mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
d1df6fd8a1
This patch implements a new type of lightweight tunnel named seg6local. A seg6local lwt is defined by a type of action and a set of parameters. The action represents the operation to perform on the packets matching the lwt's route, and is not necessarily an encapsulation. The set of parameters are arguments for the processing function. Each action is defined in a struct seg6_action_desc within seg6_action_table[]. This structure contains the action, mandatory attributes, the processing function, and a static headroom size required by the action. The mandatory attributes are encoded as a bitmask field. The static headroom is set to a non-zero value when the processing function always add a constant number of bytes to the skb (e.g. the header size for encapsulations). To facilitate rtnetlink-related operations such as parsing, fill_encap, and cmp_encap, each type of action parameter is associated to three function pointers, in seg6_action_params[]. All actions defined in seg6_local.h are detailed in [1]. [1] https://tools.ietf.org/html/draft-filsfils-spring-srv6-network-programming-01 Signed-off-by: David Lebrun <david.lebrun@uclouvain.be> Signed-off-by: David S. Miller <davem@davemloft.net>
71 lines
1.2 KiB
C
71 lines
1.2 KiB
C
#ifndef _UAPI_LWTUNNEL_H_
|
|
#define _UAPI_LWTUNNEL_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
enum lwtunnel_encap_types {
|
|
LWTUNNEL_ENCAP_NONE,
|
|
LWTUNNEL_ENCAP_MPLS,
|
|
LWTUNNEL_ENCAP_IP,
|
|
LWTUNNEL_ENCAP_ILA,
|
|
LWTUNNEL_ENCAP_IP6,
|
|
LWTUNNEL_ENCAP_SEG6,
|
|
LWTUNNEL_ENCAP_BPF,
|
|
LWTUNNEL_ENCAP_SEG6_LOCAL,
|
|
__LWTUNNEL_ENCAP_MAX,
|
|
};
|
|
|
|
#define LWTUNNEL_ENCAP_MAX (__LWTUNNEL_ENCAP_MAX - 1)
|
|
|
|
enum lwtunnel_ip_t {
|
|
LWTUNNEL_IP_UNSPEC,
|
|
LWTUNNEL_IP_ID,
|
|
LWTUNNEL_IP_DST,
|
|
LWTUNNEL_IP_SRC,
|
|
LWTUNNEL_IP_TTL,
|
|
LWTUNNEL_IP_TO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