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_tunnel_key.h (2696B)


      1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
      2/*
      3 * Copyright (c) 2016, Amir Vadai <amir@vadai.me>
      4 * Copyright (c) 2016, Mellanox Technologies. All rights reserved.
      5 *
      6 * This program is free software; you can redistribute it and/or modify
      7 * it under the terms of the GNU General Public License as published by
      8 * the Free Software Foundation; either version 2 of the License, or
      9 * (at your option) any later version.
     10 */
     11
     12#ifndef __LINUX_TC_TUNNEL_KEY_H
     13#define __LINUX_TC_TUNNEL_KEY_H
     14
     15#include <linux/pkt_cls.h>
     16
     17#define TCA_TUNNEL_KEY_ACT_SET	    1
     18#define TCA_TUNNEL_KEY_ACT_RELEASE  2
     19
     20struct tc_tunnel_key {
     21	tc_gen;
     22	int t_action;
     23};
     24
     25enum {
     26	TCA_TUNNEL_KEY_UNSPEC,
     27	TCA_TUNNEL_KEY_TM,
     28	TCA_TUNNEL_KEY_PARMS,
     29	TCA_TUNNEL_KEY_ENC_IPV4_SRC,	/* be32 */
     30	TCA_TUNNEL_KEY_ENC_IPV4_DST,	/* be32 */
     31	TCA_TUNNEL_KEY_ENC_IPV6_SRC,	/* struct in6_addr */
     32	TCA_TUNNEL_KEY_ENC_IPV6_DST,	/* struct in6_addr */
     33	TCA_TUNNEL_KEY_ENC_KEY_ID,	/* be64 */
     34	TCA_TUNNEL_KEY_PAD,
     35	TCA_TUNNEL_KEY_ENC_DST_PORT,	/* be16 */
     36	TCA_TUNNEL_KEY_NO_CSUM,		/* u8 */
     37	TCA_TUNNEL_KEY_ENC_OPTS,	/* Nested TCA_TUNNEL_KEY_ENC_OPTS_
     38					 * attributes
     39					 */
     40	TCA_TUNNEL_KEY_ENC_TOS,		/* u8 */
     41	TCA_TUNNEL_KEY_ENC_TTL,		/* u8 */
     42	__TCA_TUNNEL_KEY_MAX,
     43};
     44
     45#define TCA_TUNNEL_KEY_MAX (__TCA_TUNNEL_KEY_MAX - 1)
     46
     47enum {
     48	TCA_TUNNEL_KEY_ENC_OPTS_UNSPEC,
     49	TCA_TUNNEL_KEY_ENC_OPTS_GENEVE,		/* Nested
     50						 * TCA_TUNNEL_KEY_ENC_OPTS_
     51						 * attributes
     52						 */
     53	TCA_TUNNEL_KEY_ENC_OPTS_VXLAN,		/* Nested
     54						 * TCA_TUNNEL_KEY_ENC_OPTS_
     55						 * attributes
     56						 */
     57	TCA_TUNNEL_KEY_ENC_OPTS_ERSPAN,		/* Nested
     58						 * TCA_TUNNEL_KEY_ENC_OPTS_
     59						 * attributes
     60						 */
     61	__TCA_TUNNEL_KEY_ENC_OPTS_MAX,
     62};
     63
     64#define TCA_TUNNEL_KEY_ENC_OPTS_MAX (__TCA_TUNNEL_KEY_ENC_OPTS_MAX - 1)
     65
     66enum {
     67	TCA_TUNNEL_KEY_ENC_OPT_GENEVE_UNSPEC,
     68	TCA_TUNNEL_KEY_ENC_OPT_GENEVE_CLASS,		/* be16 */
     69	TCA_TUNNEL_KEY_ENC_OPT_GENEVE_TYPE,		/* u8 */
     70	TCA_TUNNEL_KEY_ENC_OPT_GENEVE_DATA,		/* 4 to 128 bytes */
     71
     72	__TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX,
     73};
     74
     75#define TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX \
     76	(__TCA_TUNNEL_KEY_ENC_OPT_GENEVE_MAX - 1)
     77
     78enum {
     79	TCA_TUNNEL_KEY_ENC_OPT_VXLAN_UNSPEC,
     80	TCA_TUNNEL_KEY_ENC_OPT_VXLAN_GBP,		/* u32 */
     81	__TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX,
     82};
     83
     84#define TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX \
     85	(__TCA_TUNNEL_KEY_ENC_OPT_VXLAN_MAX - 1)
     86
     87enum {
     88	TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_UNSPEC,
     89	TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_VER,		/* u8 */
     90	TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_INDEX,		/* be32 */
     91	TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_DIR,		/* u8 */
     92	TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_HWID,		/* u8 */
     93	__TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_MAX,
     94};
     95
     96#define TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_MAX \
     97	(__TCA_TUNNEL_KEY_ENC_OPT_ERSPAN_MAX - 1)
     98
     99#endif