Skip to content

ethtool: fail with error if request has unknown flags

Michal Kubecek lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3netlink: allow extack cookie also for error messagesnet/netlink/af_netlink.c+17 -260 replies
2/3netlink: add nl_set_extack_cookie_u32()include/linux/netlink.h+9 -00 replies
3/3ethtool: reject unrecognized request flagsnet/ethtool/netlink.c+12 -41 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net 0/3] ethtool: fail with error if request has unknown flags

Jakub Kicinski pointed out that if unrecognized flags are set in netlink header request, kernel shoud fail with an error rather than silently ignore them so that we have more freedom in future flags semantics.

To help userspace with handling such errors, inform the client which flags are supported by kernel. For that purpose, we need to allow passing cookies as part of extack also in case of error (they can be only passed on success now).

Michal Kubecek (3):
netlink: allow extack cookie also for error messages
netlink: add nl_set_extack_cookie_u32()
ethtool: reject unrecognized request flags

 include/linux/netlink.h  |  9 +++++++++
 net/ethtool/netlink.c    | 16 +++++++++++----
 net/netlink/af_netlink.c | 43 ++++++++++++++++------------------------
 3 files changed, 38 insertions(+), 30 deletions(-)
Signature · 1 line
2.25.1