<div dir="ltr"><div>Please go ahead with the merge.</div><div><br></div><div>Thanks,</div><div>Kishore</div><div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Dec 3, 2026 at 8:16 AM Kevin Traynor <<a href="mailto:ktraynor@redhat.com">ktraynor@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
FYI, your patch has been queued to stable release 25.11.5<br>
<br>
Note it hasn't been pushed to <a href="http://dpdk.org/browse/dpdk-stable" rel="noreferrer" target="_blank">http://dpdk.org/browse/dpdk-stable</a> yet.<br>
It will be pushed if I get no objections before 12/08/26. So please<br>
shout if anyone has objections.<br>
<br>
Also note that after the patch there's a diff of the upstream commit vs the<br>
patch applied to the branch. This will indicate if there was any rebasing<br>
needed to apply to the stable branch. If there were code changes for rebasing<br>
(ie: not only metadata diffs), please double check that the rebase was<br>
correctly done.<br>
<br>
Queued patches are on a temporary branch at:<br>
<a href="https://github.com/kevintraynor/dpdk-stable" rel="noreferrer" target="_blank">https://github.com/kevintraynor/dpdk-stable</a><br>
<br>
This queued commit can be viewed at:<br>
<a href="https://github.com/kevintraynor/dpdk-stable/commit/d6b2823542c344c11a7ce2bed78696393957f369" rel="noreferrer" target="_blank">https://github.com/kevintraynor/dpdk-stable/commit/d6b2823542c344c11a7ce2bed78696393957f369</a><br>
<br>
Thanks.<br>
<br>
Kevin<br>
<br>
---<br>
>From d6b2823542c344c11a7ce2bed78696393957f369 Mon Sep 17 00:00:00 2001<br>
From: Kishore Padmanabha <<a href="mailto:kishore.padmanabha@broadcom.com" target="_blank">kishore.padmanabha@broadcom.com</a>><br>
Date: Mon, 5 Oct 2026 15:25:19 -0500<br>
Subject: [PATCH] net/bnxt: randomize flow table hash seed<br>
<br>
[ upstream commit 234ddc75a732b1da66372e84da5f78e4585d63f6 ]<br>
<br>
Seed the CRC32 hash used for TruFlow flow-offload table lookups<br>
with a per-table random value instead of computing an unkeyed<br>
CRC32 directly. An unkeyed hash lets an attacker who can influence<br>
flow-key contents craft inputs that collide in the same bucket,<br>
degrading flow insertion into worst-case behavior.<br>
<br>
Fixes: b14da6540294 ("net/bnxt/tf_ulp: use optimized CRC32 hash")<br>
<br>
Signed-off-by: Kishore Padmanabha <<a href="mailto:kishore.padmanabha@broadcom.com" target="_blank">kishore.padmanabha@broadcom.com</a>><br>
Signed-off-by: Manish Kurup <<a href="mailto:manish.kurup@broadcom.com" target="_blank">manish.kurup@broadcom.com</a>><br>
---<br>
drivers/net/bnxt/tf_ulp/ulp_gen_hash.c | 22 +++++++++++++++-------<br>
drivers/net/bnxt/tf_ulp/ulp_gen_hash.h | 6 ++++++<br>
2 files changed, 21 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/drivers/net/bnxt/tf_ulp/ulp_gen_hash.c b/drivers/net/bnxt/tf_ulp/ulp_gen_hash.c<br>
index d94b59286f..e050a3a460 100644<br>
--- a/drivers/net/bnxt/tf_ulp/ulp_gen_hash.c<br>
+++ b/drivers/net/bnxt/tf_ulp/ulp_gen_hash.c<br>
@@ -7,4 +7,5 @@<br>
#include <rte_log.h><br>
#include <rte_malloc.h><br>
+#include <rte_random.h><br>
#include <rte_hash_crc.h><br>
<br>
@@ -98,4 +99,10 @@ ulp_gen_hash_tbl_list_init(struct ulp_hash_create_params *cparams,<br>
}<br>
*hash_table = hash_tbl;<br>
+<br>
+ /* Random per-table seed so the CRC hash cannot be predicted offline<br>
+ * from attacker-controlled flow match fields.<br>
+ */<br>
+ hash_tbl->hash_seed = (uint32_t)rte_rand();<br>
+<br>
/* allocate the memory for the hash key table */<br>
hash_tbl->num_key_entries = cparams->num_key_entries;<br>
@@ -204,29 +211,30 @@ ulp_gen_hash_tbl_list_key_search(struct ulp_gen_hash_tbl *hash_tbl,<br>
}<br>
<br>
- /* calculate the hash */<br>
+ /* calculate the hash, keyed with the table's random per-instance<br>
+ * seed so the bucket a key lands in cannot be predicted offline.<br>
+ */<br>
switch (hash_tbl->key_tbl.data_size) {<br>
case 1:<br>
hash_id = rte_hash_crc_1byte(*entry->key_data,<br>
- ~0U);<br>
+ hash_tbl->hash_seed);<br>
break;<br>
case 2:<br>
hash_id = rte_hash_crc_2byte(*((uint16_t *)entry->key_data),<br>
- ~0U);<br>
+ hash_tbl->hash_seed);<br>
break;<br>
case 4:<br>
hash_id = rte_hash_crc_4byte(*((uint32_t *)entry->key_data),<br>
- ~0U);<br>
+ hash_tbl->hash_seed);<br>
break;<br>
case 8:<br>
hash_id = rte_hash_crc_8byte(*((uint64_t *)entry->key_data),<br>
- ~0U);<br>
+ hash_tbl->hash_seed);<br>
break;<br>
default:<br>
hash_id = rte_hash_crc(entry->key_data,<br>
hash_tbl->key_tbl.data_size,<br>
- ~0U);<br>
+ hash_tbl->hash_seed);<br>
break;<br>
}<br>
- hash_id = (uint16_t)(((hash_id >> 16) & 0xffff) ^ (hash_id & 0xffff));<br>
hash_id &= hash_tbl->hash_mask;<br>
hash_id = hash_id * hash_tbl->hash_bkt_num;<br>
diff --git a/drivers/net/bnxt/tf_ulp/ulp_gen_hash.h b/drivers/net/bnxt/tf_ulp/ulp_gen_hash.h<br>
index d3f3840cbe..3aabea07ac 100644<br>
--- a/drivers/net/bnxt/tf_ulp/ulp_gen_hash.h<br>
+++ b/drivers/net/bnxt/tf_ulp/ulp_gen_hash.h<br>
@@ -58,4 +58,10 @@ struct ulp_gen_hash_tbl {<br>
struct ulp_hash_bucket_entry *hash_list;<br>
uint32_t hash_mask;<br>
+ /* Per-table random seed for the CRC hash, set at init time so the<br>
+ * bucket a given key lands in cannot be predicted/targeted offline<br>
+ * by an attacker who controls flow match fields (hash-flooding<br>
+ * mitigation).<br>
+ */<br>
+ uint32_t hash_seed;<br>
<br>
/* Bit allocator - to allocate key_res index */<br>
-- <br>
2.56.1<br>
<br>
---<br>
Diff of the applied patch vs upstream commit (please double-check if non-empty:<br>
---<br>
--- - 2026-12-03 12:52:50.084483484 +0000<br>
+++ 0385-net-bnxt-randomize-flow-table-hash-seed.patch 2026-12-03 12:52:39.296938787 +0000<br>
@@ -1 +1 @@<br>
-From 234ddc75a732b1da66372e84da5f78e4585d63f6 Mon Sep 17 00:00:00 2001<br>
+From d6b2823542c344c11a7ce2bed78696393957f369 Mon Sep 17 00:00:00 2001<br>
@@ -5,0 +6,2 @@<br>
+[ upstream commit 234ddc75a732b1da66372e84da5f78e4585d63f6 ]<br>
+<br>
@@ -13 +14,0 @@<br>
-Cc: <a href="mailto:stable@dpdk.org" target="_blank">stable@dpdk.org</a><br>
<br>
</blockquote></div></div>