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 09E3FA09E4 for ; Sun, 25 Apr 2021 04:18:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E119B41132; Sun, 25 Apr 2021 04:18:24 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 38F0E4013F; Sun, 25 Apr 2021 04:18:21 +0200 (CEST) IronPort-SDR: ouBcWsOISW4ojLldWpze4wEhXn7tZ2jorKoe/7CZ1iYma2IM6VQhEaBezTwuec90QcpnbIk9LF CzrSW0przSlA== X-IronPort-AV: E=McAfee;i="6200,9189,9964"; a="194089668" X-IronPort-AV: E=Sophos;i="5.82,249,1613462400"; d="scan'208";a="194089668" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2021 19:18:20 -0700 IronPort-SDR: wY5uHwlVYeQ9SzEqQit+Z/pdkXYit/tAKNALQlfuZDCJcp+42BXi9QhwTaB+V9qqefikv2eR30 uJ0cbfec3QKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,249,1613462400"; d="scan'208";a="422195267" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga008.fm.intel.com with ESMTP; 24 Apr 2021 19:18:19 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sat, 24 Apr 2021 19:18:18 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Sat, 24 Apr 2021 19:18:18 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Sat, 24 Apr 2021 19:18:18 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Sat, 24 Apr 2021 19:18:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TQsUTsZy040hdkokiv6Yuxj9WksicOF1rXQ7+HQqPTv2ghqv9eZswz+Nq5A8gPbBrxKq8n10Gz5B8gvXWGS9mdyHI8GTbTue/NeHXbjYLbyQig3qJl/HeGoTDiSuDi7uN0fRsLk0c1wTFIg3t3Qh78P+TbGVDuUYYXabGVjyAwmWfO5tkVxNrH6NVwH3e931kpLuAvorFxySuagYHkrbUY8BISfNYXCMzRKjj/3OuR2YijUwTGldEjXewv91KMCy9hAk5Kgkw2e+27Q/ADJq5mBKu495wHjfkz9Jj5SxtI74RTxQDdOQFGDLuuIDKruMZcopU4sBBZ3iD9loblo+zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7ySgs0efQEIpuYEiAlFki4hazvCm8uCVXM8+urHPFXA=; b=a36FsxIhNQxf9u7mOmvvz0aozMfY2wQnQr+8CMBideQ3sAeMhN80vq8EVmDSOKPM2EkB3rhma1g5gt6K26OT4lN+7Ex/4qJWyQIcHsVtFqz5OMfutp89cmn4+ecj6aqIFwYcjTHV1UHrtSUKhU4IjWpQM36NXlcM4xjewV8uIv7OQkqQTblMTGmvzasYXCqMDeVhEdzU1uJ1sIJDmCs3prYdgtfuce1AyQ7T+sVLsPxZifIMplzS3tVGV6b8o2HZS8Qt9tK31dyD+XIkoXY5fyiM4cOJmO6ruBWNUem3M+PQanq3qDtfMJFaTMOQ1Avlo22x8IGS2xYakLXsLUpVvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7ySgs0efQEIpuYEiAlFki4hazvCm8uCVXM8+urHPFXA=; b=kcjNIY5Ijd3dyn9PATNADKr0fg3U1xeCrJ2Rk+BRage/tUrwdfsw3AWhMC70nvLWemjEmjwSTCX4dI+C+oauJIIIhyBhxf5aby+v3n5b4m4P9arsdNLqg1zscghiCTpXD/3oJCzyrWSvBx7Rx9kDJHTxmffBZp7rkALzkK8vgQw= Received: from MN2PR11MB3807.namprd11.prod.outlook.com (2603:10b6:208:f0::24) by MN2PR11MB3951.namprd11.prod.outlook.com (2603:10b6:208:13b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Sun, 25 Apr 2021 02:18:06 +0000 Received: from MN2PR11MB3807.namprd11.prod.outlook.com ([fe80::e554:7a73:44fd:37b7]) by MN2PR11MB3807.namprd11.prod.outlook.com ([fe80::e554:7a73:44fd:37b7%6]) with mapi id 15.20.4065.025; Sun, 25 Apr 2021 02:18:06 +0000 From: "Xing, Beilei" To: "Zhang, AlvinX" , "Wu, Jingjing" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH v5] net/iavf: fix hash configuration on i40e VF Thread-Index: AQHXNzWUBZjccjJ87ES3iicgLdTyGqrEg0uA Date: Sun, 25 Apr 2021 02:18:05 +0000 Message-ID: References: <20210422031500.32256-1-alvinx.zhang@intel.com> <20210422050809.33164-1-alvinx.zhang@intel.com> In-Reply-To: <20210422050809.33164-1-alvinx.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.53] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c12328a1-3a5f-4a99-06ec-08d907905ca1 x-ms-traffictypediagnostic: MN2PR11MB3951: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1169; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NBn+/g1pWgFGYIu0iRUOGJkD3sGcHU9bbaiU9B+sa3EQtUv1Gu9wvmfW40r3s1jvcQk2wlaYy5cJTUHrNYbh6xzN+ERgVwd52A6/7rpo9xhW2dDg1kiR8uGCaScRnFLAkUXAU6QpXI0SWFdTLHXhFqBni++TRX2e8E9f6YKS6aUYHH1TQXABPKtE1WM/5Vw8Bd16XVPOiYt8nxUIOmTBFbwe5oyDKBR36i/BKOeGq6V5Y94ceVlZ6jLQxnHaIzeExyA65X+IqR19+NkbOgDqhrdxXkaDouZrZ+dRLrRs5EtToGcwq5B+qyLk6ClCWm2bpcGajHU+lquWwZPAf3vbUjVOIANaVtWWKznaE0TLk4yJhqg8kmx+WYxzyHsZf9777ifOHEfm2/jgv8ZtOeLl4n3TswSfotIoLsVMnSr52NHYAudWA0tHQhD4dEOJEfchQ4F0UJ3n4DqZpAJPrqkI4HXjYmWapJREpap+klrWSXEzYcdIX0XIJ+gYEhr1ps6yS541iesTiw7vXMJe4OGYkDwpN0uahRWE8ddzi6o/uwDE2Zl1vxWXZ89REIvyr7ni0IpMTEUVW4Os1Pn5w3xYuy1jD4VJ7hn8yV1KX65xows= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB3807.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(366004)(136003)(39860400002)(376002)(346002)(7696005)(8676002)(122000001)(71200400001)(110136005)(38100700002)(53546011)(6636002)(2906002)(8936002)(55016002)(4326008)(6506007)(5660300002)(33656002)(26005)(186003)(9686003)(66476007)(66446008)(450100002)(66556008)(478600001)(52536014)(64756008)(66946007)(86362001)(316002)(83380400001)(54906003)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?cAwsGxlgpp9HCiH0v+hwvMFP0Ax6Fv6ePWiREqGE37iIzsq9gCjJbG8sFm2+?= =?us-ascii?Q?JJSiyJrGW3Af9gsxTuKTSUyV+k/82BFq30CoZ5eXSS8CtC1LDIYIZxKgaCCt?= =?us-ascii?Q?Z8tetHmt25ZoCE1q0VodzdJ1KZb7ucPX1kzpRJtftJIpYn1cdslQDC6eA699?= =?us-ascii?Q?ILFTZCVcuHA7taa65E1arnYs60SgFBdGH9yxFXRpovxExfHkVSmB7CGqUJxM?= =?us-ascii?Q?4W87ZW0HJVznunyI9FA0kalVmsz96ld5ehd5UXG8mRpQ0uBnaqcu8nnx/Vou?= =?us-ascii?Q?i1GaDVSmSDzbCv1tglsFNzCldx9nIwSEX2Ya2U3HVnbg8uv9R4YRIunw2EUs?= =?us-ascii?Q?vjqphOzF+xQ9c4x5exd1MxrlOQs5qmF+3kQMhQ9AXQ4RGtp4TaIjSwpS/LkF?= =?us-ascii?Q?pk6lgM+Dlp7hc6XKz3XgUk0S+2U+nCqrN6BUAad9NJK0jpi2gRJ0PiN62Gsx?= =?us-ascii?Q?nQdOKbqBygutVK0JFqRu4hO73fLklgmqs+pdNd8i7bpwnsnFyP9kWxOHRqWf?= =?us-ascii?Q?fGGkiHNZORVPEuh/k7a5RQajRJ0iCsWTfwr21tRpHO7dCO86NQAkUYN7kG8y?= =?us-ascii?Q?SHGQofQxMjGlC6PFc1bVPX6vBRxR2C414PofqeSuxwOuQ8hb6g9VJJ9rBjWM?= =?us-ascii?Q?bmK6BzjeQGAOOwZJT8DyBOxMM6DDr+UHSwOBlegeQj8j4EWdn+yhYdMmI8zc?= =?us-ascii?Q?uKt8kwNun/+4ew6KuiXx4L/lVgb1+TqA40cqRCCeDPJnGpRubB/q6nFa+ZxA?= =?us-ascii?Q?wGUsXdcbNoDX7jN3/yQH+w8FJhFHj0T/SZaW4q9gzlVCvvdwV43QNX3XvYEi?= =?us-ascii?Q?JETtwATkZorczA4jUdVdgnWHg6ZBAI2BNjfCkftwmanMsgIqmGjT5XZVxwWq?= =?us-ascii?Q?VtP2SWj4k7VM6DsE1zF0MUbuEyxonksvWDaW/S+22BUoIHlEcH9A0Y9UHC8i?= =?us-ascii?Q?eIkfBa6Abf+D5PA5j+GEuRUL4MgdWadUoIPP5QvmDdAZ59n4RJGRtZeRW/W6?= =?us-ascii?Q?xo1bg5GJnkmsBy59YmYFzyaiFxPVURfXsLOyK+zi844UjOwkVOKyJ4npQmVC?= =?us-ascii?Q?Umr4wR9HOqrko50YW6BZVlB936FI0teMjk/hXZpvN+nSh/aRAR2TRqxXQqWk?= =?us-ascii?Q?3UeDJRtdfZ50b2EPDFyenztP+JvTmzI34+U4C4s35Rz2jX200DV+LEMDJ4KW?= =?us-ascii?Q?W+IWxNDja66qyHUXMOgvbAUZWn6J7VnXICIGSy24VBCkk9Xfd6dwDMAfHL6d?= =?us-ascii?Q?tiND+V6Z4VfQ2Hec+t0pNGn7rCBKGne8n5OJYS0W8SeIfkG6WUd5HeqSe93o?= =?us-ascii?Q?7vA03KeCzNCv1VN5x8ROhTOk?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR11MB3807.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c12328a1-3a5f-4a99-06ec-08d907905ca1 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Apr 2021 02:18:05.9438 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: WdHxhZSBgwEyE755pVLPAM/eb2BA3OckXKqTSiW5KEL0dG4E1UwIjW86BLJ+9Th72kGny7vz5X9O6m1YP6jIYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3951 X-OriginatorOrg: intel.com Subject: Re: [dpdk-stable] [PATCH v5] net/iavf: fix hash configuration on i40e VF X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > -----Original Message----- > From: Zhang, AlvinX > Sent: Thursday, April 22, 2021 1:08 PM > To: Wu, Jingjing ; Xing, Beilei > Cc: dev@dpdk.org; Zhang, AlvinX ; stable@dpdk.org > Subject: [PATCH v5] net/iavf: fix hash configuration on i40e VF >=20 > In i40evf PMD, the VF directly accesses the hash enable registers to enab= le or > disable hashing on ingress packets. When binding i40e VF to iavf, because= the > PF doesn't support VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF capability. > Therefore, the VF hashing cannot be enabled. Better to descript what's the issue first and then give the root cause. >=20 > This patch adds support of hash configuration for i40e VF by sending > VIRTCHNL_OP_SET_RSS_HENA message to the PF after checking that the PF > does not support VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF capability. >=20 > Fixes: c678299594a8 ("net/iavf: fix default RSS configuration") > Cc: stable@dpdk.org >=20 > Signed-off-by: Alvin Zhang > --- >=20 > v2: Update commit log. > v3: Increase compatibility with old drivers. > v4: Fix compile issues. > v5: Rebase to 1b593b9c832e9b284cc59665fe662242a3fc1daf. > --- > drivers/net/iavf/iavf.h | 1 + > drivers/net/iavf/iavf_ethdev.c | 111 > ++++++++++++++++++++++++++++++++++++++++- > drivers/net/iavf/iavf_vchnl.c | 45 ++++++++++++++--- > 3 files changed, 150 insertions(+), 7 deletions(-) >=20 > diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index > d1ae5a3..1e73f01 100644 > --- a/drivers/net/iavf/iavf.h > +++ b/drivers/net/iavf/iavf.h > @@ -336,6 +336,7 @@ int iavf_fdir_check(struct iavf_adapter *adapter, > struct iavf_fdir_conf *filter); > int iavf_add_del_rss_cfg(struct iavf_adapter *adapter, > struct virtchnl_rss_cfg *rss_cfg, bool add); > +int iavf_get_hena_caps(struct iavf_adapter *adapter, uint64_t *caps); > int iavf_set_hena(struct iavf_adapter *adapter, uint64_t hena); int > iavf_rss_hash_set(struct iavf_adapter *ad, uint64_t rss_hf, bool add); i= nt > iavf_add_del_mc_addr_list(struct iavf_adapter *adapter, diff --git > a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index > d523a06..97a2dc7 100644 > --- a/drivers/net/iavf/iavf_ethdev.c > +++ b/drivers/net/iavf/iavf_ethdev.c > @@ -246,6 +246,107 @@ struct rte_iavf_xstats_name_off { } >=20 > static int > +iavf_config_rss_hf(struct iavf_adapter *adapter, uint64_t rss_hf) { > + static const uint64_t map_hena_rss[] =3D { > + /* IPv4 */ > + [IAVF_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP] =3D > + ETH_RSS_NONFRAG_IPV4_UDP, > + [IAVF_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP] =3D > + ETH_RSS_NONFRAG_IPV4_UDP, > + [IAVF_FILTER_PCTYPE_NONF_IPV4_UDP] =3D > + ETH_RSS_NONFRAG_IPV4_UDP, > + [IAVF_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK] =3D > + ETH_RSS_NONFRAG_IPV4_TCP, > + [IAVF_FILTER_PCTYPE_NONF_IPV4_TCP] =3D > + ETH_RSS_NONFRAG_IPV4_TCP, > + [IAVF_FILTER_PCTYPE_NONF_IPV4_SCTP] =3D > + ETH_RSS_NONFRAG_IPV4_SCTP, > + [IAVF_FILTER_PCTYPE_NONF_IPV4_OTHER] =3D > + ETH_RSS_NONFRAG_IPV4_OTHER, > + [IAVF_FILTER_PCTYPE_FRAG_IPV4] =3D ETH_RSS_FRAG_IPV4, > + > + /* IPv6 */ > + [IAVF_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP] =3D > + ETH_RSS_NONFRAG_IPV6_UDP, > + [IAVF_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP] =3D > + ETH_RSS_NONFRAG_IPV6_UDP, > + [IAVF_FILTER_PCTYPE_NONF_IPV6_UDP] =3D > + ETH_RSS_NONFRAG_IPV6_UDP, > + [IAVF_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK] =3D > + ETH_RSS_NONFRAG_IPV6_TCP, > + [IAVF_FILTER_PCTYPE_NONF_IPV6_TCP] =3D > + ETH_RSS_NONFRAG_IPV6_TCP, > + [IAVF_FILTER_PCTYPE_NONF_IPV6_SCTP] =3D > + ETH_RSS_NONFRAG_IPV6_SCTP, > + [IAVF_FILTER_PCTYPE_NONF_IPV6_OTHER] =3D > + ETH_RSS_NONFRAG_IPV6_OTHER, > + [IAVF_FILTER_PCTYPE_FRAG_IPV6] =3D ETH_RSS_FRAG_IPV6, > + > + /* L2 Payload */ > + [IAVF_FILTER_PCTYPE_L2_PAYLOAD] =3D ETH_RSS_L2_PAYLOAD > + }; > + > + const uint64_t ipv4_rss =3D ETH_RSS_NONFRAG_IPV4_UDP | > + ETH_RSS_NONFRAG_IPV4_TCP | > + ETH_RSS_NONFRAG_IPV4_SCTP | > + ETH_RSS_NONFRAG_IPV4_OTHER | > + ETH_RSS_FRAG_IPV4; > + > + const uint64_t ipv6_rss =3D ETH_RSS_NONFRAG_IPV6_UDP | > + ETH_RSS_NONFRAG_IPV6_TCP | > + ETH_RSS_NONFRAG_IPV6_SCTP | > + ETH_RSS_NONFRAG_IPV6_OTHER | > + ETH_RSS_FRAG_IPV6; > + > + struct iavf_info *vf =3D IAVF_DEV_PRIVATE_TO_VF(adapter); > + uint64_t caps =3D 0, hena =3D 0, valid_rss_hf =3D 0; > + uint32_t i; > + int ret; > + > + ret =3D iavf_get_hena_caps(adapter, &caps); > + if (ret) > + return ret; > + /** > + * ETH_RSS_IPV4 and ETH_RSS_IPV6 can be considered as 2 > + * generalizations of all other IPv4 and IPv6 RSS types. > + */ > + if (rss_hf & ETH_RSS_IPV4) > + rss_hf |=3D ipv4_rss; > + > + if (rss_hf & ETH_RSS_IPV6) > + rss_hf |=3D ipv6_rss; > + > + RTE_BUILD_BUG_ON(RTE_DIM(map_hena_rss) > sizeof(uint64_t) * > CHAR_BIT); > + > + for (i =3D 0; i < RTE_DIM(map_hena_rss); i++) { > + uint64_t bit =3D BIT_ULL(i); > + > + if ((caps & bit) && (map_hena_rss[i] & rss_hf)) { > + valid_rss_hf |=3D map_hena_rss[i]; > + hena |=3D bit; > + } > + } > + > + ret =3D iavf_set_hena(adapter, hena); > + if (ret) > + return ret; > + > + if (valid_rss_hf & ipv4_rss) > + valid_rss_hf |=3D rss_hf & ETH_RSS_IPV4; > + > + if (valid_rss_hf & ipv6_rss) > + valid_rss_hf |=3D rss_hf & ETH_RSS_IPV6; > + > + if (rss_hf & ~valid_rss_hf) > + PMD_DRV_LOG(WARNING, "Unsupported rss_hf 0x%" PRIx64, > + rss_hf & ~valid_rss_hf); > + > + vf->rss_hf =3D valid_rss_hf; > + return 0; > +} > + > +static int > iavf_init_rss(struct iavf_adapter *adapter) { > struct iavf_info *vf =3D IAVF_DEV_PRIVATE_TO_VF(adapter); @@ -301,6 > +402,10 @@ struct rte_iavf_xstats_name_off { > PMD_DRV_LOG(ERR, "fail to set default RSS"); > return ret; > } > + } else { > + ret =3D iavf_config_rss_hf(adapter, rss_conf->rss_hf); > + if (ret !=3D -ENOTSUP) > + return ret; > } >=20 > return 0; > @@ -1282,6 +1387,10 @@ static int iavf_config_rx_queues_irqs(struct > rte_eth_dev *dev, > PMD_DRV_LOG(ERR, "fail to set new RSS"); > return ret; > } > + } else { > + ret =3D iavf_config_rss_hf(adapter, rss_conf->rss_hf); > + if (ret !=3D -ENOTSUP) > + return ret; > } >=20 > return 0; > @@ -2096,7 +2205,7 @@ static int iavf_parse_devargs(struct rte_eth_dev > *dev) > struct iavf_info *vf =3D IAVF_DEV_PRIVATE_TO_VF(adapter); > int ret =3D 0; >=20 > - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF) { > + if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) { > /* Set hena =3D 0 to ask PF to cleanup all existing RSS. */ > ret =3D iavf_set_hena(adapter, 0); > if (ret) > diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.= c index > 45096cb..8f2df0a 100644 > --- a/drivers/net/iavf/iavf_vchnl.c > +++ b/drivers/net/iavf/iavf_vchnl.c > @@ -9,6 +9,7 @@ > #include > #include > #include > +#include > #include > #include >=20 > @@ -228,13 +229,19 @@ > rte_delay_ms(ASQ_DELAY_MS); > /* If don't read msg or read sys event, continue */ > } while (i++ < MAX_TRY_TIMES); > - /* If there's no response is received, clear command */ > - if (i >=3D MAX_TRY_TIMES || > - vf->cmd_retval !=3D VIRTCHNL_STATUS_SUCCESS) { > - err =3D -1; > - PMD_DRV_LOG(ERR, "No response or return failure > (%d)" > - " for cmd %d", vf->cmd_retval, args->ops); > + > + if (i >=3D MAX_TRY_TIMES) { > + PMD_DRV_LOG(ERR, "No response for cmd %d", args- > >ops); > _clear_cmd(vf); > + err =3D -EIO; > + } else if (vf->cmd_retval =3D=3D > + (uint32_t)VIRTCHNL_STATUS_ERR_NOT_SUPPORTED) > { > + PMD_DRV_LOG(ERR, "Cmd %d not supported", args- > >ops); > + err =3D -ENOTSUP; > + } else if (vf->cmd_retval !=3D VIRTCHNL_STATUS_SUCCESS) { > + PMD_DRV_LOG(ERR, "Return failure %d for cmd %d", > + vf->cmd_retval, args->ops); > + err =3D -EINVAL; Seems it's not related to the issue, better to split them. > } > break; > } > @@ -1496,6 +1503,32 @@ > } >=20 > int > +iavf_get_hena_caps(struct iavf_adapter *adapter, uint64_t *caps) { > + struct iavf_info *vf =3D IAVF_DEV_PRIVATE_TO_VF(adapter); > + struct iavf_cmd_info args; > + int err; > + > + assert(caps); Why need assert here? Can we remove it? > + > + args.ops =3D VIRTCHNL_OP_GET_RSS_HENA_CAPS; > + args.in_args =3D NULL; > + args.in_args_size =3D 0; > + args.out_buffer =3D vf->aq_resp; > + args.out_size =3D IAVF_AQ_BUF_SZ; > + > + err =3D iavf_execute_vf_cmd(adapter, &args); > + if (err) { > + PMD_DRV_LOG(ERR, > + "Failed to execute command of > OP_GET_RSS_HENA_CAPS"); > + return err; > + } > + > + *caps =3D ((struct virtchnl_rss_hena *)args.out_buffer)->hena; > + return 0; > +} > + > +int > iavf_set_hena(struct iavf_adapter *adapter, uint64_t hena) { > struct iavf_info *vf =3D IAVF_DEV_PRIVATE_TO_VF(adapter); > -- > 1.8.3.1