[SRU][F:linux-bluefield][PULL V1 000/131] Support VF groups rate limit

Bodong Wang bodong at nvidia.com
Tue Mar 1 15:57:13 UTC 2022

BugLink: https://bugs.launchpad.net/bugs/1962490

Pull request page can be found at:


Git repo based on master-next
(90e155d15079 net/xfrm: IPsec tunnel mode fix inner_ipproto setting in sec_path) can be found at:

https://git.launchpad.net/~bodong-wang/ubuntu/+source/linux-bluefield/ nvidia-devlink

Managing TX rate of VFs becomes non-trivial task when a big number of VFs are
used. This issue can be handled with some grouping mechanism.

Currently driver provide two ways to limit TX rate of the VF: TC police action
and NDO API callback. Implementation of grouping within this two infrastructures
problematic, due to the following:

NDO API rate limiting is legacy feature, even though it's available in switchdev
mode, and extending it with new abstraction is not good anyway;

TC police action is flow based and requires net device with Qdisc on it and
implementing this will bring unwanted complications.

According to aforesaid devlink is the most appropriate place.

In order to cherry pick the devlink patch for VF group rate limit, devlink API
patches before the rate limit are needed to maintain a clear history.

1. Change for "cherry picked" to "backported" for patches with conflicts.
2. Update cover letter to reflect accurate repo base.

Amit Cohen (6):
  devlink: Add layer 3 generic packet traps
  devlink: Add layer 3 generic packet exception traps
  devlink: Add non-routable packet trap
  devlink: Add tunnel generic packet traps
  devlink: Add overlay source MAC is multicast trap
  devlink: Add early_drop trap

Andrew Lunn (4):
  net: devlink: regions: Add a priv member to the regions ops struct
  net: devlink: region: Pass the region ops to the snapshot function
  net: devlink: Add support for port regions
  net: devlink: Add unused port flavour

Aya Levin (4):
  devlink: Allow large formatted message of binary output
  devlink: Force enclosing array on binary fmsg data
  devlink: Add DMAC filter generic packet trap
  devlink: Fix dmac_filter trap name, align to its documentation

Bodong Wang (1):
  UBUNTU: [Config] Bluefield: disable inbox drivers which are not used

Danielle Ratson (6):
  devlink: Move set attribute of devlink_port_attrs to devlink_port
  devlink: Move switch_port attribute of devlink_port_attrs to
  devlink: Replace devlink_port_attrs_set parameters with a struct
  devlink: Add a new devlink port lanes attribute and pass to netlink
  devlink: Add a new devlink port split ability attribute and pass to
  mlxsw: Register physical ports as a devlink resource

Dmytro Linkin (6):
  devlink: Introduce rate object
  devlink: Allow setting tx rate for devlink rate leaf objects
  devlink: Introduce rate nodes
  devlink: Allow setting parent node of rate objects
  devlink: Remove eswitch mode check for mode set call
  devlink: Protect rate list with lock while switching modes

Eran Ben Elisha (2):
  devlink: Implicitly set auto recover flag when registering health
  devlink: Add auto dump flag to health reporter

Ido Schimmel (17):
  devlink: Add API to register packet trap groups
  devlink: Stop reference counting packet trap groups
  devlink: Only pass packet trap group identifier in trap structure
  devlink: Add packet trap policers support
  devlink: Add packet trap group parameters support
  devlink: Allow setting of packet trap group parameters
  devlink: Create dedicated trap group for layer 3 exceptions
  devlink: Add layer 2 control packet traps
  devlink: Add layer 3 control packet traps
  devlink: Add ACL control packet traps
  mlxsw: spectrum: Use different trap group for externally routed
  devlink: Pass extack when setting trap's action and group's parameters
  devlink: Add a tracepoint for trap reports
  drop_monitor: Filter control packets in drop monitor
  devlink: Add blackhole_nexthop trap
  devlink: Add 'control' trap type
  drop_monitor: Convert to using devlink tracepoint

Ioana Ciornei (2):
  devlink: add parser error drop packet traps
  devlink: add .trap_group_action_set() callback

Jacob Keller (17):
  devlink: add macro for "fw.psid"
  devlink: move devlink documentation to subfolder
  devlink: correct misspelling of snapshot
  devlink: promote "fw.bundle_id" to a generic info version
  devlink: prepare to support region operations
  devlink: convert snapshot destructor callback to region op
  devlink: add function to take snapshot while locked
  devlink: use -ENOSPC to indicate no more room for snapshots
  devlink: extract snapshot id allocation to helper function
  devlink: report error once U32_MAX snapshot ids have been used
  devlink: track snapshot id usage count using an xarray
  devlink: implement DEVLINK_CMD_REGION_NEW
  devlink: check flash_update parameter support in net core
  devlink: convert flash_update to use params structure
  devlink: introduce flash update overwrite mask
  devlink: move request_firmware out of driver
  devlink: move flash end and begin to core devlink

