Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2673020rdb; Mon, 4 Dec 2023 04:36:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHPNgqaf+GPlMZfOWOeUJlPWDgyQX17ztTt3sxsqVzWoafbYB/20n3tQf5n9X+kS3gJI/y X-Received: by 2002:a05:6358:709:b0:170:32f2:aaa7 with SMTP id e9-20020a056358070900b0017032f2aaa7mr1229584rwj.6.1701693390636; Mon, 04 Dec 2023 04:36:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701693390; cv=none; d=google.com; s=arc-20160816; b=p/0h8mUroKxn2W+t9pxOKqLgTuOamuyx0FEkxWZK5AxYwkS+fAwq0gaS+MvSnbT6j2 YgOt6Tj/4zwEugzCfiD4nCKcKutIzFu/QzOZwAEeWKJa7rVQDs/Cm8jwXzww6O8NTKmk 8U820wFp9WyDOSnwKPeRgwADRB2+u4p/rmeO0Cp0X7LKwC9PP82qyP5O8W9wLD/VJt+V el6BEFXIGQigMSTRVb5/6yUhy7RFsJbUAaiI2uJQtUr+BPovT0m5Oo4WbefklIdwSiRi Z4xZey9fXHgfpJxFkcfCuW3/gkwV0VWTfEXlzO/sPuvp99y6/qwroxMtoLWZ7xajLqHu QU4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=62rxNUFrabgo1MsQVAn9Sa43KNGX8LiJhquJqZGKuFE=; fh=sEMXM8EIRon7mOSJlyzssyc8ZI4OrKolZNyYtAw3uRE=; b=0B36IX5DuFwcnmwNlcR+7lCuqrQsorVupA7NI6F1cgYwtvlPwmuPR052YcejawNn61 5dYK8xol3tPBnA3j4hf/Nsd2gOlbu0sh0c5JEQ6nA9rB2woCnIVgm2+oM7kjx0TBbMDD JCC3KAYF82gbny0Sb3pOnvvuFb3AlHFB8nC/93UoachlVGf3U+PEqfXxIHXEGQLdqpwK SE5gMp+DEW+lnHbYOj8gAfSTB053w3dMrejaf+FtyfVtnUQPu5YauKAwel+XCVExYETg YsZRWXOzHQd+15Zj3sus1X+dCJSRU2C2OUGpwscxU+7jOEJVLe1XYs7xYchYNQcBEc97 FRvw== 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:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id j24-20020a63cf18000000b00584ca25959csi8008200pgg.540.2023.12.04.04.36.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 04:36:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 14E8C80A7333; Mon, 4 Dec 2023 04:36:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232806AbjLDMgM (ORCPT + 99 others); Mon, 4 Dec 2023 07:36:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235405AbjLDMgG (ORCPT ); Mon, 4 Dec 2023 07:36:06 -0500 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E704FC0; Mon, 4 Dec 2023 04:36:11 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---0VxqRCak_1701693368; Received: from 30.221.130.147(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0VxqRCak_1701693368) by smtp.aliyun-inc.com; Mon, 04 Dec 2023 20:36:09 +0800 Message-ID: <8efa4f88-4ab1-bdd9-5705-93d62909bfa9@linux.alibaba.com> Date: Mon, 4 Dec 2023 20:36:07 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH net-next v3 7/7] net/smc: manage system EID in SMC stack instead of ISM driver To: Alexandra Winter , 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, raspl@linux.ibm.com, schnelle@linux.ibm.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1701343695-122657-1-git-send-email-guwen@linux.alibaba.com> <1701343695-122657-8-git-send-email-guwen@linux.alibaba.com> From: Wen Gu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 howler.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 (howler.vger.email [0.0.0.0]); Mon, 04 Dec 2023 04:36:28 -0800 (PST) On 2023/12/1 19:18, Alexandra Winter wrote: > > > On 30.11.23 12:28, Wen Gu wrote: >> The System EID (SEID) is an internal EID that is used by the SMCv2 >> software stack that has a predefined and constant value representing >> the s390 physical machine that the OS is executing on. So it should >> be managed by SMC stack instead of ISM driver and be consistent for >> all ISMv2 device (including virtual ISM devices) on s390 architecture. >> >> Suggested-by: Alexandra Winter >> Signed-off-by: Wen Gu >> --- > > Reviewed-by: Alexandra Winter > > > [...] >> diff --git a/net/smc/smc_ism.c b/net/smc/smc_ism.c >> index a33f861..ac88de2 100644 >> --- a/net/smc/smc_ism.c >> +++ b/net/smc/smc_ism.c > [...] >> @@ -431,14 +452,8 @@ static void smcd_register_dev(struct ism_dev *ism) >> >> mutex_lock(&smcd_dev_list.mutex); >> if (list_empty(&smcd_dev_list.list)) { >> - u8 *system_eid = NULL; >> - >> - system_eid = smcd->ops->get_system_eid(); >> - if (smcd->ops->supports_v2()) { >> + if (smcd->ops->supports_v2()) >> smc_ism_v2_capable = true; >> - memcpy(smc_ism_v2_system_eid, system_eid, >> - SMC_MAX_EID_LEN); >> - } >> } > > Just a comment: > Here we only check the first smcd device to determine whether we support v2. > Which is ok, for today's platform firmware ISM devices, as they are always the same version. > > When you add virtual ISM devices (loopback-ism, virtio-ism) then this needs to be changed. > IMO the logic then needs to be "if all smcd devices support v2, > then smc_ism_v2_capable = true; > else smc_ism_v2_capable = false;" > Thank you. I will change this in the loopback-ism patch set. But I am wondering if loopback-ism coexists with s390 ISMv1, why smc_ism_v2_capable shouldn't be set? Is it because the SEID generated in this way is not correct if the s390 ISMv2 does not exist? > I don't know if you would like to change that now in this patch, or later when > you add when you add the support for loopback. > >