From: Oleksij Rempel <o.rempel@pengutronix.de>
To: "David S. Miller" <davem@davemloft.net>,
Andrew Lunn <andrew@lunn.ch>, Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Vladimir Oltean <olteanv@gmail.com>,
Woojung Huh <woojung.huh@microchip.com>
Cc: kernel@pengutronix.de, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, UNGLinuxDriver@microchip.com
Subject: Re: [PATCH net-next v1 2/2] net: dsa: microchip: add ETS Qdisc support for KSZ9477 series
Date: Wed, 8 Mar 2023 08:16:49 +0100 [thread overview]
Message-ID: <20230308071649.GD1692@pengutronix.de> (raw)
In-Reply-To: <20230306124940.865233-2-o.rempel@pengutronix.de>
On Mon, Mar 06, 2023 at 01:49:40PM +0100, Oleksij Rempel wrote:
> +static int ksz_queue_set_strict(struct ksz_device *dev, int port, int queue)
> +{
> + int ret;
> +
> + /* In order to ensure proper prioritization, it is necessary to set the
> + * rate limit for the related queue to zero. Otherwise strict priority
> + * mode will not work.
> + */
> + ret = ksz_pwrite8(dev, port, KSZ9477_REG_PORT_OUT_RATE_0 + queue,
> + KSZ9477_OUT_RATE_NO_LIMIT);
Uff, this part works by accident. KSZ9477_REG_PORT_OUT_RATE_0 registers
should be written in a direct order. According to the documentation
"update will not take effect until the Port Queue 3 Egress Limit
Control Register is written.". But we are writing in a reverse order -
queue 3 is written first.
> + if (ret)
> + return ret;
> +
> + ret = ksz_pwrite32(dev, port, REG_PORT_MTI_QUEUE_INDEX__4, queue);
> + if (ret)
> + return ret;
> +
> + return ksz_setup_tc_mode(dev, port, MTI_SCHEDULE_STRICT_PRIO,
> + MTI_SHAPING_OFF);
> +}
> +
> +static int ksz_queue_set_wrr(struct ksz_device *dev, int port, int queue,
> + int weight)
> +{
> + int ret;
> +
> + /* In order to ensure proper prioritization, it is necessary to set the
> + * rate limit for the related queue to zero. Otherwise weighted round
> + * robin mode will not work.
> + */
> + ret = ksz_pwrite8(dev, port, KSZ9477_REG_PORT_OUT_RATE_0 + queue,
> + KSZ9477_OUT_RATE_NO_LIMIT);
same here.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2023-03-08 7:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-06 12:49 [PATCH net-next v1 1/2] net: dsa: microchip: add ksz_setup_tc_mode() function Oleksij Rempel
2023-03-06 12:49 ` [PATCH net-next v1 2/2] net: dsa: microchip: add ETS Qdisc support for KSZ9477 series Oleksij Rempel
2023-03-06 14:06 ` Vladimir Oltean
2023-03-06 16:35 ` Oleksij Rempel
2023-03-07 16:46 ` Vladimir Oltean
2023-03-07 18:27 ` Oleksij Rempel
2023-03-07 18:57 ` Vladimir Oltean
2023-03-07 19:52 ` Oleksij Rempel
2023-03-07 21:11 ` Vladimir Oltean
2023-03-08 5:48 ` Oleksij Rempel
2023-03-08 7:16 ` Oleksij Rempel [this message]
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=20230308071649.GD1692@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=woojung.huh@microchip.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.