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 7928CA0543 for ; Tue, 21 Jun 2022 10:03:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6FF7640151; Tue, 21 Jun 2022 10:03:48 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2080.outbound.protection.outlook.com [40.107.101.80]) by mails.dpdk.org (Postfix) with ESMTP id 7973740151 for ; Tue, 21 Jun 2022 10:03:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RAH1Nspk5Xy3PX+wmrl+ZM50j6YlErQ8qq9YN2hGz0bj4vpYVy7UZeOehFMB7Ol0dmORe1bx/Alq9NzR8bOatxxvK1d4HPVW8ibHQpZmgplS42pJ9b4xuEnhMLRBIrU1UcPE0mo9J5D4YP6WDH//TgDTMCbuFvv/CsWyCQ24lNcrhMv+eoTW9tR/GXDUeKNyKDMGgL4JxPfYKTtMIq69BcqFSz1qUcXgMsd+/PEYClV6yEP8aWUfb7JqcQPkpwGwzIT/YTqfnUYkjN/gUsLCgOmaYR64qDEffGcbOkw2Q+BUAWM8XugrX+cj3nQo7jkG9YtvsolypLPgnctUnU9Jyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DTvUIkkf0TlqIpSI27NuxWxwFsiTc8s3TWFUW0gDdBU=; b=ivSl5pi6GVKy3F0gKzxK3MfLwQUWqnuweqMSyUnu1tr2/iI5RzE2IhWpLVAMErSHymLGu7gF2LKSpE0x8uGkaSGm5eirOafhSgcZC4FyCB0K/hiGAoDlCzIEEEQObTEiiTogSdZtFivv3wz8k9LJYNeBm3S6PA4zftFqFVvwnxsunU5luyCghzjWlIW6e9NvIoOlu2pUtoWR+/o14kxmKgFL24Kmg2wiB93WefZs64OkHTJM66Vjp/mcqQTgNmGO0+uRgJNaY7muEKMEyKNLw4mrtjG4CF0QGhO9ETn2buJpomcSB4XRIqCWi55clRZq8gLrsV3LBP1iv8YYS7MM3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.238) smtp.rcpttodomain=linux.microsoft.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DTvUIkkf0TlqIpSI27NuxWxwFsiTc8s3TWFUW0gDdBU=; b=TZsthV3gygzz59Mk0bCui0msSD2tqKPzaoj628bXCqD3tvimN8ENrZhRr2fa0VmyeXFwA0WBsPwW0iFYwqEkcNy920BrQpoOQChVj+nhB5pU5gLETUPLC4ym1IaWVZIAFVnnsLNhERSwjApH83l2FcrE6gQ9yjyqDbi1GOdAe9IlcwRAcVbyJfBOh/cVPot7CV/rQ7WRchm+GRyf6L+ulrobROEg2Si/eaTRQvBliFeCW2OYuUlH864XcNMSHqD04AM51V8sxbzzxZKZldXV4t1ArN8525lOCzr+pUV5MKFCSoNF4BGmjY2anBBSht2b0MCrJvhBcD6JkWeRButFxA== Received: from DM3PR12CA0063.namprd12.prod.outlook.com (2603:10b6:0:56::31) by PH0PR12MB5466.namprd12.prod.outlook.com (2603:10b6:510:d7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Tue, 21 Jun 2022 08:03:44 +0000 Received: from DM6NAM11FT048.eop-nam11.prod.protection.outlook.com (2603:10b6:0:56:cafe::15) by DM3PR12CA0063.outlook.office365.com (2603:10b6:0:56::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:03:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.238) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.238 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.238; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.238) by DM6NAM11FT048.mail.protection.outlook.com (10.13.173.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:03:44 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL105.nvidia.com (10.27.9.14) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:03:43 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:03:41 -0700 From: Xueming Li 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 20.11.6 Date: Tue, 21 Jun 2022 11:01:11 +0300 Message-ID: <20220621080301.2315720-6-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 09323be3-93ce-4d83-58c5-08da535c8fed X-MS-TrafficTypeDiagnostic: PH0PR12MB5466:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: igymE+MrfKhg0jXyYquKy1NlICNhWLpd/oAdPsB2lKoazvlwRATfNE6gJrxUBdtRBLDWIYetGoW9QzkbFzpMFqIt5nFTcOkZg0STlELEr3jivb+KiDTKao9I1mKmRgeEiSJ6bf8G/TGRgWG44QsUL9hVYum2qW2s83MZPfuqJnMndF4go5W2i3mWa5ZrpUPjx4iWUVlm2sFX5eLC82Z7EqoKKmlG+LDzUgFTCs8ef6YOJzcNxaId2+YpEKK1PTRHIcSuF8Ot4CYsw+j50JxCLxQVukcoeWfpVBbP9I9GWGZSv0KwQvqjHWh+yAP/+6aiUJViarUgwClYdJ1PQ1G6jwkXuF3jzAWGyS2OGFpaSt+QlKFyiExPXi6vYNgcCq/pLM+Cn6LLCxQxNg1DkDkYiILXMSVCUtZXk18YF3nAy/dGSV1eMTUpZLHZPW3PK3W7Nx+9qKv5yKYAUlGIMLhhK56NZXL7CQMPDuj0XKNjhTsUMmcXcd9FNxW4+Jjn05M/sl7OaRCqMz2li88goNsFVk0WHMXOG0gvI4ldNW0yloldg16iQmovryUj6apXxWo3v/DOnAk4Y6C2gsr25DSESiU0xL5iOBIx/A2FlZfSOz6TYCZYaBhRXLkamayrtmZACpiObulySrB1jZivMTqARcHkc0ymwFr5TixYUKC/1jQyck8NHxAd/bpth5SNi1Ww8oL8pc1G66C58ERskJpRTBrNaG5eLaVMIrDXvvoXgKC1yNfBJloXg1mtYskaYQbWAY2ViVnwdhMSmayQop4T9NOXuGFKMB+al+KXuJVB3w0oAGxLmL4lcWN8wuAkUu6wvpZ/t0It9TFArrgYO2F5UewRG4anFoEpcT+0k+WV84w= X-Forefront-Antispam-Report: CIP:12.22.5.238; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(136003)(346002)(396003)(39860400002)(376002)(46966006)(40470700004)(36840700001)(966005)(478600001)(5660300002)(40480700001)(8936002)(26005)(53546011)(1076003)(7696005)(6286002)(2616005)(40460700003)(36756003)(83380400001)(2906002)(47076005)(186003)(8676002)(70206006)(86362001)(426003)(41300700001)(66574015)(16526019)(316002)(336012)(70586007)(6916009)(81166007)(55016003)(54906003)(82740400003)(6666004)(82310400005)(4326008)(36860700001)(356005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:03:44.1889 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 09323be3-93ce-4d83-58c5-08da535c8fed X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.238]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT048.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5466 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 20.11.6 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/23/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/faca6823330d436338bd7e3a8b0a79d32ca23d5c Thanks. Xueming Li --- >From faca6823330d436338bd7e3a8b0a79d32ca23d5c 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 Cc: Xueming Li [ 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 a6763bce47..43d5df83ae 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -376,7 +376,7 @@ static int lcore_main(__rte_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); @@ -457,7 +457,7 @@ static int lcore_main(__rte_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"); @@ -572,7 +572,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result, { int worker_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) { @@ -592,7 +592,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result, if ((worker_core_id >= RTE_MAX_LCORE) || (worker_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, @@ -660,7 +660,7 @@ static void cmd_stop_parsed(__rte_unused void *parsed_result, struct cmdline *cl, __rte_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", @@ -701,7 +701,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result, struct cmdline *cl, __rte_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", @@ -763,7 +763,7 @@ static void cmd_show_parsed(__rte_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.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:49.529792596 +0800 +++ 0005-examples-bond-fix-invalid-use-of-trylock.patch 2022-06-21 15:37:48.954450956 +0800 @@ -1 +1 @@ -From 03382cf4115019e6a82d6fca51a16a34a0824a90 Mon Sep 17 00:00:00 2001 +From faca6823330d436338bd7e3a8b0a79d32ca23d5c Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit 03382cf4115019e6a82d6fca51a16a34a0824a90 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 335bde5c8d..4efebb3902 100644 +index a6763bce47..43d5df83ae 100644 @@ -27 +29 @@ -@@ -373,7 +373,7 @@ static int lcore_main(__rte_unused void *arg1) +@@ -376,7 +376,7 @@ static int lcore_main(__rte_unused void *arg1) @@ -36 +38 @@ -@@ -456,7 +456,7 @@ static int lcore_main(__rte_unused void *arg1) +@@ -457,7 +457,7 @@ static int lcore_main(__rte_unused void *arg1) @@ -45 +47 @@ -@@ -571,7 +571,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result, +@@ -572,7 +572,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result, @@ -54 +56 @@ -@@ -591,7 +591,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result, +@@ -592,7 +592,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result, @@ -63 +65 @@ -@@ -659,7 +659,7 @@ static void cmd_stop_parsed(__rte_unused void *parsed_result, +@@ -660,7 +660,7 @@ static void cmd_stop_parsed(__rte_unused void *parsed_result, @@ -72 +74 @@ -@@ -700,7 +700,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result, +@@ -701,7 +701,7 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result, @@ -81 +83 @@ -@@ -762,7 +762,7 @@ static void cmd_show_parsed(__rte_unused void *parsed_result, +@@ -763,7 +763,7 @@ static void cmd_show_parsed(__rte_unused void *parsed_result,