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 19B84A0547 for ; Mon, 21 Jun 2021 03:04:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 93FC74003F; Mon, 21 Jun 2021 03:04:13 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 941674003F for ; Mon, 21 Jun 2021 03:04:11 +0200 (CEST) IronPort-SDR: 25bhIaCdPGG9lC32vAUV+dcokjnuXx8wk+dN9Qz+jHO2cu84B0dRBx/spuQ/MwlmCgA32mn1x0 vdPgMWr+Q4/g== X-IronPort-AV: E=McAfee;i="6200,9189,10021"; a="228300613" X-IronPort-AV: E=Sophos;i="5.83,288,1616482800"; d="scan'208";a="228300613" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2021 18:04:10 -0700 IronPort-SDR: w0e6GdiAPx5CunNCt4VLq7umo5So6+d7zz9uUyX4QGDg9DauGAZ6waKNRhoheKXgGL/Sm/YGGR SBlja45Jbw7A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,288,1616482800"; d="scan'208";a="622922178" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga005.jf.intel.com with ESMTP; 20 Jun 2021 18:04:10 -0700 Received: from shsmsx605.ccr.corp.intel.com (10.109.6.215) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Sun, 20 Jun 2021 18:04:09 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX605.ccr.corp.intel.com (10.109.6.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 21 Jun 2021 09:04: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.2242.008; Mon, 21 Jun 2021 09:04:04 +0800 From: "Zhang, Qi Z" To: "Xueming(Steven) Li" , "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: AQHXXmLCGFiG9KY0w0CJugStaFHBfascd6WAgAE5UZA= Date: Mon, 21 Jun 2021 01:04:04 +0000 Message-ID: <16b1fa096f224ee18c2d8c7474657ce5@intel.com> References: <20210611014343.133471-1-qi.z.zhang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows 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-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" Hi Xueming > -----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 >=20 > Hi Qi, >=20 > Two upstream tag in this commit message, the first one not found in upstr= eam > branch, could you please check? Yes, the commit log is not correct, it should be 50937e495f5bcc5985365b3b93= e34b6efffeca10, will fix in v2. > BTW, the patch can't be applied to 20.11 work queue branch, could you ple= ase > rebase on latest version? > https://github.com/steevenlee/dpdk/commits/20.11 Actually I found the second patch (0c35eecf) is already in your working que= ue, and the other one (50937e495) is merged in DPDK main repo with Cc stabl= e, I assume it will be captured as well. So I think you can just ignore this patch now :) sorry for the noise. Thanks Qi >=20 > Best Regards, > Xueming >=20 > > -----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_va= l > 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 *adapter, > > 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