]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: add NULL-friendly helper for setting extended ACK message
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 1 May 2017 04:46:45 +0000 (21:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 May 2017 14:35:47 +0000 (10:35 -0400)
commit0f91bb43b1e992fa6e6da164e74016af8c64d7b5
tree1c0c643212c1cfe1131f70327a88725f84e049a0
parent5be5752c6a3178376cc6485cbe942c2bf9e04b78
netlink: add NULL-friendly helper for setting extended ACK message

As we propagate extended ack reporting throughout various paths in
the kernel it may be that the same function is called with the
extended ack parameter passed as NULL.  One place where that happens
is in drivers which have a centralized reconfiguration function
called both from ndos and from ethtool_ops.  Add a new helper for
setting the error message in such conditions.

Existing helper is left as is to encourage propagating the ext act
fully wherever possible.  It also makes it clear in the code which
messages may be lost due to ext ack being NULL.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netlink.h