From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A2E56A04A3 for ; Fri, 5 Jun 2020 20:28:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6EB9B1D515; Fri, 5 Jun 2020 20:28:07 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id E2A201D5CB for ; Fri, 5 Jun 2020 20:28:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591381685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pv4ltpbLmMSqT1jz5WkRDQliULEoMgwnusQ45a789UE=; b=QkaSZ6VVQG5EGvdGVDF+emo4j1v2sBdWWLrUoOQ9zmlVNzPbKyrQRqKN3PD0b4pnzHDIgM PQsmTRw26dLX2+kSEnW/bL2OE0nZuTu6PtNPoze2Y9gpXgEz96nG1+Cyx7Vi9diDeeZlmy I9Tj0Ytm/WfF7Sg8xHEfSR/TwJElhqQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-164-HNIIHnB4PmSA2oZukNIf_g-1; Fri, 05 Jun 2020 14:28:02 -0400 X-MC-Unique: HNIIHnB4PmSA2oZukNIf_g-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 071DA18A8220; Fri, 5 Jun 2020 18:28:01 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED47660E1C; Fri, 5 Jun 2020 18:27:59 +0000 (UTC) From: Kevin Traynor To: Ferruh Yigit Cc: Rasesh Mody , Xi Zhang , dpdk stable Date: Fri, 5 Jun 2020 19:25:20 +0100 Message-Id: <20200605182525.22483-83-ktraynor@redhat.com> In-Reply-To: <20200605182525.22483-1-ktraynor@redhat.com> References: <20200605182525.22483-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/kni: fix crash during MTU set' has been queued to LTS release 18.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 Acked-by: Rasesh Mody Tested-by: Xi Zhang --- 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@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)