xref: /linux/include/net/tc_act/tc_mpls.h (revision b8d312aa075f33282565467662c4628dae0a2aff)
1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2 /* Copyright (C) 2019 Netronome Systems, Inc. */
3 
4 #ifndef __NET_TC_MPLS_H
5 #define __NET_TC_MPLS_H
6 
7 #include <linux/tc_act/tc_mpls.h>
8 #include <net/act_api.h>
9 
10 struct tcf_mpls_params {
11 	int tcfm_action;
12 	u32 tcfm_label;
13 	u8 tcfm_tc;
14 	u8 tcfm_ttl;
15 	u8 tcfm_bos;
16 	__be16 tcfm_proto;
17 	struct rcu_head	rcu;
18 };
19 
20 #define ACT_MPLS_TC_NOT_SET	0xff
21 #define ACT_MPLS_BOS_NOT_SET	0xff
22 #define ACT_MPLS_LABEL_NOT_SET	0xffffffff
23 
24 struct tcf_mpls {
25 	struct tc_action common;
26 	struct tcf_mpls_params __rcu *mpls_p;
27 };
28 #define to_mpls(a) ((struct tcf_mpls *)a)
29 
30 #endif /* __NET_TC_MPLS_H */
31