> Hi all,
> 
> I am implementing SRv6 Encap/Decap actions and already have a working
> source tree, although messy. It's a huge change, so I was wondering
> if anyone could review the design before I send it off as patch series.
> 
> Examples of suggested actions are as follows:
> 
>   actions=push_srv6(mode=encap,segs=(fc00:3::11,fc00:3::12)),output:p2
>   actions=pop_srv6,output:p2
> 
> Each corresponds to the following commands in iproute2 [1]:
> 
>   ip -6 route add ... encap seg6 mode encap segs fc00:3::11,fc00:3::12 dev p2
>   ip -6 route add ... encap seg6local action End.DX4 dev p2
> 
> push_srv6 accepts IPv4 or IPv6 packets. When mode=encap, it prepends IPv6
> header and SRH (Segment Routing Header) as Outer Header for encapsulation;
> when mode=inline, it inserts SRH only. Equivalent to T.encap and T.inline,
> respectively. pop_srv6 performs the reverse operation of push_srv6.
> 
> Changes for push_srv6 are as follows: pop_srv6 is similar.
> 
> Files                                              Changes
> -------------------------------------------------  
> -----------------------------------------------------
> datapath/linux/compat/include/linux/openvswitch.h  add 
> OVS_ACTION_ATTR_PUSH_SRV6 to enum ovs_action_attr
> include/openvswitch/ofp-actions.h                  add PUSH_SRV6 to OFPACTS
> include/openvswitch/ofp-actions.h                  add struct ofpact_push_srv6
> lib/ofp-actions.c                                  add 
> {decode_OFPAT_RAW11,encode,parse,format,check}_PUSH_SRV6
> lib/packets.c                                      add dp_packet_resize_l3
> lib/packets.c                                      add push_srv6
> 
> As an alternative idea, a port-based implementation like
> “ovs-vsctl add-port ... set interface ... type=srv6 options:sids=...”
> was considered.  But this patch series doesn’t use port-based
> implementation because it is desirable to have flexible control over
> SIDs (Segment IDs) by flow rules.

Hi.  Sorry for the late reply.

The feature might be interesting indeed, but the port-based implementation
is preferred.  Creating and maintaining new actions is much more difficult
and all other lightweight-tunnel-based stuff is implemented as tunnel ports,
not separate actions.  So, it's better to re-use the common infrastructure.

For the flexible control over SIDs by flow rules, you may achieve that with
options:srv6_sids=flow configuration.  For example, see how the remote_ip=flow
or options:erspan_idx=flow are implemented.  See the
  http://www.openvswitch.org/support/dist-docs/ovs-fields.7.txt
``Flow-based’’ tunnels section, for the usage exmaple.

Best regards, Ilya Maximets.

> 
> As you may know, SRv6 is already implemented in some data planes, including
> Linux, VPP, P4, and XDP [2]. Since many users already have important assets
> using OVS ecosystem, I think it is significant to be able to keep them and
> support SRv6.
> 
> I am new to OVS, so any comments would be greatly appreciated.
> 
> [1] https://man7.org/linux/man-pages/man8/ip-route.8.html
> [2] https://www.segment-routing.net/open-software
> 
> Best Regards,
> Nobuhiro Miki

_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to