Hi all, While refactoring the GBP plugin to use feature arcs instead of hardcoded L2 feature bits, I had to basically duplicate my feature arc nodes 3x (and disable/enable them 3x etc.) because the L2 feature arcs are divided in 3 flavors: nonip (no IP ethertype), ip4 (IPv4 ethertype) and ip6 (IPv6 ethertype). It works but I'd prefer to hide this complexity from the plugins. I can see several possibilities: 1) add a new feature arc flavor 'all' alongside nonip, ip4 and ip6. Nodes on this arc will gets all packets regardless of the headers. It keeps backward compat but should add a small performance hit when L2 feature arcs are enabled (we have to visit 4 feature arcs instead of 3). This is my favorite. 2) remove feature arcs flavors and just pass all packets to feature nodes. It is the responsibility of the nodes to check the packet type. It simplifies the L2 feature arc code but breaks backward compat. It could also be slightly less efficient as the ethertype test will happen later and must be duplicating in all feature nodes. 3) add a new feature arc using a new feature bit. It does not modify the current path at all, so perf & compat is unchanged but adds some complexity in the L2 path. 4) keeps the 3 flavors as they are but add helper to register nodes to the 3 arcs - basically move helpers from GBP plugin to vnet/l2. Basically same up/downside as (3) 5) keep it as is (boilerplate in GBP)
My favorite would be (1) but I'd like to hear from more experience VPP dev. Best, Ben
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#11986): https://lists.fd.io/g/vpp-dev/message/11986 Mute This Topic: https://lists.fd.io/mt/29523811/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-