35 lines · c
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */2/* Copyright (C) 2019 Netronome Systems, Inc. */3 4#ifndef __LINUX_TC_MPLS_H5#define __LINUX_TC_MPLS_H6 7#include <linux/pkt_cls.h>8 9#define TCA_MPLS_ACT_POP 110#define TCA_MPLS_ACT_PUSH 211#define TCA_MPLS_ACT_MODIFY 312#define TCA_MPLS_ACT_DEC_TTL 413#define TCA_MPLS_ACT_MAC_PUSH 514 15struct tc_mpls {16 tc_gen; /* generic TC action fields. */17 int m_action; /* action of type TCA_MPLS_ACT_*. */18};19 20enum {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#endif35