Message ID | 20221117150722.2909271-1-luwei32@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp420187wrr; Thu, 17 Nov 2022 06:11:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf53tBgedqcp6cl/LlFOCgPOxQcI/Q97wb62Ch/4SRKNYKm70Q99AAbeN/2llhfjoB6lSuaf X-Received: by 2002:a17:907:c70a:b0:7ad:d6c6:eb7c with SMTP id ty10-20020a170907c70a00b007add6c6eb7cmr2254734ejc.249.1668694271052; Thu, 17 Nov 2022 06:11:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668694271; cv=none; d=google.com; s=arc-20160816; b=u/l8kteplaJDdgPsIxCBrI8x5Czn2BnNT13tOmtK6CPqnAPUBzxcesodkDHahkR3qS nckNE+ewwq30QB6OZZNDnw7BB4CELupAdWx8OWKSG4rNuo2oSDwco6Wrt7VcNTnmgYFR MpyV1wNDrG3pGV0K0aHP/KlTvgoddzqAmmgZ1g3gxPvUuVhTIwZgtQfWwdi3/UUA1rU4 tuRZeU5J8Vl64DXeIMlZJpeMSLhsrD5L8fHtdqB0dlDWudyD5bFrBgqCvv9pUQlJzz2g bDH+oN8KcI3bMyqst28Tn28ihUOVTXgTpjztJuvN2B+Y/ouAuGTm5dUE+2VhablBzx+G GVnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=AggziuvtZnQHtsTAIFjSHInNNpPvMJYJnwFyudN05GI=; b=lkFxEy980uSQR1dmnR8sYIw/X/50fO9h8SyJxkfOECAB/G0sqfb5IW+Rari6qyzU4G fR80S732+OCsYn4YjdSwtUFU/2lx18WRdLjNPERDHGLkdGl78G37CNo2wbUbEJMVfMqZ q6D3Jsfkq+9PlA1umV6F85aCo4foHZ9jC+AvgDbK7uZabN3qyqoCws7Vot2J6yXoI5uG u//veVSjBvWpNzNRAiMsDeMogm5sPwjFi2WtbWq2MWBuco/yQmyfXeU/irny06eYy6d/ nAJXVnvnM3td5mkUvnoJL6Ed28cmYElo4Yv0u3KZ8uDHGI5sr+Jqy2i0/QNn6Kh55wTT FAsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht21-20020a170907609500b007b299050723si706921ejc.410.2022.11.17.06.10.47; Thu, 17 Nov 2022 06:11:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239767AbiKQOCn (ORCPT <rfc822;a1648639935@gmail.com> + 99 others); Thu, 17 Nov 2022 09:02:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234629AbiKQOCl (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 17 Nov 2022 09:02:41 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 889DA4093E; Thu, 17 Nov 2022 06:02:40 -0800 (PST) Received: from kwepemi500015.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NChS842jpzRpFX; Thu, 17 Nov 2022 22:02:16 +0800 (CST) Received: from huawei.com (10.175.101.6) by kwepemi500015.china.huawei.com (7.221.188.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 17 Nov 2022 22:02:37 +0800 From: Lu Wei <luwei32@huawei.com> To: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>, <lars.povlsen@microchip.com>, <Steen.Hegelund@microchip.com>, <daniel.machon@microchip.com>, <UNGLinuxDriver@microchip.com>, <netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [patch net] net: microchip: sparx5: Fix return value in sparx5_tc_setup_qdisc_ets() Date: Thu, 17 Nov 2022 23:07:22 +0800 Message-ID: <20221117150722.2909271-1-luwei32@huawei.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.101.6] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500015.china.huawei.com (7.221.188.92) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749752763904361092?= X-GMAIL-MSGID: =?utf-8?q?1749752763904361092?= |
Series |
[net] net: microchip: sparx5: Fix return value in sparx5_tc_setup_qdisc_ets()
|
|
Commit Message
Lu Wei
Nov. 17, 2022, 3:07 p.m. UTC
Function sparx5_tc_setup_qdisc_ets() always returns negative value
because it return -EOPNOTSUPP in the end. This patch returns the
rersult of sparx5_tc_ets_add() and sparx5_tc_ets_del() directly.
Fixes: 211225428d65 ("net: microchip: sparx5: add support for offloading ets qdisc")
Signed-off-by: Lu Wei <luwei32@huawei.com>
---
drivers/net/ethernet/microchip/sparx5/sparx5_tc.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
Comments
Den Thu, Nov 17, 2022 at 11:07:22PM +0800 skrev Lu Wei: > [Some people who received this message don't often get email from luwei32@huawei.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > Function sparx5_tc_setup_qdisc_ets() always returns negative value > because it return -EOPNOTSUPP in the end. This patch returns the > rersult of sparx5_tc_ets_add() and sparx5_tc_ets_del() directly. > > Fixes: 211225428d65 ("net: microchip: sparx5: add support for offloading ets qdisc") > Signed-off-by: Lu Wei <luwei32@huawei.com> > --- > drivers/net/ethernet/microchip/sparx5/sparx5_tc.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c b/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c > index e05429c751ee..dc2c3756e3a2 100644 > --- a/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c > +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c > @@ -90,13 +90,10 @@ static int sparx5_tc_setup_qdisc_ets(struct net_device *ndev, > } > } > > - sparx5_tc_ets_add(port, params); > - break; > + return sparx5_tc_ets_add(port, params); > case TC_ETS_DESTROY: > > - sparx5_tc_ets_del(port); > - > - break; > + return sparx5_tc_ets_del(port); > case TC_ETS_GRAFT: > return -EOPNOTSUPP; > > -- > 2.31.1 > Looks like ets_offload_change() does not check the return value of ndo_setup_tc() here [1] - I wonder why this is. This also explains why my ETS tests were passing. Anyway, thank you for the patch. Reviewed-by: Daniel Machon <daniel.machon@microchip.com> ================== [1] https://elixir.bootlin.com/linux/v6.1-rc5/source/net/sched/sch_ets.c#L143
Hello: This patch was applied to netdev/net.git (master) by David S. Miller <davem@davemloft.net>: On Thu, 17 Nov 2022 23:07:22 +0800 you wrote: > Function sparx5_tc_setup_qdisc_ets() always returns negative value > because it return -EOPNOTSUPP in the end. This patch returns the > rersult of sparx5_tc_ets_add() and sparx5_tc_ets_del() directly. > > Fixes: 211225428d65 ("net: microchip: sparx5: add support for offloading ets qdisc") > Signed-off-by: Lu Wei <luwei32@huawei.com> > > [...] Here is the summary with links: - [net] net: microchip: sparx5: Fix return value in sparx5_tc_setup_qdisc_ets() https://git.kernel.org/netdev/net/c/19d04a947db5 You are awesome, thank you!
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c b/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c index e05429c751ee..dc2c3756e3a2 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_tc.c @@ -90,13 +90,10 @@ static int sparx5_tc_setup_qdisc_ets(struct net_device *ndev, } } - sparx5_tc_ets_add(port, params); - break; + return sparx5_tc_ets_add(port, params); case TC_ETS_DESTROY: - sparx5_tc_ets_del(port); - - break; + return sparx5_tc_ets_del(port); case TC_ETS_GRAFT: return -EOPNOTSUPP;