Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp2621483rwb; Mon, 7 Aug 2023 00:02:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEXKBlOjAUlh1YIuJXV785i0y+BnAUSqKdutoihkQCH8yfTaLS9l5+iycIIMIByXvJWTGWv X-Received: by 2002:a17:90a:3941:b0:262:ecd9:ed09 with SMTP id n1-20020a17090a394100b00262ecd9ed09mr6148299pjf.33.1691391751500; Mon, 07 Aug 2023 00:02:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691391751; cv=none; d=google.com; s=arc-20160816; b=rCj5LrIQ+FkUlC5Xb6QUaoAKMthS09DC2RT3A+a4rjMel997mA5xai+b5IhNKn36+G 9D0gWyBAlqnioKP7N4LeWk2ezvcAhIPdXMItoNKm50zCrXMQVyyvjNTWzVG7MjdpYhib DWcOgrhhfdEJLin9/4MS3Smd5lL3ua1pzoujkfvUpRKN/EwMOXm8LNADSxe3zl6lX462 1O2YUJLEq8wV7ZY6aq+g2ptReVjYP10TWLzIIiV9+RsyxB/S/uaHqL2366VK+nTIaM1b urqo9hsWbQjgCluzwYEEc4g2WtGmZtMlqnzXw9zCYOqI202HSvrIxQJecGIcqMhOduYs 0Iww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=oNoFFH8HSKjmfCfprLA4qYYgwAkiDrMix4ia+MSDn3s=; fh=ZCp5TNn3f3pdt4ChKWALzuwxJBSlAvSnn16y/cdV+Lg=; b=izpqIeCralyiCEeb7qQinkthLSm3HystuE4Yci083tZjuF14Bwt1zQW4WD0De/exs8 5GNsJAEx0RIjL0F0VAnNTiko+Ku3aRQ3wbJl89bzz4jR+ONH1+L3nJusUV0+F7ceuABQ SrFvlLlccqpA8B7N82GxCMPuu9Cblyi86kdnsjbNKlIfbIrHiU5LcssfTM6TOx0azHnt BH0LpiUKnlaA74pDk4Nidfpk8TRLGq5/xADcv+DjmjE6/jD+V4l5emVNRyGhQ2YS0GJM O3y7KeCiNiz6ryp+4lPQ/h2psZKdoheN6MtaL8pUsJX0DAD+//f7vgwjXRPjne7HBbBV pbmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mu17-20020a17090b389100b0026764aac11bsi7781770pjb.29.2023.08.07.00.02.18; Mon, 07 Aug 2023 00:02:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231251AbjHGG1u (ORCPT + 99 others); Mon, 7 Aug 2023 02:27:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231217AbjHGG1g (ORCPT ); Mon, 7 Aug 2023 02:27:36 -0400 Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 862BE10F9; Sun, 6 Aug 2023 23:27:33 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=guangguan.wang@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0VpANHwl_1691389649; Received: from localhost.localdomain(mailfrom:guangguan.wang@linux.alibaba.com fp:SMTPD_---0VpANHwl_1691389649) by smtp.aliyun-inc.com; Mon, 07 Aug 2023 14:27:29 +0800 From: Guangguan Wang To: wenjia@linux.ibm.com, jaka@linux.ibm.com, kgraul@linux.ibm.com, tonylu@linux.alibaba.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: horms@kernel.org, alibuda@linux.alibaba.com, guwen@linux.alibaba.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v2 net-next 6/6] net/smc: Extend SMCR v2 linkgroup netlink attribute Date: Mon, 7 Aug 2023 14:27:20 +0800 Message-Id: <20230807062720.20555-7-guangguan.wang@linux.alibaba.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20230807062720.20555-1-guangguan.wang@linux.alibaba.com> References: <20230807062720.20555-1-guangguan.wang@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- include/uapi/linux/smc.h | 2 ++ net/smc/smc_core.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/include/uapi/linux/smc.h b/include/uapi/linux/smc.h index bb4dacca31e7..837fcd4b0abc 100644 --- a/include/uapi/linux/smc.h +++ b/include/uapi/linux/smc.h @@ -107,6 +107,8 @@ enum { enum { SMC_NLA_LGR_R_V2_UNSPEC, SMC_NLA_LGR_R_V2_DIRECT, /* u8 */ + SMC_NLA_LGR_R_V2_MAX_CONNS, /* u8 */ + SMC_NLA_LGR_R_V2_MAX_LINKS, /* u8 */ __SMC_NLA_LGR_R_V2_MAX, SMC_NLA_LGR_R_V2_MAX = __SMC_NLA_LGR_R_V2_MAX - 1 }; diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index d5967826bcdf..182ac69d25c8 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -319,6 +319,10 @@ static int smc_nl_fill_smcr_lgr_v2(struct smc_link_group *lgr, goto errattr; if (nla_put_u8(skb, SMC_NLA_LGR_R_V2_DIRECT, !lgr->uses_gateway)) goto errv2attr; + if (nla_put_u8(skb, SMC_NLA_LGR_R_V2_MAX_CONNS, lgr->max_conns)) + goto errv2attr; + if (nla_put_u8(skb, SMC_NLA_LGR_R_V2_MAX_LINKS, lgr->max_links)) + goto errv2attr; nla_nest_end(skb, v2_attrs); return 0; -- 2.24.3 (Apple Git-128)