Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2456642rdb; Wed, 4 Oct 2023 01:27:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnndf3HhmRQSIC4Lfqz1sR678dJGJxeyRCDPB6ltQP07jPsXg7fuu6alIIc8BBHEmz4fm4 X-Received: by 2002:a17:902:ea0c:b0:1c6:3157:29f3 with SMTP id s12-20020a170902ea0c00b001c6315729f3mr1973954plg.36.1696408057677; Wed, 04 Oct 2023 01:27:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696408057; cv=none; d=google.com; s=arc-20160816; b=ocMw34MTwHHYGIygj70GtDdCPnBNkJmFGfZlSY/fow91gq/E1ClMEN49bn0LjRK+an 0cXGNYpjSwu5tjEjMb7vlLDBYoXAkygWh3/UQKTAEQBJm9sytNYG79m0UMD87TOtGKGe b69n2mrsdnI7567wanKt3ycV0U+srAW5RdGpIzyApT77l9g48/lGXPJBVG3j1jrRjZVz 3AgW7nfqC7Z/tyC7PiUeULq7UxgCk5Ny0uJm6lplCqCbLOUhOLOi1SN8rF8E2Yr5LJC3 wUQrQ29kmCYWtSDCoGg2KknbpvAs1Z5aIQHu02p1/Njmi+kCmI84Qc2oda2OVmPThE6s zZfA== 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=bxYz0FvsAxpGwEWrw544g6CD2LNIycDHoidtZWVHSaM=; fh=lkwtwWOMYOzSCPQgFF3qSLQZeKIf77TpdIxMkouwDfY=; b=A07Rt/8DYKWNCRAiNGrq4wKU6oJWC2bTUoy7JNMInCOWwjO5ca34xRPyZu76elJMH0 9xQP9c6uIMaFH5lBycex5cev7zQrujl49gkBeavjVp9YBCfEt9NOPzQPeRwZ15qoiZJr ME6bmuxpsK0yyFXoxnyaBgjydxqbP4ZHe8BBKP9lVkFLMDbvCoDMZINdMUG/8w8CTakv UucmalBjZ3oIahSt6Yz+cMdYWqsQXK/1GbU5D+vJkIhpN0nPyJsnSf+3psfsQIt5msGv lZdGyio165P79SRYOEBChuaZ1rg3UwbKx0L47fnU5MWJb07ls8sSgyJOX3gcbM8KsvbL rQ1w== 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 kt5-20020a170903088500b001c7342b46e4si2932553plb.23.2023.10.04.01.27.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 01:27:37 -0700 (PDT) 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 1910F8246859; Wed, 4 Oct 2023 01:27:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241669AbjJDI1Z (ORCPT + 99 others); Wed, 4 Oct 2023 04:27:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232596AbjJDI1Y (ORCPT ); Wed, 4 Oct 2023 04:27:24 -0400 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 7D9F7B4; Wed, 4 Oct 2023 01:27:20 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R611e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0VtMWrES_1696408036; Received: from 30.13.48.40(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0VtMWrES_1696408036) by smtp.aliyun-inc.com; Wed, 04 Oct 2023 16:27:18 +0800 Message-ID: Date: Wed, 4 Oct 2023 16:27:11 +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 v4 05/18] net/smc: reserve CHID range for SMC-D virtual device To: Alexandra Winter , Jan Karcher , kgraul@linux.ibm.com, wenjia@linux.ibm.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: 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, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1695568613-125057-1-git-send-email-guwen@linux.alibaba.com> <1695568613-125057-6-git-send-email-guwen@linux.alibaba.com> <987f4ee8-57ab-71c2-597d-7835c3e1e202@linux.ibm.com> From: Wen Gu In-Reply-To: <987f4ee8-57ab-71c2-597d-7835c3e1e202@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 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, 04 Oct 2023 01:27:35 -0700 (PDT) On 2023/9/28 17:10, Alexandra Winter wrote: > > > On 28.09.23 05:08, Jan Karcher wrote: >> On 24/09/2023 17:16, Wen Gu wrote: >>> This patch reserve CHID range from 0xFF00 to 0xFFFF for SMC-D virtual >> >> The current state is that 0xFF00 - 0xFFFF is the range of all virtual SMC-D devices. This range devides into: >> - 0xFF00 - 0xFFFE is for virto-ism >> - 0xFFFF is for loopback >> >> >>> device and introduces helpers to identify them. >>> >>> Signed-off-by: Wen Gu >>> --- >>>   net/smc/smc_ism.h | 15 +++++++++++++++ >>>   1 file changed, 15 insertions(+) >>> >>> diff --git a/net/smc/smc_ism.h b/net/smc/smc_ism.h >>> index 14d2e77..2ecc8de 100644 >>> --- a/net/smc/smc_ism.h >>> +++ b/net/smc/smc_ism.h >>> @@ -15,6 +15,9 @@ >>>     #include "smc.h" >>>   +#define SMC_VIRT_ISM_CHID_MAX        0xFFFF >> >> SMC_VIRT_ISM_MAX is 0xFFFE. Or do you mean virtual devices as the whole group. If yes i think that this naming will be very confusing in a few months/years. >> Maybe something like SMC_VIRTUAL_DEV_CHID_{MIN|MAX}? > > > IMO names are important. They can make future lives easier or harder. > Hi Sandy and Jan, I agree with your opinion that names are important. I view these terms in this way: SMC-D devices (smcd_dev) | |- s390 ISM devices (ISM, ism_dev) | |- virtual ISM devices (virtual ISM, smc_lo_dev) | | | |- loopback-ism | | | |- virtio-ism | |- maybe future devices SMC_VIRT_ISM_CHID_MAX was introduced to represent the maximum CHID of virtual ISM devices. CHIDs used by virtual ISM devices should be in range of [SMC_VIRT_ISM_CHID_MIN, SMC_VIRT_ISM_CHID_MAX]. I think the problem here is that SMC_VIRT_ISM_CHID_MAX might be misunderstood as CHID of virtio-ism? Then I will change them to SMC_VIRTUAL_ISM_CHID_{MAX|MIN}. > Your first group of patches aims at 'decouple ISM device hard code from SMC-D stack' > Maybe now would be a good point in time to decide what ISM should mean in net/smc. > a) the s390 ISM devices > b) SMC-D devices in general > I would vote for a). (today a) and b) can be found in the code, as well as the term smcd_dev) > > Then like Jan wrote above: > "0xFF00 - 0xFFFF is the range of all virtual SMC-D devices" and it should NOT be called SMC_VIRT_ISM_CHID_MAX. > Yes, I also vote for a). But IMHO, loopback-ism and virtio-ism should be better classified as 'virtual ISM devices', like what describes in the specification, rather than 'virtual SMC-D devices', since they are intended to emulate ISM devices for using SMC-D on non-s390 systems. > > Then in many places in net/smc 'ism' should be replaces by 'smcd_dev' or something similar. > Wen Gu, is that something you would offer to do as part of the preparation work for this series? Yes. But I'm not sure which 'ism' words you suggested to be replaced with 'smcd_dev'/'smcd'? IMHO, in some generic codes like SMC-D operations (smcd_ops) or SMC-D device dump, they should be generic to all kinds of SMC-D devices, so struct ism_dev or struct ism_client should not be used, that is what patch#1 & #2 want to do. But in some operations related to underlay device, like smcd_ism_register_dmb(), smc_ism_cantalk(), and etc in smc_ism.c. They works for both s390 ISM devices and virtual ISM devices. I think they can keep 'ism' in the helpers' name as they are now. What do you think? Thanks and regards, Wen Gu