From nobody Wed Jan 15 17:45:08 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 4605BCE7A8B for ; Sun, 24 Sep 2023 15:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230124AbjIXPSI (ORCPT ); Sun, 24 Sep 2023 11:18:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230226AbjIXPRu (ORCPT ); Sun, 24 Sep 2023 11:17:50 -0400 Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C008CE5F; Sun, 24 Sep 2023 08:17:28 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;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=18;SR=0;TI=SMTPD_---0VsinOcr_1695568642; Received: from localhost(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0VsinOcr_1695568642) by smtp.aliyun-inc.com; Sun, 24 Sep 2023 23:17:24 +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: wintera@linux.ibm.com, 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, guwen@linux.alibaba.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v4 11/18] net/smc: implement some unsupported operations of loopback Date: Sun, 24 Sep 2023 23:16:46 +0800 Message-Id: <1695568613-125057-12-git-send-email-guwen@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1695568613-125057-1-git-send-email-guwen@linux.alibaba.com> References: <1695568613-125057-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 610af99..4341803 100644 --- a/net/smc/smc_loopback.c +++ b/net/smc/smc_loopback.c @@ -75,6 +75,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, struct smcd_gid *rgid, + u32 trigger_irq, u32 event_code, u64 info) +{ + return 0; +} + static int smc_lo_supports_v2(void) { return SMC_LO_SUPPORTS_V2; @@ -108,11 +134,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