From patchwork Tue Mar 12 14:27:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen Gu X-Patchwork-Id: 13590080 X-Patchwork-Delegate: kuba@kernel.org Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 169BF7BAF8; Tue, 12 Mar 2024 14:28:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710253700; cv=none; b=tvWFlHO//HTWcxU4820+Gefi7RmDF0ANlDCezmNH/+XOsewlCaRnD4Fqe24OtW2/iTewigf/owM89K+8C6ZSeOhJl22CcFACvqf4FySEz40M4Og/LXCEuEnVV19W/thv1Cb8GZgq2+TCp/GlmL+jBr5iMF4Cr+/Sb/lAC1yATEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710253700; c=relaxed/simple; bh=Ee+xcNTcptaiM2jTB8g+F9qmbZgu8jnu92Rr6tA1wvY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WZlEtCUgM81RCJA8GKN8xJcTYyeq3162zC5EzYc7yKule0mcrfaXSGZef/Ti8vtcfJQwReTkDoC3HEc4CpXRf1Pz/Nt3MfeT3xH+I07o3A5D2Z1jGRL0P3LZcfWmBg7yW0A0dxS9zaHTskN8ZHY7gStUwLOhKwfLKOhG1lIlRTk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=RIHsaW3L; arc=none smtp.client-ip=115.124.30.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="RIHsaW3L" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1710253690; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=ubqaBkEChBN8FJYb5WwRk2pB7ZGQw8hXZ6l87c/Z7dk=; b=RIHsaW3Lzh9x8DnacjI6epTC7bhoPMKhAMuEOrueYEbGYArjq/Nk9YNutszPGYlfDLxSas72fZKnAFrisp/v3TGXBHKVFmUswfcRpKRBqpZj8CAL9Z0BoqfKu4quBdmJDBZ94BMYQ3at0qML10ZCh4V/8D8A6EUDr9wBT58I5oE= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0W2MG3KD_1710253688; Received: from localhost(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0W2MG3KD_1710253688) by smtp.aliyun-inc.com; Tue, 12 Mar 2024 22:28:09 +0800 From: Wen Gu To: wintera@linux.ibm.com, twinkler@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, wenjia@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-kernel@vger.kernel.org, linux-s390@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH net-next v3 05/11] net/smc: implement some unsupported operations of loopback-ism Date: Tue, 12 Mar 2024 22:27:37 +0800 Message-Id: <20240312142743.41406-6-guwen@linux.alibaba.com> X-Mailer: git-send-email 2.32.0.3.g01195cf9f In-Reply-To: <20240312142743.41406-1-guwen@linux.alibaba.com> References: <20240312142743.41406-1-guwen@linux.alibaba.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org vlan operations are not supported currently since the need for vlan in loopback-ism 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 7656a2474500..253128c77208 100644 --- a/net/smc/smc_loopback.c +++ b/net/smc/smc_loopback.c @@ -49,6 +49,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; @@ -77,11 +103,11 @@ static const struct smcd_ops lo_ops = { .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,