[dpdk-stable] patch 'examples/kni: fix crash during MTU set' has been queued to LTS release 18.11.9

Kevin Traynor ktraynor at redhat.com
Fri Jun 5 20:25:20 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/10/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.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/949e3fde221cfaca5e534921971a7324523f88c0

Thanks.

Kevin.

---
>From 949e3fde221cfaca5e534921971a7324523f88c0 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Thu, 21 May 2020 16:10:42 +0100
Subject: [PATCH] examples/kni: fix crash during MTU set

[ upstream commit 36f9eba4710b521b95d72f0e65e85f38c1cff9b5 ]

During MTU set (kni_change_mtu) sample application setup queues, which
can free and re-allocate queues.
Meanwhile sample application keeps continues in Rx/Tx burst calls in
different threads, which may cause crash during queue setup.

Pausing application Rx/Tx calls before MTU set and starts it back
afterwards.

Bugzilla ID: 482
Fixes: a26b116749a3 ("examples/kni: fix MTU change to setup Tx queue")

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Acked-by: Rasesh Mody <rmody at marvell.com>
Tested-by: Xi Zhang <xix.zhang at intel.com>
---
 examples/kni/main.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/examples/kni/main.c b/examples/kni/main.c
index 4fbb860109..54bd69491b 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -739,7 +739,6 @@ monitor_all_ports_link_status(void *arg)
 }
 
-/* Callback for request of changing MTU */
 static int
-kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
+kni_change_mtu_(uint16_t port_id, unsigned int new_mtu)
 {
 	int ret;
@@ -814,4 +813,17 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
 }
 
+/* Callback for request of changing MTU */
+static int
+kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
+{
+	int ret;
+
+	rte_atomic32_inc(&kni_pause);
+	ret =  kni_change_mtu_(port_id, new_mtu);
+	rte_atomic32_dec(&kni_pause);
+
+	return ret;
+}
+
 /* Callback for request of configuring network interface up/down */
 static int
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-06-05 19:20:55.333053196 +0100
+++ 0083-examples-kni-fix-crash-during-MTU-set.patch	2020-06-05 19:20:50.987036792 +0100
@@ -1 +1 @@
-From 36f9eba4710b521b95d72f0e65e85f38c1cff9b5 Mon Sep 17 00:00:00 2001
+From 949e3fde221cfaca5e534921971a7324523f88c0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 36f9eba4710b521b95d72f0e65e85f38c1cff9b5 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 7a927a50c0..80dd0353e7 100644
+index 4fbb860109..54bd69491b 100644
@@ -29 +30 @@
-@@ -769,7 +769,6 @@ monitor_all_ports_link_status(void *arg)
+@@ -739,7 +739,6 @@ monitor_all_ports_link_status(void *arg)
@@ -38 +39 @@
-@@ -852,4 +851,17 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
+@@ -814,4 +813,17 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu)



More information about the stable mailing list