Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp708942rdh; Sun, 24 Sep 2023 08:18:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHILlYCOc4Q339w/1r47W0j3Zb/oc+FSYFZCTA9vrgQh/G/V+5DE6M0Gb3Vu7bdRhBg1ix7 X-Received: by 2002:a05:6808:10d6:b0:3a7:7d4:4f91 with SMTP id s22-20020a05680810d600b003a707d44f91mr7586343ois.14.1695568700283; Sun, 24 Sep 2023 08:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695568700; cv=none; d=google.com; s=arc-20160816; b=d+BNSot9JWPS7qG+a6EJo17tw1OsQKeqIpk7Tg97Zcw6CdZPHGA6MK5fsrn9tC/zUo H2TiiYG6OG9cmnLoLSPIs4N9qWXWWyclXsTtpt7VQy9xsm/peNyFBtKYyOmnBjUqU6Pd SJgm15GDM6SqO7076Q9tKgxbhSVLM2rw7ncPnmfhLFpnxj4I3NYyJQ/uYBjYfl5EaTQK wi/X0oPqw+fEhuLgxCagwvvlBwK/f762ADNyweouBnkOe1S2kqSWed0wu0Jod48AWxqM Cv1w9UufoTvPUBqDLRWC9DdlwYRnlBvHsqQN4UD7aOm0KWl7S4eE4TUQ2EwHqaRk3g1i yCYw== 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=EYcGpfMcAYSbZ7LiIeLnw9Do+HzrOWthPw6TqqTf33M=; fh=kTBstCixiri9Ahdk8UNuw7wmcx8Ry+mqafUdDsc8Vd0=; b=XwK8oUW1PgC5RS6tawVzHd+wG69KJPEV6QEp2od17atF9EwljAUnMlMg3Exme9/OxV XUkz71CqNUOXuYGeM4WtUyO0n6P/Zmlr0BpLdyqlaMChpcZskh2Z/utrwo0q0wTXNAZn hC0hpT+zkNL5KEgXbVRIJ7psxaxwarXSSBDkh+yJVYnDMz+294lEanQk7JnXKTJxx3IO 2BFNK6Ugb/wRU7W4kqQouMn12iziQNHUhHHQRDYgdXv13SQ6ZT0if0usaBRJLO1bitur X2otMRIrKrzHgntgSOALCQdchn6ekmg88um/FPD18NjnBlSFH2i+RZfeQoxelpZYvo8d Y9lg== 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:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id n67-20020a632746000000b0057759a5b7ccsi8528900pgn.305.2023.09.24.08.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 08:18:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 7D644819D1E7; Sun, 24 Sep 2023 08:18:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229982AbjIXPRw (ORCPT + 99 others); Sun, 24 Sep 2023 11:17:52 -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> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Sun, 24 Sep 2023 08:18:11 -0700 (PDT) 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 = 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)) { @@ -1993,6 +1994,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 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 = 27, }; +enum smc_supp_feature { /* supplemental features supported by current version */ + SMC_SPF_VIRT_ISM_DEV = 0, +}; + +#define SMC_FEATURE_MASK \ + (BIT(SMC_SPF_VIRT_ISM_DEV)) + struct smc_link_group; struct smc_wr_rx_hdr { /* common prefix part of LLC and CDC to demultiplex */ -- 1.8.3.1