Skip to contentSkip to conversation

docs: networking: add guidance on what to push via extack

PATCH Superseded Jakub Kicinski 3 participants 3 messages Jun 9

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 docs: networking: add guidance on what to push via extack

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.

---
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 Documentation/networking/driver.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Documentation/networking/driver.rst +13 -0
index 195a916dc0de..abd366dd5e43 100644
@@ -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
+=======================
+
+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.
Signature · 1 line
2.54.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 21 lines · Jakub Kicinski

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.

---
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 Documentation/networking/driver.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Documentation/networking/driver.rst +0 -0
index 195a916dc0de..abd366dd5e43 100644

Documentation/networking/driver.rst to be freed up. · line 135

Quoted 8 lines
Documentation/networking/driver.rst +5 -0
@@ -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
+=======================
+
+Number of driver configuration interfaces pass a Netlink extended ACK

Maybe I'm reading it wrong, but seems like it should be: "A number of" ?

reviewer
#2 lore raw
In reply to Jakub Kicinski
Quoted 1 line · Jakub Kicinski

Every now and then someone tries to duplicated extack

duplicate

Quoted 20 lines

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.

---
CC: [email protected]
CC: [email protected]
CC: [email protected]

---
 Documentation/networking/driver.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)
Documentation/networking/driver.rst +0 -0
index 195a916dc0de..abd366dd5e43 100644

Documentation/networking/driver.rst to be freed up. · line 135

Quoted 8 lines
Documentation/networking/driver.rst +5 -0
@@ -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
+=======================
+
+Number of driver configuration interfaces pass a Netlink extended ACK

A number of ...
(agreeing with Joe)

Documentation/networking/driver.rst to be freed up. · line 139

Quoted 4 lines
Documentation/networking/driver.rst +4 -0
+(``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

bad state,

Quoted 4 lines
Documentation/networking/driver.rst +4 -0
+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.
Signature · 1 line
~Randy