mirror of https://gitee.com/openkylin/linux.git
net: Move all TC actions identifiers to one place
Move all the TC identifiers to one place, to the same enum that defines the identifier of police action. This makes it easier choose numbers for new actions since they are now defined in one place. We preserve the original values for binary compatibility. New IDs should be added inside the enum. Signed-off-by: Eli Cohen <eli@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
99c864667c
commit
257eeded20
|
@ -63,12 +63,49 @@ enum {
|
|||
#define TC_ACT_GOTO_CHAIN __TC_ACT_EXT(2)
|
||||
#define TC_ACT_EXT_OPCODE_MAX TC_ACT_GOTO_CHAIN
|
||||
|
||||
/* These macros are put here for binary compatibility with userspace apps that
|
||||
* make use of them. For kernel code and new userspace apps, use the TCA_ID_*
|
||||
* versions.
|
||||
*/
|
||||
#define TCA_ACT_GACT 5
|
||||
#define TCA_ACT_IPT 6
|
||||
#define TCA_ACT_PEDIT 7
|
||||
#define TCA_ACT_MIRRED 8
|
||||
#define TCA_ACT_NAT 9
|
||||
#define TCA_ACT_XT 10
|
||||
#define TCA_ACT_SKBEDIT 11
|
||||
#define TCA_ACT_VLAN 12
|
||||
#define TCA_ACT_BPF 13
|
||||
#define TCA_ACT_CONNMARK 14
|
||||
#define TCA_ACT_SKBMOD 15
|
||||
#define TCA_ACT_CSUM 16
|
||||
#define TCA_ACT_TUNNEL_KEY 17
|
||||
#define TCA_ACT_SIMP 22
|
||||
#define TCA_ACT_IFE 25
|
||||
#define TCA_ACT_SAMPLE 26
|
||||
|
||||
/* Action type identifiers*/
|
||||
enum {
|
||||
TCA_ID_UNSPEC=0,
|
||||
TCA_ID_POLICE=1,
|
||||
TCA_ID_UNSPEC = 0,
|
||||
TCA_ID_POLICE = 1,
|
||||
TCA_ID_GACT = TCA_ACT_GACT,
|
||||
TCA_ID_IPT = TCA_ACT_IPT,
|
||||
TCA_ID_PEDIT = TCA_ACT_PEDIT,
|
||||
TCA_ID_MIRRED = TCA_ACT_MIRRED,
|
||||
TCA_ID_NAT = TCA_ACT_NAT,
|
||||
TCA_ID_XT = TCA_ACT_XT,
|
||||
TCA_ID_SKBEDIT = TCA_ACT_SKBEDIT,
|
||||
TCA_ID_VLAN = TCA_ACT_VLAN,
|
||||
TCA_ID_BPF = TCA_ACT_BPF,
|
||||
TCA_ID_CONNMARK = TCA_ACT_CONNMARK,
|
||||
TCA_ID_SKBMOD = TCA_ACT_SKBMOD,
|
||||
TCA_ID_CSUM = TCA_ACT_CSUM,
|
||||
TCA_ID_TUNNEL_KEY = TCA_ACT_TUNNEL_KEY,
|
||||
TCA_ID_SIMP = TCA_ACT_SIMP,
|
||||
TCA_ID_IFE = TCA_ACT_IFE,
|
||||
TCA_ID_SAMPLE = TCA_ACT_SAMPLE,
|
||||
/* other actions go here */
|
||||
__TCA_ID_MAX=255
|
||||
__TCA_ID_MAX = 255
|
||||
};
|
||||
|
||||
#define TCA_ID_MAX __TCA_ID_MAX
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_BPF 13
|
||||
|
||||
struct tc_act_bpf {
|
||||
tc_gen;
|
||||
};
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_CONNMARK 14
|
||||
|
||||
struct tc_connmark {
|
||||
tc_gen;
|
||||
__u16 zone;
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_CSUM 16
|
||||
|
||||
enum {
|
||||
TCA_CSUM_UNSPEC,
|
||||
TCA_CSUM_PARMS,
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_GACT 5
|
||||
struct tc_gact {
|
||||
tc_gen;
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <linux/pkt_cls.h>
|
||||
#include <linux/ife.h>
|
||||
|
||||
#define TCA_ACT_IFE 25
|
||||
/* Flag bits for now just encoding/decoding; mutually exclusive */
|
||||
#define IFE_ENCODE 1
|
||||
#define IFE_DECODE 0
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_IPT 6
|
||||
#define TCA_ACT_XT 10
|
||||
|
||||
enum {
|
||||
TCA_IPT_UNSPEC,
|
||||
TCA_IPT_TABLE,
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_MIRRED 8
|
||||
#define TCA_EGRESS_REDIR 1 /* packet redirect to EGRESS*/
|
||||
#define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */
|
||||
#define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#include <linux/pkt_cls.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define TCA_ACT_NAT 9
|
||||
|
||||
enum {
|
||||
TCA_NAT_UNSPEC,
|
||||
TCA_NAT_PARMS,
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_PEDIT 7
|
||||
|
||||
enum {
|
||||
TCA_PEDIT_UNSPEC,
|
||||
TCA_PEDIT_TM,
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
#include <linux/pkt_cls.h>
|
||||
#include <linux/if_ether.h>
|
||||
|
||||
#define TCA_ACT_SAMPLE 26
|
||||
|
||||
struct tc_sample {
|
||||
tc_gen;
|
||||
};
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_SKBEDIT 11
|
||||
|
||||
#define SKBEDIT_F_PRIORITY 0x1
|
||||
#define SKBEDIT_F_QUEUE_MAPPING 0x2
|
||||
#define SKBEDIT_F_MARK 0x4
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_SKBMOD 15
|
||||
|
||||
#define SKBMOD_F_DMAC 0x1
|
||||
#define SKBMOD_F_SMAC 0x2
|
||||
#define SKBMOD_F_ETYPE 0x4
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_TUNNEL_KEY 17
|
||||
|
||||
#define TCA_TUNNEL_KEY_ACT_SET 1
|
||||
#define TCA_TUNNEL_KEY_ACT_RELEASE 2
|
||||
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_VLAN 12
|
||||
|
||||
#define TCA_VLAN_ACT_POP 1
|
||||
#define TCA_VLAN_ACT_PUSH 2
|
||||
#define TCA_VLAN_ACT_MODIFY 3
|
||||
|
|
|
@ -19,8 +19,6 @@
|
|||
#include <net/netlink.h>
|
||||
#include <net/pkt_sched.h>
|
||||
|
||||
#define TCA_ACT_SIMP 22
|
||||
|
||||
#include <linux/tc_act/tc_defact.h>
|
||||
#include <net/tc_act/tc_defact.h>
|
||||
|
||||
|
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include <linux/pkt_cls.h>
|
||||
|
||||
#define TCA_ACT_BPF 13
|
||||
|
||||
struct tc_act_bpf {
|
||||
tc_gen;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue