From: <Daniel.Machon@microchip.com>
To: <Steen.Hegelund@microchip.com>
Cc: <netdev@vger.kernel.org>, <UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH net-next v5 2/6] net: dcb: add new apptrust attribute
Date: Mon, 31 Oct 2022 13:45:06 +0000 [thread overview]
Message-ID: <Y1/TxJL60qsMod3N@DEN-LT-70577> (raw)
In-Reply-To: <b6a2a8c9331d12dc6f7148be210acfea17f16479.camel@microchip.com>
Den Mon, Oct 31, 2022 at 11:40:42AM +0100 skrev Steen Hegelund:
> Hi Daniel,
>
> On Fri, 2022-10-28 at 15:13 +0200, Daniel Machon wrote:
> > Add new apptrust extension attributes to the 8021Qaz APP managed object.
> >
> > Two new attributes, DCB_ATTR_DCB_APP_TRUST_TABLE and
> > DCB_ATTR_DCB_APP_TRUST, has been added. Trusted selectors are passed in
> > the nested attribute DCB_ATTR_DCB_APP_TRUST, in order of precedence.
> >
> > The new attributes are meant to allow drivers, whose hw supports the
> > notion of trust, to be able to set whether a particular app selector is
> > trusted - and in which order.
> >
> > Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
> > ---
>
> ...snip...
>
> > @ -1185,6 +1186,29 @@ static int dcbnl_ieee_fill(struct sk_buff *skb, struct net_device *netdev)
> > spin_unlock_bh(&dcb_lock);
> > nla_nest_end(skb, app);
> >
> > + if (ops->dcbnl_getapptrust) {
> > + u8 selectors[IEEE_8021QAZ_APP_SEL_MAX + 1] = {0};
> > + int nselectors, i;
> > +
> > + apptrust = nla_nest_start(skb, DCB_ATTR_DCB_APP_TRUST_TABLE);
> > + if (!app)
>
> apptrust?
Wow, can't believe I missed this. Good catch. Will be fixed in next version, thanks :-)
>
> > + return -EMSGSIZE;
> > +
> > + err = ops->dcbnl_getapptrust(netdev, selectors, &nselectors);
> > + if (!err) {
> > + for (i = 0; i < nselectors; i++) {
> > + err = nla_put_u8(skb, DCB_ATTR_DCB_APP_TRUST,
> > + selectors[i]);
> > + if (err) {
> > + nla_nest_cancel(skb, apptrust);
> > + return err;
> > + }
> > + }
> > + }
> > +
> > + nla_nest_end(skb, apptrust);
> > + }
> > +
> >
>
> ...snip...
>
> > err:
> > err = nla_put_u8(skb, DCB_ATTR_IEEE, err);
> > dcbnl_ieee_notify(netdev, RTM_SETDCB, DCB_CMD_IEEE_SET, seq, 0);
>
> BR
> Steen
next prev parent reply other threads:[~2022-10-31 13:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 13:13 [PATCH net-next v5 0/6] Add new PCP and APPTRUST attributes to dcbnl Daniel Machon
2022-10-28 13:13 ` [PATCH net-next v5 1/6] net: dcb: add new pcp selector to app object Daniel Machon
2022-10-28 13:13 ` [PATCH net-next v5 2/6] net: dcb: add new apptrust attribute Daniel Machon
2022-10-31 10:40 ` Steen Hegelund
2022-10-31 13:45 ` Daniel.Machon [this message]
2022-10-28 13:14 ` [PATCH net-next v5 3/6] net: microchip: sparx5: add support for offloading pcp table Daniel Machon
2022-10-28 13:14 ` [PATCH net-next v5 4/6] net: microchip: sparx5: add support for apptrust Daniel Machon
2022-10-28 13:14 ` [PATCH net-next v5 5/6] net: microchip: sparx5: add support for offloading dscp table Daniel Machon
2022-10-28 13:14 ` [PATCH net-next v5 6/6] net: microchip: sparx5: add support for offloading default prio Daniel Machon
2022-10-31 16:02 ` [PATCH net-next v5 0/6] Add new PCP and APPTRUST attributes to dcbnl Petr Machata
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=Y1/TxJL60qsMod3N@DEN-LT-70577 \
--to=daniel.machon@microchip.com \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).