]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
docs: networking: add guidance on what to push via extack
authorJakub Kicinski <kuba@kernel.org>
Thu, 11 Jun 2026 17:21:49 +0000 (10:21 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 13 Jun 2026 00:55:48 +0000 (17:55 -0700)
Every now and then someone tries to duplicated extack
messages to dmesg. Document our guidance against this.
Also indicate that system level faults should continue
to go to system logs. The high level thinking is to try
to distinguish between what's important to the user vs
system admin.

Reviewed-by: Joe Damato <joe@dama.to>
Link: https://patch.msgid.link/20260611172149.1877704-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/networking/driver.rst

index 195a916dc0deece92b837b9c93828cb021fef10a..920c0ec987594a871b3433806ca45c1ead994aeb 100644 (file)
@@ -128,3 +128,16 @@ to be freed up.
 If you return NETDEV_TX_BUSY from the ndo_start_xmit method, you
 must not keep any reference to that SKB and you must not attempt
 to free it up.
+
+Error message reporting
+=======================
+
+A number of driver configuration interfaces pass a Netlink extended ACK
+(``extack``) object to the driver (either directly as an argument or
+as a member of a parameter struct). The drivers should try to report
+most errors via the ``extack`` object. System level exceptions,
+indicating that system or device is misbehaving or is in bad state,
+should continue to be reported to system logs.
+
+Messages should be passed **either** via ``extack`` **or** to system logs.
+Drivers should not try to report the same information to both.