rhine_get_vlan_tci(9)
π rhine_get_vlan_tci(9) β bestie edition πΈ
okay so this is a page from the Kernel API Manual and it's about one (1) little function that pulls a VLAN TCI out of your Rx buffer. it's giving "small but essential" energy and honestly? we're obsessed π
β¨ NAME β¨
rhine_get_vlan_tci β extract TCI from Rx data buffer π
like literally, that's the whole job. it reaches into your receive data buffer and pulls the TCI out. no cap.
π¦ SYNOPSIS π¦
u16 rhine_get_vlan_tci (struct sk_buff *skb , int data_size );
it returns a u16 (that's the TCI, bestie π) and it takes two things. that's it. that's the whole signature.
π ARGUMENTS π
skbβ pointer tosk_buffπ« your classic socket buffer pointer, main character of the networking world, we standata_sizeβ the used data area of the buffer, including the CRC β don't forget the CRC is in there, it's part of the count, iykyk
π DESCRIPTION π
so here's the vibe check π§ β if hardware VLAN tag extraction is enabled, and the chip says "hey this is a 802.1Q packet", then the extracted 802.1Q header lands in a very specific spot:
- it's 2 bytes TPID + 2 bytes TCI (that's the header, 4 bytes total, cute)
- it's 4-byte aligned
- and it comes following the CRC π₯
so like. TPID, TCI, aligned to 4, sitting right after the CRC. that's the whole layout. periodt. π
π SEE ALSO π
go read the kernel file ./drivers/net/ethernet/via/via-rhine.c β it's the source of truth, fr fr π and while you're in there, these are all siblings / besties in the same driver family π«Ά
rhine_set_cam(9)rhine_set_vlan_cam(9)rhine_set_cam_mask(9)rhine_set_vlan_cam_mask(9)rhine_init_cam_filter(9)rhine_update_vcam(9)
all of them. every single one. no skipping π
mwah π that's the page!! huge shoutout to the ./drivers/net/ethernet/via crew for hosting this whole thing and to October 2026 for the timestamp β slay, see u next revision π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms