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 A6C74A0C47; Tue, 6 Jul 2021 14:28:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D6EE41262; Tue, 6 Jul 2021 14:28:49 +0200 (CEST) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id 5C5144120E for ; Tue, 6 Jul 2021 14:28:48 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0D8C65C0638; Tue, 6 Jul 2021 08:28:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 06 Jul 2021 08:28:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= qugfctv7vsegFeOakcWPpdjafLYywK9PcIhgUh8xJa4=; b=lvJToBV/cJnFI7ip CZiybsVRqGaav2FtMRVws9qPZqGcVLe5o9TQaOzMyt8crg+jZCdLRWoKSq4y+xjk pvxMrsf0s7L3gHreWCH2tfXBnQd5QCk9hK76ULP4lTvRP6Ha2l7pQrf0kdmZxo/5 sOtIgnJu+t7KWA8RERQZ2fI/IYzRqXb99WJSflojNJpO5uBUQoAQa+1FZ8Ij0oFa cXPxDAmgCO0TrjInyI+ZgvT3217ctDcRJ5Rr8H+/fDLh2ss3n75KxafOUleY5g7V d27T8QaJkcvvIBB1nt3OfM6i0MS64lWibexy2Ej8mzg7CiYbItyt7UjwHyDJos/7 w8OGdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=qugfctv7vsegFeOakcWPpdjafLYywK9PcIhgUh8xJ a4=; b=GrQQVdT8PS2d9/fxJceUZWOMbCKDx8wHdQ1k7eHag5rRKZet3nxAkQkpw 1G6vV0V1HXbt9a13CpgwaYf45QvEM+8NcjVI08oGkD24fRBmqBhO9O5/PwvbIKQM d0OC1HJopBKSdY0+qbWPS+SLkjHT4KK1P4dDQcZnNgaGmglP8ESePhSlxTfM29Qd tAGavhRmUAwiXludkLQRnedQBUMC6nglEoUeJT+awHklxIckveOm6RYOHh9n5tS3 7x9dksN1AXGb6H+wD+OPUUGDPh6ZFlONL4ZD17iPa4K3z5WEhikTDxjrpQckTFBi X9Vun5Y7ldROkB+I5QyyPfq+szuNw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrtddtgdduudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 6 Jul 2021 08:28:44 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: matan@nvidia.com, viacheslavo@nvidia.com, orika@nvidia.com, Xiaoyun Li , rasland@nvidia.com, rongwei liu , andrew.rybchenko@oktetlabs.ru, david.marchand@redhat.com, ajit.khaparde@broadcom.com Date: Tue, 06 Jul 2021 14:28:42 +0200 Message-ID: <5766443.s2oXsmogDv@thomas> In-Reply-To: <20210705095020.1120216-3-rongweil@nvidia.com> References: <20210705095020.1120216-1-rongweil@nvidia.com> <20210705095020.1120216-3-rongweil@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 2/2] app/testpmd: support VXLAN last 8-bits field matching 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 Sender: "dev" +Cc more people 05/07/2021 11:50, rongwei liu: > Add a new testpmd pattern field 'last_rsvd' that supports the > last 8-bits matching of VXLAN header. > > The examples for the "last_rsvd" pattern field are as below: > > 1. ...pattern eth / ipv4 / udp / vxlan last_rsvd is 0x80 / end ... > > This flow will exactly match the last 8-bits to be 0x80. > > 2. ...pattern eth / ipv4 / udp / vxlan last_rsvd spec 0x80 > vxlan mask 0x80 / end ... > > This flow will only match the MSB of the last 8-bits to be 1. > > Signed-off-by: rongwei liu > Acked-by: Viacheslav Ovsiienko > --- > app/test-pmd/cmdline_flow.c | 9 +++++++++ > app/test-pmd/util.c | 5 +++-- > doc/guides/rel_notes/release_21_08.rst | 7 +++++++ > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 1 + > 4 files changed, 20 insertions(+), 2 deletions(-) > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 1c587bb7b8..6e76a625ca 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -207,6 +207,7 @@ enum index { > ITEM_SCTP_CKSUM, > ITEM_VXLAN, > ITEM_VXLAN_VNI, > + ITEM_VXLAN_LAST_RSVD, > ITEM_E_TAG, > ITEM_E_TAG_GRP_ECID_B, > ITEM_NVGRE, > @@ -1129,6 +1130,7 @@ static const enum index item_sctp[] = { > > static const enum index item_vxlan[] = { > ITEM_VXLAN_VNI, > + ITEM_VXLAN_LAST_RSVD, > ITEM_NEXT, > ZERO, > }; > @@ -2806,6 +2808,13 @@ static const struct token token_list[] = { > .next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param), > .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, vni)), > }, > + [ITEM_VXLAN_LAST_RSVD] = { > + .name = "last_rsvd", > + .help = "VXLAN last reserved bits", > + .next = NEXT(item_vxlan, NEXT_ENTRY(UNSIGNED), item_param), > + .args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_vxlan, > + rsvd1)), > + }, > [ITEM_E_TAG] = { > .name = "e_tag", > .help = "match E-Tag header", > diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c > index a9e431a8b2..59626518d5 100644 > --- a/app/test-pmd/util.c > +++ b/app/test-pmd/util.c > @@ -266,8 +266,9 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], > vx_vni = rte_be_to_cpu_32(vxlan_hdr->vx_vni); > MKDUMPSTR(print_buf, buf_size, cur_len, > " - VXLAN packet: packet type =%d, " > - "Destination UDP port =%d, VNI = %d", > - packet_type, udp_port, vx_vni >> 8); > + "Destination UDP port =%d, VNI = %d, " > + "last_rsvd = %d", packet_type, > + udp_port, vx_vni >> 8, vx_vni & 0xff); > } > } > MKDUMPSTR(print_buf, buf_size, cur_len, > diff --git a/doc/guides/rel_notes/release_21_08.rst b/doc/guides/rel_notes/release_21_08.rst > index a6ecfdf3ce..ad89af8466 100644 > --- a/doc/guides/rel_notes/release_21_08.rst > +++ b/doc/guides/rel_notes/release_21_08.rst > @@ -55,6 +55,12 @@ New Features > Also, make sure to start the actual text at the margin. > ======================================================= > > +* **Updated Mellanox mlx5 driver.** > + > + Updated the Mellanox mlx5 driver with new features and improvements, including: > + > + * Added support for matching on vxlan header last 8-bits reserved field. > + > > Removed Items > ------------- > @@ -136,3 +142,4 @@ Tested Platforms > This section is a comment. Do not overwrite or remove it. > Also, make sure to start the actual text at the margin. > ======================================================= > + > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 33857acf54..4ca3103067 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -3694,6 +3694,7 @@ This section lists supported pattern items and their attributes, if any. > - ``vxlan``: match VXLAN header. > > - ``vni {unsigned}``: VXLAN identifier. > + - ``last_rsvd {unsigned}``: VXLAN last reserved 8-bits. > > - ``e_tag``: match IEEE 802.1BR E-Tag header. > >