Re: [PATCH net] net/smc: avoid overwriting when adjusting sock bufsizes

Wenjia Zhang
2024-06-04T15:10:24Z

On 04.06.24 16:04, Paolo Abeni wrote:
> On Fri, 2024-05-31 at 16:54 +0800, Wen Gu wrote:
>> When copying smc settings to clcsock, avoid setting clcsock's sk_sndbuf
>> to sysctl_tcp_wmem[1], since this may overwrite the value set by
>> tcp_sndbuf_expand() in TCP connection establishment.
>>
>> And the other setting sk_{snd|rcv}buf to sysctl value in
>> smc_adjust_sock_bufsizes() can also be omitted since the initialization
>> of smc sock and clcsock has set sk_{snd|rcv}buf to smc.sysctl_{w|r}mem
>> or ipv4_sysctl_tcp_{w|r}mem[1].
>>
>> Fixes: 30c3c4a4497c ("net/smc: Use correct buffer sizes when switching between TCP and SMC")
>> Link: https://lore.kernel.org/r/5eaf3858-e7fd-4db8-83e8-3d7a3e0e9ae2@linux.alibaba.com
>> Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
>> ---
>> FYI,
>> The detailed motivation and testing can be found in the link above.
>
> My understanding is that there is an open question here if this is the
> expected and desired behavior.
>
> @Wenjia, @Jan: could you please have a look?
>
> Thanks!
>
> Paolo
>
> @Paolo, thank you for reminding us!

@Wen, Gerd and I have looked into your patch and discussed on it. Gerd
would send the concrete answer to your question soon.

Regarding to this patch, it looks good to me. Here you are:

Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>

Thanks,
Wenjia