Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/smc: Use sysctl-specified types of buffers in new link group

This patch introduces a new SMC-R specific element buf_type
in struct smc_link_group, for recording the value of sysctl
smcr_buf_type when link group is created.

New created link group will create and reuse buffers of the
type specified by buf_type.

Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Wen Gu and committed by
David S. Miller
b984f370 4bc5008e

+2
+1
net/smc/smc_core.c
··· 907 907 lgr->net = smc_ib_net(lnk->smcibdev); 908 908 lgr_list = &smc_lgr_list.list; 909 909 lgr_lock = &smc_lgr_list.lock; 910 + lgr->buf_type = lgr->net->smc.sysctl_smcr_buf_type; 910 911 atomic_inc(&lgr_cnt); 911 912 } 912 913 smc->conn.lgr = lgr;
+1
net/smc/smc_core.h
··· 284 284 /* used rtoken elements */ 285 285 u8 next_link_id; 286 286 enum smc_lgr_type type; 287 + enum smcr_buf_type buf_type; 287 288 /* redundancy state */ 288 289 u8 pnet_id[SMC_MAX_PNETID_LEN + 1]; 289 290 /* pnet id of this lgr */