From patchwork Tue Sep 19 14:41:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen Gu X-Patchwork-Id: 141934 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3447596vqi; Tue, 19 Sep 2023 07:52:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGnsrlTiQTLST8ILPR/lMNX/Wt/EDZ6gRy+W8EomFi5RVv6RGsbgbqaiqHOHV4Idi1qzSwg X-Received: by 2002:a05:6a20:8e02:b0:141:cc5f:7d28 with SMTP id y2-20020a056a208e0200b00141cc5f7d28mr6491447pzj.50.1695135172988; Tue, 19 Sep 2023 07:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695135172; cv=none; d=google.com; s=arc-20160816; b=dy3vQOKsOr0tA9fuoNz6/F7hKakfrj4TbBGmzS9CuLdtX4ZuQ8C1SeKVQTCEdb/sQe lc/wNMyRctuQlk0+vZpOO3LI2XPbLlDzSisQ5Jp2rqIJ2hlfj5oRfGLXNC8LpVVnCR15 N/42eY7MDLKz5GG73bP9qcstYm1z8y/C4WBHY6LbTOsDrwFC7+6KyBB+n1I55hCO5UGg 7mRn4nueebK925AkhBFNAks9SpdPUobKNGGjhc//yejgqi0v4KyBczXytSYZXNxDpnMf trJcYcOT7R28CWU6mhOpEMqutz9LPaQe5gq1AHwTsc96XWwfpx9VEVQW2a8TnKxD5NtQ 4xXg== 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=757vBKA+aPUcQjvHtDQDkXhjjWNpZNpazhiORavJmyw=; fh=2Ks5OhTjwS8gZt4F+VGxBODwUEQ0u2wJBF3lQY5ZqAM=; b=vdm/xD0fwLvGCkM8jN9JMDCy89QIhlgw1biYdTUtKoGUztLJUx4wHQLbX87pvOM7J+ lCSDyngry6zgoD43Xxy4Le35H1uDulXI0y6fqsUY8sBiGyq263TnWNir92GHRHFfhjfb iYP0X1f1EsHidCJ6O8Qt89VRbtphEkb0ZdBvuAR3Ybe67+VgVsqzEt+kDSwW+cJWNiMI +n5DPF3Prj3jJBCpvA54jS9hQscRqX8r+2YcOYzuaM6QFuwzMBf+7CkYGZCpJqwYiBKy C6KfViRlOYfnA8Z1nJV05LzCMeImZlVTMxXwtbl4g8a/DwOIZ4FW4EtkdlwW937Qe+fq yPXQ== 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 Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id cq24-20020a056a00331800b0068a6f6d9f7dsi9885745pfb.57.2023.09.19.07.52.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 07:52:52 -0700 (PDT) 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 2E76F8023918; Tue, 19 Sep 2023 07:43:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233106AbjISOnm (ORCPT + 26 others); Tue, 19 Sep 2023 10:43:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233050AbjISOna (ORCPT ); Tue, 19 Sep 2023 10:43:30 -0400 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FD22CDC; Tue, 19 Sep 2023 07:43:07 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R731e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0VsRqc92_1695134576; Received: from localhost(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0VsRqc92_1695134576) by smtp.aliyun-inc.com; Tue, 19 Sep 2023 22:42:58 +0800 From: Wen Gu To: 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: 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: [PATCH net-next 11/18] net/smc: implement some unsupported operations of loopback Date: Tue, 19 Sep 2023 22:41:55 +0800 Message-Id: <1695134522-126655-12-git-send-email-guwen@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1695134522-126655-1-git-send-email-guwen@linux.alibaba.com> References: <1695134522-126655-1-git-send-email-guwen@linux.alibaba.com> X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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]); Tue, 19 Sep 2023 07:43:57 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777478059122309258 X-GMAIL-MSGID: 1777478059122309258 Vlan operations are not supported currently since the need for vlan in loopback does not seem to be strong. Signal_event operation is not supported since no event now needs to be processed by loopback 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 6b8ff65..fe61260 100644 --- a/net/smc/smc_loopback.c +++ b/net/smc/smc_loopback.c @@ -73,6 +73,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, u64 rgid, u32 trigger_irq, + u32 event_code, u64 info) +{ + return 0; +} + static int smc_lo_supports_v2(void) { return SMC_LO_SUPPORTS_V2; @@ -106,11 +132,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_system_eid = smc_lo_get_system_eid,