Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd58c7e0 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller
Browse files

net/smc: allow sysctl rmem and wmem defaults for servers



Without setsockopt SO_SNDBUF and SO_RCVBUF settings, the sysctl
defaults net.ipv4.tcp_wmem and net.ipv4.tcp_rmem should be the base
for the sizes of the SMC sndbuf and rcvbuf. Any TCP buffer size
optimizations for servers should be ignored.

Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent caa21e19
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1122,6 +1122,8 @@ static void smc_tcp_listen_work(struct work_struct *work)
		sock_hold(lsk); /* sock_put in smc_listen_work */
		INIT_WORK(&new_smc->smc_listen_work, smc_listen_work);
		smc_copy_sock_settings_to_smc(new_smc);
		new_smc->sk.sk_sndbuf = lsmc->sk.sk_sndbuf;
		new_smc->sk.sk_rcvbuf = lsmc->sk.sk_rcvbuf;
		sock_hold(&new_smc->sk); /* sock_put in passive closing */
		if (!schedule_work(&new_smc->smc_listen_work))
			sock_put(&new_smc->sk);