linux/drivers/net/ethernet/intel/libie/rx.c

// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (C) 2024 Intel Corporation */

#include <linux/net/intel/libie/rx.h>

/* O(1) converting i40e/ice/iavf's 8/10-bit hardware packet type to a parsed
 * bitfield struct.
 */

/* A few supplementary definitions for when XDP hash types do not coincide
 * with what can be generated from ptype definitions by means of preprocessor
 * concatenation.
 */
#define XDP_RSS_L3_L2
#define XDP_RSS_L4_NONE
#define XDP_RSS_L4_TIMESYNC
#define XDP_RSS_TYPE_L3
#define XDP_RSS_TYPE_L4

#define LIBIE_RX_PT(oip, ofrag, tun, tp, tefr, iprot, pl)

#define LIBIE_RX_PT_UNUSED

#define __LIBIE_RX_PT_L2(iprot, pl)
#define LIBIE_RX_PT_L2
#define LIBIE_RX_PT_TS
#define LIBIE_RX_PT_L3

#define LIBIE_RX_PT_IP_FRAG(oip)
#define LIBIE_RX_PT_IP_L3(oip, tun, teprot, tefr)
#define LIBIE_RX_PT_IP_L4(oip, tun, teprot, iprot)

#define LIBIE_RX_PT_IP_NOF(oip, tun, ver)

/* IPv oip --> tun --> IPv ver */
#define LIBIE_RX_PT_IP_TUN_VER(oip, tun, ver)

/* Non Tunneled IPv oip */
#define LIBIE_RX_PT_IP_RAW(oip)

/* IPv oip --> tun --> { IPv4, IPv6 } */
#define LIBIE_RX_PT_IP_TUN(oip, tun)

/* IPv oip --> GRE/NAT tun --> { x, IPv4, IPv6 } */
#define LIBIE_RX_PT_IP_GRE(oip, tun)

/* Non Tunneled IPv oip
 * IPv oip --> { IPv4, IPv6 }
 * IPv oip --> GRE/NAT --> { x, IPv4, IPv6 }
 * IPv oip --> GRE/NAT --> MAC --> { x, IPv4, IPv6 }
 * IPv oip --> GRE/NAT --> MAC/VLAN --> { x, IPv4, IPv6 }
 */
#define LIBIE_RX_PT_IP(oip)

/* Lookup table mapping for O(1) parsing */
const struct libeth_rx_pt libie_rx_pt_lut[LIBIE_RX_PT_NUM] =;
EXPORT_SYMBOL_NS_GPL();

MODULE_DESCRIPTION();
MODULE_IMPORT_NS();
MODULE_LICENSE();