* Does rte_net_get_ptype() support processing packets with two 0x8100 VLAN tags?
@ 2025-07-02 2:38 huangdengdui
2025-07-02 5:56 ` Morten Brørup
0 siblings, 1 reply; 3+ messages in thread
From: huangdengdui @ 2025-07-02 2:38 UTC (permalink / raw)
To: dev
Cc: stephen, jasvinder.singh, thomas, aman.deep.singh, lihuisong,
fengchengwen, liuyonglong
Hi everyone,
The current rte_net_get_ptype() only supports parsing packets with a single 0x8100 VLAN tag and two 0x88a8 VLAN tags,
but does not support processing packets with two 0x8100 VLAN tags.
Some network cards (e.g., hns3) do support parsing packets with two 0x8100 VLAN tags.
Can this API be extended to support such packets?
I understand that two 0x8100 VLAN tag packets aren't commonly used, so I'm uncertain whether adding support is necessary.
Anyone is welcome to discuss this and share their opinions.
Thanks,
/Dengdui
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Does rte_net_get_ptype() support processing packets with two 0x8100 VLAN tags?
2025-07-02 2:38 Does rte_net_get_ptype() support processing packets with two 0x8100 VLAN tags? huangdengdui
@ 2025-07-02 5:56 ` Morten Brørup
2025-07-02 7:26 ` huangdengdui
0 siblings, 1 reply; 3+ messages in thread
From: Morten Brørup @ 2025-07-02 5:56 UTC (permalink / raw)
To: huangdengdui, dev
Cc: stephen, jasvinder.singh, thomas, aman.deep.singh, lihuisong,
fengchengwen, liuyonglong
> From: huangdengdui [mailto:huangdengdui@huawei.com]
> Sent: Wednesday, 2 July 2025 04.38
>
> Hi everyone,
>
> The current rte_net_get_ptype() only supports parsing packets with a
> single 0x8100 VLAN tag and two 0x88a8 VLAN tags,
> but does not support processing packets with two 0x8100 VLAN tags.
>
> Some network cards (e.g., hns3) do support parsing packets with two
> 0x8100 VLAN tags.
> Can this API be extended to support such packets?
It already does; the layers parameter must have RTE_PTYPE_INNER_L2_MASK set.
>
> I understand that two 0x8100 VLAN tag packets aren't commonly used, so
> I'm uncertain whether adding support is necessary.
AFAIR, it's called "VLAN Stacking".
Stacking two 0x8100 VLAN tags is commonly used.
E.g. the majority of consumer fiber internet connections in Denmark use VLAN Stacking (not QinQ) at the network owners' Points-of-Interconnect for the service providers to identify individual homes.
>
> Anyone is welcome to discuss this and share their opinions.
>
> Thanks,
> /Dengdui
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Does rte_net_get_ptype() support processing packets with two 0x8100 VLAN tags?
2025-07-02 5:56 ` Morten Brørup
@ 2025-07-02 7:26 ` huangdengdui
0 siblings, 0 replies; 3+ messages in thread
From: huangdengdui @ 2025-07-02 7:26 UTC (permalink / raw)
To: Morten Brørup, dev
Cc: stephen, jasvinder.singh, thomas, aman.deep.singh, lihuisong,
fengchengwen, liuyonglong
On 2025/7/2 13:56, Morten Brørup wrote:
>> From: huangdengdui [mailto:huangdengdui@huawei.com]
>> Sent: Wednesday, 2 July 2025 04.38
>>
>> Hi everyone,
>>
>> The current rte_net_get_ptype() only supports parsing packets with a
>> single 0x8100 VLAN tag and two 0x88a8 VLAN tags,
>> but does not support processing packets with two 0x8100 VLAN tags.
>>
>> Some network cards (e.g., hns3) do support parsing packets with two
>> 0x8100 VLAN tags.
>> Can this API be extended to support such packets?
>
> It already does; the layers parameter must have RTE_PTYPE_INNER_L2_MASK set.
Yes, by setting RTE_PTYPE_INNER_L2_MASK, packets with two 0x8100 VLAN tags can be parsed,
but they will be recognized as tunnel packets even though they are not actually tunnel packets.
The current branch that parses the 0x8100 VLAN tag only handles a single VLAN tag[1][2].
Should we extend it to support parsing two or more 0x8100 VLAN tags?
[1]https://elixir.bootlin.com/dpdk/v25.07-rc2/source/lib/net/rte_net.c#L348
[2]https://elixir.bootlin.com/dpdk/v25.07-rc2/source/lib/net/rte_net.c#L500
>
>>
>> I understand that two 0x8100 VLAN tag packets aren't commonly used, so
>> I'm uncertain whether adding support is necessary.
>
> AFAIR, it's called "VLAN Stacking".
> Stacking two 0x8100 VLAN tags is commonly used.
> E.g. the majority of consumer fiber internet connections in Denmark use VLAN Stacking (not QinQ) at the network owners' Points-of-Interconnect for the service providers to identify individual homes.
Oh, I'm not very familiar with this. If stacking two 0x8100 VLAN tags is a commonly used, it would make sense for rte_net_get_ptype() to support parsing such packets.
>
>>
>> Anyone is welcome to discuss this and share their opinions.
>>
>> Thanks,
>> /Dengdui
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-02 7:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-02 2:38 Does rte_net_get_ptype() support processing packets with two 0x8100 VLAN tags? huangdengdui
2025-07-02 5:56 ` Morten Brørup
2025-07-02 7:26 ` huangdengdui
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).