GNU Linux-libre 6.0.15-gnu
[releases.git] / include / uapi / linux / tc_act / tc_mpls.h
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /* Copyright (C) 2019 Netronome Systems, Inc. */
3
4 #ifndef __LINUX_TC_MPLS_H
5 #define __LINUX_TC_MPLS_H
6
7 #include <linux/pkt_cls.h>
8
9 #define TCA_MPLS_ACT_POP        1
10 #define TCA_MPLS_ACT_PUSH       2
11 #define TCA_MPLS_ACT_MODIFY     3
12 #define TCA_MPLS_ACT_DEC_TTL    4
13 #define TCA_MPLS_ACT_MAC_PUSH   5
14
15 struct tc_mpls {
16         tc_gen;         /* generic TC action fields. */
17         int m_action;   /* action of type TCA_MPLS_ACT_*. */
18 };
19
20 enum {
21         TCA_MPLS_UNSPEC,
22         TCA_MPLS_TM,    /* struct tcf_t; time values associated with action. */
23         TCA_MPLS_PARMS, /* struct tc_mpls; action type and general TC fields. */
24         TCA_MPLS_PAD,
25         TCA_MPLS_PROTO, /* be16; eth_type of pushed or next (for pop) header. */
26         TCA_MPLS_LABEL, /* u32; MPLS label. Lower 20 bits are used. */
27         TCA_MPLS_TC,    /* u8; MPLS TC field. Lower 3 bits are used. */
28         TCA_MPLS_TTL,   /* u8; MPLS TTL field. Must not be 0. */
29         TCA_MPLS_BOS,   /* u8; MPLS BOS field. Either 1 or 0. */
30         __TCA_MPLS_MAX,
31 };
32 #define TCA_MPLS_MAX (__TCA_MPLS_MAX - 1)
33
34 #endif