From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wenzhuo Lu Subject: [PATCH v2 1/2] ixgbe: fix the wrong address of device data pointer Date: Thu, 24 Mar 2016 15:07:45 +0800 Message-ID: <1458803267-26332-2-git-send-email-wenzhuo.lu@intel.com> References: <1458801431-25886-1-git-send-email-wenzhuo.lu@intel.com> <1458803267-26332-1-git-send-email-wenzhuo.lu@intel.com> Cc: Wenzhuo Lu To: dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 196F02BF5 for ; Thu, 24 Mar 2016 08:08:06 +0100 (CET) In-Reply-To: <1458803267-26332-1-git-send-email-wenzhuo.lu@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There's an issue reported. In the scenario DPDK PF + DPDK VF, if the VF port 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. Fixes: 00e30184daa0("ixgbe: add PF support") Signed-off-by: Wenzhuo Lu Reported-by: Bernard Iremonger --- drivers/net/ixgbe/ixgbe_pf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index b854c72..a540343 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -312,8 +312,7 @@ int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev) static void set_rx_mode(struct rte_eth_dev *dev) { - struct rte_eth_dev_data *dev_data = - (struct rte_eth_dev_data*)dev->data->dev_private; + struct rte_eth_dev_data *dev_data = dev->data; struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); u32 fctrl, vmolr = IXGBE_VMOLR_BAM | IXGBE_VMOLR_AUPE; uint16_t vfn = dev_num_vf(dev); -- 1.9.3