Skip to content

Commit bbed596

Browse files
GuangguanWangdavem330
authored andcommitted
net/smc: Extend SMCR v2 linkgroup netlink attribute
Add SMC_NLA_LGR_R_V2_MAX_CONNS and SMC_NLA_LGR_R_V2_MAX_LINKS to SMCR v2 linkgroup netlink attribute SMC_NLA_LGR_R_V2 for linkgroup's detail info showing. Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com> Reviewed-by: Jan Karcher <jaka@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 69b888e commit bbed596

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

include/uapi/linux/smc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ enum {
107107
enum {
108108
SMC_NLA_LGR_R_V2_UNSPEC,
109109
SMC_NLA_LGR_R_V2_DIRECT, /* u8 */
110+
SMC_NLA_LGR_R_V2_MAX_CONNS, /* u8 */
111+
SMC_NLA_LGR_R_V2_MAX_LINKS, /* u8 */
110112
__SMC_NLA_LGR_R_V2_MAX,
111113
SMC_NLA_LGR_R_V2_MAX = __SMC_NLA_LGR_R_V2_MAX - 1
112114
};

net/smc/smc_core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ static int smc_nl_fill_smcr_lgr_v2(struct smc_link_group *lgr,
319319
goto errattr;
320320
if (nla_put_u8(skb, SMC_NLA_LGR_R_V2_DIRECT, !lgr->uses_gateway))
321321
goto errv2attr;
322+
if (nla_put_u8(skb, SMC_NLA_LGR_R_V2_MAX_CONNS, lgr->max_conns))
323+
goto errv2attr;
324+
if (nla_put_u8(skb, SMC_NLA_LGR_R_V2_MAX_LINKS, lgr->max_links))
325+
goto errv2attr;
322326

323327
nla_nest_end(skb, v2_attrs);
324328
return 0;

0 commit comments

Comments
 (0)