[net-next,v2,0/2] net: dsa: microchip: tc-ets support

Message ID 20230310090809.220764-1-o.rempel@pengutronix.de
Headers
Series net: dsa: microchip: tc-ets support |

Message

Oleksij Rempel March 10, 2023, 9:08 a.m. UTC
  changes v3:
- add tc_ets_supported to match supported devices
- dynamically regenerated default TC to queue map.
- add Acked-by to the first patch

changes v2:
- run egress limit configuration on all queue separately. Otherwise
  configuration may not apply correctly.

Oleksij Rempel (2):
  net: dsa: microchip: add ksz_setup_tc_mode() function
  net: dsa: microchip: add ETS Qdisc support for KSZ9477 series

 drivers/net/dsa/microchip/ksz_common.c | 238 ++++++++++++++++++++++++-
 drivers/net/dsa/microchip/ksz_common.h |  18 +-
 2 files changed, 244 insertions(+), 12 deletions(-)
  

Comments

Arun Ramadoss March 13, 2023, 6:48 a.m. UTC | #1
Hi Oleksij,
On Fri, 2023-03-10 at 10:08 +0100, Oleksij Rempel wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe

Cover letter patch version is still v2.
[PATCH net-next v2]

> 
> changes v3:
> - add tc_ets_supported to match supported devices
> - dynamically regenerated default TC to queue map.
> - add Acked-by to the first patch
> 
> changes v2:
> - run egress limit configuration on all queue separately. Otherwise
>   configuration may not apply correctly.
> 
> Oleksij Rempel (2):
>   net: dsa: microchip: add ksz_setup_tc_mode() function
>   net: dsa: microchip: add ETS Qdisc support for KSZ9477 series
> 
>  drivers/net/dsa/microchip/ksz_common.c | 238
> ++++++++++++++++++++++++-
>  drivers/net/dsa/microchip/ksz_common.h |  18 +-
>  2 files changed, 244 insertions(+), 12 deletions(-)
> 
> --
> 2.30.2
>
  
Jakub Kicinski March 13, 2023, 7:18 p.m. UTC | #2
On Fri, 10 Mar 2023 10:08:07 +0100 Oleksij Rempel wrote:
> changes v3:
> - add tc_ets_supported to match supported devices
> - dynamically regenerated default TC to queue map.
> - add Acked-by to the first patch
> 
> changes v2:
> - run egress limit configuration on all queue separately. Otherwise
>   configuration may not apply correctly.

I thought Vladimir was suggesting mqprio, could you summarize the take
aways from that discussion?
  
Oleksij Rempel March 14, 2023, 8:01 a.m. UTC | #3
On Mon, Mar 13, 2023 at 12:18:33PM -0700, Jakub Kicinski wrote:
> On Fri, 10 Mar 2023 10:08:07 +0100 Oleksij Rempel wrote:
> > changes v3:
> > - add tc_ets_supported to match supported devices
> > - dynamically regenerated default TC to queue map.
> > - add Acked-by to the first patch
> > 
> > changes v2:
> > - run egress limit configuration on all queue separately. Otherwise
> >   configuration may not apply correctly.
> 
> I thought Vladimir was suggesting mqprio, could you summarize the take
> aways from that discussion?

Both Qdiscs are suitable for my use case, but I prefer tc-ets because it
aligns better with the abilities of the KSZ9477 family of switches.
However, I won't be able to support only the deficit round-robin
functionality of tc-ets with this hardware. On the other hand, tc-mqprio
has more features that are not supported by this switch, such as TXQ
grouping, bandwidth limit, and DCB support. The advanced mapping
functionality of tc-mqprio, which involves mapping SO_PRIORITY to TCs
and then to TXQ groups, can also be confusing. For my use case, only TC
to TXQ mapping is needed.

Futures of tc-mqprio:
- all TXQ groups use a strict priority transmission selection algorithm
  (TSA). Within one TXQ group probably round robin robin TSA is used.
- Number of supported traffic classes (TCs) is equal to the number of
  TXQ groups.
- TCs have predefined priorities. TC0 == minimal prio and transmitted
  last if TCn> TC0 exists.
- flexible mapping of all SO_PRIORITYs to TCs
- flexible mapping of TCs to TXQ groups.
- configurable bandwidth limit per TXQ group.

Futures of tc-ets:
- supports strict priority and deficit round robin (DRR) TSA. Both
  variants can be combined.
- quantum of each DRR band can be flexibly configured.
- each band has predefined priority and mapped directly to a TXQ.
- Supports max 16 TCs. Each TC can be flexibly mapped to a band==TXQ.

Futures of KSZ9477 family:
- Supports up to 4 TXQs. LANxxxx variants support up to 8 TXQs
- Each TXQ can be configured to strict priority or to weighted round
  robin (WRR) TSA.
- If bandwidth configuration per TXQ is used TSA falls back to simple
  round robin.
- TXQs can’t be grouped without breaking strict priority TSA
- Max 8 TCs are supported and can be flexibly mapped to TXQs

Regards,
Oleksij
  
patchwork-bot+netdevbpf@kernel.org March 15, 2023, 8:10 a.m. UTC | #4
Hello:

This series was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Fri, 10 Mar 2023 10:08:07 +0100 you wrote:
> changes v3:
> - add tc_ets_supported to match supported devices
> - dynamically regenerated default TC to queue map.
> - add Acked-by to the first patch
> 
> changes v2:
> - run egress limit configuration on all queue separately. Otherwise
>   configuration may not apply correctly.
> 
> [...]

Here is the summary with links:
  - [net-next,v3,1/2] net: dsa: microchip: add ksz_setup_tc_mode() function
    https://git.kernel.org/netdev/net-next/c/69444581d002
  - [net-next,v3,2/2] net: dsa: microchip: add ETS Qdisc support for KSZ9477 series
    https://git.kernel.org/netdev/net-next/c/c570f861fa05

You are awesome, thank you!