linux/drivers/net/ethernet/intel/ice/ice_flex_type.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2019, Intel Corporation. */

#ifndef _ICE_FLEX_TYPE_H_
#define _ICE_FLEX_TYPE_H_
#include "ice_ddp.h"

/* Packet Type (PTYPE) values */
#define ICE_PTYPE_MAC_PAY
#define ICE_PTYPE_IPV4_PAY
#define ICE_PTYPE_IPV4_UDP_PAY
#define ICE_PTYPE_IPV4_TCP_PAY
#define ICE_PTYPE_IPV4_SCTP_PAY
#define ICE_PTYPE_IPV6_PAY
#define ICE_PTYPE_IPV6_UDP_PAY
#define ICE_PTYPE_IPV6_TCP_PAY
#define ICE_PTYPE_IPV6_SCTP_PAY
#define ICE_MAC_IPV4_ESP
#define ICE_MAC_IPV6_ESP
#define ICE_MAC_IPV4_AH
#define ICE_MAC_IPV6_AH
#define ICE_MAC_IPV4_NAT_T_ESP
#define ICE_MAC_IPV6_NAT_T_ESP
#define ICE_MAC_IPV4_GTPU
#define ICE_MAC_IPV6_GTPU
#define ICE_MAC_IPV4_GTPU_IPV4_FRAG
#define ICE_MAC_IPV4_GTPU_IPV4_PAY
#define ICE_MAC_IPV4_GTPU_IPV4_UDP_PAY
#define ICE_MAC_IPV4_GTPU_IPV4_TCP
#define ICE_MAC_IPV4_GTPU_IPV4_ICMP
#define ICE_MAC_IPV6_GTPU_IPV4_FRAG
#define ICE_MAC_IPV6_GTPU_IPV4_PAY
#define ICE_MAC_IPV6_GTPU_IPV4_UDP_PAY
#define ICE_MAC_IPV6_GTPU_IPV4_TCP
#define ICE_MAC_IPV6_GTPU_IPV4_ICMP
#define ICE_MAC_IPV4_GTPU_IPV6_FRAG
#define ICE_MAC_IPV4_GTPU_IPV6_PAY
#define ICE_MAC_IPV4_GTPU_IPV6_UDP_PAY
#define ICE_MAC_IPV4_GTPU_IPV6_TCP
#define ICE_MAC_IPV4_GTPU_IPV6_ICMPV6
#define ICE_MAC_IPV6_GTPU_IPV6_FRAG
#define ICE_MAC_IPV6_GTPU_IPV6_PAY
#define ICE_MAC_IPV6_GTPU_IPV6_UDP_PAY
#define ICE_MAC_IPV6_GTPU_IPV6_TCP
#define ICE_MAC_IPV6_GTPU_IPV6_ICMPV6
#define ICE_MAC_IPV4_PFCP_SESSION
#define ICE_MAC_IPV6_PFCP_SESSION
#define ICE_MAC_IPV4_L2TPV3
#define ICE_MAC_IPV6_L2TPV3

/* Attributes that can modify PTYPE definitions.
 *
 * These values will represent special attributes for PTYPEs, which will
 * resolve into metadata packet flags definitions that can be used in the TCAM
 * for identifying a PTYPE with specific characteristics.
 */
enum ice_ptype_attrib_type {};

struct ice_ptype_attrib_info {};

/* TCAM flag definitions */
#define ICE_GTP_PDU
#define ICE_GTP_PDU_LINK

/* GTP attributes */
#define ICE_GTP_PDU_FLAG_MASK
#define ICE_GTP_PDU_EH

#define ICE_GTP_FLAGS_MASK
#define ICE_GTP_SESSION
#define ICE_GTP_DOWNLINK
#define ICE_GTP_UPLINK

struct ice_ptype_attributes {};

/* Tunnel enabling */

enum ice_tunnel_type {};

struct ice_tunnel_type_scan {};

struct ice_tunnel_entry {};

#define ICE_TUNNEL_MAX_ENTRIES

struct ice_tunnel_table {};

struct ice_dvm_entry {};

#define ICE_DVM_MAX_ENTRIES

struct ice_dvm_table {};

struct ice_pkg_es {};

struct ice_es {};

/* PTYPE Group management */

/* Note: XLT1 table takes 13-bit as input, and results in an 8-bit packet type
 * group (PTG) ID as output.
 *
 * Note: PTG 0 is the default packet type group and it is assumed that all PTYPE
 * are a part of this group until moved to a new PTG.
 */
#define ICE_DEFAULT_PTG

struct ice_ptg_entry {};

struct ice_ptg_ptype {};

#define ICE_MAX_TCAM_PER_PROFILE
#define ICE_MAX_PTG_PER_PROFILE

struct ice_prof_map {};

#define ICE_INVALID_TCAM

struct ice_tcam_inf {};

struct ice_vsig_prof {};

struct ice_vsig_entry {};

struct ice_vsig_vsi {};

#define ICE_XLT1_CNT
#define ICE_MAX_PTGS

/* XLT1 Table */
struct ice_xlt1 {};

#define ICE_XLT2_CNT
#define ICE_MAX_VSIGS

/* VSIG bit layout:
 * [0:12]: incremental VSIG index 1 to ICE_MAX_VSIGS
 * [13:15]: PF number of device
 */
#define ICE_VSIG_IDX_M
#define ICE_PF_NUM_S
#define ICE_PF_NUM_M
#define ICE_VSIG_VALUE(vsig, pf_id)
#define ICE_DEFAULT_VSIG

/* XLT2 Table */
struct ice_xlt2 {};

/* Profile ID Management */
struct ice_prof_id_key {} __packed;

/* Keys are made up of two values, each one-half the size of the key.
 * For TCAM, the entire key is 80 bits wide (or 2, 40-bit wide values)
 */
#define ICE_TCAM_KEY_VAL_SZ
#define ICE_TCAM_KEY_SZ

struct ice_prof_tcam_entry {} __packed;

struct ice_prof_id_section {};

struct ice_prof_tcam {};

struct ice_prof_redir {};

struct ice_mask {};

struct ice_masks {};

struct ice_prof_id {};

/* Tables per block */
struct ice_blk_info {};

enum ice_chg_type {};

struct ice_chs_chg {};

#define ICE_FLOW_PTYPE_MAX

enum ice_prof_type {};

/* Number of bits/bytes contained in meta init entry. Note, this should be a
 * multiple of 32 bits.
 */
#define ICE_META_INIT_BITS
#define ICE_META_INIT_DW_CNT

/* The meta init Flag field starts at this bit */
#define ICE_META_FLAGS_ST

/* The entry and bit to check for Double VLAN Mode (DVM) support */
#define ICE_META_VLAN_MODE_ENTRY
#define ICE_META_FLAG_VLAN_MODE
#define ICE_META_VLAN_MODE_BIT

struct ice_meta_init_entry {};

struct ice_meta_init_section {};
#endif /* _ICE_FLEX_TYPE_H_ */