Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp708986rdh; Sun, 24 Sep 2023 08:18:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+7Xwsi/3EV/g3bdNEKSkw9b1/aPW4Lf78wGVgL6Dwyifl6gbxuSBfl7SQfn4Dk7BhFlwS X-Received: by 2002:a17:902:7685:b0:1c3:6705:bcee with SMTP id m5-20020a170902768500b001c36705bceemr4754166pll.57.1695568708003; Sun, 24 Sep 2023 08:18:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695568707; cv=none; d=google.com; s=arc-20160816; b=QsbAnRMhY5l6j9lg8Sw+rr0p5nXo2PAepPKLXAAYhpUrfK8Vf+GtMW1nU5Q6PfTxli F6R28dqTF5h6Pr+bt66nwUF4oeYObtBLq9z+4Okg/7QGXlZE8Ono9ux4Nl43VuJO2YbO 7owV1tsl6grpFI/3gql9lMX8AQfN4meZgRUgWy3fDX1ncONAyQ1bMk0r3/rMMdU52a2G RIcEqiNlXJQ1nH4BZdGfVWjNC+YpC6JlDnNNI/elY884yNqOL5170LGcZjcp4Di5UzBw 0jKL7gJnWqnCr54WjvB6uqW7JW2VYhZbEPBnQ09M83tsjbgB6l8nMdiYWY1o0xzX6yOo G3Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=5h9h2mmOafXNsXHkeoa/34jwI5r0oX1R8ItoaaA4Wtc=; fh=kTBstCixiri9Ahdk8UNuw7wmcx8Ry+mqafUdDsc8Vd0=; b=E/PM2me7sdLkhjgBUIeymVBQ0zOy6yKVvSMtNmQFCIK0T5Pco0hZPIkZs0YYNsOViP zE66FcU+t/86qhUdXQ27M9E8WRfkCLCNGSlbYnyQMUtmP5h+dJXe6QSzGLe6puZjsY0P SjxM0N49TYF1D3pBUMnVEM49OpVCwMNXo9JcZUI9Ifn2qLPpZzlPU4s+NQugEmJMmUz8 P+BGC81hGe+a/79kc7+qJ+aMlzojUkSz4OrGhZsB0Kj3hZtx4FmUFvBEGcEA3ReCXjXu B7nsWbdbv8HuY+WV20Zdt/7BFaqqxuNfoL96sB8a2AjmLAtXzWu0MGkNUwPUT4ok9NuV bzyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id s11-20020a170903200b00b001bbbd9cd44bsi7460427pla.79.2023.09.24.08.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 08:18:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id EC480802209A; Sun, 24 Sep 2023 08:18:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229928AbjIXPSH (ORCPT + 99 others); Sun, 24 Sep 2023 11:18:07 -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> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Sun, 24 Sep 2023 08:18:24 -0700 (PDT) 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, 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_SUPPORTS_V2; @@ -108,11 +134,11 @@ static struct device *smc_lo_get_dev(struct smcd_dev *smcd) .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_system_eid = smc_lo_get_system_eid, -- 1.8.3.1