Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1359574rdh; Mon, 25 Sep 2023 10:12:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhPNGt4VawwSX50aYJWtPeAEqYmznHKDRWLVQX5R7DmLI+KhoqJsyJzqAKOOB7RLvhWGJB X-Received: by 2002:a17:903:1ca:b0:1c5:9d00:be84 with SMTP id e10-20020a17090301ca00b001c59d00be84mr334120plh.33.1695661977083; Mon, 25 Sep 2023 10:12:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695661977; cv=none; d=google.com; s=arc-20160816; b=kwZdm5XvRK0kpeU5K8AaRbukDEmhH119wkEBzgNCkQ4cQhFFFHQxfFtNERGTUeB0B/ 7f+IpAKKUq6T4BwGQftyFzRGWkESDIz218c/dqH8/3VowkiRwNGmJtJKSCa1Kz7vHEoZ hpWeFU+uR6kJ99W/3ucJDz+rnyAOdLufhCcYM+oCLFVUzOXU7Z0bG+oZ9TrFc6GL9NIp dGssh5XeR84jc1sALW8p02dh0eAmbd93uNVICW5lh6kOrfhtc8Nl5Z38+2oued0XxWfg uvawisYIXiWd3ilu6T7+0PKq7i0MVFCtL5NyfVzvgvpjX5lXnJN2UEh1jxuqEpBa/tu2 p3Uw== 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:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=u/uhG0g/kXxNmlqKDXNg/CTspL0SQq4wEiD1G7ilDOA=; fh=IcXRiz1LnfUwDFMkpdCs3ZbrmCNQ82zUjUe5f/PhP6M=; b=nocvEcYDa7VoXFr2EIJygPPTNEEUjEyGHus7SejNnrJlvxNPWbjbXTdXUyAR1MW90A KQr2PzC9aPX+XxQHS4vVctemEnRvQveN8Xsd20LciahHOU3w3SyS3mw5nI5Mn0QSKPdT pto5ijpSjx5nL+btTYoTik0tBIT4UeG3Z7Re/YmdGfHvDL6SimoBqZXZWTzY/td68oqd JUJz89Qgo5B4OaS6Ke5OcLiS3lZ77Q9SbKaruRMjtsjzV9kHgWz1aMIHjNkmxQNr9/k3 EvJOeL8/TidetDcV+KBeTieBYNbp5q80Zel03CvRBKKZ2Q1jWfR8wBcB/01pchUV7grL AZKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=gPk0OIhh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id kj3-20020a17090306c300b001c5c34172e8si9761715plb.281.2023.09.25.10.12.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 10:12:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=gPk0OIhh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B14C1806BE29; Mon, 25 Sep 2023 04:50:44 -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 S229712AbjIYLuk (ORCPT + 99 others); Mon, 25 Sep 2023 07:50:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjIYLug (ORCPT ); Mon, 25 Sep 2023 07:50:36 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DF3E9B; Mon, 25 Sep 2023 04:50:30 -0700 (PDT) Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38PBbbSR000407; Mon, 25 Sep 2023 11:50:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=u/uhG0g/kXxNmlqKDXNg/CTspL0SQq4wEiD1G7ilDOA=; b=gPk0OIhhwM4P/q0SQJ8jShpAnQvbf8wHyamg1+r0ImY1fE+0375sSKWLzFisMCp7SKRW zt4eA1tPDWGVaLSylOF+8molm1X3gDsHxo1PBsaKxL3AKBSBUeCexzTtoEWSg76efouN owxOIY37Dk/22AU/JGGZxVIF9P3MobfeXQ52wrusa/+6/yF0/2Hd5bKTkUn5/YbVo1A3 eEDxG5dAbrcW2n5gu14igOHUZ/M/a0GYIzsCoKL+7EBFOnCyFwOn0gLs3kfieVMqDi94 xE1xWrNpzomuY0v1bjJIUEfu8OBJKQJg8WT8rcshuP+sivlM+rTFaaHAf5yuqaxYF+mz TQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tb7m62ts9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Sep 2023 11:50:27 +0000 Received: from m0353726.ppops.net (m0353726.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38PBbp5h002470; Mon, 25 Sep 2023 11:50:27 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3tb7m62trt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Sep 2023 11:50:26 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38P9tmFS030719; Mon, 25 Sep 2023 11:50:26 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3tacjjhd4d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Sep 2023 11:50:25 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38PBoMN116908974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Sep 2023 11:50:23 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CE75320043; Mon, 25 Sep 2023 11:50:22 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9433F20040; Mon, 25 Sep 2023 11:50:22 +0000 (GMT) Received: from [9.152.224.54] (unknown [9.152.224.54]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 25 Sep 2023 11:50:22 +0000 (GMT) Message-ID: <3febdf3e-e213-7acf-7dd4-75d177676c3e@linux.ibm.com> Date: Mon, 25 Sep 2023 13:50:22 +0200 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 Content-Language: en-US To: Wen Gu , 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> From: Alexandra Winter In-Reply-To: <1695568613-125057-10-git-send-email-guwen@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: t_8wHPH4AWvOWU9GE8aKNKofI0SNlpax X-Proofpoint-GUID: RlZnKHlCw6vIphuA58WF_Icozxk9YcXO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-25_08,2023-09-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 adultscore=0 impostorscore=0 phishscore=0 spamscore=0 mlxlogscore=577 suspectscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309250086 X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS 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]); Mon, 25 Sep 2023 04:50:44 -0700 (PDT) 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.