Jakub Kicinski (5):
  devlink: let kernel allocate region snapshot id
  genetlink: reorg struct genl_family
  devlink: refactor end checks in devlink_nl_cmd_region_read_dumpit
  devlink: ignore -EOPNOTSUPP errors on dumpit
  devlink: factor out building a snapshot notification

Jiri Pirko (16):
  devlink: add ACL generic packet traps
  devlink: add trap metadata type for cookie
  devlink: extend devlink_trap_report() to accept cookie and pass
  net: devlink: allow to change namespaces during reload
  net: devlink: export devlink net getter
  net: devlink: export devlink net setter
  devlink: propagate extack down to health reporter ops
  devlink: introduce the health reporter test command
  net: genetlink: push doit/dumpit code from genl_family_rcv_msg
  net: genetlink: introduce dump info struct to be available during
    dumpit op
  net: genetlink: push attrbuf allocation and parsing to a separate
  net: genetlink: parse attrs and store in contect info struct during
  net: genetlink: remove unused genl_family_attrbuf()
  net: genetlink: always allocate separate attrs for dumpit ops
  devlink: have genetlink code to parse the attrs during dumpit
  net: introduce nla_put_bitfield32() helper and use it

Johannes Berg (1):
  netlink: remove type-unsafe validation_data pointer

Leon Romanovsky (4):
  devlink: Remove duplicated registration check
  devlink: Break parameter notification sequence to be before/after
    unload/load driver
  devlink: Allocate devlink directly in requested net namespace
  devlink: Remove check of always valid devlink pointer

Michal Kubecek (1):
  genetlink: do not parse attributes for families with zero maxattr

Moshe Shemesh (8):
  devlink: Add health recover notifications on devlink flows
  devlink: Add reload action option to devlink reload command
  devlink: Change devlink_reload_supported() param type
  devlink: Add devlink reload limit option
  devlink: Add reload stats
  devlink: Add remote reload stats
  devlink: Add enable_remote_dev_reset generic parameter
  devlink: Fix reload stats structure

Oleksandr Mazur (1):
  net: core: devlink: add dropped stats traps field

Paolo Abeni (1):
  net: genetlink: return the error code when attribute parsing fails.

Parav Pandit (15):
  net/devlink: Support querying hardware address of port function
  net/devlink: Support setting hardware address of port function
  devlink: Add comment for devlink instance lock
  devlink: Add comment block for missing port attributes
  devlink: Move structure comments outside of structure
  devlink: Introduce external controller flag
  devlink: Introduce controller number
  devlink: Fix per port reporter fields initialization
  devlink: Prepare code to fill multiple port function attributes
  devlink: Introduce devlink port flavour virtual
  devlink: Introduce PCI SF port flavour and port attribute
  devlink: Support add and delete devlink port
  devlink: Support get and set state of port function
  devlink: Extend SF port attributes to have external attribute
  devlink: Always use user_ptr[0] for devlink and simplify post_doit

Petr Machata (2):
  net: sched: Allow extending set of supported RED flags
  net: sched: RED: Introduce an ECN nodrop mode

Shannon Nelson (2):
  devlink: add timeout information to status_notify
  devlink: collect flash notify params into a struct

Vasundhara Volam (3):
  devlink: add macro for "fw.roce"
  devlink: Add macro for "fw.mgmt.api" to info_get cb.
  devlink: Add support for board.serial_number to info_get cb.

Vikas Gupta (2):
  devlink: add support for reporter recovery completion
  devlink: add devink notification when reporter update health state

