ovs-hyperv: make kernel return values netlink socket like
authorNithin Raju <nithin@vmware.com>
Tue, 28 Apr 2015 21:35:37 +0000 (14:35 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 29 Apr 2015 14:35:50 +0000 (07:35 -0700)
commita51a50862a9b9933067fef7651783b2a611f524a
treecf74e348e667a367c09e4b8cf263dc54a0090d28
parent9719aee5c7bf4d3b99a0b25eecf86ea0eef652e8
ovs-hyperv: make kernel return values netlink socket like

In this patch, we make changes to usersapce as well as
kernel datapath on hyperv to make it more netlink socket
like. Previously, the kernel datapath did not distinguish
between "transport errors" and other errors. Netlink
semantics dictate that netlink functions should only
return an error only in the case of a "transport error"
which is generally something fatal. Eg. failure to
communicate with the OVS module, or an invalid command
altogether. Other errors such as an unsupported action,
or an invalid flow key is not considered a "transport
error", and in such cases, netlink functions are to return
success with a 'struct nlmsgerr' populated in the output
buffer.

This patch implements these semantics.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/72
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows/ovsext/Datapath.c
datapath-windows/ovsext/Datapath.h
lib/netlink-socket.c