Hello folks, In old router plugin it was done with the following snippet: ``` #include <vnet/osi/osi.h> ... osi_register_input_protocol (OSI_PROTOCOL_isis, im->tx_node_index); ```
So, I'd give it a try to register this protocol for `lip_punt_node` (`lcp_router_init` seems quite suitable). Something like this: diff --git a/src/plugins/linux-cp/lcp.h b/src/plugins/linux-cp/lcp.h index 4ddaa3898..51f6b1b3e 100644 --- a/src/plugins/linux-cp/lcp.h +++ b/src/plugins/linux-cp/lcp.h @@ -52,6 +52,8 @@ u8 lcp_get_del_static_on_link_down (void); void lcp_set_del_dynamic_on_link_down (u8 is_del); u8 lcp_get_del_dynamic_on_link_down (void); +extern vlib_node_registration_t lip_punt_node; + #endif /* diff --git a/src/plugins/linux-cp/lcp_router.c b/src/plugins/linux-cp/lcp_router.c index 3534b597e..1f2c126d9 100644 --- a/src/plugins/linux-cp/lcp_router.c +++ b/src/plugins/linux-cp/lcp_router.c @@ -37,6 +37,7 @@ #include <vnet/ip/ip6_link.h> #include "lcp_nl_evpn.h" +#include "vnet/osi/osi.h" typedef struct lcp_router_table_t_ { @@ -1416,6 +1417,8 @@ lcp_router_init (vlib_main_t *vm) lcp_rt_fib_src_dynamic = fib_source_allocate ( "lcp-rt-dynamic", FIB_SOURCE_PRIORITY_HI + 1, FIB_SOURCE_BH_API); + osi_register_input_protocol( OSI_PROTOCOL_isis, lip_punt_node.index); + return (NULL); } It compiles, but I haven't checked anything since I'm too lazy to configure ISIS. On Mon, 23 Jan 2023 at 18:14, Pim van Pelt via lists.fd.io <pim= ipng...@lists.fd.io> wrote: > Hoi, > > I would suggest not matching (only) MAC but (foremost) the ethertype, and > then punting those packets into the TAP, take a look at VLIB_REGISTER_NODE > (lip_punt_node) in src/plugins/linux-cp/lcp_node.c, contributions are > welcome. > > groet, > Pim > > On Mon, Jan 23, 2023 at 6:06 PM <agv...@gmail.com> wrote: > >> Hoi Pim, >> >> As for distinguishing IS-IS packets, I think that should not be really >> difficult, it's just all the packets with specific DST MACs: >> 09:00:2b:00:00:05, 09:00:2b:00:00:14,09:00:2b:00:00:15. >> It's hard to imagine situation when they are needed to be processed by >> DataPlane. >> >> >> > > -- > Pim van Pelt <p...@ipng.nl> > PBVP1-RIPE - http://www.ipng.nl/ > > > > -- Best regards Stanislav Zaikin
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#22494): https://lists.fd.io/g/vpp-dev/message/22494 Mute This Topic: https://lists.fd.io/mt/96476162/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-