Merge branch 'ipv6-sr-add-support-for-advanced-local-segment-processing'
David Lebrun says: ==================== ipv6: sr: add support for advanced local segment processing v2: use EXPORT_SYMBOL_GPL The current implementation of IPv6 SR supports SRH insertion/encapsulation and basic segment endpoint behavior (i.e., processing of an SRH contained in a packet whose active segment (IPv6 DA) is routed to the local node). This behavior simply consists of updating the DA to the next segment and forwarding the packet accordingly. This processing is realised for all such packets, regardless of the active segment. The most recent specifications of IPv6 SR [1] [2] extend the SRH processing features as follows. Each segment endpoint defines a MyLocalSID table. This table maps segments to operations to perform. For each ingress IPv6 packet whose DA is part of a given prefix, the segment endpoint looks up the active segment (i.e., the IPv6 DA) in the MyLocalSID table and applies the corresponding operation. Such specifications enable to specify arbitrary operations besides the basic SRH processing and allow for a more fine-grained classification. This patch series implements those extended specifications by leveraging a new type of lightweight tunnel, seg6local. The MyLocalSID table is simply an arbitrary routing table (using CONFIG_IPV6_MULTIPLE_TABLES). The following commands would assign the prefix fc00::/64 to the MyLocalSID table, map the segment fc00::42 to the regular SRH processing function (named "End"), and drop all packets received with an undefined active segment: ip -6 rule add fc00::/64 lookup 100 ip -6 route add fc00::42 encap seg6local action End dev eth0 table 100 ip -6 route add blackhole default table 100 As another example, the following command would assign the segment fc00::1234 to the regular SRH processing function, except that the processed packet must be forwarded to the next-hop fc42::1 (this operation is named "End.X"): ip -6 route add fc00::1234 encap seg6local action End.X nh6 fc42::1 dev eth0 table 100 Those two basic operations (End and End.X) are defined in [1]. A more extensive list of advanced operations is defined in [2]. The first two patches of the series are preliminary work that remove an assumption about initial SRH format, and export the two functions used to insert and encapsulate an SRH onto packets. The third patch defines the new seg6local lightweight tunnel and implement the core functions. The fourth patch implements the operations needed to handle the newly defined rtnetlink attributes. The fifth patch implements a few SRH processing operations, including End and End.X. [1] https://tools.ietf.org/html/draft-ietf-6man-segment-routing-header-07 [2] https://tools.ietf.org/html/draft-filsfils-spring-srv6-network-programming-01 ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Showing
include/linux/seg6_local.h
0 → 100644
net/ipv6/seg6_local.c
0 → 100644
This diff is collapsed.
Please register or sign in to comment