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 AC2E4A0C45 for ; Tue, 30 Nov 2021 17:38:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A77CB411CB; Tue, 30 Nov 2021 17:38:09 +0100 (CET) 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 8EB22411CB for ; Tue, 30 Nov 2021 17:38:08 +0100 (CET) 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 5F0AC3FFE1 for ; Tue, 30 Nov 2021 16:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290288; bh=8vfiN2l3YckkuwPKghqqkZgVK0k1A98c08Dm36ryCes=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Dc0tx2cLuShVcVtskMna+C1OO8nSgT4sCAEDFmGVJ+8sBNw2i37RNqi3OVM7u8/m3 lKlx5bhnGae5rpKf5Y+mI5+FuttzFPln0f8KraIPvDcofeSiEpz7QqHWxlRJjn73KJ C+/tgpMv2JqdGyRvxY3Zma+51MbK2VFuao7gJ/aKXyR0yw3XWzgCpT514jmpdC39If zms1hk3Br6YfGneiyJzfLe0FVPxpM31B10U5FzZw48jBs3duylTTfCjrsFyh8TqT+A Zj3oYL44oSq4j0U/c4zJ7+UeFwmoh7wdsIOG7NeyqUl8zFixM6Gy5efWci+iChRbCp cUem1HiyjOZFA== Received: by mail-ed1-f71.google.com with SMTP id d13-20020a056402516d00b003e7e67a8f93so17520813ede.0 for ; Tue, 30 Nov 2021 08:38:08 -0800 (PST) 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=8vfiN2l3YckkuwPKghqqkZgVK0k1A98c08Dm36ryCes=; b=w7DD2qLqreXX1xHI13OEf23ps7/5QcgCPLI7Zk/dKP99Oj0MYe6nhgCcM3DExXJ56D xrniF3yLaPvNhz5gduS2WHLn1mOTtVWVjVYe2fPjv9PaWsUg7khpG7ivsMj0Jkp+rn+l XyBzNrt1Vzr9Hhs49CfErlRSo+gDeXBLj6AGhERlfmRSJrA1Xhj305hpG2rsSxYrZ6qd drwwQs9iL0QFzLeepB+5D3z6pQhFJFKxXGbJ/rzPYbwD0WGsRM1i1UqLGQP7+YevLKsS 9cXNK9AG1ahxZUMTenZe7lm5+f8QyKReXILFVmquSPYAlOAs3NxMiW1ZTyyJxTqvvbpD 0xVg== X-Gm-Message-State: AOAM531C4DpI5EEsPODS5rdPxg4VnbHd9jsfq0H+MmmRi5vTYTBA/0Do q3I+yGoJPnOImPzCiNMmb06334gRgaITf2ZOgfETiskXSpUNgTm+i3GnuTfCW4Es9kp67fL2bPc /AGaNlPpeOri6cCMjhmzVaAyX X-Received: by 2002:a50:da48:: with SMTP id a8mr31902edk.155.1638290287277; Tue, 30 Nov 2021 08:38:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdba+bjv93pJEu8CGcizuyyLEZHUWRoWwabwr/3b4NaqjGqisPVpTpxipdb5L1caqhZE82sA== X-Received: by 2002:a50:da48:: with SMTP id a8mr31845edk.155.1638290286865; Tue, 30 Nov 2021 08:38:06 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id gt18sm9745641ejc.46.2021.11.30.08.38.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:38:06 -0800 (PST) From: christian.ehrhardt@canonical.com To: Julien Meunier Cc: Olivier Matz , dpdk stable Subject: patch 'stack: fix reload head when pop fails' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:02 +0100 Message-Id: <20211130163605.2460997-38-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 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.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/fd91b764200967366d9711219d408ebb6cbb14d1 Thanks. Christian Ehrhardt --- >From fd91b764200967366d9711219d408ebb6cbb14d1 Mon Sep 17 00:00:00 2001 From: Julien Meunier Date: Tue, 21 Sep 2021 18:17:24 +0200 Subject: [PATCH] stack: fix reload head when pop fails [ upstream commit 6ded44bce4d3e5f4fce66f00ce0638ebc866911f ] The previous commit 18effad9cfa7 ("stack: reload head when pop fails") only changed C11 implementation, not generic implementation. List head must be loaded right before continue (when failed to find the new head). Without this, one thread might keep trying and failing to pop items without ever loading the new correct head. Fixes: 3340202f5954 ("stack: add lock-free implementation") Signed-off-by: Julien Meunier Acked-by: Olivier Matz --- lib/librte_stack/rte_stack_lf_generic.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h index 4850a05ee7..7fa29cedb2 100644 --- a/lib/librte_stack/rte_stack_lf_generic.h +++ b/lib/librte_stack/rte_stack_lf_generic.h @@ -128,8 +128,10 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list, /* If NULL was encountered, the list was modified while * traversing it. Retry. */ - if (i != num) + if (i != num) { + old_head = list->head; continue; + } new_head.top = tmp; new_head.cnt = old_head.cnt + 1; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:08.291034836 +0100 +++ 0038-stack-fix-reload-head-when-pop-fails.patch 2021-11-30 16:50:05.646872473 +0100 @@ -1 +1 @@ -From 6ded44bce4d3e5f4fce66f00ce0638ebc866911f Mon Sep 17 00:00:00 2001 +From fd91b764200967366d9711219d408ebb6cbb14d1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6ded44bce4d3e5f4fce66f00ce0638ebc866911f ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ - lib/stack/rte_stack_lf_generic.h | 4 +++- + lib/librte_stack/rte_stack_lf_generic.h | 4 +++- @@ -22 +23 @@ -diff --git a/lib/stack/rte_stack_lf_generic.h b/lib/stack/rte_stack_lf_generic.h +diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h @@ -24,2 +25,2 @@ ---- a/lib/stack/rte_stack_lf_generic.h -+++ b/lib/stack/rte_stack_lf_generic.h +--- a/lib/librte_stack/rte_stack_lf_generic.h ++++ b/lib/librte_stack/rte_stack_lf_generic.h