From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D860DA0540 for ; Thu, 7 Jul 2022 09:55:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3F9F40A7F; Thu, 7 Jul 2022 09:55:34 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id D57AA40DDE for ; Thu, 7 Jul 2022 09:55:32 +0200 (CEST) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 9DA4B402B9 for ; Thu, 7 Jul 2022 07:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180532; bh=QulYuXnTj7Fcs3Jtu5fwh8aXLZO4NN0knd/74kDtuAY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=DNxt5JlSk9L4VrZGJ8s6k7qmWeGO8TPDBUD2n15qTL+7T+Jk4Y8BKY6Amqs2cR0vI hsmRv9gkCJ2XoCXhx6L6jRpkr+HvPCBpwXkD1Na9fa5K1RaUy0sftqsQHNA8Y1ClCE Sygc8ojueIvs2Fexh+t95IFnVuynBO7yAQRrwHK2ggv+FA4nLq7k54VkH2Fz3kNvb/ qUJM/yvyGpmSH8t8R5silnWqJst2JWUUcsC0uqVg9SyLgbow90tRcqRReHl1VuJ6vR lxuOpQ1WScLwBl1wKjrit5sAqxWubPh6tnzDrSQyGaKOpbTt5yXw/NT0xjduTZk8L0 cCyJ+k8HljCpA== Received: by mail-ed1-f71.google.com with SMTP id s1-20020a056402520100b00439658fad14so13621736edd.20 for ; Thu, 07 Jul 2022 00:55:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QulYuXnTj7Fcs3Jtu5fwh8aXLZO4NN0knd/74kDtuAY=; b=F8M4GulZmUn0dA/wAZ3CHTC4O7vU4cJ2MLSwNnNdeGLSy1PNFsj5LiGrghbISrzdJy s4izcX3G4DhuKqEgXLwuu9H4AiFnnAUiwN3nIFR2QkrFKNHJcVH465VIbtOH8OCydUZa 1PNXLpNWsJUx6UObJuQipAMqsfCiNiDmMI/LNkalOC/Z31fH4u9TGqotqzeQwyETmcRX cq9y/ejudgZVidgWERzrrYponNtNYTcbxfCTkUjMdegIaOyaEvVmeUr4XoPcdREjHQjo W7XymFTyMCLCpQIlxMJlpB6EYatS28zQXtjo2RLLcVrUzXfXAgsmH/vLgxDkeEh9RXvB mlRA== X-Gm-Message-State: AJIora8nDX8VVdW1N8iUoKZ3YgeqZj0pEYEZb6+X874How1WD3EFNIo1 xkCOKp5VwH2X8h71YWry+6/P2cJ3lTjxp7MZzNwDFR4oamf2I5zMGO919vY8rvXpxle9kQOy56p 9g0t1Cja0f0lZkcL4vh0bUK0a X-Received: by 2002:a17:907:9808:b0:72a:f35f:7cdd with SMTP id ji8-20020a170907980800b0072af35f7cddmr9070500ejc.36.1657180531906; Thu, 07 Jul 2022 00:55:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tKc9C8kB+D3wReA1DyRRfsW3yMwHdlYU4IhHBw7208Xs9wx0SQYly8QQTWIbNWFsE5ANrGJw== X-Received: by 2002:a17:907:9808:b0:72a:f35f:7cdd with SMTP id ji8-20020a170907980800b0072af35f7cddmr9070484ejc.36.1657180531701; Thu, 07 Jul 2022 00:55:31 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id cq9-20020a056402220900b0043a6df72c11sm7857527edb.63.2022.07.07.00.55.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:55:30 -0700 (PDT) From: christian.ehrhardt@canonical.com To: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Cc: Bruce Richardson , Min Hu , Tyler Retzlaff , dpdk stable Subject: patch 'examples/bond: fix invalid use of trylock' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:53:57 +0200 Message-Id: <20220707075522.194223-2-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 19.11.13 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/09/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/2b9663aec4d2eecf2eacc58f2936582ac4c2c5b4 Thanks. Christian Ehrhardt --- >From 2b9663aec4d2eecf2eacc58f2936582ac4c2c5b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Date: Mon, 11 Apr 2022 17:15:59 +0200 Subject: [PATCH] examples/bond: fix invalid use of trylock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 03382cf4115019e6a82d6fca51a16a34a0824a90 ] The conditional rte_spinlock_trylock() was used as if it is an unconditional lock operation in a number of places. Fixes: cc7e8ae84faa ("examples/bond: add example application for link bonding mode 6") Signed-off-by: Mattias Rönnblom Acked-by: Bruce Richardson Acked-by: Min Hu (Connor) Acked-by: Tyler Retzlaff --- examples/bond/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/bond/main.c b/examples/bond/main.c index d4de4b9e68..9243a85501 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -379,7 +379,7 @@ static int lcore_main(__attribute__((unused)) void *arg1) bond_ip = BOND_IP_1 | (BOND_IP_2 << 8) | (BOND_IP_3 << 16) | (BOND_IP_4 << 24); - rte_spinlock_trylock(&global_flag_stru_p->lock); + rte_spinlock_lock(&global_flag_stru_p->lock); while (global_flag_stru_p->LcoreMainIsRunning) { rte_spinlock_unlock(&global_flag_stru_p->lock); @@ -460,7 +460,7 @@ static int lcore_main(__attribute__((unused)) void *arg1) if (is_free == 0) rte_pktmbuf_free(pkts[i]); } - rte_spinlock_trylock(&global_flag_stru_p->lock); + rte_spinlock_lock(&global_flag_stru_p->lock); } rte_spinlock_unlock(&global_flag_stru_p->lock); printf("BYE lcore_main\n"); @@ -575,7 +575,7 @@ static void cmd_start_parsed(__attribute__((unused)) void *parsed_result, { int slave_core_id = rte_lcore_id(); - rte_spinlock_trylock(&global_flag_stru_p->lock); + rte_spinlock_lock(&global_flag_stru_p->lock); if (global_flag_stru_p->LcoreMainIsRunning == 0) { if (rte_eal_get_lcore_state(global_flag_stru_p->LcoreMainCore) != WAIT) { @@ -595,7 +595,7 @@ static void cmd_start_parsed(__attribute__((unused)) void *parsed_result, if ((slave_core_id >= RTE_MAX_LCORE) || (slave_core_id == 0)) return; - rte_spinlock_trylock(&global_flag_stru_p->lock); + rte_spinlock_lock(&global_flag_stru_p->lock); global_flag_stru_p->LcoreMainIsRunning = 1; rte_spinlock_unlock(&global_flag_stru_p->lock); cmdline_printf(cl, @@ -663,7 +663,7 @@ static void cmd_stop_parsed(__attribute__((unused)) void *parsed_result, struct cmdline *cl, __attribute__((unused)) void *data) { - rte_spinlock_trylock(&global_flag_stru_p->lock); + rte_spinlock_lock(&global_flag_stru_p->lock); if (global_flag_stru_p->LcoreMainIsRunning == 0) { cmdline_printf(cl, "lcore_main not running on core:%d\n", @@ -704,7 +704,7 @@ static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result, struct cmdline *cl, __attribute__((unused)) void *data) { - rte_spinlock_trylock(&global_flag_stru_p->lock); + rte_spinlock_lock(&global_flag_stru_p->lock); if (global_flag_stru_p->LcoreMainIsRunning == 0) { cmdline_printf(cl, "lcore_main not running on core:%d\n", @@ -766,7 +766,7 @@ static void cmd_show_parsed(__attribute__((unused)) void *parsed_result, printf("\n"); } - rte_spinlock_trylock(&global_flag_stru_p->lock); + rte_spinlock_lock(&global_flag_stru_p->lock); cmdline_printf(cl, "Active_slaves:%d " "packets received:Tot:%d Arp:%d IPv4:%d\n", -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:11.231336066 +0200 +++ 0002-examples-bond-fix-invalid-use-of-trylock.patch 2022-07-07 09:54:10.769823406 +0200 @@ -1 +1 @@ -From 03382cf4115019e6a82d6fca51a16a34a0824a90 Mon Sep 17 00:00:00 2001 +From 2b9663aec4d2eecf2eacc58f2936582ac4c2c5b4 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 03382cf4115019e6a82d6fca51a16a34a0824a90 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 335bde5c8d..4efebb3902 100644 +index d4de4b9e68..9243a85501 100644 @@ -27 +28 @@ -@@ -373,7 +373,7 @@ static int lcore_main(__rte_unused void *arg1) +@@ -379,7 +379,7 @@ static int lcore_main(__attribute__((unused)) void *arg1) @@ -36 +37 @@ -@@ -456,7 +456,7 @@ static int lcore_main(__rte_unused void *arg1) +@@ -460,7 +460,7 @@ static int lcore_main(__attribute__((unused)) void *arg1) @@ -45 +46 @@ -@@ -571,7 +571,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result, +@@ -575,7 +575,7 @@ static void cmd_start_parsed(__attribute__((unused)) void *parsed_result, @@ -47 +48 @@ - int worker_core_id = rte_lcore_id(); + int slave_core_id = rte_lcore_id(); @@ -54,2 +55,2 @@ -@@ -591,7 +591,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result, - if ((worker_core_id >= RTE_MAX_LCORE) || (worker_core_id == 0)) +@@ -595,7 +595,7 @@ static void cmd_start_parsed(__attribute__((unused)) void *parsed_result, + if ((slave_core_id >= RTE_MAX_LCORE) || (slave_core_id == 0)) @@ -63 +64 @@ -@@ -659,7 +659,7 @@ static void cmd_stop_parsed(__rte_unused void *parsed_result, +@@ -663,7 +663,7 @@ static void cmd_stop_parsed(__attribute__((unused)) void *parsed_result, @@ -65 +66 @@ - __rte_unused void *data) + __attribute__((unused)) void *data) @@ -72 +73 @@ -@@ -700,7 +700,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result, +@@ -704,7 +704,7 @@ static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result, @@ -74 +75 @@ - __rte_unused void *data) + __attribute__((unused)) void *data) @@ -81 +82 @@ -@@ -762,7 +762,7 @@ static void cmd_show_parsed(__rte_unused void *parsed_result, +@@ -766,7 +766,7 @@ static void cmd_show_parsed(__attribute__((unused)) void *parsed_result,