[dpdk-dev,v2,2/2] bond: use rte_eth_dev_socket_id()

Message ID 20170630143449.13990-2-declan.doherty@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Doherty, Declan June 30, 2017, 2:34 p.m. UTC
  From: Jan Blunck <jblunck@infradead.org>

The bonded device does not have to be a PCI device. Use the rte_ethdev
functions instead.

Signed-off-by: Wen Chiu <wchiu@brocade.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Jan Blunck <jblunck@infradead.org>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 7826296..65dc75b 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -887,7 +887,7 @@  bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev, uint8_t slave_id)
 	RTE_ASSERT(port->rx_ring == NULL);
 	RTE_ASSERT(port->tx_ring == NULL);
 
-	socket_id = rte_eth_devices[slave_id].data->numa_node;
+	socket_id = rte_eth_dev_socket_id(slave_id);
 	if (socket_id == (int)LCORE_ID_ANY)
 		socket_id = rte_socket_id();