[dpdk-stable] patch 'net/bnx2x: fix socket id for slowpath memory' has been queued to stable release 16.07.2

Yuanhan Liu yuanhan.liu at linux.intel.com
Wed Nov 2 11:21:11 CET 2016


Hi,

FYI, your patch has been queued to stable release 16.07.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
yet. It will be pushed if I get no objections before 11/06/16.
So please shout if anyone has objections.

Thanks.

	--yliu

---
>From 7ca138f7f87bec2099cab8233b89e9cc7ba39b52 Mon Sep 17 00:00:00 2001
From: Rasesh Mody <rasesh.mody at qlogic.com>
Date: Wed, 5 Oct 2016 22:36:37 -0700
Subject: [PATCH] net/bnx2x: fix socket id for slowpath memory

[ upstream commit 8d6c8b9ade221d94622988968ab4a304e37dbab5 ]

When the DMA allocation routine is invoked in the context of a non-EAL
thread, the API rte_lcore_id() returns -1 and indexing on that in
rte_lcore_to_socket_id() leads to segfault. The fix is to use
SOCKET_ID_ANY as the socket_id for all slowpath memory allocation.

Fixes: 540a211084a7 ("bnx2x: driver core")

Signed-off-by: Rasesh Mody <rasesh.mody at qlogic.com>
---
 drivers/net/bnx2x/bnx2x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 2bb4a84..8970334 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -178,7 +178,7 @@ bnx2x_dma_alloc(struct bnx2x_softc *sc, size_t size, struct bnx2x_dma *dma,
 
 	/* Caller must take care that strlen(mz_name) < RTE_MEMZONE_NAMESIZE */
 	z = rte_memzone_reserve_aligned(mz_name, (uint64_t) (size),
-					rte_lcore_to_socket_id(rte_lcore_id()),
+					SOCKET_ID_ANY,
 					0, align);
 	if (z == NULL) {
 		PMD_DRV_LOG(ERR, "DMA alloc failed for %s", msg);
-- 
1.9.0



More information about the stable mailing list