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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 28 Sep 2022 02:47:38 +0300
From:   Vladimir Oltean <>
Cc:     "David S. Miller" <>,
        Eric Dumazet <>,
        Jakub Kicinski <>,
        Paolo Abeni <>,
        Xiaoliang Yang <>,
        Rui Sousa <>,
        Claudiu Manoil <>,
        Alexandre Belloni <>,,
        Horatiu Vultur <>,
        Andrew Lunn <>,
        Vivien Didelot <>,
        Florian Fainelli <>,
        Michael Walle <>,
        Vinicius Costa Gomes <>,
        Maxim Kochetkov <>,
        Colin Foster <>,
        Richie Pearn <>,
        Kurt Kanzenbach <>,
        Vladimir Oltean <>,
        Jamal Hadi Salim <>,
        Cong Wang <>,
        Jiri Pirko <>,
Subject: [PATCH v3 net-next 0/8] Add tc-taprio support for queueMaxSDU

Changes in v3:
- at Jakub's suggestion, implement a TC_QUERY_CAPS functionality in
  ndo_setup_tc through which drivers can opt into features, rather than
  out of them
- consequently, drop patches to am65-cpsw, stmmac, igc, tsnep, lan966x

Non-changes in v3:
- still not using the nla_policy to limit the range for the tc index
- still not using the NL_SET_ERR_ATTR_MISS() helper to report a missing
  tc entry index attribute
As discussed here, this would actually make things less user friendly,
until iproute2 gains support for policy tables and for meaningfully
parsing the offset to the bad attribute, something which I've no idea
how to do.

v2 at:*

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
- get rid of some taprio cleanup patches which were merged separately
- make enetc_vf.ko compile by excluding the taprio offload code:

v1 at:

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

The initial discussion was at:

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.

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

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

Vladimir Oltean (7):
  net/sched: query offload capabilities through ndo_setup_tc()
  net/sched: taprio: allow user input of per-tc max SDU
  net: dsa: felix: offload per-tc max SDU from tc-taprio
  net: dsa: hellcreek: refactor hellcreek_port_setup_tc() to use
  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        |  94 +++++++++--
 drivers/net/dsa/hirschmann/hellcreek.h        |   7 +
 drivers/net/dsa/ocelot/felix_vsc9959.c        |  35 +++-
 drivers/net/ethernet/freescale/enetc/enetc.c  |  28 ++--
 drivers/net/ethernet/freescale/enetc/enetc.h  |  14 +-
 .../net/ethernet/freescale/enetc/enetc_hw.h   |  10 +-
 .../net/ethernet/freescale/enetc/enetc_pf.c   |  27 +++-
 .../net/ethernet/freescale/enetc/enetc_qos.c  |  94 ++++++-----
 include/linux/netdevice.h                     |   1 +
 include/net/pkt_sched.h                       |  10 ++
 include/net/sch_generic.h                     |   3 +
 include/uapi/linux/pkt_sched.h                |  11 ++
 net/sched/sch_api.c                           |  17 ++
 net/sched/sch_taprio.c                        | 152 +++++++++++++++++-
 14 files changed, 429 insertions(+), 74 deletions(-)


Powered by blists - more mailing lists