]> git.baikalelectronics.ru Git - kernel.git/commit
seg6: add netlink_ext_ack support in parsing SRv6 behavior attributes
authorAndrea Mayer <andrea.mayer@uniroma2.it>
Mon, 12 Sep 2022 17:16:17 +0000 (19:16 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 20 Sep 2022 10:33:22 +0000 (12:33 +0200)
commit51e9bbde2b2373c379c5dcf76a03a3034e848b15
tree36dba37d6a66922b633786cee3f75d69b17d72d7
parent788efc4f6b55a91d1a80b5915d8b2a0ed79b0e3c
seg6: add netlink_ext_ack support in parsing SRv6 behavior attributes

An SRv6 behavior instance can be set up using mandatory and/or optional
attributes.
In the setup phase, each supplied attribute is parsed and processed. If
the parsing operation fails, the creation of the behavior instance stops
and an error number/code is reported to the user.  In many cases, it is
challenging for the user to figure out exactly what happened by relying
only on the error code.

For this reason, we add the support for netlink_ext_ack in parsing SRv6
behavior attributes. In this way, when an SRv6 behavior attribute is
parsed and an error occurs, the kernel can send a message to the
userspace describing the error through a meaningful text message in
addition to the classic error code.

Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ipv6/seg6_local.c