From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D82D85589; Mon, 15 Apr 2019 14:44:03 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 05:44:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,353,1549958400"; d="scan'208";a="143089590" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga007.fm.intel.com with ESMTP; 15 Apr 2019 05:44:00 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 15 Apr 2019 05:44:00 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 15 Apr 2019 05:44:00 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.93]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.92]) with mapi id 14.03.0415.000; Mon, 15 Apr 2019 20:43:58 +0800 From: "Zhang, Qi Z" To: "Wang, Ying A" , "Lu, Wenzhuo" , "Yang, Qiming" CC: "dev@dpdk.org" , "Wang, Ying A" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] net/ice: code clean Thread-Index: AQHU8TiOOGeU08n19EOZ4uze2OkVi6Y9KRVQ Date: Mon, 15 Apr 2019 12:43:57 +0000 Message-ID: <039ED4275CED7440929022BC67E7061153368A6F@SHSMSX103.ccr.corp.intel.com> References: <1555077139-244831-1-git-send-email-ying.a.wang@intel.com> <1555077139-244831-2-git-send-email-ying.a.wang@intel.com> In-Reply-To: <1555077139-244831-2-git-send-email-ying.a.wang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjJlMWUyZGEtZmViNi00YWEwLWFmYmEtMzU3YjcxZjE3YjY0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoielNiZGFpd0V6Y0ZoQmNGYUVJNHBkNnNHSDhLNWtTd003dnFrUElVUzg3dXM4VUVPT3lyeDRFSWdaTXdLOXFadSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] net/ice: code clean 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: Mon, 15 Apr 2019 12:44:04 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wang Ying A > Sent: Friday, April 12, 2019 9:52 PM > To: Lu, Wenzhuo ; Yang, Qiming > > Cc: dev@dpdk.org; Wang, Ying A ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH 1/2] net/ice: code clean Better to change title to "fix wrong type", since it's actually a bug fix. >=20 > Variable "status" should be difined as "int" instead of "uint_16t". > This patch fixes the issue. Some typo >=20 > Fixes: c945e4bf9063 ("net/ice: support promiscuous mode") > Cc: stable@dpdk.org >=20 > Signed-off-by: Wang Ying A > --- > drivers/net/ice/ice_ethdev.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c = index > 9d01018..72831bb 100644 > --- a/drivers/net/ice/ice_ethdev.c > +++ b/drivers/net/ice/ice_ethdev.c > @@ -2753,7 +2753,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, > struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct ice_vsi *vsi =3D pf->main_vsi; > uint8_t pmask; > - uint16_t status; > + int status; Can we use enum ice_status directly here? Since I saw it will be compared with a enum value ICE_SUCCESS later. >=20 > pmask =3D ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX | > ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX; @@ -2769,7 > +2769,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, > struct ice_pf *pf =3D ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); > struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct ice_vsi *vsi =3D pf->main_vsi; > - uint16_t status; > + int status; > uint8_t pmask; >=20 > pmask =3D ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX | @@ > -2787,7 +2787,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, > struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct ice_vsi *vsi =3D pf->main_vsi; > uint8_t pmask; > - uint16_t status; > + int status; >=20 > pmask =3D ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX; >=20 > @@ -2802,7 +2802,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, > struct ice_pf *pf =3D ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); > struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct ice_vsi *vsi =3D pf->main_vsi; > - uint16_t status; > + int status; > uint8_t pmask; >=20 > if (dev->data->promiscuous =3D=3D 1) > -- > 1.8.3.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id CCA61A00E6 for ; Mon, 15 Apr 2019 14:44:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 61F6F1B1CE; Mon, 15 Apr 2019 14:44:06 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D82D85589; Mon, 15 Apr 2019 14:44:03 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2019 05:44:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,353,1549958400"; d="scan'208";a="143089590" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga007.fm.intel.com with ESMTP; 15 Apr 2019 05:44:00 -0700 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 15 Apr 2019 05:44:00 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 15 Apr 2019 05:44:00 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.93]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.92]) with mapi id 14.03.0415.000; Mon, 15 Apr 2019 20:43:58 +0800 From: "Zhang, Qi Z" To: "Wang, Ying A" , "Lu, Wenzhuo" , "Yang, Qiming" CC: "dev@dpdk.org" , "Wang, Ying A" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 1/2] net/ice: code clean Thread-Index: AQHU8TiOOGeU08n19EOZ4uze2OkVi6Y9KRVQ Date: Mon, 15 Apr 2019 12:43:57 +0000 Message-ID: <039ED4275CED7440929022BC67E7061153368A6F@SHSMSX103.ccr.corp.intel.com> References: <1555077139-244831-1-git-send-email-ying.a.wang@intel.com> <1555077139-244831-2-git-send-email-ying.a.wang@intel.com> In-Reply-To: <1555077139-244831-2-git-send-email-ying.a.wang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjJlMWUyZGEtZmViNi00YWEwLWFmYmEtMzU3YjcxZjE3YjY0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoielNiZGFpd0V6Y0ZoQmNGYUVJNHBkNnNHSDhLNWtTd003dnFrUElVUzg3dXM4VUVPT3lyeDRFSWdaTXdLOXFadSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] net/ice: code clean 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" Message-ID: <20190415124357.UNu9OfhLKd2bk2-oC9o0ds8Cmz2b-koVvEia9bMBi68@z> > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wang Ying A > Sent: Friday, April 12, 2019 9:52 PM > To: Lu, Wenzhuo ; Yang, Qiming > > Cc: dev@dpdk.org; Wang, Ying A ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH 1/2] net/ice: code clean Better to change title to "fix wrong type", since it's actually a bug fix. >=20 > Variable "status" should be difined as "int" instead of "uint_16t". > This patch fixes the issue. Some typo >=20 > Fixes: c945e4bf9063 ("net/ice: support promiscuous mode") > Cc: stable@dpdk.org >=20 > Signed-off-by: Wang Ying A > --- > drivers/net/ice/ice_ethdev.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c = index > 9d01018..72831bb 100644 > --- a/drivers/net/ice/ice_ethdev.c > +++ b/drivers/net/ice/ice_ethdev.c > @@ -2753,7 +2753,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, > struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct ice_vsi *vsi =3D pf->main_vsi; > uint8_t pmask; > - uint16_t status; > + int status; Can we use enum ice_status directly here? Since I saw it will be compared with a enum value ICE_SUCCESS later. >=20 > pmask =3D ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX | > ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX; @@ -2769,7 > +2769,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, > struct ice_pf *pf =3D ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); > struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct ice_vsi *vsi =3D pf->main_vsi; > - uint16_t status; > + int status; > uint8_t pmask; >=20 > pmask =3D ICE_PROMISC_UCAST_RX | ICE_PROMISC_UCAST_TX | @@ > -2787,7 +2787,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, > struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct ice_vsi *vsi =3D pf->main_vsi; > uint8_t pmask; > - uint16_t status; > + int status; >=20 > pmask =3D ICE_PROMISC_MCAST_RX | ICE_PROMISC_MCAST_TX; >=20 > @@ -2802,7 +2802,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, > struct ice_pf *pf =3D ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private); > struct ice_hw *hw =3D ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private); > struct ice_vsi *vsi =3D pf->main_vsi; > - uint16_t status; > + int status; > uint8_t pmask; >=20 > if (dev->data->promiscuous =3D=3D 1) > -- > 1.8.3.1