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 8553DA0521; Tue, 3 Nov 2020 09:31:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 33299C7FE; Tue, 3 Nov 2020 09:31:25 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2C620C7FA for ; Tue, 3 Nov 2020 09:31:22 +0100 (CET) IronPort-SDR: 3r+aSCwZbQB3RWyWw6DR+6WSDYvVquCtzJ2lGLuD5i0Brehdwwl9xcivBezBjr6BRfrk9w5QAL d8uUux1enYFA== X-IronPort-AV: E=McAfee;i="6000,8403,9793"; a="186862039" X-IronPort-AV: E=Sophos;i="5.77,447,1596524400"; d="scan'208";a="186862039" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2020 00:31:07 -0800 IronPort-SDR: gDzrwQZMTBWU4DIbNNb3/frXWg8S6VXlamdmxGx0oJCBvj2vKzdqw8VC9UQHFCwPzsj4d/HFGK BRf1dvTbvL1Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,447,1596524400"; d="scan'208";a="362894670" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by FMSMGA003.fm.intel.com with ESMTP; 03 Nov 2020 00:31:07 -0800 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 3 Nov 2020 00:31:06 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX602.ccr.corp.intel.com (10.109.6.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 3 Nov 2020 16:31:04 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Tue, 3 Nov 2020 16:31:04 +0800 From: "Huang, ZhiminX" To: "Guo, Jia" , "Wu, Jingjing" , "Zhang, Qi Z" , "Xing, Beilei" CC: "dev@dpdk.org" , "Guo, Jia" Thread-Topic: [dpdk-dev] [PATCH v2] net/iavf: fix PROT filed for rss hash Thread-Index: AQHWsbUeMO12Q0DE8U21/FBNRH4lhqm2EQIg Date: Tue, 3 Nov 2020 08:31:04 +0000 Message-ID: <3d65f8ecbe2c4fd3990166a0d5b75ce2@intel.com> References: <20201103073433.22492-1-jia.guo@intel.com> In-Reply-To: <20201103073433.22492-1-jia.guo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] net/iavf: fix PROT filed for rss hash 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: Huang, ZhiminX Regards, HuangZhiMin > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jeff Guo > Sent: Tuesday, November 3, 2020 3:35 PM > To: Wu, Jingjing ; Zhang, Qi Z > ; Xing, Beilei > Cc: dev@dpdk.org; Guo, Jia > Subject: [dpdk-dev] [PATCH v2] net/iavf: fix PROT filed for rss hash >=20 > Add PROT field into IPv4 and IPv6 protocol headers for rss hash. >=20 > Fixes: 91f27b2e39ab ("net/iavf: refactor RSS") > Signed-off-by: Jeff Guo > --- > v2: > add prot into the new hdr replace of function modify > --- > drivers/net/iavf/iavf_hash.c | 32 ++++++++++++++++++++++++-------- > 1 file changed, 24 insertions(+), 8 deletions(-) >=20 > diff --git a/drivers/net/iavf/iavf_hash.c b/drivers/net/iavf/iavf_hash.c = index > b56152c5b8..804deec5fe 100644 > --- a/drivers/net/iavf/iavf_hash.c > +++ b/drivers/net/iavf/iavf_hash.c > @@ -101,11 +101,23 @@ iavf_hash_parse_pattern_action(struct > iavf_adapter *ad, > FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \ > FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST), > {BUFF_NOUSED} } >=20 > +#define proto_hdr_ipv4_with_prot { \ > + VIRTCHNL_PROTO_HDR_IPV4, \ > + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_SRC) | \ > + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_DST) | \ > + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV4_PROT), > {BUFF_NOUSED} } > + > #define proto_hdr_ipv6 { \ > VIRTCHNL_PROTO_HDR_IPV6, \ > FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \ > FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST), > {BUFF_NOUSED} } >=20 > +#define proto_hdr_ipv6_with_prot { \ > + VIRTCHNL_PROTO_HDR_IPV6, \ > + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_SRC) | \ > + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_DST) | \ > + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_IPV6_PROT), > {BUFF_NOUSED} } > + > #define proto_hdr_udp { \ > VIRTCHNL_PROTO_HDR_UDP, \ > FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_UDP_SRC_PORT) | \ @@ - > 151,13 +163,15 @@ struct virtchnl_proto_hdrs outer_ipv4_tmplt =3D { >=20 > struct virtchnl_proto_hdrs outer_ipv4_udp_tmplt =3D { > TUNNEL_LEVEL_OUTER, 5, > - {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv4, > + {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, > + proto_hdr_ipv4_with_prot, > proto_hdr_udp} > }; >=20 > struct virtchnl_proto_hdrs outer_ipv4_tcp_tmplt =3D { > TUNNEL_LEVEL_OUTER, 5, > - {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv4, > + {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, > + proto_hdr_ipv4_with_prot, > proto_hdr_tcp} > }; >=20 > @@ -174,13 +188,15 @@ struct virtchnl_proto_hdrs outer_ipv6_tmplt =3D { >=20 > struct virtchnl_proto_hdrs outer_ipv6_udp_tmplt =3D { > TUNNEL_LEVEL_OUTER, 5, > - {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv6, > + {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, > + proto_hdr_ipv6_with_prot, > proto_hdr_udp} > }; >=20 > struct virtchnl_proto_hdrs outer_ipv6_tcp_tmplt =3D { > TUNNEL_LEVEL_OUTER, 5, > - {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, proto_hdr_ipv6, > + {proto_hdr_eth, proto_hdr_svlan, proto_hdr_cvlan, > + proto_hdr_ipv6_with_prot, > proto_hdr_tcp} > }; >=20 > @@ -195,11 +211,11 @@ struct virtchnl_proto_hdrs inner_ipv4_tmplt =3D { = }; >=20 > struct virtchnl_proto_hdrs inner_ipv4_udp_tmplt =3D { > - TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv4, proto_hdr_udp} > + TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv4_with_prot, > proto_hdr_udp} > }; >=20 > struct virtchnl_proto_hdrs inner_ipv4_tcp_tmplt =3D { > - TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv4, proto_hdr_tcp} > + TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv4_with_prot, > proto_hdr_tcp} > }; >=20 > struct virtchnl_proto_hdrs inner_ipv4_sctp_tmplt =3D { @@ -211,11 +227,1= 1 > @@ struct virtchnl_proto_hdrs inner_ipv6_tmplt =3D { }; >=20 > struct virtchnl_proto_hdrs inner_ipv6_udp_tmplt =3D { > - TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv6, proto_hdr_udp} > + TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv6_with_prot, > proto_hdr_udp} > }; >=20 > struct virtchnl_proto_hdrs inner_ipv6_tcp_tmplt =3D { > - TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv6, proto_hdr_tcp} > + TUNNEL_LEVEL_INNER, 2, {proto_hdr_ipv6_with_prot, > proto_hdr_tcp} > }; >=20 > struct virtchnl_proto_hdrs inner_ipv6_sctp_tmplt =3D { > -- > 2.20.1