linux-stable/include/net/netns/smc.h
Wen Gu 4bc5008e43 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>
2022-07-18 11:19:17 +01:00

23 lines
569 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __NETNS_SMC_H__
#define __NETNS_SMC_H__
#include <linux/mutex.h>
#include <linux/percpu.h>
struct smc_stats_rsn;
struct smc_stats;
struct netns_smc {
/* per cpu counters for SMC */
struct smc_stats __percpu *smc_stats;
/* protect fback_rsn */
struct mutex mutex_fback_rsn;
struct smc_stats_rsn *fback_rsn;
bool limit_smc_hs; /* constraint on handshake */
#ifdef CONFIG_SYSCTL
struct ctl_table_header *smc_hdr;
#endif
unsigned int sysctl_autocorking_size;
unsigned int sysctl_smcr_buf_type;
};
#endif