netlink: allow sending extended ACK with cookie on success
authorJohannes Berg <johannes.berg@intel.com>
Wed, 12 Apr 2017 12:34:06 +0000 (14:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Apr 2017 17:58:21 +0000 (13:58 -0400)
commitba0dc5f6e0ba5a5d2f575bcdb35e5d1960cf7c04
tree67f74587529492b36ee1566352d961f245efa45c
parent7ab606d1609dd6dfeae9c8ad0a8a4e051d831e46
netlink: allow sending extended ACK with cookie on success

Now that we have extended error reporting and a new message format for
netlink ACK messages, also extend this to be able to return arbitrary
cookie data on success.

This will allow, for example, nl80211 to not send an extra message for
cookies identifying newly created objects, but return those directly
in the ACK message.

The cookie data size is currently limited to 20 bytes (since Jamal
talked about using SHA1 for identifiers.)

Thanks to Jamal Hadi Salim for bringing up this idea during the
discussions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netlink.h
include/uapi/linux/netlink.h
net/netlink/af_netlink.c