netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 00/12] Add tc-taprio support for queueMaxSDU
@ 2022-09-23 16:32 Vladimir Oltean
  2022-09-23 16:32 ` [PATCH v2 net-next 01/12] net/sched: taprio: allow user input of per-tc max SDU Vladimir Oltean
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Vladimir Oltean @ 2022-09-23 16:32 UTC (permalink / raw)
  To: netdev
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Xiaoliang Yang, Rui Sousa, Claudiu Manoil, Alexandre Belloni,
	UNGLinuxDriver, Horatiu Vultur, Andrew Lunn, Vivien Didelot,
	Florian Fainelli, Michael Walle, Vinicius Costa Gomes,
	Maxim Kochetkov, Colin Foster, Richie Pearn, Kurt Kanzenbach,
	Vladimir Oltean, Jesse Brandeburg, Tony Nguyen,
	Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	Jamal Hadi Salim, Cong Wang, Jiri Pirko, Gerhard Engleder,
	linux-kernel

The tc-taprio offload mode supported by the Felix DSA driver has
limitations surrounding its guard bands.

The initial discussion was at:
https://lore.kernel.org/netdev/c7618025da6723418c56a54fe4683bd7@walle.cc/

with the latest status being that we now have a vsc9959_tas_guard_bands_update()
method which makes a best-guess attempt at how much useful space to
reserve for packet scheduling in a taprio interval, and how much to
reserve for guard bands.

IEEE 802.1Q actually does offer a tunable variable (queueMaxSDU) which
can determine the max MTU supported per traffic class. In turn we can
determine the size we need for the guard bands, depending on the
queueMaxSDU. This way we can make the guard band of small taprio
intervals smaller than one full MTU worth of transmission time, if we
know that said traffic class will transport only smaller packets.

As discussed with Gerhard Engleder, the queueMaxSDU may also be useful
in limiting the latency on an endpoint, if some of the TX queues are
outside of the control of the Linux driver.
https://patchwork.kernel.org/project/netdevbpf/patch/20220914153303.1792444-11-vladimir.oltean@nxp.com/

Allow input of queueMaxSDU through netlink into tc-taprio, offload it to
the hardware I have access to (LS1028A), and deny non-default values to
everyone else. Kurt Kanzenbach has also kindly tested and shared a patch
to offload this to hellcreek.

Changes in v2:
- precompute the max_frm_len using dev->hard_header_len, so that the
  fast path can directly check against skb->len
- add the newly added lan966x taprio offload to the list of drivers
  which must reject the new option
- add some enetc cleanup patches from
  https://patchwork.kernel.org/project/netdevbpf/patch/20220921144349.1529150-2-vladimir.oltean@nxp.com/
- get rid of some taprio cleanup patches which were merged separately
  via https://patchwork.kernel.org/project/netdevbpf/cover/20220915105046.2404072-1-vladimir.oltean@nxp.com/
- make enetc_vf.ko compile by excluding the taprio offload code:
  https://patchwork.kernel.org/project/netdevbpf/patch/20220916133209.3351399-2-vladimir.oltean@nxp.com/

v1 at:
https://patchwork.kernel.org/project/netdevbpf/cover/20220914153303.1792444-1-vladimir.oltean@nxp.com/

Kurt Kanzenbach (1):
  net: dsa: hellcreek: Offload per-tc max SDU from tc-taprio

Vladimir Oltean (11):
  net/sched: taprio: allow user input of per-tc max SDU
  tsnep: deny tc-taprio changes to per-tc max SDU
  igc: deny tc-taprio changes to per-tc max SDU
  net: stmmac: deny tc-taprio changes to per-tc max SDU
  net: am65-cpsw: deny tc-taprio changes to per-tc max SDU
  net: lan966x: deny tc-taprio changes to per-tc max SDU
  net: dsa: sja1105: deny tc-taprio changes to per-tc max SDU
  net: dsa: felix: offload per-tc max SDU from tc-taprio
  net: enetc: cache accesses to &priv->si->hw
  net: enetc: use common naming scheme for PTGCR and PTGCAPR registers
  net: enetc: offload per-tc max SDU from tc-taprio

 drivers/net/dsa/hirschmann/hellcreek.c        |  59 +++++++-
 drivers/net/dsa/hirschmann/hellcreek.h        |   7 +
 drivers/net/dsa/ocelot/felix_vsc9959.c        |  20 ++-
 drivers/net/dsa/sja1105/sja1105_tas.c         |   6 +-
 drivers/net/ethernet/engleder/tsnep_tc.c      |   6 +-
 drivers/net/ethernet/freescale/enetc/enetc.c  |  28 ++--
 drivers/net/ethernet/freescale/enetc/enetc.h  |  12 +-
 .../net/ethernet/freescale/enetc/enetc_hw.h   |  10 +-
 .../net/ethernet/freescale/enetc/enetc_pf.c   |  25 +++-
 .../net/ethernet/freescale/enetc/enetc_qos.c  |  73 +++++----
 drivers/net/ethernet/intel/igc/igc_main.c     |   6 +-
 .../microchip/lan966x/lan966x_taprio.c        |   8 +
 .../net/ethernet/stmicro/stmmac/stmmac_tc.c   |   6 +-
 drivers/net/ethernet/ti/am65-cpsw-qos.c       |   6 +-
 include/net/pkt_sched.h                       |   1 +
 include/uapi/linux/pkt_sched.h                |  11 ++
 net/sched/sch_taprio.c                        | 138 +++++++++++++++++-
 17 files changed, 351 insertions(+), 71 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-09-27 21:32 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-23 16:32 [PATCH v2 net-next 00/12] Add tc-taprio support for queueMaxSDU Vladimir Oltean
2022-09-23 16:32 ` [PATCH v2 net-next 01/12] net/sched: taprio: allow user input of per-tc max SDU Vladimir Oltean
2022-09-26 20:38   ` Jakub Kicinski
2022-09-27 15:09     ` Vladimir Oltean
2022-09-27 18:27       ` Jakub Kicinski
2022-09-27 21:23         ` Vladimir Oltean
2022-09-27 21:32           ` Jakub Kicinski
2022-09-23 16:33 ` [PATCH v2 net-next 02/12] tsnep: deny tc-taprio changes to " Vladimir Oltean
2022-09-26 20:40   ` Jakub Kicinski
2022-09-26 21:50     ` Vladimir Oltean
2022-09-26 23:29       ` Jakub Kicinski
2022-09-27  0:22         ` Vladimir Oltean
2022-09-27  0:43           ` Jakub Kicinski
2022-09-23 16:33 ` [PATCH v2 net-next 03/12] igc: " Vladimir Oltean
2022-09-23 16:33 ` [PATCH v2 net-next 04/12] net: stmmac: " Vladimir Oltean
2022-09-23 16:33 ` [PATCH v2 net-next 05/12] net: am65-cpsw: " Vladimir Oltean
2022-09-23 16:33 ` [PATCH v2 net-next 06/12] net: lan966x: " Vladimir Oltean
2022-09-23 16:33 ` [PATCH v2 net-next 07/12] net: dsa: sja1105: " Vladimir Oltean
2022-09-23 16:33 ` [PATCH v2 net-next 08/12] net: dsa: felix: offload per-tc max SDU from tc-taprio Vladimir Oltean
2022-09-23 16:33 ` [PATCH v2 net-next 09/12] net: dsa: hellcreek: Offload " Vladimir Oltean
2022-09-23 16:33 ` [PATCH v2 net-next 10/12] net: enetc: cache accesses to &priv->si->hw Vladimir Oltean
2022-09-23 16:33 ` [PATCH v2 net-next 11/12] net: enetc: use common naming scheme for PTGCR and PTGCAPR registers Vladimir Oltean
2022-09-23 16:33 ` [PATCH v2 net-next 12/12] net: enetc: offload per-tc max SDU from tc-taprio Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).