Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2251928rwo; Thu, 3 Aug 2023 07:01:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlHdowGaIU4xxVzfFqdQutgL7TpxuDpv9lXpTUXzDtyEmbRh0b/plD6QvASngtXctu3Cvp3t X-Received: by 2002:a50:fa8d:0:b0:522:9ead:56e4 with SMTP id w13-20020a50fa8d000000b005229ead56e4mr8725138edr.1.1691071263500; Thu, 03 Aug 2023 07:01:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691071263; cv=none; d=google.com; s=arc-20160816; b=nqp9euAK5xiZOIJ5ZncXdUkzLdd7P/U2u7zh1dQDMyBi4/N7kG9r93jgjm1WQ2ND76 PrMY5K2d7MM2nidIGHsKvqGPN1sZeuuw61SK2wd0/el2epYL0m/bVfFPVXI/lr8h0HMd j/kyeIGfnzd7NT63e3cOvjYnGnp2lYkkPJsIYJ/X1fG83KdXWToa3zVG3BJrW33y2+Wn ApbOVU0NTSAwiD/JLikvKC6RnKCyMvZ5ruXFiJYGl9pBlpWoLiDP/ochRQ7D2fL/dUph u8atlQHZ6m+WSLo3eHMRioWqYOU44OHWUxxGlLqYGdi8/idaPpUgrGPRhwnbT6TxcqGs YZ7w== 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=8ip4DUddnTzabERi8TVpNN2xDOzoY7hIlOifJESapF8=; b=L1piIBgnA4UH1FxYDqIft0v5Z+Hb4i4U5HF0NjDRtdS/chCBg2GY18WuJNepncTOj8 FqACedbPkrrUONWUbokEEzUg9xGzOFQlz1XfqthIWwCKlPw2O9+sy/rFPRdtRM3WD8Js 760glYMDiIFxao2U5afZ5tGP0brB75xdUInH6tsH7RHprk7TS3Ksou+BNMDgDhbtjZGp oXGlyvdBR8eSbHgjUxCLNERfeqc/jYPYEBIP0oboojISbVigynNuFgMTNqHhfC4TBapi tCNqi5c/X1S4chPO5NUl4whGigxBef7tZsC+AZJUQCcWya/N/lNE8r1++3AeMobNo32E aJpQ== 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 bo7-20020a0564020b2700b00523108e0dc0si611602edb.155.2023.08.03.07.00.21; Thu, 03 Aug 2023 07:01:03 -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 S236143AbjHCNYy (ORCPT + 99 others); Thu, 3 Aug 2023 09:24:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235697AbjHCNYe (ORCPT ); Thu, 3 Aug 2023 09:24:34 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEDEB1BFA; Thu, 3 Aug 2023 06:24:32 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R451e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=guangguan.wang@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0Voz-FRv_1691069068; Received: from localhost.localdomain(mailfrom:guangguan.wang@linux.alibaba.com fp:SMTPD_---0Voz-FRv_1691069068) by smtp.aliyun-inc.com; Thu, 03 Aug 2023 21:24: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: 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 net-next 6/6] net/smc: Extend SMCR v2 linkgroup netlink attribute Date: Thu, 3 Aug 2023 21:24:22 +0800 Message-Id: <20230803132422.6280-7-guangguan.wang@linux.alibaba.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20230803132422.6280-1-guangguan.wang@linux.alibaba.com> References: <20230803132422.6280-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, T_SCC_BODY_TEXT_LINE,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)