> On 10 Mar 2020, at 12:42, Sylvain CADILHAC
> <sylvain.cadil...@jaguar-network.com> wrote:
>
> 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. ?
Some variant of 3 makes most sense here. Adding “inactive” oper state makes
sense to me here….
Instead of modifying existing ethernet-input node, you can simply send all
packets to error-drop except CFM frames which can go straight to your plugin.
I’m fine with adding minimal hooks to make this feature working into the
ethernet code in vnet, and rest goes to plugin.
>
> 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. ?
inactive state + minor modification of interface-tx code. Here, we can use
vector scalar data to pass flag with frame which says “I insist on transmitting
this packets even if interface is inactive”. CFM process node simply sets that
flag when it ships CFM frames to interface-tx node….
—
Damjan
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#15715): https://lists.fd.io/g/vpp-dev/message/15715
Mute This Topic: https://lists.fd.io/mt/71854861/21656
Mute #vnet: https://lists.fd.io/mk?hashtag=vnet&subid=1480452
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-