Commit 8591684
committed
logging: fix incorrect vlan trace
When receiving from a hardware interface that strips VLANs (i.e. the
mbuf offload flags have RTE_MBUF_F_RX_VLAN_STRIPPED), we look in the
vlan_tci mbuf field to determine which VLAN ID to display in the traces.
When transmitting such packets after forwarding, the trace function will
wrongfully assume that the packet has a VLAN to be displayed as well.
Even though there is no VLAN header. E.g.:
[rx p0] 30:3e:a7:0b:f2:54 > 9e:a8:3f:c8:8f:72 / ...
[tx p0] 9e:a8:3f:c8:8f:72 > 0e:75:e5:da:2b:79 / VLAN id=42 / ...
[rx p1] 46:00:c4:b7:f0:95 > 5a:8d:ed:dc:a5:c8 / VLAN id=43 / ...
[tx p1] 5a:8d:ed:dc:a5:c8 > 30:3e:a7:0b:f2:55 / VLAN id=43 / ...
The packet transmitted on p1 does not carry any VLAN header on the wire
but the trace displays one anyway.
Clear the RTE_MBUF_F_RX_VLAN_STRIPPED right after reading vlan_tci in
eth_input to avoid any confusion.
Signed-off-by: Robin Jarry <[email protected]>
Reviewed-by: Christophe Fontaine <[email protected]>1 parent dbd902f commit 8591684
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
0 commit comments