Thread (11 messages) 11 messages, 4 authors, 2017-10-10

Re: [PATCH] net/bonding: strengthen the judgment of lacp packets

From: zengganghui <hidden>
Date: 2017-09-18 12:50:34

All mbuf packets have been init to zero when pktmbuf pool create. So judgment this flag is safe, whether or not support VLAN stripping.

BR.
Zeng Ganghui
Huawei Technologies Co., Ltd.

-----Original Message-----
From: Doherty, Declan [mailto:declan.doherty@intel.com] 
Sent: Monday, September 18, 2017 8:34 PM
To: zengganghui; dev@dpdk.org
Subject: Re: [PATCH] net/bonding: strengthen the judgment of lacp packets

On 18/09/2017 12:12 PM, zengganghui wrote:
For example, when packets received from an MLX network card, the value of mbuf->vlan_tci is a random value. So that this value cannot be used to determine whether VLAN packets . We need to judgment mbuf->ol_flags first.

BR.
Zeng Ganghui
Huawei Technologies Co., Ltd.

-----Original Message-----
From: Doherty, Declan [mailto:declan.doherty@intel.com]
Sent: Monday, September 18, 2017 5:14 PM
To: zengganghui; dev@dpdk.org
Subject: Re: [PATCH] net/bonding: strengthen the judgment of lacp 
packets

On 30/08/2017 4:46 AM, ZengGanghui wrote:
quoted
When the nic does not support vlan rx offload may be wrong, resulting 
in lacp packets will not be processed.

Signed-off-by: ZengGanghui <redacted>
---
...
quoted
Acked-by: Declan Doherty <redacted>
Ok, I see your point. A LACP PDU can't be encapsulated in a VLAN packet anyway, as it is link local traffic. So a check for ol_flags & PKT_RX_VLAN_PKT != 0 should be sufficient, otherwise if the PKT_RX_VLAN_PKT flag is true the packet cannot be link local and therefore a LACP PDU. I think that it's safe to assume all PMDs must set this flag if VLAN stripping is enabled?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help