mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Arun Ramadoss <arun.ramadoss@microchip.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: woojung.huh@microchip.com, UNGLinuxDriver@microchip.com,
	andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com,
	olteanv@gmail.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, linux@armlinux.org.uk,
	Tristram.Ha@microchip.com
Subject: Re: [Patch net-next 1/2] net: dsa: microchip: enable port queues for tc mqprio
Date: Thu, 19 Jan 2023 10:37:37 +0100	[thread overview]
Message-ID: <0dfd9deea3497500ce55027a2308bdd823d587b5.camel@redhat.com> (raw)
In-Reply-To: <20230117143252.8339-2-arun.ramadoss@microchip.com>

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@microchip.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


  reply	other threads:[~2023-01-19  9:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 14:32 [Patch net-next 0/2] net: dsa: microchip: add support for credit based shaper Arun Ramadoss
2023-01-17 14:32 ` [Patch net-next 1/2] net: dsa: microchip: enable port queues for tc mqprio Arun Ramadoss
2023-01-19  9:37   ` Paolo Abeni [this message]
2023-01-17 14:32 ` [Patch net-next 2/2] net: dsa: microchip: add support for credit based shaper Arun Ramadoss
2023-01-19  9:30   ` Paolo Abeni

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=0dfd9deea3497500ce55027a2308bdd823d587b5.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=Tristram.Ha@microchip.com \
    --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=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.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

all inboxes | Powered by JetHome®