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>,
Arun Ramadoss <arun.ramadoss@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 partial ACL support for ksz9477 switches
Date: Thu, 13 Apr 2023 06:29:36 +0200 [thread overview]
Message-ID: <20230413042936.GA12562@pengutronix.de> (raw)
In-Reply-To: <20230411172456.3003003-3-o.rempel@pengutronix.de>
On Tue, Apr 11, 2023 at 07:24:55PM +0200, Oleksij Rempel wrote:
...
> drivers/net/dsa/microchip/ksz9477_acl.c | 950 ++++++++++++++++++++++++
I'll better split tc-flower code and ACL code to separate files. This
chips support other engines which can be used for priority remaping. For
example DiffServ/DSCP
> drivers/net/dsa/microchip/ksz_common.c | 40 +
> drivers/net/dsa/microchip/ksz_common.h | 1 +
...
> +/**
> + * ksz9477_acl_port_enable - Enables ACL functionality on a given port.
> + * @dev: The ksz_device instance.
> + * @port: The port number on which to enable ACL functionality.
> + *
> + * This function enables ACL functionality on the specified port by configuring
> + * the appropriate control registers. It returns 0 if the operation is
> + * successful, or a negative error code if an error occurs.
> + */
> +static int ksz9477_acl_port_enable(struct ksz_device *dev, int port)
> +{
> + int ret;
> +
> + ret = ksz_prmw8(dev, port, P_PRIO_CTRL, 0, PORT_ACL_PRIO_ENABLE |
> + PORT_OR_PRIO);
According to KSZ9477S 5.2.8.2 Port Priority Control Register
"To achieve the desired functionality, do not set more than one bit at a
time in this register.
...
Bit 6 - OR’ed Priority
...
Bit 2 - 802.1p Priority Classification
Bit 1 - Diffserv Priority Classification
Bit 0 - ACL Priority Classification
"
@Arun what will happen if multiple engines are used for packet
prioritization? For example ACL || Diffserv || 802.1p... ?
If I see it correctly, it is possible but not recommended. Should I
prevent usage of multiple prio sources?
> + if (ret)
> + return ret;
> +
> + return ksz_pwrite8(dev, port, REG_PORT_MRI_AUTHEN_CTRL,
> + PORT_ACL_ENABLE |
> + FIELD_PREP(PORT_AUTHEN_MODE, PORT_AUTHEN_PASS));
> +}
Regards,
Oleksij
--
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 |
next prev parent reply other threads:[~2023-04-13 4:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 17:24 [PATCH net-next v1 0/2] net: dsa: microchip: Rework ksz_prmw8 and add partial ACL support Oleksij Rempel
2023-04-11 17:24 ` [PATCH net-next v1 1/2] net: dsa: microchip: rework ksz_prmw8 Oleksij Rempel
2023-04-11 17:24 ` [PATCH net-next v1 2/2] net: dsa: microchip: Add partial ACL support for ksz9477 switches Oleksij Rempel
2023-04-12 5:36 ` kernel test robot
2023-04-13 4:29 ` Oleksij Rempel [this message]
2023-04-16 16:59 ` Vladimir Oltean
2023-04-17 11:41 ` Oleksij Rempel
2023-04-17 12:05 ` Vladimir Oltean
2023-04-18 7:24 ` Oleksij Rempel
2023-04-18 12:08 ` Vladimir Oltean
2023-04-16 16:56 ` Vladimir Oltean
2023-04-17 4:57 ` Oleksij Rempel
2023-04-17 10:12 ` Vladimir Oltean
2023-04-17 11:03 ` Oleksij Rempel
2023-04-17 12:19 ` Vladimir Oltean
2023-04-18 4:55 ` Oleksij Rempel
2023-04-17 14:16 ` kernel test robot
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=20230413042936.GA12562@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=arun.ramadoss@microchip.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox