Skip to content

Commit

Permalink
net/smc: Use sysctl-specified types of buffers in new link group
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wen Gu authored and David S. Miller committed Jul 18, 2022
1 parent 4bc5008 commit b984f37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/smc/smc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ static int smc_lgr_create(struct smc_sock *smc, struct smc_init_info *ini)
lgr->net = smc_ib_net(lnk->smcibdev);
lgr_list = &smc_lgr_list.list;
lgr_lock = &smc_lgr_list.lock;
lgr->buf_type = lgr->net->smc.sysctl_smcr_buf_type;
atomic_inc(&lgr_cnt);
}
smc->conn.lgr = lgr;
Expand Down
1 change: 1 addition & 0 deletions net/smc/smc_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ struct smc_link_group {
/* used rtoken elements */
u8 next_link_id;
enum smc_lgr_type type;
enum smcr_buf_type buf_type;
/* redundancy state */
u8 pnet_id[SMC_MAX_PNETID_LEN + 1];
/* pnet id of this lgr */
Expand Down

0 comments on commit b984f37

Please sign in to comment.