Received: by 2002:a05:7208:70d5:b0:7f:5597:fa5c with SMTP id q21csp2214747rba; Sun, 24 Mar 2024 06:57:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX1I0yvJ3JTSC2wQwY33j+xMDaJTofUF5oeDxH8zVbj++10+WiD2oDqJ/Q5Y6QvCzp29XLFaTHffEiY0/+F99zJlgrLkbNE2Dnr7dgLwg== X-Google-Smtp-Source: AGHT+IFmjDL427VyIQ7R40dkwOVYbHyECeM7dLEiOtjjxE+EOnnUpIWo7BoYG9x0qVffzk2Qbf4D X-Received: by 2002:a05:6214:1308:b0:690:ae50:780b with SMTP id pn8-20020a056214130800b00690ae50780bmr6181305qvb.34.1711288630328; Sun, 24 Mar 2024 06:57:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711288630; cv=pass; d=google.com; s=arc-20160816; b=ysnVgR3u7RfJsI6J69UoqK4VN+LECOSGdIFNIHPlLpoIiecs+gdLjtlDk0dEBGW/y/ OStkxQ+a+vIRz4BMa4u/MjjHLmE97sFUSKil814OZyVkeX3NkH91C/AM9/y/C/g98rlQ nI5EPBvWk0mTUmH7v1X2H+AJGaHr8YW4tdR+reLwVOd3oIeDksrWomz+VQSfD/QR98n6 B2scIBKEkYm2Z4Tkqlw5AjqAP9y5JQgU/EqUjHnSRDf9Y3A53p7gHQTZGHfuc7Ft8KuT pUiqsaY9fz8w093foK2l/ceJgwbXiogLGO8HbRQ1RIDVTRtEUnKYceUZJdtbf/zOwZoN kalg== ARC-Message-Signature: i=2; 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:dkim-signature; bh=jpdnQZnDvs15szWBmPNF0c29jZHdspFSHq1dvNgAgXk=; fh=dZ+5j4HvJgOzvN8nB02tgPlkwHWSh0WzjxQ9fqEQCrY=; b=0RvOdZwWartOCwoqJZRM96x2Uo1J0UuH1NbaSSh7pdqeGzGd/lsXvnfCNbMVkN16a+ 8SD1UvNGMqfzb9+FihZO7tBgklHYK8T/rR2zgOkwv5OPCcTv7l7nz4c8/f2hgaMJMGBw X1LaSXEEwE/4VQcQTBiXp0N9uDF2E1ejoT0UnNbZgoPCo2vwWRJCez+aIFkCivz1o2uf NIMvu82ktnRCiNxM//7T82t7NnZFY10TUo9C1TFWotTcppEYq95J6Ywh4f+woVkRhuwd cW8jLN4fEr66KpRBdrbwy5lZe7xPdA0YPN2w+6IpMPrlLETAzCG3YMw6/XZkbGcje5Nx V6yQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=ICbZUbo2; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-112692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112692-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.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 r15-20020a0562140c4f00b006961856f616si5894265qvj.39.2024.03.24.06.57.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 06:57:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112692-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; dkim=pass header.i=@linux.alibaba.com header.s=default header.b=ICbZUbo2; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-112692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112692-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.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 0E8611C20A48 for ; Sun, 24 Mar 2024 13:57:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E645B1B945; Sun, 24 Mar 2024 13:55:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="ICbZUbo2" Received: from out30-101.freemail.mail.aliyun.com (out30-101.freemail.mail.aliyun.com [115.124.30.101]) (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 D98F21AAB9; Sun, 24 Mar 2024 13:55:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711288546; cv=none; b=a1AJqgSrRaVufLbPLC4eezzg3nJzl8u++IxqNK2fp4Q5ozK1vJS/iPc0CDQIEQBIvwIm07QqoM3IKZrB/nh1uGF/NPr5J8MiBzh0m89oFG/IKU9Cbd/lyFbl8Yelkxv807asqDbCNthj4350EKLbjpLcm3OMadckmI5t38TBex8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711288546; c=relaxed/simple; bh=WYbhRMGR0W01lVww6SeqPkwW5gyATMicfULdP3ORxAw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=eKEKBFRp8Idtl4HoogcPkwEDC1q/lsUYbcwviyPXZ6h+MUd7hsuwXs3c8T5S76p5/tuOZsUeoPmLz0nZSGGttu0BoySydY0VRSL2WmTENwSEwCPWYgomyAFx8EgpbGZLLDX440Qy++edFfwpSS/m7oyaRwMTB9ZE8B3ijhIeoxM= 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=ICbZUbo2; arc=none smtp.client-ip=115.124.30.101 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 DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1711288536; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=jpdnQZnDvs15szWBmPNF0c29jZHdspFSHq1dvNgAgXk=; b=ICbZUbo2EVTZ2um+Dt++8IeA6UeqNZ9RtJOOK1P4C953JzxwZZ0QrGVk7+JnCff6IFysP1X/XgdDas8jKL3PWpXwlghnf5ZntLA4WVsyE2iCgndRCEp57lBUJ3u79r016K1V377gay/3jz2VVzJAwApIQ4+1JU5VlI9lkNAPbp0= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R791e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0W372t9q_1711288533; Received: from localhost(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0W372t9q_1711288533) by smtp.aliyun-inc.com; Sun, 24 Mar 2024 21:55:35 +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: [RFC PATCH net-next v5 04/11] net/smc: implement some unsupported operations of loopback-ism Date: Sun, 24 Mar 2024 21:55:15 +0800 Message-Id: <20240324135522.108564-5-guwen@linux.alibaba.com> X-Mailer: git-send-email 2.32.0.3.g01195cf9f In-Reply-To: <20240324135522.108564-1-guwen@linux.alibaba.com> References: <20240324135522.108564-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 This implements some operations that loopback-ism does not support currently: - vlan operations, since there is no strong use-case for it. - signal_event operations, since there is no event to be processed by the 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 3eb623e030eb..4b5e864ebca3 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, -- 2.32.0.3.g01195cf9f