mbox series

[v3,net-next,0/3] netlink: formatted extacks

Message ID cover.1666102698.git.ecree.xilinx@gmail.com (mailing list archive)
Headers show
Series netlink: formatted extacks | expand

Message

edward.cree@amd.com Oct. 18, 2022, 2:37 p.m. UTC
From: Edward Cree <ecree.xilinx@gmail.com>

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(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 19, 2022, 10:10 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 18 Oct 2022 15:37:26 +0100 you wrote:
> From: Edward Cree <ecree.xilinx@gmail.com>
> 
> 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.
> 
> [...]

Here is the summary with links:
  - [v3,net-next,1/3] netlink: add support for formatted extack messages
    https://git.kernel.org/netdev/net-next/c/51c352bdbcd2
  - [v3,net-next,2/3] sfc: use formatted extacks instead of efx_tc_err()
    https://git.kernel.org/netdev/net-next/c/ad1c80d5f777
  - [v3,net-next,3/3] sfc: remove 'log-tc-errors' ethtool private flag
    https://git.kernel.org/netdev/net-next/c/b799f052a987

You are awesome, thank you!