Re: [PATCH v28 net-next 03/10] net/nebula-matrix: add channel layer

From
Jakub Kicinski <kuba@kernel.org>
Date
2026-09-19 23:30:11
Also in
linux-doc, lkml
Reply to
illusion.wang, 2026-09-14
On Mon, 14 Sep 2026 20:34:17 +0800 illusion.wang wrote:
quoted hunk ↗ jump to hunk
+static u32 nbl_common_calc_hash_key(void *key, u32 key_size, u32 bucket_size)
+{
+	u32 hash;
+
+	if (bucket_size == 0 || bucket_size == 1)
+		return 0;
+
+	hash = jhash(key, key_size, 0);
+
+	/* Use bitmask if bucket_size is a power of 2 */
+	if ((bucket_size & (bucket_size - 1)) == 0)
+		return hash & (bucket_size - 1);
+	return hash % bucket_size;
+}
I asked you to remove the hash table implementation, I think you only
removed the hashing function. You should probably use Xarray here.
Maybe rhashtable, but I don't really see why.

I will apply the first 2 patches to make the series a little shorter.
Please don't take that as an invitation to add more patches to the
series.

Also, if you have a good LLM you can try these prompts:
https://github.com/kuba-moo/ai-prompts/blob/main/driver-upstreaming-prompts.md
to generate the code for you. I used them with Opus 5 recently and
the patches it produced only needed minor modifications. The split
was excellent.
Thread (23 messages) 23 messages, 4 authors, last reply 2026-09-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help