lkml.org 
[lkml]   [2024]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v2 2/9] net: dsa: microchip: add IPV information support
On 2024-04-03 at 14:58:58, Oleksij Rempel (o.rempel@pengutronix.de) wrote:
> Most of Microchip KSZ switches use Internal Priority Value associated
> with every frame. For example, it is possible to map any VLAN PCP or
> DSCP value to IPV and at the end, map IPV to a queue.
>
> Since amount of IPVs is not equal to amount of queues, add this
> information and make use of it in some functions.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com>
> ---
>
> dev->dev_ops->enable_stp_addr(dev);
>
> + /* Make sure driver provide plausible queue and IPV values */
> + if (!dev->info->num_tx_queues ||
> + dev->info->num_tx_queues > dev->info->max_ipvs) {
> + dev_err(dev->dev, "Number of TX queues exceeds maximum supported IPVs\n");
if dev->info->num_tx_queues == 0, error message seems to be wrong.

> + return -EINVAL;
> + }
>
> #define KSZ9477_PORT_TC_MAP_S 4
> -#define KSZ9477_MAX_TC_PRIO 7
>
> /* CBS related registers */
> #define REG_PORT_MTI_QUEUE_INDEX__4 0x0900
> --
> 2.39.2
>

\
 
 \ /
  Last update: 2024-05-27 16:20    [W:0.094 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site