]> git.baikalelectronics.ru Git - kernel.git/commit
seg6: add callbacks for customizing the creation/destruction of a behavior
authorAndrea Mayer <andrea.mayer@uniroma2.it>
Wed, 2 Dec 2020 13:05:13 +0000 (14:05 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 4 Dec 2020 21:30:50 +0000 (13:30 -0800)
commit8cdaf1b5fb448d098cf0b4390ec9b2f3af5c2d0c
tree3e5de5891f8fc237b8825be93aca2d0688c9ddf0
parentd0a395f1a93ff4367f2e14b550e0e2c5d9d0e09f
seg6: add callbacks for customizing the creation/destruction of a behavior

We introduce two callbacks used for customizing the creation/destruction of
a SRv6 behavior. Such callbacks are defined in the new struct
seg6_local_lwtunnel_ops and hereafter we provide a brief description of
them:

 - build_state(...): used for calling the custom constructor of the
   behavior during its initialization phase and after all the attributes
   have been parsed successfully;

 - destroy_state(...): used for calling the custom destructor of the
   behavior before it is completely destroyed.

Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/seg6_local.c