From: <Arun.Ramadoss@microchip.com>
To: <andrew@lunn.ch>, <olteanv@gmail.com>, <davem@davemloft.net>,
<Woojung.Huh@microchip.com>, <pabeni@redhat.com>,
<o.rempel@pengutronix.de>, <edumazet@google.com>,
<f.fainelli@gmail.com>, <kuba@kernel.org>
Cc: <kernel@pengutronix.de>, <dsahern@kernel.org>, <san@skov.dk>,
<willemb@google.com>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>, <horms@kernel.org>,
<UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH net-next v1 3/3] net: dsa: microchip: dcb: set default apptrust to PCP only
Date: Wed, 8 May 2024 15:11:24 +0000 [thread overview]
Message-ID: <d4f7d3be15d46b07d7139ee4d453d7366d7aedc3.camel@microchip.com> (raw)
In-Reply-To: <20240508103902.4134098-4-o.rempel@pengutronix.de>
Hi Oleksij,
On Wed, 2024-05-08 at 12:39 +0200, Oleksij Rempel wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
>
> -static const u8 ksz8_port2_supported_apptrust[] = {
> - DCB_APP_SEL_PCP,
> -};
> -
> static const char * const ksz_supported_apptrust_variants[] = {
> "empty", "dscp", "pcp", "dscp pcp"
> };
> @@ -771,9 +767,8 @@ int ksz_port_get_apptrust(struct dsa_switch *ds,
> int port, u8 *sel, int *nsel)
> */
> int ksz_dcb_init_port(struct ksz_device *dev, int port)
> {
> - const u8 *sel;
> + const u8 ksz_default_apptrust[] = { DCB_APP_SEL_PCP };
> int ret, ipm;
> - int sel_len;
>
> if (is_ksz8(dev)) {
> ipm = ieee8021q_tt_to_tc(IEEE8021Q_TT_BE,
> @@ -789,18 +784,8 @@ int ksz_dcb_init_port(struct ksz_device *dev,
> int port)
> if (ret)
> return ret;
>
> - if (ksz_is_ksz88x3(dev) && port == KSZ_PORT_2) {
> - /* KSZ88x3 devices do not support DSCP classification
> on
> - * "Port 2.
> - */
> - sel = ksz8_port2_supported_apptrust;
> - sel_len = ARRAY_SIZE(ksz8_port2_supported_apptrust);
If we remove this, How the user application knows about the DSCP
resistriction of KSZ8 port 2. Is it implemented in other functions?
> - } else {
> - sel = ksz_supported_apptrust;
> - sel_len = ARRAY_SIZE(ksz_supported_apptrust);
> - }
> -
> - return ksz_port_set_apptrust(dev->ds, port, sel, sel_len);
> + return ksz_port_set_apptrust(dev->ds, port,
> ksz_default_apptrust,
> + ARRAY_SIZE(ksz_default_apptrust)
> );
> }
>
> /**
> --
> 2.39.2
>
next prev parent reply other threads:[~2024-05-08 15:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 10:38 [PATCH net-next v1 0/3] net: dsa: microchip: DCB fixes Oleksij Rempel
2024-05-08 10:39 ` [PATCH net-next v1 1/3] net: dsa: microchip: dcb: add comments for DSCP related functions Oleksij Rempel
2024-05-08 14:58 ` Arun.Ramadoss
2024-05-08 10:39 ` [PATCH net-next v1 2/3] net: dsa: microchip: dcb: rename IPV to IPM Oleksij Rempel
2024-05-08 13:41 ` Woojung.Huh
2024-05-08 10:39 ` [PATCH net-next v1 3/3] net: dsa: microchip: dcb: set default apptrust to PCP only Oleksij Rempel
2024-05-08 15:11 ` Arun.Ramadoss [this message]
2024-05-09 5:15 ` Oleksij Rempel
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=d4f7d3be15d46b07d7139ee4d453d7366d7aedc3.camel@microchip.com \
--to=arun.ramadoss@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=horms@kernel.org \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=san@skov.dk \
--cc=willemb@google.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
all inboxes | Powered by JetHome®