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 8E448A034F for ; Wed, 10 Nov 2021 07:39:51 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8820140142; Wed, 10 Nov 2021 07:39:51 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2080.outbound.protection.outlook.com [40.107.244.80]) by mails.dpdk.org (Postfix) with ESMTP id B180D410EF for ; Wed, 10 Nov 2021 07:39:49 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aavp3i4eqGRXU1mXAE4Z19KcRCJry+JnKIfmOlcg62u709MxU0XgfvXDTvpnTIWci3Hgt5Cz0VeyRRaMIy3bP4lWvU7sDC+V+n4Rt/dVPKLS3bqaPT2DFCheaUWHVV3Lj46NgyWmZn7Emhjl0vQKHuNxDO2+RF7d9jrw8FtJbTFUbMv63UtayXKdYpSo0ipbVK99wbh29ASA5kbyenek0qjwLxwMBWcx6g7sSgpPhkml6k/GlRP8Y7wqwRN88e2bJOCZ8zJKOkrUjjayzkdwxhtls3mLfrGkP/qkphTga+R87kkZKMUPlSigCuwPZtP5rfx/I+JG3XZhgg88TRjDdw== 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=tYEn71mV+m5R6xNaNGfhkHnIWHLfPPLizihwaHGPc54=; b=Fx6DAkEGX6KValUT72bxwdaxS39VSgInKnyEi1N15wZ4TC6ov2fFXncDNzZTOZYM7LD2IBO1aJyKHOBGjjSJlNbxwJscDfrRP1ZevY0O3uFQNiV4ESgZ6HINBnIuLztG/6MMJ0vVsXI0BYruV1IdM/iS/hTyJbhHduerIQElMKodbbryyDCCJwpXUb2XKEupBUffomk4A0G7MjkDQZnHUtSO+w9SDV0gG/M+yvYwuI+9H8CWAes1MtYqaFsp7p7CaQo6EXr6LHswfxZzWO/bUB3xBzfm0rJaYQPC7JDf10XRa/cI+1pdAzz07u/rU3oHxmt9psRsz9MujJg3vWuRiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=6wind.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=tYEn71mV+m5R6xNaNGfhkHnIWHLfPPLizihwaHGPc54=; b=mdcFWlSEy9LwiFRB9F1NBhJ5OfeUgCUiH/alVLzY0ymdipuhwy3bXWZs8x5daA+JRaV1yr3I0DvGOZOgOuovUPma+4xVYMqhUGK7i+gnPysLE7IBRHZqpZDdvqhIjBYc+2mm3O1GMm+y3x+1Y+b4tf0VYOQW6ykiJvawWas8fGfUXVqgh6pgRyfTBGjBUStIxJigYIvDyURzSGajYSVlkfAH/pb0GdbCMS95YOkMr8m69y3taO2X1JheRtVrm2gpRYT/Q4w4HKNPz0mlqy6foHSElGwj/NeI6vsSN92L8EvKRi8ZMxK+NNnMKx9v5dBAoHswY1ZIOznC5zzPR/bYtw== Received: from DM6PR08CA0047.namprd08.prod.outlook.com (2603:10b6:5:1e0::21) by DM6PR12MB4299.namprd12.prod.outlook.com (2603:10b6:5:223::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Wed, 10 Nov 2021 06:39:48 +0000 Received: from DM6NAM11FT018.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1e0:cafe::28) by DM6PR08CA0047.outlook.office365.com (2603:10b6:5:1e0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13 via Frontend Transport; Wed, 10 Nov 2021 06:39:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT018.mail.protection.outlook.com (10.13.172.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:39:47 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:39:43 +0000 From: Xueming Li To: Julien Meunier CC: Luca Boccassi , Olivier Matz , dpdk stable Date: Wed, 10 Nov 2021 14:29:12 +0800 Message-ID: <20211110063216.2744012-69-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 10958666-55be-4494-9bd0-08d9a414e3d5 X-MS-TrafficTypeDiagnostic: DM6PR12MB4299: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PQhWXS2V+ZEYEmi0xV7KarGn0Cp+l/gQX9RBWQJueJwIl9Z40PlLE9CUZkl5j2Z2RoygUpUIkQ3TnKPJ8e8tYEfpDMUfayMrGflfmNXkSEk1Yq6HdoFERBzEFr/KbwhjYEB0teqikfWaArhAnJyZk/PRviEoPVfszux7EeWks/TaMyCjO/3MqDzE3psTQhH6UZRP8/1O9ICkSC0w29HXup+as0Gy9jfqNeppjafr8BD5RqAlFcrj4HbBAM77Z330BSClExI4dyiArMpvhQcalWtr+NpYErRoxyc9YByu2wBteJP7awwGLkfV7m07ERftmMF9/cQBox405/8A+qRIplBw2KecH6GEAeuSJGPxkcFS+a+GXYV094CsuFZoxvjCBU93odmTBTImSSTtVczxEQMN2B0X9cQGbx2+wEgymv6dErCw9sXmpLFdJRHpZU7icByPF41+y3XKx/Vj6yj4rp8VjicRgOa6Z3H5btrfdQ5mkU/S6lwdfmt0uUuSxvJipeDACGo64iBHt6lJtRI/hDfhKnPgPN+nHrsHtTnt1/q+qhi14ZZucMnx2YZ42wru059pjgMtzJFwWXFFSR3xYSaepoklBcOs+S0Ht4gvyk12+vUyALiIMQQTlG0nqsNWOVWrvcTAR1l9uD+VINIaOy5fw+qkfcKAGmziwaoKKLTtOlD5s4++FWw/4W3uexj3ZcvwyYqnDhPajphKK1mNacqDArpnQ8/nQQ5h3oSZXPgfQalOJNnKOqWO8UvCtpp7q8Jtwfk9AUEmOPn7dlHxGYGDMRPY+QqtnGD9Ws8SuUCjhfmj8tKNAyxm7B2DZ0EDG3GbUTESKojv9B5ljy+9Ng== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(70586007)(7636003)(53546011)(82310400003)(356005)(508600001)(4326008)(8936002)(70206006)(1076003)(83380400001)(36756003)(6666004)(6286002)(2906002)(4001150100001)(5660300002)(86362001)(36860700001)(426003)(8676002)(336012)(6862004)(26005)(2616005)(55016002)(54906003)(966005)(7696005)(16526019)(316002)(186003)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:39:47.7224 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10958666-55be-4494-9bd0-08d9a414e3d5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT018.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4299 Subject: [dpdk-stable] patch 'stack: fix reload head when pop fails' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. 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/e78d085e36db1df8a90bb3e87fdeca69bd4b85a4 Thanks. Xueming Li --- >From e78d085e36db1df8a90bb3e87fdeca69bd4b85a4 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 Cc: Xueming Li [ 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.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:05.100432366 +0800 +++ 0068-stack-fix-reload-head-when-pop-fails.patch 2021-11-10 14:17:01.824079806 +0800 @@ -1 +1 @@ -From 6ded44bce4d3e5f4fce66f00ce0638ebc866911f Mon Sep 17 00:00:00 2001 +From e78d085e36db1df8a90bb3e87fdeca69bd4b85a4 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 6ded44bce4d3e5f4fce66f00ce0638ebc866911f ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -19 +21 @@ - lib/stack/rte_stack_lf_generic.h | 4 +++- + lib/librte_stack/rte_stack_lf_generic.h | 4 +++- @@ -22 +24 @@ -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 +26,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