From: zengganghui <zengganghui@huawei.com>
To: "Doherty, Declan" <declan.doherty@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/bonding: strengthen the judgment of lacp packets
Date: Mon, 18 Sep 2017 12:50:28 +0000 [thread overview]
Message-ID: <7683DD995282C14797C50C5AB01DF6D6B8D124@DGGEMA504-MBX.china.huawei.com> (raw)
In-Reply-To: <2cbd474d-6505-9188-97ae-476a5edb16ef@intel.com>
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:
>> When the nic does not support vlan rx offload may be wrong, resulting
>> in lacp packets will not be processed.
>>
>> Signed-off-by: ZengGanghui <zengganghui@huawei.com>
>> ---
> ...
>>
>
> Acked-by: Declan Doherty <declan.doherty@intel.com>
>
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?
next prev parent reply other threads:[~2017-09-18 12:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 3:46 ZengGanghui
2017-09-04 13:19 ` Radu Nicolau
2017-10-10 19:55 ` Ferruh Yigit
2017-09-18 9:14 ` Doherty, Declan
2017-09-18 11:12 ` zengganghui
2017-09-18 12:33 ` Doherty, Declan
2017-09-18 12:50 ` zengganghui [this message]
2017-09-18 13:11 ` Doherty, Declan
2017-09-19 4:09 ` zengganghui
2017-10-03 15:49 ` Ferruh Yigit
2017-10-10 8:53 ` Doherty, Declan
-- strict thread matches above, loose matches on Subject: below --
2017-08-30 3:43 ZengGanghui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7683DD995282C14797C50C5AB01DF6D6B8D124@DGGEMA504-MBX.china.huawei.com \
--to=zengganghui@huawei.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).