datapath: add netlink error message to help kernel userspace integration.
authorAndy Zhou <azhou@nicira.com>
Wed, 3 Jul 2013 16:18:27 +0000 (09:18 -0700)
committerJesse Gross <jesse@nicira.com>
Wed, 3 Jul 2013 23:51:05 +0000 (16:51 -0700)
commit1b936472569dbaf1d6140c06789890ea01967456
tree58e858f9f3ec9f3df0bae1d19ad2fdf8cd5cd3f6
parentf44ccce1dbd221ada735d92f5cb616a4cef58262
datapath: add netlink error message to help kernel userspace integration.

When kernel rejects a netlink message, it usually returns EINVAL
error code to the userspace. The actual reason for rejecting the
netlinke message is not available, making it harder to debug netlink
issues.  This patch adds kernel log messages whenever a netlink message
is rejected with reasons. Those messages are logged at the info level.

Those messages are logged only once per message, to keep kernel log noise
level down. Reload the kernel module to re-enable already logged
messages.

The messages are meant to help developers to debug userspace and kernel
intergration issues. The actual message may change or be removed over time.
These messages are not expected to show up in a production environment.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath/datapath.c
datapath/datapath.h
datapath/flow.c
datapath/linux/compat/include/linux/kernel.h