lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0dfd9deea3497500ce55027a2308bdd823d587b5.camel@redhat.com>
Date:   Thu, 19 Jan 2023 10:37:37 +0100
From:   Paolo Abeni <pabeni@...hat.com>
To:     Arun Ramadoss <arun.ramadoss@...rochip.com>,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Cc:     woojung.huh@...rochip.com, UNGLinuxDriver@...rochip.com,
        andrew@...n.ch, vivien.didelot@...il.com, f.fainelli@...il.com,
        olteanv@...il.com, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, linux@...linux.org.uk, Tristram.Ha@...rochip.com
Subject: Re: [Patch net-next 1/2] net: dsa: microchip: enable port queues
 for tc mqprio

On Tue, 2023-01-17 at 20:02 +0530, Arun Ramadoss wrote:
> LAN937x family of switches has 8 queues per port where the KSZ switches
> has 4 queues per port. By default, only one queue per port is enabled.
> The queues are configurable in 2, 4 or 8. This patch add 8 number of
> queues for LAN937x and 4 for other switches.
> In the tag_ksz.c file, prioirty of the packet is queried using the skb
> buffer and the corresponding value is updated in the tag.
> 
> Signed-off-by: Arun Ramadoss <arun.ramadoss@...rochip.com>
> ---
>  drivers/net/dsa/microchip/ksz9477.c      |  4 ++++
>  drivers/net/dsa/microchip/ksz9477_reg.h  |  5 ++++-
>  drivers/net/dsa/microchip/ksz_common.c   | 18 ++++++++++++++++++
>  drivers/net/dsa/microchip/ksz_common.h   |  1 +
>  drivers/net/dsa/microchip/lan937x_main.c |  4 ++++
>  drivers/net/dsa/microchip/lan937x_reg.h  |  6 +++++-
>  net/dsa/tag_ksz.c                        | 15 +++++++++++++++
>  7 files changed, 51 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
> index 47b54ecf2c6f..5a66d0be2876 100644
> --- a/drivers/net/dsa/microchip/ksz9477.c
> +++ b/drivers/net/dsa/microchip/ksz9477.c
> @@ -991,6 +991,10 @@ void ksz9477_port_setup(struct ksz_device *dev, int port, bool cpu_port)
>  		ksz_port_cfg(dev, port, REG_PORT_CTRL_0, PORT_TAIL_TAG_ENABLE,
>  			     true);
>  
> +	/* Enable the Port Queue split */
> +	ksz_prmw8(dev, port, REG_PORT_CTRL_0, PORT_QUEUE_SPLIT_MASK,
> +		  PORT_FOUR_QUEUE);

I think it would be nice here (and in lan937x_port_setup below)
explicitly checking that the owning ksz_device->num_tx_queues matches
the configured value. 

Cheers,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