[dpdk-dev,v2,2/2] igb: fix the wrong address of device data pointer

Message ID 1458803267-26332-3-git-send-email-wenzhuo.lu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers

Commit Message

Wenzhuo Lu March 24, 2016, 7:07 a.m. UTC
  In the function set_rx_mode, the pointer of device data points
to the wrong address as found in ixgbe code.

Fixes: be2d648a2dd3("igb: add PF support")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/e1000/igb_pf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Jingjing Wu March 24, 2016, 7:14 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> Sent: Thursday, March 24, 2016 3:08 PM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo
> Subject: [dpdk-dev] [PATCH v2 2/2] igb: fix the wrong address of device data
> pointer
> 
> In the function set_rx_mode, the pointer of device data points to the wrong
> address as found in ixgbe code.
> 
> Fixes: be2d648a2dd3("igb: add PF support")
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
  

Patch

diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c
index 95204e9..7f45a44 100644
--- a/drivers/net/e1000/igb_pf.c
+++ b/drivers/net/e1000/igb_pf.c
@@ -218,8 +218,7 @@  int igb_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 e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	uint32_t fctrl, vmolr = E1000_VMOLR_BAM | E1000_VMOLR_AUPE;
 	uint16_t vfn = dev_num_vf(dev);