mbox series

[ovs-dev,v3,0/7] Improve linux QoS for exotic and fast links

Message ID 20230712070259.531904-1-amorenoz@redhat.com
Headers show
Series Improve linux QoS for exotic and fast links | expand

Message

Adrian Moreno July 12, 2023, 7:02 a.m. UTC
There are currently two issues that limit our ability to configure QoS
on certain cards in linux:

1) Firstly, the maximum link speed (which is used as maximum rate in
some tc classes), is obtained from netdev feature bits.
This is quite problematic because netdev feature bits do not keep up
with the new feature bits being added to ethtool. Therefore, cards whose
speed is not supported by OpenFlow currently report an incorrect speed
and this can affect QoS configuration.

This series addresses this problem by adding a new netdev function that
gets the actual link speed so we don't rely on feature bits which are
difficult to keep in sync.

2) The tc layer uses 32bit Bps rates which means we cannot express rates
higher than ~34Gbps.

This series addresses this problem using 64-bit tc attributes when
needed.

---
v2 -> v3
- Move some (non htb-related) from patch 4 to patch 3.
- Add a checkpatch.py warning if the old netdev_features_to_bps API is
  used.
- Change unit tests to avoid burst integer overflow.
- Use netdev_get_speed() instead of accessing current_speed directly in
  {hfsc,htb}parse_qdisc_details__() (patch 2).

v1 -> v2
- Fix style issues.
- Add a test that checks we can expose a 50Gbps speed using a tap
  interface.
- Add an implementation of get_speed for netdev-bsd.
- Expose both HAVE_TCA_HTB_RATE64 and HAVE_TCA_POLICE_PKTRATE64 as AC
  variables and skip tests if the running kernel does not support them.

Adrian Moreno (7):
  netdev: add netdev_get_speed() to nedev API
  netdev-linux: use speed as max rate in tc classes
  netdev-linux: use 64bit rtab and burst calculations
  netdev-linux: use 64-bit rates in htb tc classes
  netdev-linux: remove tc_matchall_fill_police
  netdev-linux: refactor nl_msg_put_act_police
  netdev-linux: support 64-bit rates in tc policing

 acinclude.m4                 |  20 ++++
 include/openvswitch/netdev.h |   1 +
 lib/dpif.h                   |   4 +-
 lib/netdev-bsd.c             |  22 ++++
 lib/netdev-dpdk.c            |  52 ++++++++
 lib/netdev-linux-private.h   |   1 +
 lib/netdev-linux.c           | 223 ++++++++++++++++++++---------------
 lib/netdev-linux.h           |   2 +-
 lib/netdev-provider.h        |   9 ++
 lib/netdev.c                 |  23 ++++
 lib/tc.c                     |   2 +
 ofproto/ofproto-dpif-sflow.c |  11 +-
 ofproto/ofproto.c            |   6 +-
 tests/atlocal.in             |   5 +
 tests/system-interface.at    |  30 +++++
 tests/system-traffic.at      |  49 ++++++++
 utilities/checkpatch.py      |  11 +-
 vswitchd/bridge.c            |  30 +++--
 18 files changed, 386 insertions(+), 115 deletions(-)