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 v2 net-next 1/2] net: dcb: add new pcp selector to app object
Date: Wed, 28 Sep 2022 13:52:39 +0000 [thread overview]
Message-ID: <YzRT9hzoVU8h4q7i@DEN-LT-70577> (raw)
In-Reply-To: <87edw7y93y.fsf@nvidia.com>
Den Mon, Sep 19, 2022 at 11:45:41AM +0200 skrev Petr Machata:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> Daniel Machon <daniel.machon@microchip.com> writes:
>
> > 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.
>
> One more thought: please verify how this behaves with openlldpad.
> It's a fairly major user of this API.
>
> I guess it is OK if it refuses to run or bails out in face of the PCP
> APP entries. On its own it will never introduce them, so this clear and
> noisy diagnostic when a user messes with the system through a different
> channels is OK IMHO.
>
> But it shouldn't silently reinterpret the 255 to mean something else.
Hi Petr,
Looks like we are in trouble here:
https://github.com/openSUSE/lldpad/blob/master/lldp_8021qaz.c#L911
protocol is shifted and masked with selector to fit in u8. Same u8
value is being transmitted in the APP TLVs.
A dscp mapping of 10:7 will become (7 << 5) | 5 = e5
A pcp mapping of 1:1 will become (1 << 5) | ff = ff (always)
Looks like the loop does not even check for DCB_ATTR_IEEE_APP, so putting
the pcp stuff in a non-standard attribute in the DCB_ATTR_IEEE_APP_TABLE
wont work either.
The pcp selector will have to fit in 5 bits (0x1f instead of 0xff) to not
interfere with the priority in lldapd.
Thoughts?
/ Daniel
next prev parent reply other threads:[~2022-09-28 13:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 9:57 [RFC PATCH v2 net-next 0/2] Add PCP selector and new APPTRUST attribute Daniel Machon
2022-09-15 9:57 ` [RFC PATCH v2 net-next 1/2] net: dcb: add new pcp selector to app object Daniel Machon
2022-09-19 9:45 ` Petr Machata
2022-09-28 13:52 ` Daniel.Machon [this message]
2022-09-28 15:50 ` Petr Machata
2022-09-15 9:57 ` [RFC PATCH v2 net-next 2/2] net: dcb: add new apptrust attribute Daniel Machon
2022-09-15 9:51 ` Vladimir Oltean
2022-09-19 7:30 ` Petr Machata
2022-09-19 7:54 ` [RFC PATCH v2 net-next 0/2] Add PCP selector and new APPTRUST attribute Petr Machata
2022-09-19 8:13 ` Daniel.Machon
2022-09-19 15:11 ` 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=YzRT9hzoVU8h4q7i@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