From: Guillaume Nault <gnault@redhat.com>
To: Roger Quadros <rogerq@kernel.org>
Cc: Siddharth Vadapalli <s-vadapalli@ti.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
linux-omap@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, srk@ti.com,
Pekka Varis <p-varis@ti.com>
Subject: Re: [PATCH net-next v4 1/2] net: ethernet: ti: am65-cpsw: update pri_thread_map as per IEEE802.1Q-2014
Date: Thu, 14 Nov 2024 16:43:15 +0100 [thread overview]
Message-ID: <ZzYak49k8fQC76/+@debian> (raw)
In-Reply-To: <20241114-am65-cpsw-multi-rx-dscp-v4-1-93eaf6760759@kernel.org>
On Thu, Nov 14, 2024 at 03:36:52PM +0200, Roger Quadros wrote:
> IEEE802.1Q-2014 supersedes IEEE802.1D-2004. Now Priority Code Point (PCP)
> 2 is no longer at a lower priority than PCP 0. PCP 1 (Background) is still
> at a lower priority than PCP 0 (Best Effort).
Reviewed-by: Guillaume Nault <gnault@redhat.com>
> Reference:
> IEEE802.1Q-2014, Standard for Local and metropolitan area networks
> Table I-2 - Traffic type acronyms
> Table I-3 - Defining traffic types
>
> Signed-off-by: Roger Quadros <rogerq@kernel.org>
> Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> ---
> drivers/net/ethernet/ti/cpsw_ale.c | 36 ++++++++++++++++++++++--------------
> 1 file changed, 22 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
> index 8d02d2b21429..9f79056b3f48 100644
> --- a/drivers/net/ethernet/ti/cpsw_ale.c
> +++ b/drivers/net/ethernet/ti/cpsw_ale.c
> @@ -1692,26 +1692,34 @@ static void cpsw_ale_policer_reset(struct cpsw_ale *ale)
> void cpsw_ale_classifier_setup_default(struct cpsw_ale *ale, int num_rx_ch)
> {
> int pri, idx;
> - /* IEEE802.1D-2004, Standard for Local and metropolitan area networks
> - * Table G-2 - Traffic type acronyms
> - * Table G-3 - Defining traffic types
> - * User priority values 1 and 2 effectively communicate a lower
> - * priority than 0. In the below table 0 is assigned to higher priority
> - * thread than 1 and 2 wherever possible.
> - * The below table maps which thread the user priority needs to be
> +
> + /* Reference:
> + * IEEE802.1Q-2014, Standard for Local and metropolitan area networks
> + * Table I-2 - Traffic type acronyms
> + * Table I-3 - Defining traffic types
> + * Section I.4 Traffic types and priority values, states:
> + * "0 is thus used both for default priority and for Best Effort, and
> + * Background is associated with a priority value of 1. This means
> + * that the value 1 effectively communicates a lower priority than 0."
> + *
> + * In the table below, Priority Code Point (PCP) 0 is assigned
> + * to a higher priority thread than PCP 1 wherever possible.
> + * The table maps which thread the PCP traffic needs to be
> * sent to for a given number of threads (RX channels). Upper threads
> * have higher priority.
> * e.g. if number of threads is 8 then user priority 0 will map to
> - * pri_thread_map[8-1][0] i.e. thread 2
> + * pri_thread_map[8-1][0] i.e. thread 1
> */
> - int pri_thread_map[8][8] = { { 0, 0, 0, 0, 0, 0, 0, 0, },
> +
> + int pri_thread_map[8][8] = { /* BK,BE,EE,CA,VI,VO,IC,NC */
> + { 0, 0, 0, 0, 0, 0, 0, 0, },
> { 0, 0, 0, 0, 1, 1, 1, 1, },
> { 0, 0, 0, 0, 1, 1, 2, 2, },
> - { 1, 0, 0, 1, 2, 2, 3, 3, },
> - { 1, 0, 0, 1, 2, 3, 4, 4, },
> - { 1, 0, 0, 2, 3, 4, 5, 5, },
> - { 1, 0, 0, 2, 3, 4, 5, 6, },
> - { 2, 0, 1, 3, 4, 5, 6, 7, } };
> + { 0, 0, 1, 1, 2, 2, 3, 3, },
> + { 0, 0, 1, 1, 2, 2, 3, 4, },
> + { 1, 0, 2, 2, 3, 3, 4, 5, },
> + { 1, 0, 2, 3, 4, 4, 5, 6, },
> + { 1, 0, 2, 3, 4, 5, 6, 7 } };
>
> cpsw_ale_policer_reset(ale);
>
>
> --
> 2.34.1
>
next prev parent reply other threads:[~2024-11-14 15:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 13:36 [PATCH net-next v4 0/2] net: ethernet: ti: am65-cpsw: enable DSCP to priority map for RX Roger Quadros
2024-11-14 13:36 ` [PATCH net-next v4 1/2] net: ethernet: ti: am65-cpsw: update pri_thread_map as per IEEE802.1Q-2014 Roger Quadros
2024-11-14 15:43 ` Guillaume Nault [this message]
2024-11-14 13:36 ` [PATCH net-next v4 2/2] net: ethernet: ti: am65-cpsw: enable DSCP to priority map for RX Roger Quadros
2024-11-14 14:07 ` Guillaume Nault
2024-11-18 12:10 ` [PATCH net-next v4 0/2] " patchwork-bot+netdevbpf
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=ZzYak49k8fQC76/+@debian \
--to=gnault@redhat.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=p-varis@ti.com \
--cc=pabeni@redhat.com \
--cc=rogerq@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=srk@ti.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.