# 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 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/09/17609498
- Thread: https://ratatoskr.run/netdev/2026/09/17573175/t.md

```text
On Mon, 14 Sep 2026 20:34:17 +0800 illusion.wang wrote:
> +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.
```
