From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 462C6A04E6; Wed, 18 Nov 2020 03:23:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 08B8258C4; Wed, 18 Nov 2020 03:23:39 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 51DCE37B1 for ; Wed, 18 Nov 2020 03:23:34 +0100 (CET) IronPort-SDR: 3uP6X68a1FeUE6lCl0DnNXko7eAnXmJ/mAAjM4iZ5W0KSYrdyhjIBCE4hHRbRdJlVaz/T4Uyrq 1FwUybmQ1DMQ== X-IronPort-AV: E=McAfee;i="6000,8403,9808"; a="170271066" X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="log'?scan'208";a="170271066" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2020 18:23:32 -0800 IronPort-SDR: cwOn5dXURTpZPfPTp6zY6N6Gvn59LqQVdiYlU90YEmWWalHXfNhZmPAo6Ud1coWaaseS/5fX2u +7meYOX2I4jA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="log'?scan'208";a="532455199" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga006.fm.intel.com with ESMTP; 17 Nov 2020 18:23:32 -0800 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 17 Nov 2020 18:23:31 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX603.ccr.corp.intel.com (10.109.6.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 18 Nov 2020 10:23:29 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Wed, 18 Nov 2020 10:23:29 +0800 From: "Zhou, JunX W" To: Xiaoyu Min , "Singh, Jasvinder" , "Dumitrescu, Cristian" CC: "dev@dpdk.org" , Dekel Peled Thread-Topic: [dpdk-dev] [PATCH 5/5] net/softnic: update headers size calculation Thread-Index: AQHWu+4jTa8q5olUCU+Yt1hRExsn8anNKx4A Date: Wed, 18 Nov 2020 02:23:28 +0000 Message-ID: References: <0bbc7b578dc8ad9348e802e2553de977805f80db.1605493464.git.jackmin@nvidia.com> In-Reply-To: <0bbc7b578dc8ad9348e802e2553de977805f80db.1605493464.git.jackmin@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 5/5] net/softnic: update headers size calculation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" Tested-by: Zhou, Jun -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xiaoyu Min Sent: Monday, November 16, 2020 3:55 PM To: Singh, Jasvinder ; Dumitrescu, Cristian Cc: dev@dpdk.org; Dekel Peled Subject: [dpdk-dev] [PATCH 5/5] net/softnic: update headers size calculatio= n From: Dekel Peled The rte_flow_item_eth and rte_flow_item_vlan items were updated in [1]. The rte_flow_item_ipv6 item was updated in [2]. The structs now contain additional metadata following the header data. The size to use for match should be the header data size only, and not the = size of the whole struct. This patch replaces the rte_flow_item_* with the corresponding rte_*_hdr. [1]:commit 09315fc83861 ("ethdev: add VLAN attributes to ethernet and VLAN items") [2]: commit ad976bd40d28 ("ethdev: add extensions attributes to IPv6 item") Signed-off-by: Dekel Peled --- drivers/net/softnic/rte_eth_softnic_flow.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/softnic/rte_eth_softnic_flow.c b/drivers/net/softn= ic/rte_eth_softnic_flow.c index f05ff092fa..7925bad1c0 100644 --- a/drivers/net/softnic/rte_eth_softnic_flow.c +++ b/drivers/net/softnic/rte_eth_softnic_flow.c @@ -169,22 +169,22 @@ flow_item_is_proto(enum rte_flow_item_type type, =20 case RTE_FLOW_ITEM_TYPE_ETH: *mask =3D &rte_flow_item_eth_mask; - *size =3D sizeof(struct rte_flow_item_eth); + *size =3D sizeof(struct rte_ether_hdr); return 1; /* TRUE */ =20 case RTE_FLOW_ITEM_TYPE_VLAN: *mask =3D &rte_flow_item_vlan_mask; - *size =3D sizeof(struct rte_flow_item_vlan); + *size =3D sizeof(struct rte_vlan_hdr); return 1; =20 case RTE_FLOW_ITEM_TYPE_IPV4: *mask =3D &rte_flow_item_ipv4_mask; - *size =3D sizeof(struct rte_flow_item_ipv4); + *size =3D sizeof(struct rte_ipv4_hdr); return 1; =20 case RTE_FLOW_ITEM_TYPE_IPV6: *mask =3D &rte_flow_item_ipv6_mask; - *size =3D sizeof(struct rte_flow_item_ipv6); + *size =3D sizeof(struct rte_ipv6_hdr); return 1; =20 case RTE_FLOW_ITEM_TYPE_ICMP: -- 2.25.1