From patchwork Sun Feb 19 13:53:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 59153 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp856878wrn; Sun, 19 Feb 2023 05:56:48 -0800 (PST) X-Google-Smtp-Source: AK7set8IV4C2Fie2FagQSBw40zt/g9/aC5rRW2bGKNhHXI9yy+XIM0cistvJbYAYBb/IPaKBZER/ X-Received: by 2002:aa7:d915:0:b0:4ab:33d5:4251 with SMTP id a21-20020aa7d915000000b004ab33d54251mr1106103edr.39.1676815008368; Sun, 19 Feb 2023 05:56:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1676815008; cv=pass; d=google.com; s=arc-20160816; b=TZyoV7aNrcS9RZKc0aElcqy4ZkGOO7in+stLBiliEu7uSusI5bUzQXnw02PDbeDp3Q 2f0/rzgnw2UD2ksuvBGImfh5uk6ngxdaHprNoUjxxGxSdnTm5YCkBDHrgPwweFSc1/da 1Z55e4MWkkfSZ5fAH0G3oKaNJgWe9xf2f4XMcK4ajjbRBUCGa1yyvjkoXaJs16RXyWZn VSSTVvxzss2ps7y4aVIGBRN2C5ByR0HkfUX50EEz65/USq4QhJfr2BzN+yyQy0QsQGzw giqeZQiANCFVrACf+21NrZPmNaLH3TV/nkfpbjTnqRSBwqs1GJ/bBwjzX/07nDCQJise CsOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oWA5ZVkzye1cWQMELYAg+E5GiyqEGuVWmdf9EzSQVbM=; b=W7wiNhVjV9VbwZTRoj30GdRVKcYtccEf8HqLKAQfTpl2oU4NjK1AX9Q69Lp8qH0YGK ButsJorKv+pvoHWQndDU1kR2BFDODfTBA0Uj7/Qya/FJLeGFeyCIKxtBtjBkFp24Howr zjHggb7+HyygZ1ILW6k5y7Z3ePmvc1aeippfrSQ7rtB/IK6XPzP4mReuo1yG7rBZNLAW xTBFcZAOQQaNORZqd40wLNYsi/PP0n9Y9YSlmID1PsvSHyiLlJPImY9ukZy77mhmiyME y6TgvykOeI6ICyhA4k8M0dZqxRjOkmYc2RAPw+YhRkMKlrW0fyFh7UD5BbYKG3SiND8P mbPA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="FQL/jHqH"; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r21-20020aa7da15000000b004acc9d32198si11217153eds.582.2023.02.19.05.56.26; Sun, 19 Feb 2023 05:56:48 -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; dkim=pass header.i=@nxp.com header.s=selector2 header.b="FQL/jHqH"; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.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=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230126AbjBSNyr (ORCPT + 99 others); Sun, 19 Feb 2023 08:54:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230009AbjBSNyZ (ORCPT ); Sun, 19 Feb 2023 08:54:25 -0500 Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2084.outbound.protection.outlook.com [40.107.14.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18B5710F0; Sun, 19 Feb 2023 05:53:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W6xM13ygB7KrqzQZC/kXFl7TYGj1bf4JJQAmhieSQZEuzbr1sPJjn+AJrJEi6oc0kL2N/hSqGAvVRPIV5MaodKtmbOWlxCguM28O6dSerMGPG/jERsFRo/FnvNffe4iFjSo3yPx4MlAvSTSJRxH9uiI9WPJfCLpEa6JYWYq1aXtrAX8sO167fHA2tSwbJmf7nnBzPegjheM3MdvbXbDqqR1UZEteNcu1iEqBy4DLQq/9sSrif4QFs/dLIfnIUDOgrdOxYGTFfSAlLE92yXo3/MPqL68i1mnhKZYBEr3XeLeWh4/MIm2dIG9R5rxxiXhxMpRcAWH+I/eUCNc2WwBAyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oWA5ZVkzye1cWQMELYAg+E5GiyqEGuVWmdf9EzSQVbM=; b=SbiMv4FhWnlv5kClsNt94nlnVi+jwhaxB/4jLAzaeUScP0I0B8+dojBJB8NVou28XnYAdLTW3FaPMpqa2UOGIkAvJBSdrgn2Wb2myGilqZV2I6eUQa2ir7lWGtR+0IggKbEXxFOPMBwSg6L/y8gt2OiGieNfleL73XMVQQKCKGJdxdBXsZDkA8adk17Vnp7nmVyr7GO3OfpmHnfpEL0pg7stxn6snDUcyy/VjsTxu5utyXsrre36fEZG/fn1H8RjO1rD1ffs7cs8smbw+WFBGLXnl3cgJJHutrdCBvtlRTCE1gm5N+ZuJ3nRM1Hgsw9ZWbUOZ7I2OWtVK/7Nguhl2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oWA5ZVkzye1cWQMELYAg+E5GiyqEGuVWmdf9EzSQVbM=; b=FQL/jHqHqMpedhbvvjUc3xtS6r2xANoA2r7i7sSe5wN7OewpPN/g97g0FkWZ0s+zMNjzvF7KqTBqd5l6ZxGUbbd01dVeXDrKwaPYmRIZs5zl2prj+TZJ+ImG3ZxX1JutM8EBNJF1JxMGluDv48ZsSXsbXVqvVAWQarV8L6389M0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by PAXPR04MB8238.eurprd04.prod.outlook.com (2603:10a6:102:1bc::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.17; Sun, 19 Feb 2023 13:53:53 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::3cfb:3ae7:1686:a68b%7]) with mapi id 15.20.6111.018; Sun, 19 Feb 2023 13:53:53 +0000 From: Vladimir Oltean To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jamal Hadi Salim , Cong Wang , Jiri Pirko , Vinicius Costa Gomes , Kurt Kanzenbach , Gerhard Engleder , Amritha Nambiar , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Andrew Lunn , Florian Fainelli , Ferenc Fejes , Xiaoliang Yang , Roger Quadros , Pranavi Somisetty , Harini Katakam , linux-kernel@vger.kernel.org, Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Wong Vee Khee , Michael Sit Wei Hong , Jacob Keller Subject: [PATCH v2 net-next 08/12] net/sched: mqprio: add an extack message to mqprio_parse_opt() Date: Sun, 19 Feb 2023 15:53:04 +0200 Message-Id: <20230219135309.594188-9-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230219135309.594188-1-vladimir.oltean@nxp.com> References: <20230219135309.594188-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: BE1P281CA0136.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:7c::6) To VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB5136:EE_|PAXPR04MB8238:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f92ad06-8180-43bd-9313-08db1280bc6a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P1TjPIbliq730M693J794ImFT69MqsaxiqOSXM0MHL5c0vxga6mrt7GYYV9UYDPMUxe4jJY1qIzhFS9WojMEtvWhWQONb6CsRDct4DIPODntN1uGVlrOm8clTWovqINdhL7RfNMhMf5HZtZ6p7eF4XzkidsXZARUfLcUy6UvAH/6Hp6zD20l1HRaHvNls2QEDtclBAqDG7cVo6NoNveo/Jyyt42vIxJx1rXozRkzS9sZIK3HXPYfgyuzZSOoWV9y7MDuBWt7gDztqqf4GU6HMVBpUHOrP8vvHkHXEgU14LG9uuy5npCv+O22OANT6OGpcDb+HQKSzmoQFoBXoqNEgT40c/1KikT3AUev8JOqRWcIKCBDBKmqNbvKio66QVC7b8FxU4EQHMNpGvrnbW0S9k3idrbN1XSk/btWORUJ1sCxoX22wtBqeeFWKAhlhPnSAybtxoDFQvYqVPilECVsE1ir1GpkLOaggH6j+3NIjuulL5pmFBB0waI2LoQXVW7wx6ItCiyBVDEBPlxjzdWrd+0sHFbI3RPZOhXQzAI4pkitNphywqg3bbQ++rbWFH27jQJkWXuh5hf+Jb712DHU61DIHhT/6JLqkidH4IKC9i2WtiqMPkKTeyTiZrdprb6vRje6Lbw09ruKxN/cELk6D+PRNlrNhZM+n4eL8tIe+ejJ9phTuLOTdXntCUaFbRkN X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(396003)(346002)(136003)(39860400002)(366004)(376002)(451199018)(8676002)(66556008)(66946007)(66476007)(5660300002)(7416002)(4326008)(8936002)(41300700001)(6916009)(44832011)(86362001)(38100700002)(38350700002)(6512007)(6666004)(6506007)(186003)(26005)(2616005)(83380400001)(52116002)(6486002)(478600001)(966005)(1076003)(36756003)(316002)(54906003)(2906002)(15650500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: EIlrReJEwhEN9b1qF+Gao4PLi1wIBABS4fqLGMfU0f+znUCrDmGsbrPADO8O9X8gj2MHg7pJkmeCZv5oj+yIQXW1RhYq5afgpbsHBa87TJKxSGI4kzQlnuCbZvx3DizVhoVv9XQRFqtQnM6qhMftvI61Y8vQbO8i7mZCt+vM45+UXbzGUnnLxHYU5IlaoYPCDQOUtumilswMwSNSXZ+kk22OltKzxeJT+AfWPxWu5Nddi2bplvwUqcf3hvk6O7tyEqU1Q/MlpzYzYRTHMvwRC8uZnTg6zmf3cNCEO5QjAYk3QioDT+/3XBFBQA0NvEVULuLSCSBF0df84t6nsNx9SYPFKTr2hHSBwBAjZnD6Lj28jH+zIQ9u+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a6lpqJTtyh3aUzCBHFfuCvPRoLZPOIbEI/n6iXzdh6OVtioA4jRZ5s2c3SV+xBT6w7pzn04lxI1pPuI70B4d7AcbT/2a4Hcz1jU4C+9KWpo7gbTIHu5kaQMiJHKpjyK9yZP5tZgo9kfLP9h2flRDTFxL7i76L0GKukICUupU8x23Ug== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0f92ad06-8180-43bd-9313-08db1280bc6a X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2023 13:53:53.2084 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5spolHz5ZBEOD18BX7oRQ5QSga4E8Vc+lSUT1RLEi3w5hjumlvXZeAr9FQVhooC9pV60FeHMN+A/b9gUcLxlMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8238 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758267974488506348?= X-GMAIL-MSGID: =?utf-8?q?1758267974488506348?= Ferenc reports that a combination of poor iproute2 defaults and obscure cases where the kernel returns -EINVAL make it difficult to understand what is wrong with this command: $ ip link add veth0 numtxqueues 8 numrxqueues 8 type veth peer name veth1 $ tc qdisc add dev veth0 root mqprio num_tc 8 map 0 1 2 3 4 5 6 7 \ queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 RTNETLINK answers: Invalid argument Hopefully with this patch, the cause is clearer: Error: Device does not support hardware offload. The kernel was (and still is) rejecting this because iproute2 defaults to "hw 1" if this command line option is not specified. Link: https://patchwork.kernel.org/project/netdevbpf/patch/20230204135307.1036988-3-vladimir.oltean@nxp.com/#25215636 Signed-off-by: Vladimir Oltean --- v1->v2: slightly reword last paragraph of commit message net/sched/sch_mqprio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c index 5a9261c38b95..9ee5a9a9b9e9 100644 --- a/net/sched/sch_mqprio.c +++ b/net/sched/sch_mqprio.c @@ -133,8 +133,11 @@ static int mqprio_parse_opt(struct net_device *dev, struct tc_mqprio_qopt *qopt, /* If ndo_setup_tc is not present then hardware doesn't support offload * and we should return an error. */ - if (qopt->hw && !dev->netdev_ops->ndo_setup_tc) + if (qopt->hw && !dev->netdev_ops->ndo_setup_tc) { + NL_SET_ERR_MSG(extack, + "Device does not support hardware offload"); return -EINVAL; + } return 0; }