anolis: net/smc: Introduce a new mode for eRDMA iWARP
ANBZ: #5550 This introduces a new mode for eRDAM iWARP support. SMC-R use an out-bound way to establish RDMA link, that is using CLC message to exchange QP information and then modify QP to record peer QP num, instead of using RDMA-CM. However, for iWARP, only RDMA-CM is supported. So in the past implementations, we provided a workaround, that reuse 5-tuple of first-contact clcsock as eRDMA iWARP link. But a disadvan- tage of this method is that we need to keep this first-contact clcsock until iWARP link is cleared (for QP reuse), which is agnostic to the user and may cause port in-use error. Now we provide a new way to replace the previous implementation. Server side will reserve several fixed ports for eRDMA iWARP and ensure no port conflicts for 5-tuple of eRDMA iWARP link, which is reserve_mode. Reserve_mode will disable the keep-first-contact-clcsock logic of the previous implementation. But note that this mode now is in beta, so we provide a module param for switch. reserve_mode is default true, and can be set to false to back to previous implementation. Signed-off-by: Wen Gu <guwen@linux.alibaba.com> Reviewed-by: Tony Lu <tonylu@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/1754
This commit is contained in:
parent
8b5b0f9425
commit
48d5d861a5
|
@ -1134,9 +1134,10 @@ enum ib_qp_create_flags {
|
|||
IB_QP_CREATE_PCI_WRITE_END_PADDING =
|
||||
IB_UVERBS_QP_CREATE_PCI_WRITE_END_PADDING,
|
||||
|
||||
IB_QP_CREATE_IWARP_WITHOUT_CM = 1 << 25,
|
||||
/* reserve bits 26-31 for low level drivers' internal use */
|
||||
IB_QP_CREATE_RESERVED_START = 1 << 26,
|
||||
/* reserve for eRDMA OOB connection establishment */
|
||||
IB_QP_CREATE_IWARP_WITHOUT_CM = 1 << 27,
|
||||
IB_QP_CREATE_RESERVED_END = 1 << 31,
|
||||
};
|
||||
|
||||
|
|
|
@ -69,6 +69,10 @@ struct workqueue_struct *smc_close_wq; /* wq for close work */
|
|||
static void smc_tcp_listen_work(struct work_struct *);
|
||||
static void smc_connect_work(struct work_struct *);
|
||||
|
||||
bool reserve_mode = true; /* default use reserve_mode */
|
||||
module_param(reserve_mode, bool, 0444);
|
||||
MODULE_PARM_DESC(reserve_mode, "reserve mode support and keep-first-contact disable");
|
||||
|
||||
int smc_nl_dump_hs_limitation(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
{
|
||||
struct smc_nl_dmp_ctx *cb_ctx = smc_nl_dmp_ctx(cb);
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
extern struct proto smc_proto;
|
||||
extern struct proto smc_proto6;
|
||||
|
||||
extern bool reserve_mode;
|
||||
|
||||
#ifdef ATOMIC64_INIT
|
||||
#define KERNEL_HAS_ATOMIC64
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue