summaryrefslogtreecommitdiff
path: root/lib/packets.c
diff options
context:
space:
mode:
authorPaolo Valerio <pvalerio@redhat.com>2021-08-11 17:43:49 +0200
committerIlya Maximets <i.maximets@ovn.org>2022-01-16 22:16:16 +0100
commit4a6a4734622e42367faf39cd3938bc8a57786282 (patch)
tree8e43915e0f7718b1525b7dd598c85fc939f9cce7 /lib/packets.c
parenteb1ab5357b6f3755f0ef1ee6d341ce24398d3bc1 (diff)
downloadopenvswitch-4a6a4734622e42367faf39cd3938bc8a57786282.tar.gz
netlink-socket: Log extack error messages in netlink transactions.
During a netlink transaction, in case of replies of type NLMSG_ERROR, the current behavior includes the translation of the error number received into a string that describes the error code. Netlink replies may carry a more descriptive error message, and although it is possible to read those messages using the existing perf tracepoint, it is more convenient to retrieve them directly from ovs. This patch extends nl_msg_nlmsgerr() so that it retrieves the message that later, if present, will be used by nl_sock_transact_multiple__() in place of the generic descriptive form of the error number. This is particularly useful with tc that makes use of such kind of mechanism. As an example, with this patch applied, the following generic message: ovs|00239|netlink_socket|DBG|received NAK error=0 (Operation not supported) becomes: ovs|00239|netlink_socket|DBG|received NAK error=0 - Conntrack isn't enabled The layout has been slightly modified to avoid nested parentheses. Suggested-by: Marcelo Ricardo Leitner <mleitner@redhat.com> Reviewed-by: Marcelo Ricardo Leitner <mleitner@redhat.com> Signed-off-by: Paolo Valerio <pvalerio@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'lib/packets.c')
0 files changed, 0 insertions, 0 deletions