Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1229107rdh; Mon, 25 Sep 2023 06:59:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGzF6Wyi/TVM73Rsq5vypx5nykSbnAdWuWuO+zDRriajPBxiXi6Sm/1VVbP4dmSSldehYyt X-Received: by 2002:a17:90b:1287:b0:274:6d4e:e0d9 with SMTP id fw7-20020a17090b128700b002746d4ee0d9mr6155691pjb.45.1695650355859; Mon, 25 Sep 2023 06:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695650355; cv=none; d=google.com; s=arc-20160816; b=SGQhQCEI4CthS4Y1xD1uL5bhiTQ3IMdJqgnMa24sfpkEzQNTu7vv2wIu7oukg9VWK5 AFJcNB+mo3ZdZg3ZzGBluCR75Cc6sNPbWCgy3bcqG9AOgG2VzVq57uZrr9VD43tyVkEt 3ZwAjP7f9PHEed7hGA3gfflNLaSLP4SFxX8wUF/PvHi5r7zIRAawkl0TPcZdxEoB0/Ob daSu21oy4A8uWb4DAyf0OO+JrjAW8pBjdxYjO2nrxQF8FkbvRXrjQv66DHFQpl34/FIJ tySkyJRYmxGZOCdhTaSvwmdHUDXmtB74AshWGMv77+buE70+9glj6AHJ8SnMJuEWgLUB vCvA== 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=rWQDnxOBFL+yJJ9whM04Sd5pTzEQnUzk5ZNLhrJTj70=; fh=OSyXv9gZsHDIuWNA9FlIa7SYwaD2Myi0gh/GQExUdqc=; b=gU7H7/xGFyOb1+ldcY6K6lbsdIAzsidIWP1Axa+T2qAWn4lhy+A2bCITx/qPknKGPP AyUGr+7YNGH7EYJ7wEq1qTRBeyvP6pgpAl0kEwjurSkLi1MO6us01fLvjxvM/Ab9ItZU Fc6T8rZl9cLbIDj1R5misquAt2ErKdxINYhofSjKWPtKSmQdP4n6Vjll7baF0DTsVDN4 +vDEuLa8d3MgE4tdsmiQm/wAVKJlDdZGU9BtPYOVL99pRUAz3bN7kTi1q9ZsBciWvO9Z n1DRMvK1tlImuiRN5ygBjD8G001Y5zBuICUhAk1VNhYr+/tFY12Zwgb3BMpmYVxvCA+F RTng== 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:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b2-20020a17090a9bc200b0027743a2eeb9si3847377pjw.124.2023.09.25.06.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 06:59:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id C84248057441; Mon, 25 Sep 2023 06:57:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229788AbjIYN5d (ORCPT + 99 others); Mon, 25 Sep 2023 09:57:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229718AbjIYN5b (ORCPT ); Mon, 25 Sep 2023 09:57:31 -0400 Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9351C107; Mon, 25 Sep 2023 06:57:22 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R411e4;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=17;SR=0;TI=SMTPD_---0VstgA6a_1695650236; Received: from 30.221.129.66(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0VstgA6a_1695650236) by smtp.aliyun-inc.com; Mon, 25 Sep 2023 21:57:17 +0800 Message-ID: <86612166-ab0c-1fcd-9c76-db8b2fc25be4@linux.alibaba.com> Date: Mon, 25 Sep 2023 21:57:12 +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 09/18] net/smc: introduce SMC-D loopback device To: Alexandra Winter , 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: 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-10-git-send-email-guwen@linux.alibaba.com> <3febdf3e-e213-7acf-7dd4-75d177676c3e@linux.ibm.com> From: Wen Gu In-Reply-To: <3febdf3e-e213-7acf-7dd4-75d177676c3e@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 25 Sep 2023 06:57:41 -0700 (PDT) On 2023/9/25 19:50, Alexandra Winter wrote: > > > On 24.09.23 17:16, Wen Gu wrote: >> This patch introduces a kind of loopback device for SMC-D. The device >> is created when SMC module is loaded and destroyed when the SMC module >> is unloaded. The loopback device is a kernel device used only by the >> SMC module and is not restricted by net namespace, so it can be used >> for local inter-process or inter-container communication. >> >> Signed-off-by: Wen Gu >> --- >> net/smc/Kconfig | 13 ++++ >> net/smc/Makefile | 2 +- >> net/smc/af_smc.c | 12 +++- >> net/smc/smc_loopback.c | 165 +++++++++++++++++++++++++++++++++++++++++++++++++ >> net/smc/smc_loopback.h | 33 ++++++++++ >> 5 files changed, 223 insertions(+), 2 deletions(-) >> create mode 100644 net/smc/smc_loopback.c >> create mode 100644 net/smc/smc_loopback.h > > > Hello Wen Gu, > > thank you for adding the Kconfig, so the distributions can decide when to offer this feature. > > I propose you add some kind of runtime switch as well. Not every user who loads the SMC module > may want to exploit smcd-loopback. Especially in native environements without containers. > > If no RoCE interfaces or no ISM interfaces exist, the respective handling is skipped in SMC. > If loopback is always created unconditionally, there is no way to opt-out. Yes, I need to think about this. Make a runtime switch to enable/disable the loopback-ism just like ip link up/down. An rough idea is to add an smc-tools command, like 'smcd device disable/enable loopback'. Thank you very much. Regards, Wen Gu