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 C84F7A0547 for ; Mon, 21 Jun 2021 03:11:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99FB94003F; Mon, 21 Jun 2021 03:11:13 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2074.outbound.protection.outlook.com [40.107.212.74]) by mails.dpdk.org (Postfix) with ESMTP id 0C7C54003F for ; Mon, 21 Jun 2021 03:11:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l4V+CYpj5owpilKpSq4sgWoVSJ0T5xb9Bcfc2fYUncvodtZXurO/NmrlzI0OTcBYNClapFz4QpJ4Kjk0wxu1PT8byYj7U1TN2XPj4fvCAyeJikOv1bkVNpMEyGauqK2dB9qCAW4QoAov3w3As/Se2hsqwPTxZgdB6ZBa+n03I3BK1azMM5QXIj+g5mmMLmvejVdcX0aiB43S5gZP0UshDfDDZbtRYN0TQ4zyjlB6GyyAWVb4mWJjY3bI1aRMOo8rEgy6V6fKhtmAE+Uz+KG5fAHcmS5gEV+crhbxuqbYgINnrGDGZB+ergSYyZSfKB2Xu5PynJ1hzc+xbTHlSN4Wyg== 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=5xKIuMRXSZJ89ovfGAmIPdXc/xCwOxYrMl0eVPjtMQE=; b=SYkXwtTV9Ed24lzvarw5DSMUM8ECV/ocuLxCaSnVsrJD9BUkxesUAYbMJufWQ/U4DejN0DqRxJfByYIeZkH5cjKwKPAKtETo/EH+ajPC30TNUwDsH1HyU/oFrbYCf3w1bnqeK3Bbd1uo7HETOohUDCl/0u8LxUzzl4AujteXZPIP6bd+VSznZd5R8t6JB53z9a7Oj+D4iUY0LOrqypD5nUOj4HoALTatmM6USQm4fmNF5iLYvc+pnwmlBh+4SZHBadJrPQrK8EdferBNtc+eKYybusPuO5tuCBfTgi+OrDmAU8V3wFm1kkvJ0lEVt3Ldk2cXpvafaFMP8BnLYgq3QA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5xKIuMRXSZJ89ovfGAmIPdXc/xCwOxYrMl0eVPjtMQE=; b=syxPjCVc2LhJz533CdQ2far1SeOa+sBe6oC+hAbVyoyU0AmM/Bfjj+BdhJ8JIbGFUV3mP4DCsSCUhLFGLtmdo4IHruf1xffLDGCa5yGpa8uEw2gTEk+UWLQCZ4Gf8JkiLFFDaS0CvAM0NCjQ22O6+35CVSoVlU5NNM357OwjcRIOEKHDiuNsN79qpa9fR9i6gtWV7yU0ecNiK+7X4uIWBHVXlC1A9wPpKWouJkBBF5rr7p5K4U+D35+mCNaUcbbS+WvgxCXiZFNo7zsx3QoRJN0gr7sZgtA805+l/zcIT9gVZ/zG0t/A67NMN858Re4K1iVAJh4kG33OMFkCZU3/xw== Received: from DM4PR12MB5373.namprd12.prod.outlook.com (2603:10b6:5:39a::17) by DM4PR12MB5216.namprd12.prod.outlook.com (2603:10b6:5:398::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.23; Mon, 21 Jun 2021 01:11:11 +0000 Received: from DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::ac75:9b9a:a03f:1676]) by DM4PR12MB5373.namprd12.prod.outlook.com ([fe80::ac75:9b9a:a03f:1676%3]) with mapi id 15.20.4242.023; Mon, 21 Jun 2021 01:11:11 +0000 From: "Xueming(Steven) Li" To: "Zhang, Qi Z" , "bluca@debian.org" CC: "Zakharchenko, Vitaliy" , "Anantharam, Arjun" , "stable@dpdk.org" , "Kwan, Ngai-mint" Thread-Topic: [dpdk-stable] [DPDK 20.11] net/iavf: fix error handling for unsupported promisc config Thread-Index: AQHXXmLEP7OJQznQJUSSMEnwJxx3o6sc/PCwgAC48gCAAAD8EA== Date: Mon, 21 Jun 2021 01:11:11 +0000 Message-ID: References: <20210611014343.133471-1-qi.z.zhang@intel.com> <16b1fa096f224ee18c2d8c7474657ce5@intel.com> In-Reply-To: <16b1fa096f224ee18c2d8c7474657ce5@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=nvidia.com; x-originating-ip: [2409:891f:b6c7:8074:2536:6a30:448e:e47] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 951b1f8d-10bf-4395-f054-08d934517580 x-ms-traffictypediagnostic: DM4PR12MB5216: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: OYjymNn2523JFH9UxJtPt9UiufzUc/iGk26k+zP8ZpVZAbqERuyzA8hBhBtgtLZhv1wszwUy1b+p3fwWp3VWQioughaERRsoUgyrB1eGM8oDDhJmZrAAWu6zGD97sjrn3KkIGCTqUp4sx/mYItLVHksr4luUKOifH5tSOwRUrA9X5BzExEAAi2cgFXtHCJiwTkKi+zsxQ2QgLduMbiA8BTxzGhN5nKfI5kUurvL6EKg5DAR24lVzJPyuEBWNvjVla1YXWQud2Kr1Y7mEeHdtGXByZFJDxvOuIUwy6zoOXt/0M+eAUbcpCyocswEPvyyyrQjD9AXBBhVfn3Ih1MJLQD73Kx+wGqpkcebxp/AcCgexGmIlMVjVVtywnYLPc1VSr7O/YoLUP4SiUgCOY5cxSNxgi9LiJTItUV9vNukknYDHVc9KsZNjPi9bEgRTRsLbMZVE1zuDYw3B4CBajornTklQGpTYRz0KWd2Gc9pRIt4KTHAT/nK7FaGsANatVN38isRaGtidmdwY49Rb0pokljlCCJXLc2J1khUBjTadK6e09R+9PI+7a5B4y5MBjHXILBXb0oD5hnh5nlkIsgFn8ptXuQFtD+jwLlr9DMrhl2rFNb689WRTXU6DmC94APaff+RoSp1rLHbMrMJElG0Cns5M34wEPJgQFMQbbs8bzqQmxuDF2jpZ7iQ6PeAEdRK9Q44j1H1ydis6Ijg1VZsmigFPeys4XA/jz+tQLVU4Gv0= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5373.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(39860400002)(396003)(346002)(376002)(4326008)(5660300002)(52536014)(83380400001)(55016002)(8936002)(122000001)(8676002)(66446008)(76116006)(966005)(71200400001)(66556008)(66476007)(66946007)(478600001)(64756008)(33656002)(2906002)(54906003)(110136005)(6506007)(53546011)(186003)(86362001)(9686003)(38100700002)(316002)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XWg2kO+l0Iz+2PX4cMW0TPSlWaTSTjkg9oZh85//ntWP5rpp9HWope3EdHj0?= =?us-ascii?Q?q/g9GhT2tF5SY/A4hahc8CLCaCEYU9JD93bkQ50HjJgzO48EikaulyNsZckH?= =?us-ascii?Q?N03yr3zVlbWAeWbQ4C7C8RxjbRQ84KSRv8HXDg/BImMJHfEy1FaaF4riMXkX?= =?us-ascii?Q?NumkKEdnPPZQeTd9uhIUo4zKRK5O1EFxwcImuMtOwh4iqKmwxgJ7d8UfEcFa?= =?us-ascii?Q?kAbq30Jkv4ngmun9Yhg6HAQJPcUvFOM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?mJWTaofetMfhyRQfwk1aowrR7ggYXfQALC6wpWea3JZnLvBD/8ey7eW0rJ46?= =?us-ascii?Q?cCuWi6b2TjI73jgUPIIAOdRyEcz295TDgwW5dZo1Tu11YqT9vs9ecqz2X9vC?= =?us-ascii?Q?3Pkbs0rsBc360HAi427QuO1/vX0hzF1hFe8i56W42l4t49a8u36fFGlH9UZO?= =?us-ascii?Q?rDMmrfLjh+Us/LnoiyaeC4ZSRlome7nk9lV45XoBpBDixW1OiwCrrAn7EQ5Z?= =?us-ascii?Q?ht1+7MLhJgkblTSVL3xi9Uebfvvk?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5373.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 951b1f8d-10bf-4395-f054-08d934517580 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jun 2021 01:11:11.7149 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Hw81B603rufkyPqsQIIMFSFPn/m5FQYV4D/lkKMVn7WbXOHE7z+hJoJEWd8rdSZa1Z7dbsg8Az0TXcaXwSrWKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5216 Subject: Re: [dpdk-stable] [DPDK 20.11] net/iavf: fix error handling for unsupported promisc config 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, Qi Z > Sent: Monday, June 21, 2021 9:04 AM > To: Xueming(Steven) Li ; bluca@debian.org > Cc: Zakharchenko, Vitaliy ; Anantharam, A= rjun ; stable@dpdk.org; > Kwan, Ngai-mint > Subject: RE: [dpdk-stable] [DPDK 20.11] net/iavf: fix error handling for = unsupported promisc config >=20 > Hi Xueming >=20 > > -----Original Message----- > > From: Xueming(Steven) Li > > Sent: Sunday, June 20, 2021 10:05 PM > > To: Zhang, Qi Z ; bluca@debian.org > > Cc: Zakharchenko, Vitaliy ; > > Anantharam, Arjun ; stable@dpdk.org; Kwan, > > Ngai-mint > > Subject: RE: [dpdk-stable] [DPDK 20.11] net/iavf: fix error handling > > for unsupported promisc config > > > > Hi Qi, > > > > Two upstream tag in this commit message, the first one not found in > > upstream branch, could you please check? >=20 > Yes, the commit log is not correct, it should be 50937e495f5bcc5985365b3b= 93e34b6efffeca10, will fix in v2. >=20 > > BTW, the patch can't be applied to 20.11 work queue branch, could you > > please rebase on latest version? > > https://github.com/steevenlee/dpdk/commits/20.11 >=20 > Actually I found the second patch (0c35eecf) is already in your working q= ueue, and the other one (50937e495) is merged in DPDK main > repo with Cc stable, I assume it will be captured as well. > So I think you can just ignore this patch now :) sorry for the noise. NP, 50937e495 is merged after v21.05, so it will be collected into next LTS= drop, i.e. 20.11.3. 20.11.2 includes fixes up to v21.05, send it manually if you want it in 20.= 11.2. >=20 > Thanks > Qi >=20 > > > > Best Regards, > > Xueming > > > > > -----Original Message----- > > > From: stable On Behalf Of Qi Zhang > > > Sent: Friday, June 11, 2021 9:44 AM > > > To: bluca@debian.org > > > Cc: vitaliy.zakharchenko@intel.com; arjun.anantharam@intel.com; > > > stable@dpdk.org; Qi Zhang ; Ngai-mint Kwan > > > > > > Subject: [dpdk-stable] [DPDK 20.11] net/iavf: fix error handling for > > > unsupported promisc config > > > > > > [ upstream commit 308f75b5c9cc5ca3e972dbc84375bdee353c3156 ] [ > > > upstream commit 0c35eecfe8b54bbdf59c30a803404acfdcc4f7eb ] > > > > > > 1. The VIRTCHNL_STATUS_ERR_NOT_SUPPORTED should be esculated to > > upper > > > with -ENOTSUP in iavf_execute_vf_cmd. > > > 2. fix error code check in iavf_config_promisc 3. change > > > vf->cmd_ret_val > > from unsigned to signed as it will compare with > > > negtive value. > > > > > > Signed-off-by: Qi Zhang > > > Signed-off-by: Ngai-mint Kwan > > > --- > > > drivers/net/iavf/iavf.h | 2 +- > > > drivers/net/iavf/iavf_vchnl.c | 16 +++++++++++----- > > > 2 files changed, 12 insertions(+), 6 deletions(-) > > > > > > diff --git a/drivers/net/iavf/iavf.h b/drivers/net/iavf/iavf.h index > > > 0196f74721..4bcb407b20 100644 > > > --- a/drivers/net/iavf/iavf.h > > > +++ b/drivers/net/iavf/iavf.h > > > @@ -136,7 +136,7 @@ struct iavf_info { > > > uint64_t supported_rxdid; > > > uint8_t *proto_xtr; /* proto xtr type for all queues */ > > > volatile enum virtchnl_ops pend_cmd; /* pending command not > > > finished > > */ > > > - uint32_t cmd_retval; /* return value of the cmd response from PF */ > > > + int cmd_retval; /* return value of the cmd response from PF */ > > > uint8_t *aq_resp; /* buffer to store the adminq response from PF > > > */ > > > > > > /* Event from pf */ > > > diff --git a/drivers/net/iavf/iavf_vchnl.c > > > b/drivers/net/iavf/iavf_vchnl.c index 3d52a8c402..219245d040 100644 > > > --- a/drivers/net/iavf/iavf_vchnl.c > > > +++ b/drivers/net/iavf/iavf_vchnl.c > > > @@ -228,12 +228,18 @@ iavf_execute_vf_cmd(struct iavf_adapter > > *adapter, struct iavf_cmd_info *args) > > > /* 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; > > > + if (i >=3D MAX_TRY_TIMES) { > > > PMD_DRV_LOG(ERR, "No response or return failure (%d)" > > > " for cmd %d", vf->cmd_retval, args->ops); > > > _clear_cmd(vf); > > > + err =3D -EIO; > > > + } else if (vf->cmd_retval =3D=3D > > 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; > > > } > > > break; > > > } > > > @@ -1099,8 +1105,8 @@ iavf_config_promisc(struct iavf_adapter *adapte= r, > > > PMD_DRV_LOG(ERR, > > > "fail to execute command > > CONFIG_PROMISCUOUS_MODE"); > > > > > > - if (err =3D=3D IAVF_NOT_SUPPORTED) > > > - return -ENOTSUP; > > > + if (err =3D=3D -ENOTSUP) > > > + return err; > > > > > > return -EAGAIN; > > > } > > > -- > > > 2.26.2