xref: /openbmc/linux/include/uapi/linux/seg6_local.h (revision 664d6f86)
1d1df6fd8SDavid Lebrun /*
2d1df6fd8SDavid Lebrun  *  SR-IPv6 implementation
3d1df6fd8SDavid Lebrun  *
4d1df6fd8SDavid Lebrun  *  Author:
5d1df6fd8SDavid Lebrun  *  David Lebrun <david.lebrun@uclouvain.be>
6d1df6fd8SDavid Lebrun  *
7d1df6fd8SDavid Lebrun  *
8d1df6fd8SDavid Lebrun  *  This program is free software; you can redistribute it and/or
9d1df6fd8SDavid Lebrun  *      modify it under the terms of the GNU General Public License
10d1df6fd8SDavid Lebrun  *      as published by the Free Software Foundation; either version
11d1df6fd8SDavid Lebrun  *      2 of the License, or (at your option) any later version.
12d1df6fd8SDavid Lebrun  */
13d1df6fd8SDavid Lebrun 
14d1df6fd8SDavid Lebrun #ifndef _UAPI_LINUX_SEG6_LOCAL_H
15d1df6fd8SDavid Lebrun #define _UAPI_LINUX_SEG6_LOCAL_H
16d1df6fd8SDavid Lebrun 
17d1df6fd8SDavid Lebrun #include <linux/seg6.h>
18d1df6fd8SDavid Lebrun 
19d1df6fd8SDavid Lebrun enum {
20d1df6fd8SDavid Lebrun 	SEG6_LOCAL_UNSPEC,
21d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION,
22d1df6fd8SDavid Lebrun 	SEG6_LOCAL_SRH,
23d1df6fd8SDavid Lebrun 	SEG6_LOCAL_TABLE,
24d1df6fd8SDavid Lebrun 	SEG6_LOCAL_NH4,
25d1df6fd8SDavid Lebrun 	SEG6_LOCAL_NH6,
26d1df6fd8SDavid Lebrun 	SEG6_LOCAL_IIF,
27d1df6fd8SDavid Lebrun 	SEG6_LOCAL_OIF,
28004d4b27SMathieu Xhonneux 	SEG6_LOCAL_BPF,
29*664d6f86SAndrea Mayer 	SEG6_LOCAL_VRFTABLE,
30d1df6fd8SDavid Lebrun 	__SEG6_LOCAL_MAX,
31d1df6fd8SDavid Lebrun };
32d1df6fd8SDavid Lebrun #define SEG6_LOCAL_MAX (__SEG6_LOCAL_MAX - 1)
33d1df6fd8SDavid Lebrun 
34d1df6fd8SDavid Lebrun enum {
35d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_UNSPEC	= 0,
36d1df6fd8SDavid Lebrun 	/* node segment */
37d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END		= 1,
38d1df6fd8SDavid Lebrun 	/* adjacency segment (IPv6 cross-connect) */
39d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_X		= 2,
40d1df6fd8SDavid Lebrun 	/* lookup of next seg NH in table */
41d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_T		= 3,
42d1df6fd8SDavid Lebrun 	/* decap and L2 cross-connect */
43d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_DX2	= 4,
44d1df6fd8SDavid Lebrun 	/* decap and IPv6 cross-connect */
45d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_DX6	= 5,
46d1df6fd8SDavid Lebrun 	/* decap and IPv4 cross-connect */
47d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_DX4	= 6,
48d1df6fd8SDavid Lebrun 	/* decap and lookup of DA in v6 table */
49d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_DT6	= 7,
50d1df6fd8SDavid Lebrun 	/* decap and lookup of DA in v4 table */
51d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_DT4	= 8,
52d1df6fd8SDavid Lebrun 	/* binding segment with insertion */
53d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_B6	= 9,
54d1df6fd8SDavid Lebrun 	/* binding segment with encapsulation */
55d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_B6_ENCAP	= 10,
56d1df6fd8SDavid Lebrun 	/* binding segment with MPLS encap */
57d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_BM	= 11,
58d1df6fd8SDavid Lebrun 	/* lookup last seg in table */
59d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_S		= 12,
60d1df6fd8SDavid Lebrun 	/* forward to SR-unaware VNF with static proxy */
61d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_AS	= 13,
62d1df6fd8SDavid Lebrun 	/* forward to SR-unaware VNF with masquerading */
63d1df6fd8SDavid Lebrun 	SEG6_LOCAL_ACTION_END_AM	= 14,
64004d4b27SMathieu Xhonneux 	/* custom BPF action */
65004d4b27SMathieu Xhonneux 	SEG6_LOCAL_ACTION_END_BPF	= 15,
66d1df6fd8SDavid Lebrun 
67d1df6fd8SDavid Lebrun 	__SEG6_LOCAL_ACTION_MAX,
68d1df6fd8SDavid Lebrun };
69d1df6fd8SDavid Lebrun 
70d1df6fd8SDavid Lebrun #define SEG6_LOCAL_ACTION_MAX (__SEG6_LOCAL_ACTION_MAX - 1)
71d1df6fd8SDavid Lebrun 
72004d4b27SMathieu Xhonneux enum {
73004d4b27SMathieu Xhonneux 	SEG6_LOCAL_BPF_PROG_UNSPEC,
74004d4b27SMathieu Xhonneux 	SEG6_LOCAL_BPF_PROG,
75004d4b27SMathieu Xhonneux 	SEG6_LOCAL_BPF_PROG_NAME,
76004d4b27SMathieu Xhonneux 	__SEG6_LOCAL_BPF_PROG_MAX,
77004d4b27SMathieu Xhonneux };
78004d4b27SMathieu Xhonneux 
79004d4b27SMathieu Xhonneux #define SEG6_LOCAL_BPF_PROG_MAX (__SEG6_LOCAL_BPF_PROG_MAX - 1)
80004d4b27SMathieu Xhonneux 
81d1df6fd8SDavid Lebrun #endif
82