Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1591468rdd; Thu, 11 Jan 2024 04:02:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9AbKJWQifW9IUr2QHHePEUAZvuRCXYb1s09Dl3OztKx4k3mtZ9yAsetDiPka2YuMs/SzU X-Received: by 2002:a05:6102:2f6:b0:467:effb:81 with SMTP id j22-20020a05610202f600b00467effb0081mr317895vsj.6.1704974542046; Thu, 11 Jan 2024 04:02:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704974542; cv=none; d=google.com; s=arc-20160816; b=XINGhVPCKFhpxVgWHWGLVpGf26y4HAWV86WdxmGtXChin0olOURkM/x33u9nTlsqiM +EJpqCPN7XBb04GYqZLWEBy2XYXbl1HV+W8t3hIk4rgx3sAHby1dIMkEIPPgglYc0kmQ D4ryUdrN/EdwjDiaAWIgpyZb6ot6JJ5j/U9D4LxI/Gp5EA8X6VeBgAjFGbw3JYR1KWCB KoqnVZLibj39a0puImIXFLfdJ4OduJ/LM3vodrXxKlMQf7JFQw16pAbnCwMiL801qPCm YGM5l6GUKZHhu9Z0CdcbSC2mRIKIB1tByVhC/yfj77fPbkK6mcY1+K7fTk/nuKEq4Qzu iwMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=vos5XcQRUTSqm8iWHrRG4S/xQdkkwh8DrqLRztzGxSo=; fh=jvQSXgb9+Gwj+2SIugFJuht8/m1b8ZaGKJU/ZBOVFgM=; b=Wn7teG095OU6iXDzFjwumDmi7MHZFO7g7YCjCMq54LxLWtfBwqvHkc6NaLokeBMJnM mWdr9zHnbzD3d0xzB9dsjBD+CuwUP2Bt9eGthTxEGg2VWEs+17aVpClBR+rPwpsR1NAN 3NhJsobQgsJyAU+xxAQ69OoXfTvLFixwwFXrjnK13O1ECpz02B7c00+xmxe8FxlBMlcn bzbKEh9glQeKRoVcLugm6BPN7gUl5Lgf+oxX1ZqFG2/UlbYrMyl4u2WFcLTlxL1aSxfg ubMpSiJ8yu4qsIqYEUzHAVebU2B/gLyG+j65NTgDj8kftPRJSZMwz4gcI2bS5ut2Pt2W 6a4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-23539-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23539-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q5-20020a67b905000000b00467f8c24e45si42389vsn.791.2024.01.11.04.02.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 04:02:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23539-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-23539-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23539-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C1EC81C23958 for ; Thu, 11 Jan 2024 12:02:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 744ED15EBF; Thu, 11 Jan 2024 12:01:23 +0000 (UTC) Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) (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 6851415488; Thu, 11 Jan 2024 12:01:19 +0000 (UTC) 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 X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R321e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=18;SR=0;TI=SMTPD_---0W-Pgn7c_1704974476; Received: from localhost(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0W-Pgn7c_1704974476) by smtp.aliyun-inc.com; Thu, 11 Jan 2024 20:01:17 +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, 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: [PATCH net-next 05/15] net/smc: implement some unsupported operations of loopback-ism Date: Thu, 11 Jan 2024 20:00:26 +0800 Message-Id: <20240111120036.109903-6-guwen@linux.alibaba.com> X-Mailer: git-send-email 2.32.0.3.g01195cf9f In-Reply-To: <20240111120036.109903-1-guwen@linux.alibaba.com> References: <20240111120036.109903-1-guwen@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 40dff28d837d..353d4a2d69a1 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 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, -- 2.32.0.3.g01195cf9f