summaryrefslogtreecommitdiff
path: root/net/smc/smc_tx.c
diff options
context:
space:
mode:
authorDust Li <dust.li@linux.alibaba.com>2022-03-01 17:43:58 +0800
committerDavid S. Miller <davem@davemloft.net>2022-03-01 14:25:12 +0000
commit12bbb0d163a90d81a2677cf7808d364697290207 (patch)
treecc1b0752c04cca5ee363f20aba99b404ef6e3161 /net/smc/smc_tx.c
parentdcd2cf5f2fc0d4d37aa5400b308d401a150c38b6 (diff)
net/smc: add sysctl for autocorking
This add a new sysctl: net.smc.autocorking_size We can dynamically change the behaviour of autocorking by change the value of autocorking_size. Setting to 0 disables autocorking in SMC Signed-off-by: Dust Li <dust.li@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_tx.c')
-rw-r--r--net/smc/smc_tx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc_tx.c b/net/smc/smc_tx.c
index 062c6b1535e3..257dc0d0aeb1 100644
--- a/net/smc/smc_tx.c
+++ b/net/smc/smc_tx.c
@@ -147,7 +147,7 @@ static bool smc_should_autocork(struct smc_sock *smc)
struct smc_connection *conn = &smc->conn;
int corking_size;
- corking_size = min(SMC_AUTOCORKING_DEFAULT_SIZE,
+ corking_size = min(sock_net(&smc->sk)->smc.sysctl_autocorking_size,
conn->sndbuf_desc->len >> 1);
if (atomic_read(&conn->cdc_pend_tx_wr) == 0 ||