Skip to content

netlink: formatted extacks

[email protected] netdev 2 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesApplied 3/3
  2. v2 RFC3 patches 5 repliesSuperseded

Changes in v3 from the cover letter

* altered string splicing in NL_SET_ERR_MSG_FMT to avoid storing the format string twice in .rodata
* removed RFC tags

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3netlink: add support for formatted extack messagesinclude/linux/netlink.h+27 -22 repliesApplied
2/3sfc: use formatted extacks instead of efx_tc_err()drivers/net/ethernet/sfc/mae.c drivers/net/ethernet/sfc/tc.c drivers/net/ethernet/sfc/tc.h+23 -470 repliesApplied
3/3sfc: remove 'log-tc-errors' ethtool private flagdrivers/net/ethernet/sfc/ef100_ethtool.c drivers/net/ethernet/sfc/ethtool_common.c drivers/net/ethernet/sfc/ethtool_common.h +1 more+0 -430 repliesApplied

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchJakub Kicinski
1/3R-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 net-next 0/3] netlink: formatted extacks

From: Edward Cree <[email protected]>

Currently, netlink extacks can only carry fixed string messages, which
is limiting when reporting failures in complex systems. This series adds the ability to return printf-formatted messages, and uses it in the sfc driver's TC offload code.
Formatted extack messages are limited in length to a fixed buffer size,
currently 80 characters. If the message exceeds this, the full message will be logged (ratelimited) to the console and a truncated version returned over netlink.
There is no change to the netlink uAPI; only internal kernel changes
are needed.

Changed in v3:
* altered string splicing in NL_SET_ERR_MSG_FMT to avoid storing the format string twice in .rodata
* removed RFC tags

Changed in v2:
* fixed null-checking of extack (with break; as suggested by kuba)
* added logging of full string on truncation (Johannes)

Edward Cree (3):
netlink: add support for formatted extack messages
sfc: use formatted extacks instead of efx_tc_err()
sfc: remove 'log-tc-errors' ethtool private flag

 drivers/net/ethernet/sfc/ef100_ethtool.c  |  2 -
 drivers/net/ethernet/sfc/ethtool_common.c | 37 ------------------
 drivers/net/ethernet/sfc/ethtool_common.h |  2 -
 drivers/net/ethernet/sfc/mae.c            |  5 +--
 drivers/net/ethernet/sfc/net_driver.h     |  2 -
 drivers/net/ethernet/sfc/tc.c             | 47 ++++++++++-------------
 drivers/net/ethernet/sfc/tc.h             | 18 ---------
 include/linux/netlink.h                   | 29 +++++++++++++-
 8 files changed, 50 insertions(+), 92 deletions(-)