* [PATCH] member: fix choice of bucket for displacement
@ 2024-11-16 1:12 Stephen Hemminger
2024-11-19 20:54 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2024-11-16 1:12 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, yipeng1.wang, stable, Sameh Gobriel, Pablo de Lara
Because of misuse of & vs && operator, the member code would
always use the primary bucket.
Fixes: 904ec78a239c ("member: implement HT mode")
Cc: yipeng1.wang@intel.com
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
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 357097ff4b..738471b378 100644
--- a/lib/member/rte_member_ht.c
+++ b/lib/member/rte_member_ht.c
@@ -494,7 +494,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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] member: fix choice of bucket for displacement
2024-11-16 1:12 [PATCH] member: fix choice of bucket for displacement Stephen Hemminger
@ 2024-11-19 20:54 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2024-11-19 20:54 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev, stable, yipeng1.wang, Sameh Gobriel, Pablo de Lara
16/11/2024 02:12, Stephen Hemminger:
> Because of misuse of & vs && operator, the member code would
> always use the primary bucket.
>
> Fixes: 904ec78a239c ("member: implement HT mode")
> Cc: yipeng1.wang@intel.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-19 20:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-16 1:12 [PATCH] member: fix choice of bucket for displacement Stephen Hemminger
2024-11-19 20:54 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).