Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3424898rdb; Sun, 10 Dec 2023 05:25:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IE2YhRF4352afOZLJSAr9sjyPC04NnXQ73vQ071kh1DF0OpAslfYdbVL96pNyIHXBj6joaU X-Received: by 2002:a17:90b:ec7:b0:28a:3526:a404 with SMTP id gz7-20020a17090b0ec700b0028a3526a404mr1001989pjb.32.1702214715192; Sun, 10 Dec 2023 05:25:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702214715; cv=none; d=google.com; s=arc-20160816; b=h0msh7EiMHNdZKoAZHUVSrOjUJgf8KU3QnZTUt0AM08f7O/Uy6chYdXpb0uia+qDmD dhk5gypNNvIz4AOjmSTYTuKxBlLIp5yDva4+Gglnswix9fFRoUU/7M876NSXd881AeTj HaDz+f2goH5yicj2kp2Btq3CITAvaKYwnlcfdtPsgcl9jUR7FXcW8Ewh2PNGF1LF/RQu PF6XwV9pujkYAdzXKJoIlUzE90ciGSjU++d4a1JL5IpB/JNIHBVDkqqZLswMIJ4CUWzS smGHmvCVTFSE5NKWFyHQ16W0+rtcxcIvDWA9lgO9ORH67AzbvbiPYZhDBwLflvQ9FkiN GNuA== 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=eAhTLEyxtGLN/eUKyibMIk/ctE8yITan3peWN2XYho4=; fh=OseD/KU9IozxwwuPl+YAZpOMu/WojE/9fn/xPSMdB/8=; b=iB/ZDFmy6ZAhzNmrp20DHJ5UyA8y+jJnpJllz6HHBNPMSc1dKuoGgKHcElTIeoQgjV 47KLkM3BLFtPltVvPhwY66aJPo85gd+kqyvQY1W8SQ/f4v2g5C8DKCxHAzPA/pn2CjNB TvXqgJs57YCV0pE3SgXHwzEXgNyXQVqvh1O/yyQYZu1WAfbwO7M0nIHg465VOUEGG7k+ AogC/nvFbLroMbVPxxRMtFO+DmJahJfR47nJFOVQt4i2PPJ3b96rG9BKY792N71XthRi A3Qu8MDfAi2oeg44aDetyKaOVzSzwkDnTgCtF4VMGjK41sjVmpkFY57iREGq1g/JgP+0 S0bg== 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 ng10-20020a17090b1a8a00b00280479459f7si6099326pjb.50.2023.12.10.05.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 05:25:15 -0800 (PST) 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 9DEF7806314F; Sun, 10 Dec 2023 05:25:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232579AbjLJNYc (ORCPT + 99 others); Sun, 10 Dec 2023 08:24:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232544AbjLJNYY (ORCPT ); Sun, 10 Dec 2023 08:24:24 -0500 Received: from out30-119.freemail.mail.aliyun.com (out30-119.freemail.mail.aliyun.com [115.124.30.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E8FD10C; Sun, 10 Dec 2023 05:24:30 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R841e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0Vy8BEmd_1702214666; Received: from localhost(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0Vy8BEmd_1702214666) by smtp.aliyun-inc.com; Sun, 10 Dec 2023 21:24:28 +0800 From: Wen Gu To: wintera@linux.ibm.com, 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, guwen@linux.alibaba.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH net-next 05/13] net/smc: implement some unsupported operations of loopback-ism Date: Sun, 10 Dec 2023 21:24:06 +0800 Message-Id: <1702214654-32069-6-git-send-email-guwen@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1702214654-32069-1-git-send-email-guwen@linux.alibaba.com> References: <1702214654-32069-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,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 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, 10 Dec 2023 05:25:12 -0800 (PST) vlan operations are not supported currently since the need for vlan in loopback situation does not seem to be strong. signal_event operation is not supported since no event now needs to be processed by loopback-ism device. Signed-off-by: Wen Gu --- net/smc/smc_loopback.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/net/smc/smc_loopback.c b/net/smc/smc_loopback.c index 39e8c8d..349a969 100644 --- a/net/smc/smc_loopback.c +++ b/net/smc/smc_loopback.c @@ -50,6 +50,32 @@ static int smc_lo_query_rgid(struct smcd_dev *smcd, struct smcd_gid *rgid, return 0; } +static int smc_lo_add_vlan_id(struct smcd_dev *smcd, u64 vlan_id) +{ + return -EOPNOTSUPP; +} + +static int smc_lo_del_vlan_id(struct smcd_dev *smcd, u64 vlan_id) +{ + return -EOPNOTSUPP; +} + +static int smc_lo_set_vlan_required(struct smcd_dev *smcd) +{ + return -EOPNOTSUPP; +} + +static int smc_lo_reset_vlan_required(struct smcd_dev *smcd) +{ + return -EOPNOTSUPP; +} + +static int smc_lo_signal_event(struct smcd_dev *dev, struct smcd_gid *rgid, + u32 trigger_irq, u32 event_code, u64 info) +{ + return 0; +} + static int smc_lo_supports_v2(void) { return SMC_LO_V2_CAPABLE; @@ -78,11 +104,11 @@ static struct device *smc_lo_get_dev(struct smcd_dev *smcd) .query_remote_gid = smc_lo_query_rgid, .register_dmb = NULL, .unregister_dmb = NULL, - .add_vlan_id = NULL, - .del_vlan_id = NULL, - .set_vlan_required = NULL, - .reset_vlan_required = NULL, - .signal_event = NULL, + .add_vlan_id = smc_lo_add_vlan_id, + .del_vlan_id = smc_lo_del_vlan_id, + .set_vlan_required = smc_lo_set_vlan_required, + .reset_vlan_required = smc_lo_reset_vlan_required, + .signal_event = smc_lo_signal_event, .move_data = NULL, .supports_v2 = smc_lo_supports_v2, .get_local_gid = smc_lo_get_local_gid, -- 1.8.3.1