[dpdk-stable] patch 'examples/ntb: fix mempool ops setting' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Feb 11 12:20:57 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.1

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

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 38498a1a3056c2f5cd2d266c3697a895375c8377 Mon Sep 17 00:00:00 2001
From: Xiaoyun Li <xiaoyun.li at intel.com>
Date: Wed, 25 Dec 2019 17:09:42 +0800
Subject: [PATCH] examples/ntb: fix mempool ops setting

[ upstream commit 28a2568f469d9d715b9dfbafdce14537e35b7d4e ]

Mempool ops may register in different order when compiling. The default
ops index is always zero but the wanted ops is ring_mp_mc. This patch
sets best mempool ops before generating mbuf pool to fix this issue.

Fixes: 5194299d6ef5 ("examples/ntb: support more functions")

Signed-off-by: Xiaoyun Li <xiaoyun.li at intel.com>
---
 examples/ntb/ntb_fwd.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index c914256dd4..17eedcf0b8 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -19,6 +19,7 @@
 #include <rte_lcore.h>
 #include <rte_cycles.h>
 #include <rte_pmd_ntb.h>
+#include <rte_mbuf_pool_ops.h>
 
 /* Per-port statistics struct */
 struct ntb_port_statistics {
@@ -1256,6 +1257,11 @@ ntb_mbuf_pool_create(uint16_t mbuf_seg_size, uint32_t nb_mbuf,
 	if (mp == NULL)
 		return NULL;
 
+	if (rte_mempool_set_ops_byname(mp, rte_mbuf_best_mempool_ops(), NULL)) {
+		printf("error setting mempool handler\n");
+		goto fail;
+	}
+
 	memset(&mbp_priv, 0, sizeof(mbp_priv));
 	mbp_priv.mbuf_data_room_size = mbuf_seg_size;
 	mbp_priv.mbuf_priv_size = 0;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-11 11:17:42.660872413 +0000
+++ 0111-examples-ntb-fix-mempool-ops-setting.patch	2020-02-11 11:17:38.576004638 +0000
@@ -1,14 +1,15 @@
-From 28a2568f469d9d715b9dfbafdce14537e35b7d4e Mon Sep 17 00:00:00 2001
+From 38498a1a3056c2f5cd2d266c3697a895375c8377 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Li <xiaoyun.li at intel.com>
 Date: Wed, 25 Dec 2019 17:09:42 +0800
 Subject: [PATCH] examples/ntb: fix mempool ops setting
 
+[ upstream commit 28a2568f469d9d715b9dfbafdce14537e35b7d4e ]
+
 Mempool ops may register in different order when compiling. The default
 ops index is always zero but the wanted ops is ring_mp_mc. This patch
 sets best mempool ops before generating mbuf pool to fix this issue.
 
 Fixes: 5194299d6ef5 ("examples/ntb: support more functions")
-Cc: stable at dpdk.org
 
 Signed-off-by: Xiaoyun Li <xiaoyun.li at intel.com>
 ---


More information about the stable mailing list