DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] bond: avoid allocating mempool on socket LCORE_ID_ANY
@ 2017-04-26 21:30 Jan Blunck
  2017-04-26 21:30 ` [dpdk-dev] [PATCH 2/2] bond: use rte_eth_dev_socket_id() Jan Blunck
  2017-06-28  9:47 ` [dpdk-dev] [PATCH 1/2] bond: avoid allocating mempool on socket LCORE_ID_ANY Declan Doherty
  0 siblings, 2 replies; 8+ messages in thread
From: Jan Blunck @ 2017-04-26 21:30 UTC (permalink / raw)
  To: dev; +Cc: Eric Kinzie, Eric Kinzie

If the numa node is unknown, use the value from rte_socket_id() to avoid
an allocation failure.

Signed-off-by: Eric Kinzie <ekinzie@brocade.com>
CC: Eric Kinzie <ehkinzie@gmail.com>
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 7b863d6..b8df536 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -887,6 +887,8 @@ 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;
+	if (socket_id == (uint8_t)LCORE_ID_ANY)
+		socket_id = 0;
 
 	element_size = sizeof(struct slow_protocol_frame) +
 				RTE_PKTMBUF_HEADROOM;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-03 12:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26 21:30 [dpdk-dev] [PATCH 1/2] bond: avoid allocating mempool on socket LCORE_ID_ANY Jan Blunck
2017-04-26 21:30 ` [dpdk-dev] [PATCH 2/2] bond: use rte_eth_dev_socket_id() Jan Blunck
2017-06-28  9:49   ` Declan Doherty
2017-06-28  9:47 ` [dpdk-dev] [PATCH 1/2] bond: avoid allocating mempool on socket LCORE_ID_ANY Declan Doherty
2017-06-28 12:00   ` Jan Blunck
2017-06-30 14:34     ` [dpdk-dev] [PATCH v2 " Declan Doherty
2017-06-30 14:34       ` [dpdk-dev] [PATCH v2 2/2] bond: use rte_eth_dev_socket_id() Declan Doherty
2017-07-03 12:17       ` [dpdk-dev] [PATCH v2 1/2] bond: avoid allocating mempool on socket LCORE_ID_ANY Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).