From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7DCC143E36; Wed, 10 Apr 2024 14:33:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C16E402CF; Wed, 10 Apr 2024 14:33:30 +0200 (CEST) Received: from fout8-smtp.messagingengine.com (fout8-smtp.messagingengine.com [103.168.172.151]) by mails.dpdk.org (Postfix) with ESMTP id 42816402C7 for ; Wed, 10 Apr 2024 14:33:28 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id 92ED41380061; Wed, 10 Apr 2024 08:33:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 10 Apr 2024 08:33:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1712752407; x=1712838807; bh=b9ujdTjNqk15UEVb1sLDLcywD4ipn2WPq4C0tSHua7U=; b= E1JRGWDRt7kDz3SnX/utpAxV1HpK3o3YWLMOdBr7DT+d9SeCZie/J/nfsNZeqfZ/ 1HQLkFtH6xgGQQH72n/6znBCULAy6BtWTrV5IszTG1klgFD/PmywcGKel/gSjJzn 3TpCN+ahLYuNTreFC1ntbF34JRzd6TDemueYYcnikoKEkI8eXHOTeQ9liFe1YrXA prkw8qSpUQHc+732FXH2OEnQmPcEZ9pgPqK3AXmX3w6GOdko6l9ICthAXiihQWi1 nOxnt/VwXlo+CKVgntDO6bRAicKiK1K6e5/eFMj2Ks2MnSU+l/KSB1qG0z1e/hvN CIn3rob4EyOBXTIcgnKTsA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1712752407; x= 1712838807; bh=b9ujdTjNqk15UEVb1sLDLcywD4ipn2WPq4C0tSHua7U=; b=l tuxw1kUIb7ZTOzFqsDckKPHh6rv8jzXswGoVJtljzLw9qSqNHLZ93kQ+0FblXhVC FKt6KDozUvMC0AHBU06GlpG1b9GMPnmhRx23OAU+xRTIx7S0bUB7xJOC+XU0mwqE BdDdE84cNxaBHhPyzWFtNSV1qjg18RloDsif51Xwc510lCbcFBwlaipKsjFIXZSh VhUrnuKZg3Dw2PBccv6vvOHfxgTXJTGQU3aiXy+weAAji2nv6DLgB13rI5GYre58 0LopkGNRDwrE1a9QTDV/YsfiQtwbx2663QweUdv7LJIAaS5cXr7cXt4qylI8MrwQ wbQQ5HL+5LxU6kLe1GAcw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudehiedgheduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeejudevheeiveduuddtveffgfdtgeekueevjeffjeegtdeggeek gfdvuefgfeekjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Apr 2024 08:33:21 -0400 (EDT) From: Thomas Monjalon To: Yuying Zhang , Aman Singh , Ferruh Yigit , andrew.rybchenko@oktetlabs.ru, ivan.malov@arknetworks.am, dekelp@nvidia.com, psatheesh@marvell.com, adrien.mazarguil@6wind.com, fengchengwen , Huisong Li , Dengdui Huang , Jie Hai Cc: "dev@dpdk.org" , orika@nvidia.com, Dariusz Sosnowski Subject: Re: question about eth and vlan item in flow pattern Date: Wed, 10 Apr 2024 14:33:18 +0200 Message-ID: <13710271.uLZWGnKmhe@thomas> In-Reply-To: <6db61bde-eb34-d7e5-cb46-c08a3268a2a4@huawei.com> References: <6db61bde-eb34-d7e5-cb46-c08a3268a2a4@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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.