Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1051684rwl; Fri, 7 Apr 2023 09:11:24 -0700 (PDT) X-Google-Smtp-Source: AKy350ZxkT7pmedHxMVC00wgDwlIe6E5Yv3TSbBhpnDx30YST2fLLVrkvrS45xfa9i46d/0LUKEG X-Received: by 2002:a05:6402:643:b0:4fb:98e2:3df8 with SMTP id u3-20020a056402064300b004fb98e23df8mr2067964edx.27.1680883883996; Fri, 07 Apr 2023 09:11:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680883883; cv=none; d=google.com; s=arc-20160816; b=fq18EtYe2ezSIbazRu/rWqmPogZKN1cO2BoQCWcdeJvWoLCcFuDDPxmmw5NvgGVhGX GjzOE8ZRmVARPQHHObZfgAjoO6+Ia2rXo5stvCzgIJnoDD/hsrOuoEbAzAPA99oRooH7 V/XwDKpDoyKrI8zpyWfSrULVkCVyy4io4R8i+cCg4YdsZY5Fq0tzATQBdsWGR4HLZCu4 H8hYRvOrTqQ0vVXLdDcvEfy6THRTaGmjLSOJf78OJ+tOQOfK/rEiMuQPW+DKYKnsg1ZD 34jYHn17EksxoeSABnsimWWFtrxO4ci/2Vs6hQCc6KpuoUT+emJJTSxenOOwmhFDyv7H 4shg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=1LeEZxg1UYS1q1LhPGSoZJZ9gjeZy1fnhbR/cP8HF/o=; b=I/jM1LLC8pKUyggEtSiOb8LsZBzZ84pcXYHtHCdOPdBFXI4HBz/ldwubJW5SmsIwx9 MAbdsH8WIlyeKiD8VxS48AWKONuoDCujfohP2WuezQTfVaeDF68Bui4PCIqRgGdlJ0TC l0WkBBtbx9ImwaSNp2RAzb4RAOOQt1eXMI7Fwsg9SrlR/ttwwNfsv5tpZ9rhtBExvBZG +bOGWEORoGvG9ZoJ51r1B5+x3VtC45fslZG+wdwBEbD9vN4eNwKfIRxP3u+ZQmHG64SK SKhjhAjBDuBaYfxGP84gWbU39q6k6u8ktEnnIzRu06dZn8+5wratvcajFI+6qsKHOD8e kKkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mojatatu-com.20210112.gappssmtp.com header.s=20210112 header.b=awIR+OnA; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p11-20020a170906140b00b009448c3fc906si3392185ejc.689.2023.04.07.09.10.51; Fri, 07 Apr 2023 09:11:23 -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=@mojatatu-com.20210112.gappssmtp.com header.s=20210112 header.b=awIR+OnA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232830AbjDGQJD (ORCPT + 99 others); Fri, 7 Apr 2023 12:09:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230369AbjDGQI6 (ORCPT ); Fri, 7 Apr 2023 12:08:58 -0400 Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E084AD0A for ; Fri, 7 Apr 2023 09:08:35 -0700 (PDT) Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-54c061acbc9so123441107b3.11 for ; Fri, 07 Apr 2023 09:08:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mojatatu-com.20210112.gappssmtp.com; s=20210112; t=1680883709; x=1683475709; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1LeEZxg1UYS1q1LhPGSoZJZ9gjeZy1fnhbR/cP8HF/o=; b=awIR+OnAfZQHVTuj2yAI08MICVo1FoFyzJbFl5vySdOvF5ihjHNlD2YKPRYCFW9An0 pzlMnB1WyHj/c4mgrXyLiZ/INVqmLhjThn9W/IylKKPHde7yDX2Kg4/sOxl9ty4yu9rt JT7WykWXCB5uKyQSCCmi4PIpkiF0SOexiSV2wZxlk1dc2iC+4zzrbWwobYZzhi/9935G UZo/cVqmsBnISOXgQtyIaR8Ge3FWI43oCHh5I++ezP4U89PD5bNTUqfsVaI6cVPF6i9I qo5GZvT6qzBIWX2+wiJEvqJuRX00jhSmn0PCXvo3QnuZHG6eKkrZjWbzXmPiUGt5UyRw 6thg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680883709; x=1683475709; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1LeEZxg1UYS1q1LhPGSoZJZ9gjeZy1fnhbR/cP8HF/o=; b=ru2VBloat48rJtpC4sz0K4gdUzGP6cGi9tC99ON7e452HqfqoSduMuNU0PBE+V2vvd XHQwRLaDG8mINJmKna87cd3u+5tGe/b4afnu8wE6/E8QitnaOGJXl00vIBK9juFehV4W UkribFbz8UoSCohBD5ozr5W26fhs3WP5MpBawNiEH824IrCRz/7KbZBn1zGhLLBB2xKK KAFaai7jWfEAcgC7BaR3nswXhovDo3zTjHYOuKRcEqfHi638sbQwyQOhwvU+gjmiOPBg HlNDCCxuwKUZBhENUS2btOMH5kPYFqB93s03gRtRWxIqsoXMGFjDip0jxXJMFMB/PStT rYwg== X-Gm-Message-State: AAQBX9d1Z5+n78SspTHHo505A2kto5hlJiBOSDJ7G3nQT6sYtxELPIce ui8ZQUdHjjAH6PMolqm98STmtFEGqp15UI9eEjMxAw== X-Received: by 2002:a81:d304:0:b0:544:b9b2:5c32 with SMTP id y4-20020a81d304000000b00544b9b25c32mr1304432ywi.7.1680883709236; Fri, 07 Apr 2023 09:08:29 -0700 (PDT) MIME-Version: 1.0 References: <20230403103440.2895683-1-vladimir.oltean@nxp.com> <20230403103440.2895683-5-vladimir.oltean@nxp.com> In-Reply-To: <20230403103440.2895683-5-vladimir.oltean@nxp.com> From: Jamal Hadi Salim Date: Fri, 7 Apr 2023 12:08:18 -0400 Message-ID: Subject: Re: [PATCH v4 net-next 4/9] net/sched: mqprio: add an extack message to mqprio_parse_opt() To: Vladimir Oltean Cc: netdev@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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 On Mon, Apr 3, 2023 at 6:35=E2=80=AFAM Vladimir Oltean wrote: > > 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/ede5e9a2f27bf83bfb86d3e8c4ca7b34093b= 99e2.camel@inf.elte.hu/ > Signed-off-by: Vladimir Oltean > Reviewed-by: Ferenc Fejes > Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim cheers, jamal > --- > 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 o= ffload > * 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; > } > -- > 2.34.1 >