Hi VPP Experts,

I'm looking for some advice in order to properly implement a CFM (802.1ag) CCM 
plugin.
CCM (Continuity Check Messages) are basic Ethernet keepalive messages -- 
missing several messages in a row should cause the Ethernet interface or 
sub-interface [the CFM frames might be VLAN tagged] to be suspended from a 
forwarding perspective.
Injecting the keepalives using a process node, and catching the incoming 
keepalives with a ethernet_register_input_type- hooked (based on EtherType) 
node look easy, but *how to properly suspend forwarding in both directions on 
the sw (sub) interface* when keepalives are missing (while still being able to 
receive further keepalives of course)? If possible as a pure plugin but I doubt 
it's possible.

Thoughts so far:

Inbound direction:

* Option 1. Hook a new node before ethernet-input to catch the CFM frames, 
identify the sub-interface (if tagged frame), drop other frames... but that 
means re-running all what's already done in ethernet-input (finding the 
matching sub-interface, etc.).
* Option 2. Hook a new node at the beginning of each next arc (IP4, IP6, MPLS, 
L2...) to drop all packets there. Enable ( vnet_feature_enable_disable ) this 
node only when CCM reports the link failure.
* Option 3. Implement a new vnet_sw_interface_flags_t flag into vnet code to 
indicate that the interface is suspended, and add checks to ethernet-input with 
a bypass option for some specific EtherTypes (CFM first).

* Note: VNET_SW_INTERFACE_FLAG_PUNT 's description sounds attractive... but I 
cannot see where and how it's actually used.

* Option 4. ?

Outbound direction:

* Option 1. Implement a new vnet_sw_interface_flags_t flag into vnet code, its 
corresponding callback, and check this flag along 
VNET_SW_INTERFACE_FLAG_ADMIN_UP in many locations.
* Option 2. Implement VNET_SW_INTERFACE_FLAG_OPER_UP new flag, controlled by 
FLAG_ADMIN_UP and by CFM, and use it rather than FLAG_ADMIN_UP in callbacks.
* Option 3. ?

Any advice will be welcome.

Thanks,
Sylvain
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15713): https://lists.fd.io/g/vpp-dev/message/15713
Mute This Topic: https://lists.fd.io/mt/71854861/21656
Mute #vnet: https://lists.fd.io/mk?hashtag=vnet&subid=1480452
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to