mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Arun.Ramadoss@microchip.com>
To: <olteanv@gmail.com>, <andrew@lunn.ch>, <f.fainelli@gmail.com>,
	<kuba@kernel.org>, <edumazet@google.com>, <pabeni@redhat.com>,
	<o.rempel@pengutronix.de>, <Woojung.Huh@microchip.com>,
	<davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<UNGLinuxDriver@microchip.com>, <kernel@pengutronix.de>
Subject: Re: [PATCH net-next v2 2/2] net: dsa: microchip: add ETS Qdisc support for KSZ9477 series
Date: Fri, 10 Mar 2023 04:17:50 +0000	[thread overview]
Message-ID: <1ac87648fb6401cd80abfcc045d9184c1532b09c.camel@microchip.com> (raw)
In-Reply-To: <20230308091237.3483895-3-o.rempel@pengutronix.de>

Hi Oleksij,

> +
> +#define KSZ9477_PORT_MRI_TC_MAP__4     0x0808
> +#define KSZ9477_DEFAULT_TC_MAP         0x33221100

KSZ9477 and KSZ8 switches has 4 queues per port whereas LAN937x has 8
queues. So Default TC MAP for LAN937x will be 0x76543210. Instead of
using this values for all the switch, this value must be derived based
on chip info. Can you consider to add this value in chip_info and use
it in funciton ksz_tc_ets_del based on the switch type, So that the
function will be generic.

> +
> +#define KSZ9477_PORT_TC_MAP_S          4
> +#define KSZ9477_MAX_TC_PRIO            7
> +
>  /* CBS related registers */
>  #define REG_PORT_MTI_QUEUE_INDEX__4    0x0900
> 
> @@ -670,6 +679,9 @@ static inline int is_lan937x(struct ksz_device
> *dev)
>  #define MTI_SHAPING_SRP                        1
>  #define MTI_SHAPING_TIME_AWARE         2
> 
> +#define KSZ9477_PORT_MTI_QUEUE_CTRL_1  0x0915
> +#define KSZ9477_DEFAULT_WRR_WEIGHT     1
> +
>  #define REG_PORT_MTI_HI_WATER_MARK     0x0916
>  #define REG_PORT_MTI_LO_WATER_MARK     0x0918
> 
> --
> 2.30.2
> 

      parent reply	other threads:[~2023-03-10  4:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08  9:12 [PATCH net-next v2 0/2] net: dsa: microchip: tc-ets support Oleksij Rempel
2023-03-08  9:12 ` [PATCH net-next v2 1/2] net: dsa: microchip: add ksz_setup_tc_mode() function Oleksij Rempel
2023-03-08 16:37   ` Simon Horman
2023-03-10  4:00   ` Arun.Ramadoss
2023-03-10  4:22     ` Arun.Ramadoss
2023-03-10  7:13       ` Oleksij Rempel
2023-03-08  9:12 ` [PATCH net-next v2 2/2] net: dsa: microchip: add ETS Qdisc support for KSZ9477 series Oleksij Rempel
2023-03-08 16:37   ` Simon Horman
2023-03-10  4:17   ` Arun.Ramadoss [this message]

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=1ac87648fb6401cd80abfcc045d9184c1532b09c.camel@microchip.com \
    --to=arun.ramadoss@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=Woojung.Huh@microchip.com \
    --cc=andrew@lunn.ch \
    --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=o.rempel@pengutronix.de \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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®