mbox series

[net-next,0/5] net: introduce TX shaping H/W offload API

Message ID cover.1719518113.git.pabeni@redhat.com (mailing list archive)
Headers show
Series net: introduce TX shaping H/W offload API | expand

Message

Paolo Abeni June 27, 2024, 8:17 p.m. UTC
We have a plurality of shaping-related drivers API, but none flexible
enough to meet existing demand from vendors[1].

This series introduces new device APIs to configure in a flexible way
TX shaping H/W offload. The new functionalities are exposed via a newly
defined generic netlink interface and include introspection
capabilities. Some basic self-tests are included, on top of a dummy
netdevsim implementation.

The ice driver support is currently a WIP, sharing the current status
earlier since some APIs details are still under discussion.

RFC: https://lore.kernel.org/netdev/3d1e2d945904a0fb55258559eb7322d7e11066b6.1715199358.git.pabeni@redhat.com/

[1] https://lore.kernel.org/netdev/20240405102313.GA310894@kernel.org/

Paolo Abeni (5):
  netlink: spec: add shaper YAML spec
  net: introduce HW Rate limiting driver API
  netlink: spec: add shaper introspection support
  net: shaper: implement introspection support
  testing: net-drv: add basic shaper test

 Documentation/netlink/specs/shaper.yaml       | 276 +++++++
 drivers/net/Kconfig                           |   1 +
 drivers/net/netdevsim/netdev.c                |  29 +
 include/linux/netdevice.h                     |  16 +
 include/net/net_shaper.h                      | 208 ++++++
 include/uapi/linux/net_shaper.h               |  90 +++
 net/Kconfig                                   |   3 +
 net/Makefile                                  |   1 +
 net/core/dev.c                                |   2 +
 net/core/dev.h                                |   6 +
 net/shaper/Makefile                           |   9 +
 net/shaper/shaper.c                           | 686 ++++++++++++++++++
 net/shaper/shaper_nl_gen.c                    | 118 +++
 net/shaper/shaper_nl_gen.h                    |  28 +
 tools/testing/selftests/drivers/net/Makefile  |   1 +
 tools/testing/selftests/drivers/net/shaper.py | 198 +++++
 .../testing/selftests/net/lib/py/__init__.py  |   1 +
 tools/testing/selftests/net/lib/py/ynl.py     |   5 +
 18 files changed, 1678 insertions(+)
 create mode 100644 Documentation/netlink/specs/shaper.yaml
 create mode 100644 include/net/net_shaper.h
 create mode 100644 include/uapi/linux/net_shaper.h
 create mode 100644 net/shaper/Makefile
 create mode 100644 net/shaper/shaper.c
 create mode 100644 net/shaper/shaper_nl_gen.c
 create mode 100644 net/shaper/shaper_nl_gen.h
 create mode 100755 tools/testing/selftests/drivers/net/shaper.py

Comments

Jakub Kicinski June 29, 2024, 2:03 a.m. UTC | #1
On Thu, 27 Jun 2024 22:17:17 +0200 Paolo Abeni wrote:
> The ice driver support is currently a WIP, sharing the current status
> earlier since some APIs details are still under discussion.

Let's stick to RFC until it's ready? Quoting documentation:

  netdevsim
  ~~~~~~~~~
  
  ``netdevsim`` is a test driver which can be used to exercise driver
  configuration APIs without requiring capable hardware.
  Mock-ups and tests based on ``netdevsim`` are strongly encouraged when
                   vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
  adding new APIs, but ``netdevsim`` in itself is **not** considered
  a use case/user. You must also implement the new APIs in a real driver.
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#netdevsim