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 628D1A0093 for ; Tue, 10 May 2022 14:30:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D7E24069D; Tue, 10 May 2022 14:30:28 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id B50FF4282F for ; Tue, 10 May 2022 14:30:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652185826; 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=PoYCYALzuV4BaSxl3UmajXChDq2K2dwgT1N6sq6fHCE=; b=R1sHISr/96666Bx1UoKNndEtg0GfuWWFbzq+t7YWjU1QryguMOffm8MBzC4myF1HM+hna6 pxJyjbaqYl0T4HbbTehV9RIC3jiN9BbyRRYoLQCkZTLQ7lJpO6Ix/F/cclS/s90R1bdfvP dHidl8YSqZ7Iby+2Qsisxw2NuPmfggo= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-125-WsiUrG20P8qS4NbxaP49zw-1; Tue, 10 May 2022 08:30:23 -0400 X-MC-Unique: WsiUrG20P8qS4NbxaP49zw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3D7B382ECD8; Tue, 10 May 2022 12:30:22 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id C3C5040CFD06; Tue, 10 May 2022 12:30:20 +0000 (UTC) From: Kevin Traynor 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 21.11.2 Date: Tue, 10 May 2022 13:29:40 +0100 Message-Id: <20220510123010.159523-3-ktraynor@redhat.com> In-Reply-To: <20220510123010.159523-1-ktraynor@redhat.com> References: <20220510123010.159523-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 21.11.2 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/15/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/6da5f268db91b8de98626486c84547410ba0fd22 Thanks. Kevin --- >From 6da5f268db91b8de98626486c84547410ba0fd22 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 335bde5c8d..4efebb3902 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -374,5 +374,5 @@ static int lcore_main(__rte_unused void *arg1) (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) { @@ -457,5 +457,5 @@ static int lcore_main(__rte_unused void *arg1) 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); @@ -572,5 +572,5 @@ 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) @@ -592,5 +592,5 @@ static void cmd_start_parsed(__rte_unused void *parsed_result, 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); @@ -660,5 +660,5 @@ static void cmd_stop_parsed(__rte_unused void *parsed_result, __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, @@ -701,5 +701,5 @@ static void cmd_quit_parsed(__rte_unused void *parsed_result, __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, @@ -763,5 +763,5 @@ static void cmd_show_parsed(__rte_unused void *parsed_result, } - rte_spinlock_trylock(&global_flag_stru_p->lock); + rte_spinlock_lock(&global_flag_stru_p->lock); cmdline_printf(cl, "Active_slaves:%d " -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-05-10 13:24:21.689693753 +0100 +++ 0003-examples-bond-fix-invalid-use-of-trylock.patch 2022-05-10 13:24:21.549646290 +0100 @@ -1 +1 @@ -From 03382cf4115019e6a82d6fca51a16a34a0824a90 Mon Sep 17 00:00:00 2001 +From 6da5f268db91b8de98626486c84547410ba0fd22 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 03382cf4115019e6a82d6fca51a16a34a0824a90 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org