From patchwork Mon Apr 3 10:34:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 78483 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2201063vqo; Mon, 3 Apr 2023 03:38:50 -0700 (PDT) X-Google-Smtp-Source: AKy350bTBduxxBUdcw/C7ii1PkVwNtOhA+FOMwr56GehtXqxT1dAu0hSEzawQ8bnJ6wMT+x/bTMB X-Received: by 2002:aa7:db83:0:b0:502:3376:46bc with SMTP id u3-20020aa7db83000000b00502337646bcmr19635482edt.8.1680518330400; Mon, 03 Apr 2023 03:38:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680518330; cv=pass; d=google.com; s=arc-20160816; b=D1ZYoHMMOtxbisms2MirU/HgvA9fAxb6Lb4cHEZLtfzhoFBQKOQVhZGmQEDxCD3Vi4 LVNDldMmpmfsWwCTWF+tGtPHTVNIAsmvOaoHWQI5cde4Ox6tNeaLyLZaOdeng0mPIg96 HnNkH5mqWll0zQBwDpKK2Phqd+myTqlLCYeibKjIP6NmiFXw4zqJX4JNf/v7lstVtAQy idobvtazYP8TrjsncMEYnNNdYzI+LU+gEn2bpLZJDBefziWFnVF0fcodMB6+c3cKzfL0 XpDhOeozqm3/zRmmTELHrSsA37Yo5mdypepuMB8P3wVDG9yfngWMcP3mLAJuHbFSW3zL rtKA== 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=ORaf51nFqoVISRd7cxFxH7jxD3Jlon0OGjdhoeIF108=; b=MEIVuobumSBOKbU/jOFf200QpVaj52JAjycbXSGoosnrtuG0SA2RY4wM1wLFSfftFv C2YfQqzZqG5e9bLNFo1ygyUiJl9Rt9vAhgxHtH3//N8eqozN03F5h+DaMU5yIuC8k929 6mSWEyDtCFGWcReZPNucs3OvBBM1BO7wGddFzF4bLHk+TXzK4UggLLtkzMZZaBUaPvot nfivsijm/Ktvmr+CWI3olbXJH1iy1E8JuGSEdcIEPw5P9Chy7kgaHvXAPdtWnCv7eFxS jIxo9jZeBiZipSvnyGrCnkhrEo4LqfCCYqWcU0DfJHvRmmc74Rz3MjOetTcd65wJPY+j Vucg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=YbWzmJaS; 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 a9-20020aa7cf09000000b004acccbad706si559543edy.194.2023.04.03.03.38.26; Mon, 03 Apr 2023 03:38:50 -0700 (PDT) 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=YbWzmJaS; 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 S232141AbjDCKfZ (ORCPT + 99 others); Mon, 3 Apr 2023 06:35:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231982AbjDCKfF (ORCPT ); Mon, 3 Apr 2023 06:35:05 -0400 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2064.outbound.protection.outlook.com [40.107.105.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C7592D51; Mon, 3 Apr 2023 03:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OJFTDs9tau6BpIMWJjzxpvEAnc5WsfDUzmOC3dhXnSB1aX72xxKyMdRgoKz5NF5ALYWjzBvrqTWeipKkxbc5hNdQ45xnXtmZI6OpVmV5iGazsm6AL68AVLJ3xtJ6xj8L83bw9iyx4oCENNJiO9UdWAON504GuR/hJBvMC9GKgI00fyMiPIV55Zr+1jDdfkYEzjFBdeH1i3Sfu17LafIWNCWuJOp5McO5Tq9F6scKEQu0/GR7+8iIrWKwB0EfGucdOApwW4Zn+Ff/BRLi0tyMcewE+GvvNPbPUeJo7otxT1YG/4mmLAy3kw+viyR5RjHI/SlwJWhoHbfzjullGA6eCw== 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=ORaf51nFqoVISRd7cxFxH7jxD3Jlon0OGjdhoeIF108=; b=QAEi/I9li/11fs1/pSuF7FqCyHpr4iPk1y5ltKSnWFYP5BS87uoZMvT1qOJ0N9PLbqIkNekLc6ZINtL5ZIGiVgzyJQkJhkgbXnOhDZn5YhE55MPj//K/1HaK05NYTNG1Y6LTAMnfvf9Wj4764VEWiV1tcJxoERVdGySXzg33eZxW3IMonz0Zk34y7Sspw+G7LkG8+3y17mU9Tjl/Sr889TRcV70L4wXEqUCMboq9aTLaBHSjYukPXOl8iXv+6dyAORurtukraEG27rwD8xBrj4BhCqpbBc+2IxDRRBpw/p5k2YVwmDEMHkckFFa/bgW/k/EXNBJHggcQ60XXnjZsBA== 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=ORaf51nFqoVISRd7cxFxH7jxD3Jlon0OGjdhoeIF108=; b=YbWzmJaSDNo8zZU75RU74q6JK7xQ0vmCFW9QT2V9hGhrPTugbnRZzhMtNcQRtidBz4Q08RaLzD7wK2sFz/CWtID7u5HDeAg2QdnRhve/Phsu3FV1sPH/MIUqfW+qFJe/65daUvVgVkqsINb/GCgDwxitW3t9wuWOXkIDVt4r+v4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by AS4PR04MB9292.eurprd04.prod.outlook.com (2603:10a6:20b:4e7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.29; Mon, 3 Apr 2023 10:35:03 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dfa2:5d65:fad:a2a5]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dfa2:5d65:fad:a2a5%3]) with mapi id 15.20.6254.026; Mon, 3 Apr 2023 10:35:03 +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 , Ferenc Fejes , Xiaoliang Yang , Roger Quadros , Pranavi Somisetty , Harini Katakam , Giuseppe Cavallaro , Alexandre Torgue , Michael Sit Wei Hong , Mohammad Athari Bin Ismail , Oleksij Rempel , Jacob Keller , linux-kernel@vger.kernel.org, Ferenc Fejes , Simon Horman Subject: [PATCH v4 net-next 4/9] net/sched: mqprio: add an extack message to mqprio_parse_opt() Date: Mon, 3 Apr 2023 13:34:35 +0300 Message-Id: <20230403103440.2895683-5-vladimir.oltean@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230403103440.2895683-1-vladimir.oltean@nxp.com> References: <20230403103440.2895683-1-vladimir.oltean@nxp.com> X-ClientProxiedBy: FR0P281CA0221.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ac::17) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|AS4PR04MB9292:EE_ X-MS-Office365-Filtering-Correlation-Id: 81c3043e-7ef5-43f2-9d53-08db342f1593 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +z1/5MlVXRUyqNhbKe+RJcrJti/9sGdbUWJAN6yvs8BibePxZoHhxfbTOj8hny+OeHLGtQu0sLcP9AMiGR0eTSXAZRsg4tGqrarwW5+e8/Rsn1OLYAI87KgF4IIY37O9Lr+ZLDEbueoxx8djh/bhfRwsql9Vo9oNFWF7LV4tu2j41u1a6Z/a1ewAsRX92Nlzx8F+2oGNw/H24bKZS4yaJM/TMdC1Q//2TtBUcku3UnFFPv+C3rXQ8HWFvbl6GKX0UPvtcuyca9i0/KC90Dui/brDf8Kiac2Uvo9Wlrn4UtAdK+uD8DXqBsfHZQpfhydfhw38gyJsRIOVpLi1iAG1bOYQygMBPI8wdWwCgwlbVf+JtBPS9qjRah52ZPqaTz2PUt2omq3p7kdzcx9Gxk/kPRBCEeJsd5PuABHIvIkEFBqkrecueMQeUzpB1auxO7plSCps11Agn87wSJnLWTw+SG81d8MtSL28lH1YL7RYb0wF91DPEKj+qq4kf8ybfAhvGlCfuc+2dTN21S3+PS9dvee4hx4rMgakyXU26QXOxPAlmjFLMhu/1AP50ptLbSnLiGGoYkNhiheDLjZM/3T/07afBGiNzUIWKQRu/vIyigc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(39860400002)(376002)(346002)(366004)(396003)(451199021)(26005)(1076003)(6506007)(186003)(38350700002)(38100700002)(6512007)(86362001)(316002)(54906003)(41300700001)(7416002)(15650500001)(5660300002)(44832011)(66556008)(66476007)(4326008)(66946007)(8676002)(6916009)(478600001)(52116002)(8936002)(6666004)(6486002)(966005)(36756003)(2616005)(2906002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MgXxGoMi8ysKlXVzZhPCyet86orWGScvxfeAb1mVVy6q62G6OwIUrhSC1/sSACbxZxMoiXmGTHLI/qWLkZEwUjPOhp2gQRHBYq6xYjBc++q34/xETTPZBHoLfo43l32ZpGO0lWT4yLFzlepFoOCxmoEubcYTU4a/V39v+lXeRaBIuWxYdp+ieRTg0cLvCPrQzeziZMNRNFa/zG1c/Jeec44b+PybbAjfbEXq5D1rAPamdJcVML4Y2U2YhFRt1FD8K7RVmfiJs22UItCr+ElkJMXfFoKkf5PMOoj3u26+89jdD3sDy9GeTdztKcDJeZxYhVWsyiRFYfhp5HbkkSkp3W1CFQd2Izhm8vHcS4Y1tR2OGDjR7UJFP9VGsmI1fq5LZwxWRzqdY6/VtUI+Nbg6e+r122NkaFse5xTZxrXzivA891+xzxWuF5EokdQqghzs1ajHfyNtfWowTc/ZrJqPFkhbJjHq5HYwZYNFNPzJj9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+EhUSUX+hcoXz1xbnElE8afbTRGabRp2Ld4BdFQULKR9ko0MnxCgw== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 81c3043e-7ef5-43f2-9d53-08db342f1593 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2023 10:35:03.5143 (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: 0FjQiy/sXGScOiMERLxL6KpAbA22CJ+psrSAYlLyj3YtqVCowkLOzRlDbSsx9h371wCsef6UZfuiNU+ka/5D9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9292 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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?1762151188932067778?= X-GMAIL-MSGID: =?utf-8?q?1762151188932067778?= 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://lore.kernel.org/netdev/ede5e9a2f27bf83bfb86d3e8c4ca7b34093b99e2.camel@inf.elte.hu/ Signed-off-by: Vladimir Oltean Reviewed-by: Ferenc Fejes Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim --- v3->v4: none v2->v3: change link from patchwork to lore 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; }