Vladyslav Tarasiuk (5):
  devlink: Refactor devlink health reporter constructor
  devlink: Create generic devlink health reporter search function
  devlink: Implement devlink health reporters on per-port basis
  devlink: Add devlink health port reporters API
  devlink: Rework devlink health reporter destructor

 Documentation/networking/devlink-health.txt        |   86 -
 Documentation/networking/devlink-info-versions.rst |   64 -
 Documentation/networking/devlink-params-bnxt.txt   |   18 -
 Documentation/networking/devlink-params-mlx5.txt   |   17 -
 Documentation/networking/devlink-params-mlxsw.txt  |   10 -
 Documentation/networking/devlink-params-nfp.txt    |    5 -
 Documentation/networking/devlink-params.txt        |   71 -
 .../networking/devlink-trap-netdevsim.rst          |   20 -
 Documentation/networking/devlink-trap.rst          |  209 -
 .../networking/devlink/devlink-health.txt          |   86 +
 .../networking/devlink/devlink-info-versions.rst   |   64 +
 .../networking/devlink/devlink-params-bnxt.txt     |   18 +
 .../networking/devlink/devlink-params-mlx5.txt     |   17 +
 .../networking/devlink/devlink-params-mlxsw.txt    |   10 +
 .../networking/devlink/devlink-params-nfp.txt      |    5 +
 .../networking/devlink/devlink-params.txt          |   71 +
 .../networking/devlink/devlink-trap-netdevsim.rst  |   20 +
 Documentation/networking/devlink/devlink-trap.rst  |  595 +++
 Documentation/networking/devlink/index.rst         |   14 +
 Documentation/networking/index.rst                 |    5 +-
 MAINTAINERS                                        |    1 +
 debian.bluefield/config/config.common.ubuntu       |   31 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c  |   32 +-
 drivers/net/ethernet/mellanox/mlx4/crdump.c        |   36 +-
 drivers/net/ethernet/mellanox/mlx4/main.c          |   13 +-
 .../ethernet/mellanox/mlx5/core/en/reporter_rx.c   |    8 +-
 .../ethernet/mellanox/mlx5/core/en/reporter_tx.c   |    8 +-
 drivers/net/ethernet/mellanox/mlx5/core/health.c   |   16 +-
 drivers/net/ethernet/mellanox/mlxsw/core.c         |   22 +-
 drivers/net/ethernet/mellanox/mlxsw/core.h         |    5 +
 drivers/net/ethernet/mellanox/mlxsw/spectrum.h     |    2 +-
 drivers/net/ethernet/netronome/nfp/nfp_devlink.c   |   14 +-
 .../net/ethernet/pensando/ionic/ionic_devlink.c    |    5 +-
 drivers/net/netdevsim/dev.c                        |   33 +-
 include/net/devlink.h                              |  928 +++-
 include/net/drop_monitor.h                         |   33 -
 include/net/genetlink.h                            |   30 +-
 include/net/netlink.h                              |   75 +-
 include/net/pkt_cls.h                              |    1 +
 include/net/red.h                                  |   38 +
 include/trace/events/devlink.h                     |   37 +
 include/uapi/linux/devlink.h                       |  152 +
 include/uapi/linux/pkt_sched.h                     |   17 +
 lib/nlattr.c                                       |   20 +-
 net/Kconfig                                        |    1 -
 net/core/devlink.c                                 | 4632 ++++++++++++++++----
 net/core/drop_monitor.c                            |   62 +-
 net/dsa/dsa2.c                                     |   17 +-
 net/netlink/genetlink.c                            |  304 +-
 net/sched/act_api.c                                |   19 +-
 net/sched/sch_red.c                                |   68 +-
 .../selftests/drivers/net/netdevsim/devlink.sh     |    3 +
 52 files changed, 6406 insertions(+), 1662 deletions(-)
 delete mode 100644 Documentation/networking/devlink-health.txt
 delete mode 100644 Documentation/networking/devlink-info-versions.rst
 delete mode 100644 Documentation/networking/devlink-params-bnxt.txt
 delete mode 100644 Documentation/networking/devlink-params-mlx5.txt
 delete mode 100644 Documentation/networking/devlink-params-mlxsw.txt
 delete mode 100644 Documentation/networking/devlink-params-nfp.txt
 delete mode 100644 Documentation/networking/devlink-params.txt
 delete mode 100644 Documentation/networking/devlink-trap-netdevsim.rst
 delete mode 100644 Documentation/networking/devlink-trap.rst
 create mode 100644 Documentation/networking/devlink/devlink-health.txt
 create mode 100644 Documentation/networking/devlink/devlink-info-versions.rst
 create mode 100644 Documentation/networking/devlink/devlink-params-bnxt.txt
 create mode 100644 Documentation/networking/devlink/devlink-params-mlx5.txt
 create mode 100644 Documentation/networking/devlink/devlink-params-mlxsw.txt
 create mode 100644 Documentation/networking/devlink/devlink-params-nfp.txt
 create mode 100644 Documentation/networking/devlink/devlink-params.txt
 create mode 100644 Documentation/networking/devlink/devlink-trap-netdevsim.rst
 create mode 100644 Documentation/networking/devlink/devlink-trap.rst
 create mode 100644 Documentation/networking/devlink/index.rst
 delete mode 100644 include/net/drop_monitor.h


More information about the kernel-team mailing list