[dpdk-stable] patch 'examples/l2fwd-keepalive: fix mbuf pool size' has been queued to stable release 19.11.3
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue May 19 15:05:01 CEST 2020
Hi,
FYI, your patch has been queued to stable release 19.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/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 f0ac3aa2d2e7d04bf184f89ab310d02edce8f316 Mon Sep 17 00:00:00 2001
From: Louise Kilheeney <louise.kilheeney at intel.com>
Date: Mon, 27 Apr 2020 15:57:43 +0100
Subject: [PATCH] examples/l2fwd-keepalive: fix mbuf pool size
[ upstream commit 0c2b79e8d59f31bc4bd39a7cd8f1960689465979 ]
MBUF pool of size 8192 was causing packet loss when using four ports. To
fix this issue this patch specifies the number of MBUF's per port
instead of having one set MBUF pool size, this way it will adapt to any
number of ports.
Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application")
Signed-off-by: Louise Kilheeney <louise.kilheeney at intel.com>
Tested-by: Xi Zhang <xix.zhang at intel.com>
---
examples/l2fwd-keepalive/main.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index b36834974e..eda703e684 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -44,7 +44,7 @@
#define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1
-#define NB_MBUF 8192
+#define NB_MBUF_PER_PORT 3000
#define MAX_PKT_BURST 32
#define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
@@ -536,6 +536,7 @@ main(int argc, char **argv)
uint16_t portid, last_port;
unsigned lcore_id, rx_lcore_id;
unsigned nb_ports_in_mask = 0;
+ unsigned int total_nb_mbufs;
struct sigaction signal_handler;
struct rte_keepalive_shm *ka_shm;
@@ -561,16 +562,19 @@ main(int argc, char **argv)
if (ret < 0)
rte_exit(EXIT_FAILURE, "Invalid L2FWD arguments\n");
- /* create the mbuf pool */
- l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool", NB_MBUF, 32,
- 0, RTE_MBUF_DEFAULT_BUF_SIZE, rte_socket_id());
- if (l2fwd_pktmbuf_pool == NULL)
- rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
-
nb_ports = rte_eth_dev_count_avail();
if (nb_ports == 0)
rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
+ /* create the mbuf pool */
+ total_nb_mbufs = NB_MBUF_PER_PORT * nb_ports;
+
+ l2fwd_pktmbuf_pool = rte_pktmbuf_pool_create("mbuf_pool",
+ total_nb_mbufs, 32, 0, RTE_MBUF_DEFAULT_BUF_SIZE,
+ rte_socket_id());
+ if (l2fwd_pktmbuf_pool == NULL)
+ rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
+
/* reset l2fwd_dst_ports */
for (portid = 0; portid < RTE_MAX_ETHPORTS; portid++)
l2fwd_dst_ports[portid] = 0;
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-05-19 14:04:51.271603050 +0100
+++ 0166-examples-l2fwd-keepalive-fix-mbuf-pool-size.patch 2020-05-19 14:04:44.508653666 +0100
@@ -1,15 +1,16 @@
-From 0c2b79e8d59f31bc4bd39a7cd8f1960689465979 Mon Sep 17 00:00:00 2001
+From f0ac3aa2d2e7d04bf184f89ab310d02edce8f316 Mon Sep 17 00:00:00 2001
From: Louise Kilheeney <louise.kilheeney at intel.com>
Date: Mon, 27 Apr 2020 15:57:43 +0100
Subject: [PATCH] examples/l2fwd-keepalive: fix mbuf pool size
+[ upstream commit 0c2b79e8d59f31bc4bd39a7cd8f1960689465979 ]
+
MBUF pool of size 8192 was causing packet loss when using four ports. To
fix this issue this patch specifies the number of MBUF's per port
instead of having one set MBUF pool size, this way it will adapt to any
number of ports.
Fixes: e64833f2273a ("examples/l2fwd-keepalive: add sample application")
-Cc: stable at dpdk.org
Signed-off-by: Louise Kilheeney <louise.kilheeney at intel.com>
Tested-by: Xi Zhang <xix.zhang at intel.com>
@@ -18,7 +19,7 @@
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
-index 2ae5a3c6a9..32482158d6 100644
+index b36834974e..eda703e684 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -44,7 +44,7 @@
More information about the stable
mailing list