From: <edward.cree@amd.com>
To: <netdev@vger.kernel.org>, <linux-net-drivers@amd.com>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <pabeni@redhat.com>,
<edumazet@google.com>, <habetsm.xilinx@gmail.com>,
<johannes@sipsolutions.net>, <marcelo.leitner@gmail.com>,
Edward Cree <ecree.xilinx@gmail.com>
Subject: [RFC PATCH v2 net-next 0/3] netlink: formatted extacks
Date: Thu, 13 Oct 2022 10:22:59 +0100 [thread overview]
Message-ID: <cover.1665567166.git.ecree.xilinx@gmail.com> (raw)
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 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 | 25 +++++++++++-
8 files changed, 46 insertions(+), 92 deletions(-)
next reply other threads:[~2022-10-13 9:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-13 9:22 edward.cree [this message]
2022-10-13 9:23 ` [RFC PATCH v2 net-next 1/3] netlink: add support for formatted extack messages edward.cree
2022-10-13 15:29 ` Jakub Kicinski
2022-10-13 16:16 ` Johannes Berg
2022-10-13 16:32 ` Jakub Kicinski
2022-10-17 12:04 ` Edward Cree
2022-10-17 18:40 ` Jakub Kicinski
2022-10-13 9:23 ` [RFC PATCH v2 net-next 2/3] sfc: use formatted extacks instead of efx_tc_err() edward.cree
2022-10-13 9:23 ` [RFC PATCH v2 net-next 3/3] sfc: remove 'log-tc-errors' ethtool private flag edward.cree
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1665567166.git.ecree.xilinx@gmail.com \
--to=edward.cree@amd.com \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=habetsm.xilinx@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-net-drivers@amd.com \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).