public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: <Daniel.Machon@microchip.com>
To: <petrm@nvidia.com>
Cc: <netdev@vger.kernel.org>, <Allan.Nielsen@microchip.com>,
	<UNGLinuxDriver@microchip.com>, <maxime.chevallier@bootlin.com>,
	<vladimir.oltean@nxp.com>, <kuba@kernel.org>,
	<vinicius.gomes@intel.com>, <thomas.petazzoni@bootlin.com>
Subject: Re: [RFC PATCH net-next 1/2] net: dcb: add new pcp selector to app object
Date: Tue, 13 Sep 2022 06:33:30 +0000	[thread overview]
Message-ID: <YyAmZaQegw2zMNLb@DEN-LT-70577> (raw)
In-Reply-To: <878rmoeezf.fsf@nvidia.com>

> > The purpose of adding the PCP selector, is to be able to offload
> > PCP-based queue classification to the 8021Q Priority Code Point table,
> > see 6.9.3 of IEEE Std 802.1Q-2018.
> >
> > PCP and DEI is encoded in the protocol field as 8*dei+pcp, so that a
> > mapping of PCP 2 and DEI 1 to priority 3 is encoded as {255, 10, 3}.
> >
> > While PCP is not a standard 8021Qaz selector, it seems very convenient
> > to add it to the APP object, as this is where similar priority mapping
> > is handled, and it perfectly fits the {selector, protocol, priority}
> > triplet.
> >
> > Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
> > ---
> >  include/uapi/linux/dcbnl.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/include/uapi/linux/dcbnl.h b/include/uapi/linux/dcbnl.h
> > index a791a94013a6..8eab16e5bc13 100644
> > --- a/include/uapi/linux/dcbnl.h
> > +++ b/include/uapi/linux/dcbnl.h
> > @@ -217,6 +217,7 @@ struct cee_pfc {
> >  #define IEEE_8021QAZ_APP_SEL_DGRAM   3
> >  #define IEEE_8021QAZ_APP_SEL_ANY     4
> >  #define IEEE_8021QAZ_APP_SEL_DSCP       5
> > +#define IEEE_8021QAZ_APP_SEL_PCP     255
> >
> >  /* This structure contains the IEEE 802.1Qaz APP managed object. This
> >   * object is also used for the CEE std as well.
> 
> I'm thinking how to further isolate this from the IEEE standard values.
> I think it would be better to pass the non-standard APP contributions in
> a different attribute. IIUIC, this is how the APP table is passed:
> 
> DCB_ATTR_IEEE_APP_TABLE {
>     DCB_ATTR_IEEE_APP {
>         struct dcb_app { ... };
>     }
>     DCB_ATTR_IEEE_APP {
>         struct dcb_app { ... };
>     }
> }
> 
> Well, instead, the non-standard stuff could be passed in a different
> attribute:
> 
> DCB_ATTR_IEEE_APP_TABLE {
>     DCB_ATTR_IEEE_APP {
>         struct dcb_app { ... }; // standard contribution to APP table
>     }
>     DCB_ATTR_DCB_APP {
>         struct dcb_app { ... }; // non-standard contribution
>     }
> }
> 
> The new selector could still stay as 255. This will allow us to keep the
> internal bookkeeping simple for the likely case that 255 never becomes a
> valid IEEE selector. But if it ever does, the UAPI can stay the same,
> just the internals will need to be updated.

I get your sentiment, but it seems a little far-fetched to me. The 
trade-off will be extra code, in trade for something that IMO very likely 
will not happen. Like you said earlier - how many selectors could one
possibly prioritize on?

  reply	other threads:[~2022-09-13  6:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 12:04 [RFC PATCH net-next 0/2] Add PCP selector and new APPTRUST attribute Daniel Machon
2022-09-08 12:04 ` [RFC PATCH net-next 1/2] net: dcb: add new pcp selector to app object Daniel Machon
2022-09-12 16:15   ` Petr Machata
2022-09-13  6:33     ` Daniel.Machon [this message]
2022-09-08 12:04 ` [RFC PATCH net-next 2/2] net: dcb: add new apptrust attribute Daniel Machon
2022-09-09 12:29   ` Vladimir Oltean
2022-09-12  7:03     ` Daniel.Machon
2022-09-12 16:30       ` Petr Machata
2022-09-12 17:16         ` Vladimir Oltean
2022-09-12 14:31   ` Petr Machata
2022-09-13  9:01     ` Daniel.Machon
2022-09-13 11:25       ` Petr Machata
2022-09-13 19:22         ` Daniel.Machon

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=YyAmZaQegw2zMNLb@DEN-LT-70577 \
    --to=daniel.machon@microchip.com \
    --cc=Allan.Nielsen@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=kuba@kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@nvidia.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vinicius.gomes@intel.com \
    --cc=vladimir.oltean@nxp.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