From nobody Wed Jan 15 16:02:23 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5873CD5BCE for ; Tue, 19 Sep 2023 14:43:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232967AbjISOnn (ORCPT ); Tue, 19 Sep 2023 10:43:43 -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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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, stru= ct smcd_gid *rgid, return 0; } =20 +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 =3D smc_lo_query_rgid, .register_dmb =3D NULL, .unregister_dmb =3D NULL, - .add_vlan_id =3D NULL, - .del_vlan_id =3D NULL, - .set_vlan_required =3D NULL, - .reset_vlan_required =3D NULL, - .signal_event =3D NULL, + .add_vlan_id =3D smc_lo_add_vlan_id, + .del_vlan_id =3D smc_lo_del_vlan_id, + .set_vlan_required =3D smc_lo_set_vlan_required, + .reset_vlan_required =3D smc_lo_reset_vlan_required, + .signal_event =3D smc_lo_signal_event, .move_data =3D NULL, .supports_v2 =3D smc_lo_supports_v2, .get_system_eid =3D smc_lo_get_system_eid, --=20 1.8.3.1