aboutsummaryrefslogtreecommitdiffstats
path: root/net/smc/smc_core.h
diff options
context:
space:
mode:
authorWen Gu <guwen@linux.alibaba.com>2022-07-14 17:44:02 +0800
committerDavid S. Miller <davem@davemloft.net>2022-07-18 11:19:17 +0100
commit4bc5008e4387106215b50ae1a4ac2467455725ca (patch)
treea4cae8948e6682f0f02f167f7b7d17799f84c025 /net/smc/smc_core.h
parentnet/smc: optimize for smc_sndbuf_sync_sg_for_device and smc_rmb_sync_sg_for_cpu (diff)
downloadlinux-dev-4bc5008e4387106215b50ae1a4ac2467455725ca.tar.xz
linux-dev-4bc5008e4387106215b50ae1a4ac2467455725ca.zip
net/smc: Introduce a sysctl for setting SMC-R buffer type
This patch introduces the sysctl smcr_buf_type for setting the type of SMC-R sndbufs and RMBs. Valid values includes: - SMCR_PHYS_CONT_BUFS, which means use physically contiguous buffers for better performance and is the default value. - SMCR_VIRT_CONT_BUFS, which means use virtually contiguous buffers in case of physically contiguous memory is scarce. - SMCR_MIXED_BUFS, which means first try to use physically contiguous buffers. If not available, then use virtually contiguous buffers. Signed-off-by: Wen Gu <guwen@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_core.h')
-rw-r--r--net/smc/smc_core.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h
index 46ddec5f1edc..7652dfa783ff 100644
--- a/net/smc/smc_core.h
+++ b/net/smc/smc_core.h
@@ -217,6 +217,12 @@ enum smc_lgr_type { /* redundancy state of lgr */
SMC_LGR_ASYMMETRIC_LOCAL, /* local has 1, peer 2 active RNICs */
};
+enum smcr_buf_type { /* types of SMC-R sndbufs and RMBs */
+ SMCR_PHYS_CONT_BUFS = 0,
+ SMCR_VIRT_CONT_BUFS = 1,
+ SMCR_MIXED_BUFS = 2,
+};
+
enum smc_llc_flowtype {
SMC_LLC_FLOW_NONE = 0,
SMC_LLC_FLOW_ADD_LINK = 2,