From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id DBAB54F94; Fri, 13 Jul 2018 05:21:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jul 2018 20:21:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,346,1526367600"; d="scan'208";a="215644135" Received: from kmsmsx155.gar.corp.intel.com ([172.21.73.106]) by orsmga004.jf.intel.com with ESMTP; 12 Jul 2018 20:21:34 -0700 Received: from pgsmsx109.gar.corp.intel.com (10.221.44.109) by KMSMSX155.gar.corp.intel.com (172.21.73.106) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 13 Jul 2018 11:21:32 +0800 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.4]) by PGSMSX109.gar.corp.intel.com ([169.254.14.206]) with mapi id 14.03.0319.002; Fri, 13 Jul 2018 11:21:32 +0800 From: "Zhao1, Wei" To: "Zhang, Qi Z" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [PATCH] net/i40e: fix FDIR check programming status error Thread-Index: AQHUGPPDyQxt3YUWcUS+aGUpXYriU6SL9L+AgACHJAD//3u8AIAAhy5w Date: Fri, 13 Jul 2018 03:21:31 +0000 Message-ID: References: <1531297520-16545-1-git-send-email-wei.zhao1@intel.com> <039ED4275CED7440929022BC67E7061153259C5E@SHSMSX103.ccr.corp.intel.com> <039ED4275CED7440929022BC67E7061153259C90@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E7061153259C90@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix FDIR check programming status error 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: , X-List-Received-Date: Fri, 13 Jul 2018 03:21:59 -0000 > -----Original Message----- > From: Zhang, Qi Z > Sent: Friday, July 13, 2018 11:16 AM > To: Zhao1, Wei ; dev@dpdk.org > Cc: stable@dpdk.org > Subject: RE: [PATCH] net/i40e: fix FDIR check programming status error >=20 >=20 >=20 > > -----Original Message----- > > From: Zhao1, Wei > > Sent: Friday, July 13, 2018 11:12 AM > > To: Zhang, Qi Z ; dev@dpdk.org > > Cc: stable@dpdk.org > > Subject: RE: [PATCH] net/i40e: fix FDIR check programming status error > > > > This code change is ok also, >=20 > I don't think so, with your change, it will always return 0 if DD bit is = set, but > we still need to return -1 if there is any error in descriptor, right? Yes, you are right! I will commit v2!! I find a bug but give out an error fix patch, orz.... >=20 > but it seems need to add more Judging branch? > > IF you think it is almost the same, I WILL commit a new v2. > > > > > > > -----Original Message----- > > > From: Zhang, Qi Z > > > Sent: Friday, July 13, 2018 11:06 AM > > > To: Zhao1, Wei ; dev@dpdk.org > > > Cc: stable@dpdk.org > > > Subject: RE: [PATCH] net/i40e: fix FDIR check programming status > > > error > > > > > > > > > > > > > -----Original Message----- > > > > From: Zhao1, Wei > > > > Sent: Wednesday, July 11, 2018 4:25 PM > > > > To: dev@dpdk.org > > > > Cc: Zhang, Qi Z ; stable@dpdk.org; Zhao1, > > > > Wei > > > > Subject: [PATCH] net/i40e: fix FDIR check programming status error > > > > > > > > In i40e FDIR PMD code for checking programming status function > > > > i40e_check_fdir_programming_status(), the initial value of return > > > > value ret should be set to -1 not 0, because if DD bit of > > > > I40E_RX_DESC_STATUS_DD is not write back, this function will > > > > return > > > > 0 to upper function, this give an error info to upper function, > > > > the fact for this is it is time out for DD write back and it should= return -1. > > > > > > > > Fixes: 05999aab4ca6 ("i40e: add or delete flow director") > > > > Signed-off-by: Wei Zhao > > > > --- > > > > drivers/net/i40e/i40e_fdir.c | 3 ++- > > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/net/i40e/i40e_fdir.c > > > > b/drivers/net/i40e/i40e_fdir.c index > > > > d41601a..b958bf6 100644 > > > > --- a/drivers/net/i40e/i40e_fdir.c > > > > +++ b/drivers/net/i40e/i40e_fdir.c > > > > @@ -1315,7 +1315,7 @@ i40e_check_fdir_programming_status(struct > > > > i40e_rx_queue *rxq) > > > > uint32_t rx_status; > > > > uint32_t len, id; > > > > uint32_t error; > > > > - int ret =3D 0; > > > > + int ret =3D -1; > > > > > > > > rxdp =3D &rxq->rx_ring[rxq->rx_tail]; > > > > qword1 =3D rte_le_to_cpu_64(rxdp->wb.qword1.status_error_len); > > > > @@ -1360,6 +1360,7 @@ i40e_check_fdir_programming_status(struct > > > > i40e_rx_queue *rxq) > > > > I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq- nb_rx_desc > - 1); > > > > else > > > > I40E_PCI_REG_WRITE(rxq->qrx_tail, rxq->rx_tail - 1); > > > > + ret =3D 0; > > > > > > Is it possible to overwrite previous ret =3D -1 which is not what we = want? > > > > > > I would prefer > > > > > > int ret =3D 0; > > > > > > If (dd bit is set) { > > > If xxx > > > Ret =3D -1; > > > If xxx > > > Ret =3D -1; > > > } else { > > > ret =3D -1; > > > } > > > > > > return ret; > > > > > > > } > > > > > > > > return ret; > > > > -- > > > > 2.7.5