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:52 +0000 (16:51 -0700)
commitd30dfb46e9851e1ee144027d7c23cad357f9b23a
tree8f184947c5ebab80396214b7c8e2d529d8489c2e
parent77b05360339de5877b23ce4358245b9196ae4b8e
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