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 95BB245D5D for ; Thu, 21 Nov 2024 00:44:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 896DF40296; Thu, 21 Nov 2024 00:44:11 +0100 (CET) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mails.dpdk.org (Postfix) with ESMTP id D133740296 for ; Thu, 21 Nov 2024 00:44:10 +0100 (CET) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4314f38d274so3127905e9.1 for ; Wed, 20 Nov 2024 15:44:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732146250; x=1732751050; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=27Adt1tY5mWaTCW08Iz7xF5isSeOGigE9Pk6kUuM6Q4=; b=j5gXlzEEM/o1+/M146m9kHFKPLHoH3YDlRNau77a0VzueqSolQLiCds/ne7h3Bn6yT jRgnXd6Td9lZ4My54q5udMtskVSoKCfnMtFIQC99YeAXzv5tuc4v5ZWcRLKhfHLQxcZD 4atuAmpBLiXQcxW0hXvL9+DIPSdkEnAtbRSuGQT4EWz9i7gua6gTmnZ5xmwlN9b9MnmX 4xQyV3qJodTJnp4XsMDXBQF//LQP3RdmtrmKAjP4bqn6gqp2sGzu593476roxLCaMqy7 9sswEDMqBeHpoTK1uad+MpZZEIwr3mauZ01MK57bEAvylB30NmscbdmA7aUMJXh/8FEH RJ4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732146250; x=1732751050; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=27Adt1tY5mWaTCW08Iz7xF5isSeOGigE9Pk6kUuM6Q4=; b=PgQ7WwC4tedru9SHWikrsMAU+PS0uRVU0Hgb8mJEBnOOJUsy4+QgeUgrGqiPDNCBd1 fafyHYk1cv2Ln36i5Pruv5c/SbQ42HltZlzKqJHvttk1s2AZa0nLM7ntOqZBlwdPtJie 6NQ/W/Uxk40vnIaO+MJaXYx8zkwe89DgyIxSaL9eoc4+08QhNIxbAl3mPtuoFQi1mI9u iYXMEdinm3KdlcSe3GnMWhlC7/48/41jtgEx0wiVpddQrtNOqukpBxmHtTX0Fjz/2FuJ 1twTzljUOkZACRAoEGQCVwSuJ76VapBHL083r0c8IrcN0/+v4rfqHsq6jbZeVddZAv1I xTuA== X-Gm-Message-State: AOJu0YyrLfDen79RFtJju+RU2Ut45yehNv47hrE3SWWd1oVCx+dndO+s V7phec66YXuqkZncxwFAhoYAo2zDaQIBKOJRveDIqfQDnWxNrw73UncqkpL4 X-Google-Smtp-Source: AGHT+IHnHCILhWXAzWldvMLpq6aG8+IacYh1bJqBmBzdLuw2f2JnU51VKC4+yBoxZg5+w8r/oIvyKw== X-Received: by 2002:a05:6000:2d84:b0:382:49fe:6f8a with SMTP id ffacd0b85a97d-38254b1bbb8mr3586628f8f.55.1732146250266; Wed, 20 Nov 2024 15:44:10 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825493ea74sm3403977f8f.89.2024.11.20.15.44.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 15:44:09 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: dpdk stable Subject: patch 'member: fix choice of bucket for displacement' has been queued to stable release 22.11.7 Date: Wed, 20 Nov 2024 23:41:52 +0000 Message-ID: <20241120234215.233355-27-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241120234215.233355-1-luca.boccassi@gmail.com> References: <20241112220754.666489-40-luca.boccassi@gmail.com> <20241120234215.233355-1-luca.boccassi@gmail.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 22.11.7 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/22/24. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/ad0890d82f1e797f378ca8f4d1c2a2c501df9ac0 Thanks. Luca Boccassi --- >From ad0890d82f1e797f378ca8f4d1c2a2c501df9ac0 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 15 Nov 2024 17:12:29 -0800 Subject: [PATCH] member: fix choice of bucket for displacement [ upstream commit 33f5b0dcb11580be8091f3b589845e512008e2f0 ] Because of misuse of & vs && operator, the member code would always use the primary bucket. Fixes: 904ec78a239c ("member: implement HT mode") Signed-off-by: Stephen Hemminger --- lib/member/rte_member_ht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/member/rte_member_ht.c b/lib/member/rte_member_ht.c index a85561b472..0d0376b264 100644 --- a/lib/member/rte_member_ht.c +++ b/lib/member/rte_member_ht.c @@ -493,7 +493,7 @@ rte_member_add_ht(const struct rte_member_setsum *ss, return ret; /* Random pick prim or sec for recursive displacement */ - uint32_t select_bucket = (tmp_sig && 1U) ? prim_bucket : sec_bucket; + uint32_t select_bucket = (tmp_sig & 1U) ? prim_bucket : sec_bucket; if (ss->cache) { ret = evict_from_bucket(); buckets[select_bucket].sigs[ret] = tmp_sig; -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-20 23:41:23.641678548 +0000 +++ 0027-member-fix-choice-of-bucket-for-displacement.patch 2024-11-20 23:41:22.756195468 +0000 @@ -1 +1 @@ -From 33f5b0dcb11580be8091f3b589845e512008e2f0 Mon Sep 17 00:00:00 2001 +From ad0890d82f1e797f378ca8f4d1c2a2c501df9ac0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 33f5b0dcb11580be8091f3b589845e512008e2f0 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ -index 357097ff4b..738471b378 100644 +index a85561b472..0d0376b264 100644 @@ -21 +22 @@ -@@ -494,7 +494,7 @@ rte_member_add_ht(const struct rte_member_setsum *ss, +@@ -493,7 +493,7 @@ rte_member_add_ht(const struct rte_member_setsum *ss,