From: Thomas Monjalon <thomas@monjalon.net>
To: Yuying Zhang <yuying.zhang@intel.com>,
Aman Singh <aman.deep.singh@intel.com>,
Ferruh Yigit <ferruh.yigit@amd.com>,
andrew.rybchenko@oktetlabs.ru, ivan.malov@arknetworks.am,
dekelp@nvidia.com, psatheesh@marvell.com,
adrien.mazarguil@6wind.com,
fengchengwen <fengchengwen@huawei.com>,
Huisong Li <lihuisong@huawei.com>,
Dengdui Huang <huangdengdui@huawei.com>,
Jie Hai <haijie1@huawei.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
orika@nvidia.com, Dariusz Sosnowski <dsosnowski@nvidia.com>
Subject: Re: question about eth and vlan item in flow pattern
Date: Wed, 10 Apr 2024 14:33:18 +0200 [thread overview]
Message-ID: <13710271.uLZWGnKmhe@thomas> (raw)
In-Reply-To: <6db61bde-eb34-d7e5-cb46-c08a3268a2a4@huawei.com>
Hello,
10/04/2024 13:37, Jie Hai:
> Hi, all,
>
> I have some questions about the sub-options for ``VLAN`` and ``ETH`` item.
If it is not clear in the doxygen documentation,
please do not hesitate to submit a patch to make it more explicit.
> According to the documentation, ``has_vlan`` is sub-option of ``ETH``
> item and it means that the pattern contains at least one vlan.
Yes
> The ``VLAN`` item is used to match tagged packets and have some
> sub-options such as ``vid``, ``tci``, etc.
>
> If we combine them, what should the effect be?
> For instance,
>
> rule-0: flow create 0 ingress pattern eth has_vlan is 1 / vlan / end
> actions queue index 2 / end
I don't think the item "vlan" has any impact here.
I mean it is redundant with "has_vlan".
> rule-1: flow create 0 ingress pattern eth has_vlan is 1 / vlan vid is
> 10 / end actions queue index 2 / end
>
> For rule-0, should it match single-tagged packets only or multi-tagged
> only or both?
I would say it matches 1 VLAN or more.
> That is to say, which one will take effect, `has_vlan is 1` or `vlan`
> or both?
I think it is redundant.
The real interesting usage of "has_vlan" would be for matching untagged packets.
> For rule-2, which packets should it match, with inner VLAN id 10, or
You mean rule-1
> outer VLAN id 10, or both 10?
In case of QinQ, I suppose specifying only 1 VLAN allows to match either inner or outer.
> The hns3 driver supports only the exact matching of VLAN numer.
> And it is planned to adapt ``has_vlan`` and ``has_more_vlan`` to the
> meaning of one VLAN for hns3 driver. Therefore, if the preceding
> combinations are supported, we need to confirm the exact meanings.
>
> So, what are your views on the above question?
I'm adding Ori Kam, maintainer of rte_flow API to confirm.
next prev parent reply other threads:[~2024-04-10 12:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 11:37 Jie Hai
2024-04-10 12:33 ` Thomas Monjalon [this message]
2024-04-10 13:19 ` Ivan Malov
2024-04-23 9:34 ` Jie Hai
2024-04-23 11:44 ` Ivan Malov
2024-04-24 20:21 ` Dariusz Sosnowski
2024-04-24 21:46 ` Ivan Malov
2024-05-13 1:45 ` Jie Hai
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=13710271.uLZWGnKmhe@thomas \
--to=thomas@monjalon.net \
--cc=adrien.mazarguil@6wind.com \
--cc=aman.deep.singh@intel.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dekelp@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=fengchengwen@huawei.com \
--cc=ferruh.yigit@amd.com \
--cc=haijie1@huawei.com \
--cc=huangdengdui@huawei.com \
--cc=ivan.malov@arknetworks.am \
--cc=lihuisong@huawei.com \
--cc=orika@nvidia.com \
--cc=psatheesh@marvell.com \
--cc=yuying.zhang@intel.com \
/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).