Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1411313rdb; Wed, 6 Dec 2023 19:51:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGyiYGxLEdcTqvlJCw600U/B09vjl01AMQXTLdur3xDoL91tpqBnF9pujGcql+RMZ8/yNW X-Received: by 2002:a05:6358:e497:b0:170:7811:87b9 with SMTP id by23-20020a056358e49700b00170781187b9mr608122rwb.18.1701921085087; Wed, 06 Dec 2023 19:51:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701921085; cv=none; d=google.com; s=arc-20160816; b=ecBs2ioYzbbLOcLydj7QA5Yl7aXaaHhgHuTDlJP3IGI7p5pI36Lh3KVBgLQ7N+hxD3 VvwbahJZBdsR/kvVS0jZ9qUz5vPfUs1bZpljF9JyHsChe2NNMof2SiyZiideg9aTmQ8/ lD7l19R4Tr8wOT4Ar1pTYD3PybmBdx6haWsEV7qhc9tiR4JwdmE6R1cTNwBaz2nV5Zlp 9R6ixiYZ6CbKbGlaY9h4AcohkJEje6Wya+FTIMKRs7NkM4fsU2PYklxKH928L5c/eZtF CQqN6LHX9pCAD4KcurSck1RC1ZBcvKKU3yXiqCVbVG0a2i8hWCrAGuk4oEn5QmLiV3S7 VjKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=vRojzZzchHsfDOM8UbtCg3ZIjIe+vH09pAVp8KWp7TM=; fh=uTJ0crBczByYIhxgrQpYUSGkMqtgvc9XI1pgPEVZjxY=; b=xM7+ByFV0tyDUtwDPxHwOQlqMhct6XtF3jYYFyyeXhw/qkFY27ZuzGUzmTDgp2J7Tu 1yaki6z66Nl76n3nq5A8oYWwd5OCCqwyhar+TXaVdWf6yXyN+NVIUsT26bG0MR1NtwNn RI3yBfDZaqimQjRPRjWHK/OLvsuDqp5Oftf3W/0/tUX4ON2q9FAh7+COT2wgdOjWsHg6 NSsn8dRwHyqJKipnSzg+7yFfSGIXHW1Q6qHyKro6UEzHo9D9DNM6+yVsYTgJZr2zD7PO SS+w0knqJ/IjjxIN1jBOwB71dpb2NB563HhHQ4VrhcGMayIPwTRMLVkorZDS9E9s7I6I XrQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id bz8-20020a056a02060800b00578b63123desi437526pgb.789.2023.12.06.19.51.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 19:51:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 89251805DEFD; Wed, 6 Dec 2023 19:51:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229780AbjLGDuM (ORCPT + 99 others); Wed, 6 Dec 2023 22:50:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjLGDuF (ORCPT ); Wed, 6 Dec 2023 22:50:05 -0500 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 D42D210CB; Wed, 6 Dec 2023 19:50:10 -0800 (PST) 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=ay29a033018046049;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=22;SR=0;TI=SMTPD_---0Vy-JsBu_1701921005; Received: from localhost(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0Vy-JsBu_1701921005) by smtp.aliyun-inc.com; Thu, 07 Dec 2023 11:50:07 +0800 From: Wen Gu To: wintera@linux.ibm.com, wenjia@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, kgraul@linux.ibm.com, jaka@linux.ibm.com Cc: borntraeger@linux.ibm.com, svens@linux.ibm.com, alibuda@linux.alibaba.com, tonylu@linux.alibaba.com, guwen@linux.alibaba.com, raspl@linux.ibm.com, schnelle@linux.ibm.com, guangguan.wang@linux.alibaba.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v4 4/9] net/smc: introduce virtual ISM device support feature Date: Thu, 7 Dec 2023 11:49:49 +0800 Message-Id: <1701920994-73705-5-git-send-email-guwen@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1701920994-73705-1-git-send-email-guwen@linux.alibaba.com> References: <1701920994-73705-1-git-send-email-guwen@linux.alibaba.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 06 Dec 2023 19:51:02 -0800 (PST) This introduces virtual ISM device support feature to SMCv2.1 as the first supplemental feature. Signed-off-by: Wen Gu --- net/smc/af_smc.c | 2 ++ net/smc/smc.h | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 7fc2f3c..0c4f975 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -1520,6 +1520,7 @@ static int __smc_connect(struct smc_sock *smc) ini->smcr_version = SMC_V1 | SMC_V2; ini->smc_type_v1 = SMC_TYPE_B; ini->smc_type_v2 = SMC_TYPE_B; + ini->feature_mask = SMC_FEATURE_MASK; /* get vlan id from IP device */ if (smc_vlan_by_tcpsk(smc->clcsock, ini)) { @@ -1985,6 +1986,7 @@ static int smc_listen_v2_check(struct smc_sock *new_smc, ini->smc_type_v2 = pclc->hdr.typev2; ini->smcd_version = smcd_indicated(ini->smc_type_v1) ? SMC_V1 : 0; ini->smcr_version = smcr_indicated(ini->smc_type_v1) ? SMC_V1 : 0; + ini->feature_mask = SMC_FEATURE_MASK; if (pclc->hdr.version > SMC_V1) { if (smcd_indicated(ini->smc_type_v2)) ini->smcd_version |= SMC_V2; diff --git a/net/smc/smc.h b/net/smc/smc.h index 903b151..9929d1e 100644 --- a/net/smc/smc.h +++ b/net/smc/smc.h @@ -58,9 +58,12 @@ enum smc_state { /* possible states of an SMC socket */ SMC_PROCESSABORT = 27, }; -#define SMC_FEATURE_MASK 0 /* bitmask of - * supported supplemental features - */ +enum smc_supplemental_features { + SMC_SPF_VIRT_ISM_DEV = 0, +}; + +#define SMC_FEATURE_MASK \ + (BIT(SMC_SPF_VIRT_ISM_DEV)) struct smc_link_group; -- 1.8.3.1