summaryrefslogtreecommitdiff
path: root/net/smc/smc.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2023-08-09 11:20:29 +0100
committerDavid S. Miller <davem@davemloft.net>2023-08-09 11:20:29 +0100
commitc992fde9f977da9beec584528f9026d21c27a053 (patch)
tree8c790429205992efb10d48778f359acdf3e6ef59 /net/smc/smc.h
parentd0378ae6d16cac86579c0350d275741fd898ba08 (diff)
parent30c3c4a4497c3765bf6b298f5072c8165aeaf7cc (diff)
downloadlinux-c992fde9f977da9beec584528f9026d21c27a053.tar.gz
linux-c992fde9f977da9beec584528f9026d21c27a053.tar.bz2
linux-c992fde9f977da9beec584528f9026d21c27a053.zip
Merge branch 'smc-fixes'
Gerd Bayer says: ==================== net/smc: Fix effective buffer size commit 0227f058aa29 ("net/smc: Unbind r/w buffer size from clcsock and make them tunable") started to derive the effective buffer size for SMC connections inconsistently in case a TCP fallback was used and memory consumption of SMC with the default settings was doubled when a connection negotiated SMC. That was not what we want. This series consolidates the resulting effective buffer size that is used with SMC sockets, which is based on Jan Karcher's effort (see [1]). For all TCP exchanges (in particular in case of a fall back when no SMC connection was possible) the values from net.ipv4.tcp_[rw]mem are used. If SMC succeeds in establishing a SMC connection, the newly introduced values from net.smc.[rw]mem are used. net.smc.[rw]mem is initialized to 64kB, respectively. Internal test have show this to be a good compromise between throughput/latency and memory consumption. Also net.smc.[rw]mem is now decoupled completely from any tuning through net.ipv4.tcp_[rw]mem. If a user chose to tune a socket's receive or send buffer size with setsockopt, this tuning is now consistently applied to either fall-back TCP or proper SMC connections over the socket. Thanks, Gerd v2 - v3: - Rebase to and resolve conflict of second patch with latest net/master. v1 - v2: - In second patch, use sock_net() helper as suggested by Tony and demanded by kernel test robot. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc.h')
-rw-r--r--net/smc/smc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc.h b/net/smc/smc.h
index 2eeea4cdc718..1f2b912c43d1 100644
--- a/net/smc/smc.h
+++ b/net/smc/smc.h
@@ -161,7 +161,7 @@ struct smc_connection {
struct smc_buf_desc *sndbuf_desc; /* send buffer descriptor */
struct smc_buf_desc *rmb_desc; /* RMBE descriptor */
- int rmbe_size_short;/* compressed notation */
+ int rmbe_size_comp; /* compressed notation */
int rmbe_update_limit;
/* lower limit for consumer
* cursor update