From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 830722965 for ; Thu, 24 Mar 2016 07:48:57 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 23 Mar 2016 23:48:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,383,1455004800"; d="scan'208";a="674817416" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 23 Mar 2016 23:48:57 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 23 Mar 2016 23:48:56 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 23 Mar 2016 23:48:56 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.132]) by shsmsx102.ccr.corp.intel.com ([169.254.2.232]) with mapi id 14.03.0248.002; Thu, 24 Mar 2016 14:48:54 +0800 From: "Wu, Jingjing" To: "Lu, Wenzhuo" , "dev@dpdk.org" CC: "Lu, Wenzhuo" Thread-Topic: [dpdk-dev] [PATCH 1/2] ixgbe: fix the wrong address of device data pointer Thread-Index: AQHRhZeuBYsSwt5140KygTBJ8WUUQZ9oJvyA Date: Thu, 24 Mar 2016 06:48:54 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F8DDC658@SHSMSX104.ccr.corp.intel.com> References: <1458801431-25886-1-git-send-email-wenzhuo.lu@intel.com> <1458801431-25886-2-git-send-email-wenzhuo.lu@intel.com> In-Reply-To: <1458801431-25886-2-git-send-email-wenzhuo.lu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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] ixgbe: fix the wrong address of device data pointer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2016 06:48:57 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu > Sent: Thursday, March 24, 2016 2:37 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo > Subject: [dpdk-dev] [PATCH 1/2] ixgbe: fix the wrong address of device da= ta > pointer >=20 > There's an issue reported. In the scenario DPDK PF + DPDK VF, if the VF p= ort > is closed, PF port cannot receive packets. > I found at that time the promicuous mode is disabled on the PF port. But = it > should be enabled. > When VF port is closed, it will send a message to its PF port to reset it= . During > this, PF port will also reset its own promicuous mode. Which promiscuous > mode should be set depends on the parameter stored in the device data. In > the function set_rx_mode, the pointer of device data points to the wrong > address. So, the promiscuous mode is wrong. >=20 > Fixes: 00e30184daa0("ixgbe: add PF support") > Signed-off-by: Wenzhuo Lu > Reported-by: Bernard Iremonger > --- > drivers/net/ixgbe/ixgbe_pf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c > index b854c72..0f8ad55 100644 > --- a/drivers/net/ixgbe/ixgbe_pf.c > +++ b/drivers/net/ixgbe/ixgbe_pf.c > @@ -313,7 +313,7 @@ static void > set_rx_mode(struct rte_eth_dev *dev) > { > struct rte_eth_dev_data *dev_data =3D > - (struct rte_eth_dev_data*)dev->data->dev_private; > + (struct rte_eth_dev_data *)dev->data; Cast is unnecessary here. /Jingjing > struct ixgbe_hw *hw =3D IXGBE_DEV_PRIVATE_TO_HW(dev->data- > >dev_private); > u32 fctrl, vmolr =3D IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE; > uint16_t vfn =3D dev_num_vf(dev); > -- > 1.9.3