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 32FA9A04A4 for ; Wed, 27 May 2020 11:25:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D80DE1D900; Wed, 27 May 2020 11:25:12 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 6B5DD1D654 for ; Wed, 27 May 2020 11:25:11 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id l10so520148wrr.10 for ; Wed, 27 May 2020 02:25:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BykuhBwOFudd4Z0pHiiDfJ1rP4iwuJUX1d3d9AymsYw=; b=edPuUufkndLBuBlD/jRiJ13DXCcoi6pi2h87e9nGd8NJdKwOBfmll00vwqsVgs4wC0 oAqaV19RyWKSot8kuA9mA9AhmsiPXVRjwhd2HBujBc0Wz698v7kRDWy435qDc6pmfJ/H SiZ8w148rEGiNLy37+2VSXOnU7LuZbDAPtkSex6ndDjYYaNmw3jqHcXqgk3ivHOl+e0Q n07fE6un09Y1m9LGHnWBIt7K0POJxUAakPsHxOPOfUzBjaJTjJv6pz+LXxTEEFpgBTZE rxzpDr8dYGW9kqjr1GR3Zqc+KVTE3wPRhco6NkJxS2/lSsx9Df0LPUCay6t89EDJf/to H70g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BykuhBwOFudd4Z0pHiiDfJ1rP4iwuJUX1d3d9AymsYw=; b=dDcqg/xjuE3xAiATRSBcKRtOUPwq9cjQgPD3aYWOZLorlhBs3ruic72NQJ6zvtc8tS wCv1u57sognXkBD4p+GA6A4bKHfOKFpWLlvhF68GZYM92unT4bhcI/2ptfaAE2Vcs5TC om3hNIGRYHgDLg35Md3L4mN0gXVSr1sQCpJLqGGpdEdhJwhBB69tb+X9GdU/sIUWXYjD fMMumH143Zy3NNReFKoBIWXQBRJDO2ePbnvNCBQ6BILSq+vxeSaVCRl31Ju0o7egRm+p BH8KeOOzsANV2UWx21vTYZU7jkkAnBBxqOvaC1AmXzCD5VLsx0mQXjmAyqqpo368ktNE kmDw== X-Gm-Message-State: AOAM530brdpD7Pl2LyCJyWUqKb8jMC18f2+207o5A1WSoNqWCiK0wbrI WECn7t8vvHMddyu74jqZ162rFWjJFuk= X-Google-Smtp-Source: ABdhPJzrhYhRJzXmWn1i0OUVG/WxMv8OySQ0pghi78XggKFvSa0J7ZYWMOcNaVaBpJlyxyhcV93wwA== X-Received: by 2002:adf:edc8:: with SMTP id v8mr10810163wro.176.1590571511119; Wed, 27 May 2020 02:25:11 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id b18sm2227559wrn.88.2020.05.27.02.25.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 02:25:10 -0700 (PDT) From: luca.boccassi@gmail.com To: Ferruh Yigit Cc: Rasesh Mody , Xi Zhang , dpdk stable Date: Wed, 27 May 2020 10:24:18 +0100 Message-Id: <20200527092422.258652-15-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200527092422.258652-1-luca.boccassi@gmail.com> References: <20200522094022.1025696-43-luca.boccassi@gmail.com> <20200527092422.258652-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'examples/kni: fix crash during MTU set' has been queued to stable release 19.11.3 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 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/29/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 1b2d70662c00013a0157f8dc809f0ff600b33ceb 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 b2866238fd..d48a59fcb1 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c @@ -764,9 +764,8 @@ monitor_all_ports_link_status(void *arg) return NULL; } -/* 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; uint16_t nb_rxd = NB_RXD; @@ -847,6 +846,19 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu) return 0; } +/* 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 kni_config_network_interface(uint16_t port_id, uint8_t if_up) -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-27 10:23:32.152216439 +0100 +++ 0015-examples-kni-fix-crash-during-MTU-set.patch 2020-05-27 10:23:31.647933907 +0100 @@ -1,8 +1,10 @@ -From 36f9eba4710b521b95d72f0e65e85f38c1cff9b5 Mon Sep 17 00:00:00 2001 +From 1b2d70662c00013a0157f8dc809f0ff600b33ceb 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 @@ -13,7 +15,6 @@ Bugzilla ID: 482 Fixes: a26b116749a3 ("examples/kni: fix MTU change to setup Tx queue") -Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit Acked-by: Rasesh Mody @@ -23,10 +24,10 @@ 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/examples/kni/main.c b/examples/kni/main.c -index 7a927a50c0..80dd0353e7 100644 +index b2866238fd..d48a59fcb1 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c -@@ -768,9 +768,8 @@ monitor_all_ports_link_status(void *arg) +@@ -764,9 +764,8 @@ monitor_all_ports_link_status(void *arg) return NULL; } @@ -37,7 +38,7 @@ { int ret; uint16_t nb_rxd = NB_RXD; -@@ -851,6 +850,19 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu) +@@ -847,6 +846,19 @@ kni_change_mtu(uint16_t port_id, unsigned int new_mtu) return 0; }