From: Ferenc Fejes <ferenc.fejes@ericsson.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"vladimir.oltean@nxp.com" <vladimir.oltean@nxp.com>
Cc: "andrew@lunn.ch" <andrew@lunn.ch>,
"amritha.nambiar@intel.com" <amritha.nambiar@intel.com>,
"vinicius.gomes@intel.com" <vinicius.gomes@intel.com>,
"jhs@mojatatu.com" <jhs@mojatatu.com>,
"claudiu.manoil@nxp.com" <claudiu.manoil@nxp.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"xiaoliang.yang_1@nxp.com" <xiaoliang.yang_1@nxp.com>,
"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
"edumazet@google.com" <edumazet@google.com>,
"jiri@resnulli.us" <jiri@resnulli.us>,
"UNGLinuxDriver@microchip.com" <UNGLinuxDriver@microchip.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"gerhard@engleder-embedded.com" <gerhard@engleder-embedded.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"xiyou.wangcong@gmail.com" <xiyou.wangcong@gmail.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"kurt@linutronix.de" <kurt@linutronix.de>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>
Subject: Re: [PATCH net-next 08/12] net/sched: mqprio: add an extack message to mqprio_parse_opt()
Date: Fri, 17 Feb 2023 07:24:07 +0000 [thread overview]
Message-ID: <c60720e1a6a9768b063ba709ec536f0d89a31ff9.camel@ericsson.com> (raw)
In-Reply-To: <20230216232126.3402975-9-vladimir.oltean@nxp.com>
Hi Vladimir!
On Fri, 2023-02-17 at 01:21 +0200, 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.
Much better, great improvement!
>
> This was rejected because iproute2 defaults to "hw 1" if the 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 <vladimir.oltean@nxp.com>
> ---
> 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 18eda5fade81..52cfc0ec2e23 100644
> --- a/net/sched/sch_mqprio.c
> +++ b/net/sched/sch_mqprio.c
> @@ -134,8 +134,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;
> }
Thanks for doing this!
Best,
Ferenc
next prev parent reply other threads:[~2023-02-17 7:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-16 23:21 [PATCH net-next 00/12] Add tc-mqprio and tc-taprio support for preemptible traffic classes Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 01/12] net: enetc: rename "mqprio" to "qopt" Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 02/12] net: mscc: ocelot: add support for mqprio offload Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 03/12] net: dsa: felix: act upon the mqprio qopt in taprio offload Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 04/12] net: ethtool: fix __ethtool_dev_mm_supported() implementation Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 05/12] net: ethtool: create and export ethtool_dev_mm_supported() Vladimir Oltean
2023-02-17 13:00 ` Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 06/12] net/sched: mqprio: simplify handling of nlattr portion of TCA_OPTIONS Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 07/12] net/sched: mqprio: add extack to mqprio_parse_nlattr() Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 08/12] net/sched: mqprio: add an extack message to mqprio_parse_opt() Vladimir Oltean
2023-02-17 7:24 ` Ferenc Fejes [this message]
2023-02-20 10:47 ` Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 09/12] net/sched: mqprio: allow per-TC user input of FP adminStatus Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 10/12] net/sched: taprio: " Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 11/12] net: mscc: ocelot: add support for preemptible traffic classes Vladimir Oltean
2023-02-16 23:21 ` [PATCH net-next 12/12] net: enetc: " Vladimir Oltean
2023-02-18 15:20 ` [PATCH net-next 00/12] Add tc-mqprio and tc-taprio " Vladimir Oltean
2023-02-19 9:47 ` Ferenc Fejes
2023-02-19 12:58 ` Vladimir Oltean
2023-02-20 8:11 ` Ferenc Fejes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c60720e1a6a9768b063ba709ec536f0d89a31ff9.camel@ericsson.com \
--to=ferenc.fejes@ericsson.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=amritha.nambiar@intel.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=gerhard@engleder-embedded.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vinicius.gomes@intel.com \
--cc=vladimir.oltean@nxp.com \
--cc=xiaoliang.yang_1@nxp.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox