From nobody Wed Jan 15 17:34:34 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 020B7CE7A88 for ; Sun, 24 Sep 2023 15:17:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229583AbjIXPRy (ORCPT ); Sun, 24 Sep 2023 11:17:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230024AbjIXPRi (ORCPT ); Sun, 24 Sep 2023 11:17:38 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF2E4CE5; Sun, 24 Sep 2023 08:17:23 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R771e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0Vsir4-C_1695568635; Received: from localhost(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0Vsir4-C_1695568635) by smtp.aliyun-inc.com; Sun, 24 Sep 2023 23:17:17 +0800 From: Wen Gu To: kgraul@linux.ibm.com, wenjia@linux.ibm.com, jaka@linux.ibm.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: wintera@linux.ibm.com, schnelle@linux.ibm.com, gbayer@linux.ibm.com, pasic@linux.ibm.com, alibuda@linux.alibaba.com, tonylu@linux.alibaba.com, dust.li@linux.alibaba.com, guwen@linux.alibaba.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v4 08/18] net/smc: enable virtual ISM device feature bit Date: Sun, 24 Sep 2023 23:16:43 +0800 Message-Id: <1695568613-125057-9-git-send-email-guwen@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1695568613-125057-1-git-send-email-guwen@linux.alibaba.com> References: <1695568613-125057-1-git-send-email-guwen@linux.alibaba.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This patch enables the first supplement feature of SMCv2.1, that is the support for virtual ISM devices. Signed-off-by: Wen Gu --- net/smc/af_smc.c | 2 ++ net/smc/smc.h | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 5bb41404..c5b7716 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -1528,6 +1528,7 @@ static int __smc_connect(struct smc_sock *smc) ini->smcr_version =3D SMC_V1 | SMC_V2; ini->smc_type_v1 =3D SMC_TYPE_B; ini->smc_type_v2 =3D SMC_TYPE_B; + ini->feature_mask =3D SMC_FEATURE_MASK; =20 /* get vlan id from IP device */ if (smc_vlan_by_tcpsk(smc->clcsock, ini)) { @@ -1993,6 +1994,7 @@ static int smc_listen_v2_check(struct smc_sock *new_s= mc, ini->smc_type_v2 =3D pclc->hdr.typev2; ini->smcd_version =3D smcd_indicated(ini->smc_type_v1) ? SMC_V1 : 0; ini->smcr_version =3D smcr_indicated(ini->smc_type_v1) ? SMC_V1 : 0; + ini->feature_mask =3D SMC_FEATURE_MASK; if (pclc->hdr.version > SMC_V1) { if (smcd_indicated(ini->smc_type_v2)) ini->smcd_version |=3D SMC_V2; diff --git a/net/smc/smc.h b/net/smc/smc.h index 24745fd..71b9640 100644 --- a/net/smc/smc.h +++ b/net/smc/smc.h @@ -58,6 +58,13 @@ enum smc_state { /* possible states of an SMC socket */ SMC_PROCESSABORT =3D 27, }; =20 +enum smc_supp_feature { /* supplemental features supported by current vers= ion */ + SMC_SPF_VIRT_ISM_DEV =3D 0, +}; + +#define SMC_FEATURE_MASK \ + (BIT(SMC_SPF_VIRT_ISM_DEV)) + struct smc_link_group; =20 struct smc_wr_rx_hdr { /* common prefix part of LLC and CDC to demultiplex= */ --=20 1.8.3.1