rtl8366_obtain_mc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ rtl8366_obtain_mc(9) πŸ¦‹

okay so bestie, welcome to the rtl8366_obtain_mc(9) page β€” yes that's the whole manual name, we're in the Kernel API Manual today and honestly? iconic behavior. this is the function that either finds you a VLAN member config or makes you a fresh one, no cap. let's get into it πŸ’…


✨ NAME ✨

rtl8366_obtain_mc β€” retrieve or allocate a VLAN member configuration πŸŽ€

like, retrieve it if it exists, allocate it if it doesn't. she does both. main character energy fr fr.


🌸 SYNOPSIS 🌸

int rtl8366_obtain_mc (struct realtek_priv *priv , int vid , struct
       rtl8366_vlan_mc *vlanmc );

that's the whole vibe check right there. returns an int, takes three args. copy it exactly, don't @ me 😭


πŸ’– ARGUMENTS πŸ’–

  • priv β€” the Realtek SMI device instance. this is your device bestie, the whole actual hardware situation you're talking to 🫢
  • vid β€” the VLAN ID to look up or allocate. so like, which VLAN are we talking about here, that one ✨
  • vlanmc β€” the pointer will be assigned to a pointer to a valid member config if successful. yes that's a pointer to a pointer, it's giving inception but it's fine, she's valid πŸ‘‘

πŸ”₯ RETURN πŸ”₯

index of a new member config or negative error number πŸ’€

so if it's >= 0 you got yourself an index and you're thriving. if it's negative, something went sideways, go check your error handling babes.


🧚 SEE ALSO 🧚

Kernel file ./drivers/net/dsa/realtek/rtl8366-core.c β€” that's where the source lives, go read it, it's lowkey fascinating 🌈


ngl bestie, the member config pointer only gets assigned if successful β€” so don't go dereferencing vlanmc before you've checked that return value, that's the whole plot twist πŸ™ˆ

and that's the page!! mwah πŸ’‹

source & version vibes: ./drivers/net/dsa/realtek β€” dated October 2026, so she's fresh, she's current, she's slay ⭐

πŸ“¦ where this page comes from