cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

tc_em_meta.h (2116B)


      1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
      2#ifndef __LINUX_TC_EM_META_H
      3#define __LINUX_TC_EM_META_H
      4
      5#include <linux/types.h>
      6#include <linux/pkt_cls.h>
      7
      8enum {
      9	TCA_EM_META_UNSPEC,
     10	TCA_EM_META_HDR,
     11	TCA_EM_META_LVALUE,
     12	TCA_EM_META_RVALUE,
     13	__TCA_EM_META_MAX
     14};
     15#define TCA_EM_META_MAX (__TCA_EM_META_MAX - 1)
     16
     17struct tcf_meta_val {
     18	__u16			kind;
     19	__u8			shift;
     20	__u8			op;
     21};
     22
     23#define TCF_META_TYPE_MASK	(0xf << 12)
     24#define TCF_META_TYPE(kind)	(((kind) & TCF_META_TYPE_MASK) >> 12)
     25#define TCF_META_ID_MASK	0x7ff
     26#define TCF_META_ID(kind)	((kind) & TCF_META_ID_MASK)
     27
     28enum {
     29	TCF_META_TYPE_VAR,
     30	TCF_META_TYPE_INT,
     31	__TCF_META_TYPE_MAX
     32};
     33#define TCF_META_TYPE_MAX (__TCF_META_TYPE_MAX - 1)
     34
     35enum {
     36	TCF_META_ID_VALUE,
     37	TCF_META_ID_RANDOM,
     38	TCF_META_ID_LOADAVG_0,
     39	TCF_META_ID_LOADAVG_1,
     40	TCF_META_ID_LOADAVG_2,
     41	TCF_META_ID_DEV,
     42	TCF_META_ID_PRIORITY,
     43	TCF_META_ID_PROTOCOL,
     44	TCF_META_ID_PKTTYPE,
     45	TCF_META_ID_PKTLEN,
     46	TCF_META_ID_DATALEN,
     47	TCF_META_ID_MACLEN,
     48	TCF_META_ID_NFMARK,
     49	TCF_META_ID_TCINDEX,
     50	TCF_META_ID_RTCLASSID,
     51	TCF_META_ID_RTIIF,
     52	TCF_META_ID_SK_FAMILY,
     53	TCF_META_ID_SK_STATE,
     54	TCF_META_ID_SK_REUSE,
     55	TCF_META_ID_SK_BOUND_IF,
     56	TCF_META_ID_SK_REFCNT,
     57	TCF_META_ID_SK_SHUTDOWN,
     58	TCF_META_ID_SK_PROTO,
     59	TCF_META_ID_SK_TYPE,
     60	TCF_META_ID_SK_RCVBUF,
     61	TCF_META_ID_SK_RMEM_ALLOC,
     62	TCF_META_ID_SK_WMEM_ALLOC,
     63	TCF_META_ID_SK_OMEM_ALLOC,
     64	TCF_META_ID_SK_WMEM_QUEUED,
     65	TCF_META_ID_SK_RCV_QLEN,
     66	TCF_META_ID_SK_SND_QLEN,
     67 	TCF_META_ID_SK_ERR_QLEN,
     68	TCF_META_ID_SK_FORWARD_ALLOCS,
     69	TCF_META_ID_SK_SNDBUF,
     70 	TCF_META_ID_SK_ALLOCS,
     71	__TCF_META_ID_SK_ROUTE_CAPS,	/* unimplemented but in ABI already */
     72 	TCF_META_ID_SK_HASH,
     73 	TCF_META_ID_SK_LINGERTIME,
     74 	TCF_META_ID_SK_ACK_BACKLOG,
     75 	TCF_META_ID_SK_MAX_ACK_BACKLOG,
     76 	TCF_META_ID_SK_PRIO,
     77 	TCF_META_ID_SK_RCVLOWAT,
     78 	TCF_META_ID_SK_RCVTIMEO,
     79 	TCF_META_ID_SK_SNDTIMEO,
     80 	TCF_META_ID_SK_SENDMSG_OFF,
     81 	TCF_META_ID_SK_WRITE_PENDING,
     82	TCF_META_ID_VLAN_TAG,
     83	TCF_META_ID_RXHASH,
     84	__TCF_META_ID_MAX
     85};
     86#define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1)
     87
     88struct tcf_meta_hdr {
     89	struct tcf_meta_val	left;
     90	struct tcf_meta_val	right;
     91};
     92
     93#endif