[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20230411111807.6b5a64cb@kernel.org>
Date: Tue, 11 Apr 2023 11:18:07 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Vladimir Oltean <vladimir.oltean@....com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
Vinicius Costa Gomes <vinicius.gomes@...el.com>,
Kurt Kanzenbach <kurt@...utronix.de>,
Gerhard Engleder <gerhard@...leder-embedded.com>,
Amritha Nambiar <amritha.nambiar@...el.com>,
Ferenc Fejes <ferenc.fejes@...csson.com>,
Xiaoliang Yang <xiaoliang.yang_1@....com>,
Roger Quadros <rogerq@...nel.org>,
Pranavi Somisetty <pranavi.somisetty@....com>,
Harini Katakam <harini.katakam@....com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Michael Sit Wei Hong <michael.wei.hong.sit@...el.com>,
Mohammad Athari Bin Ismail <mohammad.athari.ismail@...el.com>,
Oleksij Rempel <linux@...pel-privat.de>,
Jacob Keller <jacob.e.keller@...el.com>,
linux-kernel@...r.kernel.org, Ferenc Fejes <fejes@....elte.hu>,
Simon Horman <simon.horman@...igine.com>
Subject: Re: [PATCH v4 net-next 6/9] net/sched: mqprio: allow per-TC user
input of FP adminStatus
On Tue, 11 Apr 2023 20:01:51 +0300 Vladimir Oltean wrote:
> > > + int err, tc;
> > > +
> > > + err = nla_parse_nested(tb, TCA_MQPRIO_TC_ENTRY_MAX, opt,
> > > + mqprio_tc_entry_policy, extack);
> > > + if (err < 0)
> > > + return err;
> > > +
> > > + if (!tb[TCA_MQPRIO_TC_ENTRY_INDEX]) {
> > > + NL_SET_ERR_MSG(extack, "TC entry index missing");
> >
> > Are you not using NL_REQ_ATTR_CHECK() because iproute can't actually
> > parse the result? :(
>
> I could use it though.. let's assume that iproute2 is "reference code"
> and gets the nlattr structure right. Thus, the NLMSGERR_ATTR_MISS_NEST
> would be of more interest for custom user programs.
>
> Speaking of which, is there any reference example of how to use
> NLMSGERR_ATTR_MISS_NEST? My search came up empty handed:
> https://github.com/search?p=1&q=NLMSGERR_ATTR_MISS_NEST&type=Code
Only YNL to my knowledge, basic support in the in-tree Python:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/tools/net/ynl/lib/ynl.py#n198
And fuller support in the user space hacks which never made it out
of my GitHub:
https://github.com/kuba-moo/linux/blob/ynl-user-c-wip/tools/net/ynl/lib/ynl.c#L163
> I usually steal from hostap's error_handler(), but it looks like it
> hasn't gotten that advanced yet as to re-parse the netlink message to
> understand the reason why it got rejected.
Powered by blists - more mailing lists