af-packet: Add flag to distinguish VID 0 from no-vlan.
Currently, user-space cannot determine if a 0 tcp_vlan_tci means there is no VLAN tag or the VLAN ID was zero. Add flag to make this explicit. User-space can check for TP_STATUS_VLAN_VALID || tp_vlan_tci > 0, which will be backwards compatible. Older could would have just checked for tp_vlan_tci, so it will work no worse than before. Signed-off-by: Ben Greear <greearb@candelatech.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
41be5a4a36
commit
a3bcc23e89
2 changed files with 13 additions and 3 deletions
|
@ -70,6 +70,7 @@ struct tpacket_auxdata {
|
|||
#define TP_STATUS_COPY 0x2
|
||||
#define TP_STATUS_LOSING 0x4
|
||||
#define TP_STATUS_CSUMNOTREADY 0x8
|
||||
#define TP_STATUS_VLAN_VALID 0x10 /* auxdata has valid tp_vlan_tci */
|
||||
|
||||
/* Tx ring - header status */
|
||||
#define TP_STATUS_AVAILABLE 0x0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue