* [dpdk-stable] [PATCH] net/bonding: fix socket id check
@ 2020-06-16 9:46 David Marchand
0 siblings, 0 replies; only message in thread
From: David Marchand @ 2020-06-16 9:46 UTC (permalink / raw)
To: dev; +Cc: stable, Chas Williams, Wei Hu (Xavier), Eric Kinzie, Declan Doherty
Caught by code review, rte_eth_dev_socket_id() returns -1 on error.
The code should behave the same, but still, do not use LCORE_ID_ANY for
something that is not a lcore id.
Fixes: c15c5897340d ("net/bonding: avoid allocating mempool on unknown socket")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/bonding/rte_eth_bond_8023ad.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index b77a37ddb3..b7ffa2f2cf 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1043,7 +1043,7 @@ bond_mode_8023ad_activate_slave(struct rte_eth_dev *bond_dev,
RTE_ASSERT(port->tx_ring == NULL);
socket_id = rte_eth_dev_socket_id(slave_id);
- if (socket_id == (int)LCORE_ID_ANY)
+ if (socket_id == -1)
socket_id = rte_socket_id();
element_size = sizeof(struct slow_protocol_frame) +
--
2.23.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-16 9:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16 9:46 [dpdk-stable] [PATCH] net/bonding: fix socket id check David Marchand
patches for DPDK stable branches
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
stable@dpdk.org
public-inbox-index stable
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.dpdk.org/inbox.dpdk.stable
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git