On Mon, Nov 30, 2026 at 10:22:21AM +0800, Dust Li wrote:
> How did you force the connection to 508? Connections in a link group
> are supposed to be limited to 255. Did you modified the kernel?
>
> If this comes from a malicious/non-compliant peer bypassing the 255
> limit, we should look closely at the receive path.
Yes, I modified the kernel for that test. A test-only change set the
count to 508 inside smc_llc_fill_ext_v2() and reused one real RMB for
the extra entries, so it shows what the writer does with that count.
It wasn't 508 real connections, and no peer sent anything unusual.
From reading the code, the 255 limit is only enforced for the server
role. smc_conn_create() skips the max_conns and rtoken bitmap check
for a client link group, and smc_rtoken_add() reuses a slot when the
peer repeats an RMB rkey and address. I haven't actually run a case
where a peer gets a client link group past 255, though, so I can't
say for sure it's reachable.
If you'd rather fix this on the receive side or when the connection
is created, I'm happy to rework the patch that way.
Andrew