net/dpaa: support fmlib
DPAA platorm MAC interface is known as FMAN i.e. Frame Manager. There are two ways to control it. 1. Statically configure the queues and classification rules before the start of the application using FMC tool. 2. Dynamically configure it within application by making API calls of fmlib. The fmlib or Frame Manager library provides an API on top of the Frame Manager driver ioctl calls, that provides a user space application with a simple way to configure driver parameters and PCD (parse - classify - distribute) rules. This patch integrates the base fmlib so that various queue config, RSS and classification related features can be supported on DPAA platform. Signed-off-by: Sachin Saxena <sachin.saxena@nxp.com> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
This commit is contained in:
parent
c4c6c4c1f0
commit
2ffc1057f0
@ -1,5 +1,5 @@
|
||||
.. SPDX-License-Identifier: BSD-3-Clause
|
||||
Copyright 2017 NXP
|
||||
Copyright 2017,2020 NXP
|
||||
|
||||
|
||||
DPAA Poll Mode Driver
|
||||
@ -21,6 +21,7 @@ Contents summary
|
||||
|
||||
- DPAA overview
|
||||
- DPAA driver architecture overview
|
||||
- FMAN configuration tools and library
|
||||
|
||||
.. _dpaa_overview:
|
||||
|
||||
@ -285,6 +286,59 @@ for details.
|
||||
Done
|
||||
testpmd>
|
||||
|
||||
FMAN Config
|
||||
-----------
|
||||
|
||||
Frame Manager is also responsible for parser, classify and distribute
|
||||
functionality in the DPAA.
|
||||
|
||||
FMAN supports:
|
||||
Packet parsing at wire speed. It supports standard protocols parsing and
|
||||
identification by HW (VLAN/IP/UDP/TCP/SCTP/PPPoE/PPP/MPLS/GRE/IPSec).
|
||||
It supports non-standard UDF header parsing for custom protocols.
|
||||
Classification / Distribution: Coarse classification based on Key generation
|
||||
Hash and exact match lookup
|
||||
|
||||
FMC - FMAN Configuration Tool
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
This tool is available in User Space. The tool is used to configure FMAN
|
||||
Physical (MAC) or Ephemeral (OH)ports for Parse/Classify/distribute.
|
||||
The PCDs can be hash based where a set of fields are key input for hash
|
||||
generation within FMAN keygen. The hash value is used to generate a FQID for
|
||||
frame. There is a provision to setup exact match lookup too where field
|
||||
values within a packet drives corresponding FQID.
|
||||
Currently it works on XML file inputs.
|
||||
|
||||
Limitations:
|
||||
1.For Dynamic Configuration change, currently no support is available.
|
||||
E.g. enable/disable a port, a operator (set of VLANs and associate rules).
|
||||
|
||||
2.During FMC configuration, port for which policy is being configured is
|
||||
brought down and the policy is flushed on port before new policy is updated
|
||||
for the port. Support is required to add/append/delete etc.
|
||||
|
||||
3.FMC, being a separate user-space application, needs to be invoked from
|
||||
Shell.
|
||||
|
||||
|
||||
The details can be found in FMC Doc at:
|
||||
`Frame Mnager Configuration Tool <https://www.nxp.com/docs/en/application-note/AN4760.pdf>`_.
|
||||
|
||||
FMLIB
|
||||
~~~~~
|
||||
The Frame Manager library provides an API on top of the Frame Manager driver
|
||||
ioctl calls, that provides a user space application with a simple way to
|
||||
configure driver parameters and PCD (parse - classify - distribute) rules.
|
||||
|
||||
This is an alternate to the FMC based configuration. This library provides
|
||||
direct ioctl based interfaces for FMAN configuration as used by the FMC tool
|
||||
as well. This helps in overcoming the main limitaiton of FMC - i.e. lack
|
||||
of dynamic configuration.
|
||||
|
||||
The location for the fmd driver as used by FMLIB and FMC is as follows:
|
||||
`Kernel FMD Driver
|
||||
<https://source.codeaurora.org/external/qoriq/qoriq-components/linux/tree/drivers/net/ethernet/freescale/sdk_fman?h=linux-4.19-rt>`_.
|
||||
|
||||
Limitations
|
||||
-----------
|
||||
|
||||
|
@ -58,17 +58,28 @@ compatible board:
|
||||
|
||||
4. **FMC Tool**
|
||||
|
||||
Before any DPDK application can be executed, the Frame Manager Configuration
|
||||
Tool (FMC) need to be executed to set the configurations of the queues. This
|
||||
If one is planning to use more than 1 Recv queue and hardware capability to
|
||||
parse, classify and distribute the packets, the Frame Manager Configuration
|
||||
Tool (FMC) need to be executed to set the configurations of the queues before
|
||||
running the DPAA based DPDK application. This setting is persistent, the
|
||||
configuration will remain in the hardware till it is re-configured. This
|
||||
includes the queue state, RSS and other policies.
|
||||
This tool can be obtained from `NXP (Freescale) Public Git Repository <https://source.codeaurora.org/external/qoriq/qoriq-components/fmc>`_.
|
||||
|
||||
This tool needs configuration files which are available in the
|
||||
:ref:`DPDK Extra Scripts <extra_scripts>`, described below for DPDK usages.
|
||||
|
||||
As an alternative method, DPAA PMD can also be executed using images provided
|
||||
as part of SDK from NXP. The SDK includes all the above prerequisites necessary
|
||||
to bring up a DPAA board.
|
||||
Note that DPAA PMD can also be executed using images provided
|
||||
as part of SDK from NXP. The SDK includes all the above prerequisites
|
||||
necessary (i.e. fmc tool) to bring up a DPAA board.
|
||||
|
||||
As an alternate method, DPAA PMDs starting from DPDK 20.11 also support the
|
||||
fmlib library integration. The driver will detect about any existing FMC
|
||||
based config (if /tmp/fmc.bin is present). DPAA FMD will be used only if no
|
||||
previous fmc config is existing.
|
||||
|
||||
Note that fmlib based integratin rely on underlying fmd driver in kernel,
|
||||
which is available as part of NXP kernel or NXP SDK.
|
||||
|
||||
The following dependencies are not part of DPDK and must be installed
|
||||
separately:
|
||||
|
50
drivers/net/dpaa/fmlib/dpaa_integration.h
Normal file
50
drivers/net/dpaa/fmlib/dpaa_integration.h
Normal file
@ -0,0 +1,50 @@
|
||||
/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
|
||||
* Copyright 2009-2012 Freescale Semiconductor Inc.
|
||||
* Copyright 2017-2020 NXP
|
||||
*/
|
||||
|
||||
#ifndef __DPAA_INTEGRATION_H
|
||||
#define __DPAA_INTEGRATION_H
|
||||
|
||||
#include "ncsw_ext.h"
|
||||
|
||||
#define DPAA_VERSION 11
|
||||
|
||||
#define BM_MAX_NUM_OF_POOLS 64 /**< Number of buffers pools */
|
||||
|
||||
#define INTG_MAX_NUM_OF_FM 2
|
||||
|
||||
/* Ports defines */
|
||||
#define FM_MAX_NUM_OF_1G_MACS 6
|
||||
#define FM_MAX_NUM_OF_10G_MACS 2
|
||||
#define FM_MAX_NUM_OF_MACS (FM_MAX_NUM_OF_1G_MACS + FM_MAX_NUM_OF_10G_MACS)
|
||||
#define FM_MAX_NUM_OF_OH_PORTS 6
|
||||
|
||||
#define FM_MAX_NUM_OF_1G_RX_PORTS FM_MAX_NUM_OF_1G_MACS
|
||||
#define FM_MAX_NUM_OF_10G_RX_PORTS FM_MAX_NUM_OF_10G_MACS
|
||||
#define FM_MAX_NUM_OF_RX_PORTS \
|
||||
(FM_MAX_NUM_OF_10G_RX_PORTS + FM_MAX_NUM_OF_1G_RX_PORTS)
|
||||
|
||||
#define FM_MAX_NUM_OF_1G_TX_PORTS FM_MAX_NUM_OF_1G_MACS
|
||||
#define FM_MAX_NUM_OF_10G_TX_PORTS FM_MAX_NUM_OF_10G_MACS
|
||||
#define FM_MAX_NUM_OF_TX_PORTS \
|
||||
(FM_MAX_NUM_OF_10G_TX_PORTS + FM_MAX_NUM_OF_1G_TX_PORTS)
|
||||
|
||||
#define FM_PORT_MAX_NUM_OF_EXT_POOLS 4
|
||||
/**< Number of external BM pools per Rx port */
|
||||
#define FM_NUM_CONG_GRPS 256
|
||||
/**< Total number of congestion groups in QM */
|
||||
#define FM_MAX_NUM_OF_SUB_PORTALS 16
|
||||
#define FM_PORT_MAX_NUM_OF_OBSERVED_EXT_POOLS 0
|
||||
|
||||
/* PCD defines */
|
||||
#define FM_PCD_PLCR_NUM_ENTRIES 256
|
||||
/**< Total number of policer profiles */
|
||||
#define FM_PCD_KG_NUM_OF_SCHEMES 32
|
||||
/**< Total number of KG schemes */
|
||||
#define FM_PCD_MAX_NUM_OF_CLS_PLANS 256
|
||||
/**< Number of classification plan entries. */
|
||||
|
||||
#define FM_MAX_PFC_PRIO 8
|
||||
|
||||
#endif /* __DPAA_INTEGRATION_H */
|
463
drivers/net/dpaa/fmlib/fm_ext.h
Normal file
463
drivers/net/dpaa/fmlib/fm_ext.h
Normal file
@ -0,0 +1,463 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause
|
||||
* Copyright 2008-2012 Freescale Semiconductor Inc.
|
||||
* Copyright 2017-2020 NXP
|
||||
*/
|
||||
|
||||
#ifndef __FM_EXT_H
|
||||
#define __FM_EXT_H
|
||||
|
||||
#include "ncsw_ext.h"
|
||||
#include "dpaa_integration.h"
|
||||
|
||||
#define FM_IOC_TYPE_BASE (NCSW_IOC_TYPE_BASE + 1)
|
||||
#define FMT_IOC_TYPE_BASE (NCSW_IOC_TYPE_BASE + 3)
|
||||
|
||||
#define MODULE_FM 0x00010000
|
||||
#define __ERR_MODULE__ MODULE_FM
|
||||
|
||||
/* #define FM_LIB_DBG */
|
||||
|
||||
#if defined(FM_LIB_DBG)
|
||||
#define _fml_dbg(fmt, args...) \
|
||||
rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmlib:%s(): " fmt "\n", \
|
||||
__func__, ##args)
|
||||
#else
|
||||
#define _fml_dbg(arg...)
|
||||
#endif
|
||||
|
||||
/*#define FM_IOCTL_DBG*/
|
||||
|
||||
#if defined(FM_IOCTL_DBG)
|
||||
#define _fm_ioctl_dbg(fmt, args...) \
|
||||
rte_log(RTE_LOG_ ## level, dpaa_logtype_pmd, "fmioc:%s(): " fmt "\n", \
|
||||
__func__, ##args)
|
||||
#else
|
||||
#define _fm_ioctl_dbg(arg...)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @Group lnx_ioctl_ncsw_grp NetCommSw Linux User-Space (IOCTL) API
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define NCSW_IOC_TYPE_BASE 0xe0
|
||||
/**< defines the IOCTL type for all the NCSW Linux module commands */
|
||||
|
||||
/*
|
||||
* @Group lnx_usr_FM_grp Frame Manager API
|
||||
*
|
||||
* @Description FM API functions, definitions and enums.
|
||||
*
|
||||
* The FM module is the main driver module and is a mandatory
|
||||
* module for FM driver users. This module must be initialized
|
||||
* first prior to any other drivers modules.
|
||||
* The FM is a "singleton" module. It is responsible of the
|
||||
* common HW modules: FPM, DMA, common QMI and common BMI
|
||||
* initializations and run-time control routines. This module
|
||||
* must be initialized always when working with any of the FM modules.
|
||||
* NOTE - We assume that the FM library will be initialized only
|
||||
* by core No. 0!
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*
|
||||
* @Description Enum for defining port types
|
||||
*/
|
||||
typedef enum e_fm_port_type {
|
||||
e_FM_PORT_TYPE_OH_OFFLINE_PARSING = 0, /**< Offline parsing port */
|
||||
e_FM_PORT_TYPE_RX, /**< 1G Rx port */
|
||||
e_FM_PORT_TYPE_RX_10G, /**< 10G Rx port */
|
||||
e_FM_PORT_TYPE_TX, /**< 1G Tx port */
|
||||
e_FM_PORT_TYPE_TX_10G, /**< 10G Tx port */
|
||||
e_FM_PORT_TYPE_RX_2_5G, /**< 2.5G Rx port */
|
||||
e_FM_PORT_TYPE_TX_2_5G, /**< 2.5G Tx port */
|
||||
e_FM_PORT_TYPE_DUMMY
|
||||
} e_fm_port_type;
|
||||
|
||||
/*
|
||||
* @Description Parse results memory layout
|
||||
*/
|
||||
typedef struct t_fm_prs_result {
|
||||
volatile uint8_t lpid; /**< Logical port id */
|
||||
volatile uint8_t shimr; /**< Shim header result */
|
||||
volatile uint16_t l2r; /**< Layer 2 result */
|
||||
volatile uint16_t l3r; /**< Layer 3 result */
|
||||
volatile uint8_t l4r; /**< Layer 4 result */
|
||||
volatile uint8_t cplan; /**< Classification plan id */
|
||||
volatile uint16_t nxthdr; /**< Next Header */
|
||||
volatile uint16_t cksum; /**< Running-sum */
|
||||
volatile uint16_t flags_frag_off;
|
||||
/**<Flags & fragment-offset field of the last IP-header
|
||||
*/
|
||||
volatile uint8_t route_type;
|
||||
/**< Routing type field of a IPv6 routing extension
|
||||
* header
|
||||
*/
|
||||
volatile uint8_t rhp_ip_valid;
|
||||
/**< Routing Extension Header Present; last bit is IP
|
||||
* valid
|
||||
*/
|
||||
volatile uint8_t shim_off[2]; /**< Shim offset */
|
||||
volatile uint8_t ip_pid_off;
|
||||
/**< IP PID (last IP-proto)offset */
|
||||
volatile uint8_t eth_off; /**< ETH offset */
|
||||
volatile uint8_t llc_snap_off; /**< LLC_SNAP offset */
|
||||
volatile uint8_t vlan_off[2]; /**< VLAN offset */
|
||||
volatile uint8_t etype_off; /**< ETYPE offset */
|
||||
volatile uint8_t pppoe_off; /**< PPP offset */
|
||||
volatile uint8_t mpls_off[2]; /**< MPLS offset */
|
||||
volatile uint8_t ip_off[2]; /**< IP offset */
|
||||
volatile uint8_t gre_off; /**< GRE offset */
|
||||
volatile uint8_t l4_off; /**< Layer 4 offset */
|
||||
volatile uint8_t nxthdr_off; /**< Parser end point */
|
||||
} __rte_packed t_fm_prs_result;
|
||||
|
||||
/*
|
||||
* @Collection FM Parser results
|
||||
*/
|
||||
#define FM_PR_L2_VLAN_STACK 0x00000100 /**< Parse Result: VLAN stack */
|
||||
#define FM_PR_L2_ETHERNET 0x00008000 /**< Parse Result: Ethernet*/
|
||||
#define FM_PR_L2_VLAN 0x00004000 /**< Parse Result: VLAN */
|
||||
#define FM_PR_L2_LLC_SNAP 0x00002000 /**< Parse Result: LLC_SNAP */
|
||||
#define FM_PR_L2_MPLS 0x00001000 /**< Parse Result: MPLS */
|
||||
#define FM_PR_L2_PPPoE 0x00000800 /**< Parse Result: PPPoE */
|
||||
/* @} */
|
||||
|
||||
/*
|
||||
* @Collection FM Frame descriptor macros
|
||||
*/
|
||||
#define FM_FD_CMD_FCO 0x80000000 /**< Frame queue Context Override */
|
||||
#define FM_FD_CMD_RPD 0x40000000 /**< Read Prepended Data */
|
||||
#define FM_FD_CMD_UPD 0x20000000 /**< Update Prepended Data */
|
||||
#define FM_FD_CMD_DTC 0x10000000 /**< Do L4 Checksum */
|
||||
#define FM_FD_CMD_DCL4C 0x10000000 /**< Didn't calculate L4 Checksum */
|
||||
#define FM_FD_CMD_CFQ 0x00ffffff /**< Confirmation Frame Queue */
|
||||
|
||||
#define FM_FD_ERR_UNSUPPORTED_FORMAT 0x04000000
|
||||
/**< Not for Rx-Port! Unsupported Format
|
||||
*/
|
||||
#define FM_FD_ERR_LENGTH 0x02000000
|
||||
/**< Not for Rx-Port! Length Error */
|
||||
#define FM_FD_ERR_DMA 0x01000000 /**< DMA Data error */
|
||||
|
||||
#define FM_FD_IPR 0x00000001 /**< IPR frame (not error) */
|
||||
|
||||
#define FM_FD_ERR_IPR_NCSP (0x00100000 | FM_FD_IPR)
|
||||
/**< IPR non-consistent-sp */
|
||||
#define FM_FD_ERR_IPR (0x00200000 | FM_FD_IPR) /**< IPR error */
|
||||
#define FM_FD_ERR_IPR_TO (0x00300000 | FM_FD_IPR) /**< IPR timeout */
|
||||
|
||||
#ifdef FM_CAPWAP_SUPPORT
|
||||
#define FM_FD_ERR_CRE 0x00200000
|
||||
#define FM_FD_ERR_CHE 0x00100000
|
||||
#endif /* FM_CAPWAP_SUPPORT */
|
||||
|
||||
#define FM_FD_ERR_PHYSICAL 0x00080000
|
||||
/**< Rx FIFO overflow, FCS error, code error, running
|
||||
* disparity error (SGMII and TBI modes), FIFO parity
|
||||
* error. PHY Sequence error, PHY error control
|
||||
* character detected.
|
||||
*/
|
||||
#define FM_FD_ERR_SIZE 0x00040000
|
||||
/**< Frame too long OR Frame size exceeds max_length_frame */
|
||||
#define FM_FD_ERR_CLS_DISCARD 0x00020000 /**< classification discard */
|
||||
#define FM_FD_ERR_EXTRACTION 0x00008000 /**< Extract Out of Frame */
|
||||
#define FM_FD_ERR_NO_SCHEME 0x00004000 /**< No Scheme Selected */
|
||||
#define FM_FD_ERR_KEYSIZE_OVERFLOW 0x00002000 /**< Keysize Overflow */
|
||||
#define FM_FD_ERR_COLOR_RED 0x00000800 /**< Frame color is red */
|
||||
#define FM_FD_ERR_COLOR_YELLOW 0x00000400 /**< Frame color is yellow */
|
||||
#define FM_FD_ERR_ILL_PLCR 0x00000200
|
||||
/**< Illegal Policer Profile selected */
|
||||
#define FM_FD_ERR_PLCR_FRAME_LEN 0x00000100 /**< Policer frame length error */
|
||||
#define FM_FD_ERR_PRS_TIMEOUT 0x00000080 /**< Parser Time out Exceed */
|
||||
#define FM_FD_ERR_PRS_ILL_INSTRUCT 0x00000040
|
||||
/**< Invalid Soft Parser instruction */
|
||||
#define FM_FD_ERR_PRS_HDR_ERR 0x00000020
|
||||
/**< Header error was identified during parsing */
|
||||
#define FM_FD_ERR_BLOCK_LIMIT_EXCEEDED 0x00000008
|
||||
/**< Frame parsed beyind 256 first bytes */
|
||||
|
||||
#define FM_FD_TX_STATUS_ERR_MASK (FM_FD_ERR_UNSUPPORTED_FORMAT | \
|
||||
FM_FD_ERR_LENGTH | \
|
||||
FM_FD_ERR_DMA) /**< TX Error FD bits */
|
||||
|
||||
#define FM_FD_RX_STATUS_ERR_MASK (FM_FD_ERR_UNSUPPORTED_FORMAT | \
|
||||
FM_FD_ERR_LENGTH | \
|
||||
FM_FD_ERR_DMA | \
|
||||
FM_FD_ERR_IPR | \
|
||||
FM_FD_ERR_IPR_TO | \
|
||||
FM_FD_ERR_IPR_NCSP | \
|
||||
FM_FD_ERR_PHYSICAL | \
|
||||
FM_FD_ERR_SIZE | \
|
||||
FM_FD_ERR_CLS_DISCARD | \
|
||||
FM_FD_ERR_COLOR_RED | \
|
||||
FM_FD_ERR_COLOR_YELLOW | \
|
||||
FM_FD_ERR_ILL_PLCR | \
|
||||
FM_FD_ERR_PLCR_FRAME_LEN | \
|
||||
FM_FD_ERR_EXTRACTION | \
|
||||
FM_FD_ERR_NO_SCHEME | \
|
||||
FM_FD_ERR_KEYSIZE_OVERFLOW | \
|
||||
FM_FD_ERR_PRS_TIMEOUT | \
|
||||
FM_FD_ERR_PRS_ILL_INSTRUCT | \
|
||||
FM_FD_ERR_PRS_HDR_ERR | \
|
||||
FM_FD_ERR_BLOCK_LIMIT_EXCEEDED)
|
||||
/**< RX Error FD bits */
|
||||
|
||||
#define FM_FD_RX_STATUS_ERR_NON_FM 0x00400000
|
||||
/**< non Frame-Manager error */
|
||||
/* @} */
|
||||
|
||||
/*
|
||||
* @Description FM Exceptions
|
||||
*/
|
||||
typedef enum e_fm_exceptions {
|
||||
e_FM_EX_DMA_BUS_ERROR = 0, /**< DMA bus error. */
|
||||
e_FM_EX_DMA_READ_ECC,
|
||||
/**< Read Buffer ECC error (Valid for FM rev < 6)*/
|
||||
e_FM_EX_DMA_SYSTEM_WRITE_ECC,
|
||||
/**< Write Buffer ECC error on system side
|
||||
* (Valid for FM rev < 6)
|
||||
*/
|
||||
e_FM_EX_DMA_FM_WRITE_ECC,
|
||||
/**< Write Buffer ECC error on FM side (Valid for FM rev < 6)*/
|
||||
e_FM_EX_DMA_SINGLE_PORT_ECC,
|
||||
/**< Single Port ECC error on FM side (Valid for FM rev > 6)*/
|
||||
e_FM_EX_FPM_STALL_ON_TASKS, /**< Stall of tasks on FPM */
|
||||
e_FM_EX_FPM_SINGLE_ECC, /**< Single ECC on FPM. */
|
||||
e_FM_EX_FPM_DOUBLE_ECC,
|
||||
/**< Double ECC error on FPM ram access */
|
||||
e_FM_EX_QMI_SINGLE_ECC, /**< Single ECC on QMI. */
|
||||
e_FM_EX_QMI_DOUBLE_ECC, /**< Double bit ECC occurred on QMI */
|
||||
e_FM_EX_QMI_DEQ_FROM_UNKNOWN_PORTID,/**< Dequeue from unknown port id */
|
||||
e_FM_EX_BMI_LIST_RAM_ECC, /**< Linked List RAM ECC error */
|
||||
e_FM_EX_BMI_STORAGE_PROFILE_ECC,/**< Storage Profile ECC Error */
|
||||
e_FM_EX_BMI_STATISTICS_RAM_ECC,
|
||||
/**< Statistics Count RAM ECC Error Enable */
|
||||
e_FM_EX_BMI_DISPATCH_RAM_ECC, /**< Dispatch RAM ECC Error Enable */
|
||||
e_FM_EX_IRAM_ECC, /**< Double bit ECC occurred on IRAM*/
|
||||
e_FM_EX_MURAM_ECC /**< Double bit ECC occurred on MURAM*/
|
||||
} e_fm_exceptions;
|
||||
|
||||
/*
|
||||
* @Description Enum for defining port DMA cache attributes
|
||||
*/
|
||||
typedef enum e_fm_dma_cache_option {
|
||||
e_FM_DMA_NO_STASH = 0, /**< Cacheable, no Allocate (No Stashing) */
|
||||
e_FM_DMA_STASH = 1 /**< Cacheable and Allocate (Stashing on) */
|
||||
} e_fm_dma_cache_option;
|
||||
/*
|
||||
* @Group lnx_usr_FM_init_grp FM Initialization Unit
|
||||
*
|
||||
* @Description FM Initialization Unit
|
||||
*
|
||||
* Initialization Flow
|
||||
* Initialization of the FM Module will be carried out by the
|
||||
* application according to the following sequence:
|
||||
* - Calling the configuration routine with basic parameters.
|
||||
* - Calling the advance initialization routines to change
|
||||
* driver's defaults.
|
||||
* - Calling the initialization routine.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
t_handle fm_open(uint8_t id);
|
||||
void fm_close(t_handle h_fm);
|
||||
|
||||
/*
|
||||
* @Description A structure for defining buffer prefix area content.
|
||||
*/
|
||||
typedef struct t_fm_buffer_prefix_content {
|
||||
uint16_t priv_data_size;
|
||||
/**< Number of bytes to be left at the beginning of the external
|
||||
* buffer Note that the private-area will start from the base of
|
||||
* the buffer address.
|
||||
*/
|
||||
bool pass_prs_result;
|
||||
/**< TRUE to pass the parse result to/from the FM; User may use
|
||||
* fm_port_get_buffer_prs_result() in order to get the
|
||||
* parser-result from a buffer.
|
||||
*/
|
||||
bool pass_time_stamp;
|
||||
/**< TRUE to pass the timeStamp to/from the FM User may use
|
||||
* fm_port_get_buffer_time_stamp() in order to get the
|
||||
* parser-result from a buffer.
|
||||
*/
|
||||
bool pass_hash_result;
|
||||
/**< TRUE to pass the KG hash result to/from the FM User may use
|
||||
* fm_port_get_buffer_hash_result() in order to get the
|
||||
* parser-result from a buffer.
|
||||
*/
|
||||
bool pass_all_other_pcdinfo;
|
||||
/**< Add all other Internal-Context information: AD,
|
||||
* hash-result, key, etc.
|
||||
*/
|
||||
uint16_t data_align;
|
||||
/**< 0 to use driver's default alignment [64], other value for
|
||||
* selecting a data alignment (must be a power of 2); if write
|
||||
* optimization is used, must be >= 16.
|
||||
*/
|
||||
uint8_t manip_ext_space;
|
||||
/**< Maximum extra size needed (insertion-size minus
|
||||
* removal-size);
|
||||
* Note that this field impacts the size of the buffer-prefix
|
||||
* (i.e. it pushes the data offset);
|
||||
*/
|
||||
} t_fm_buffer_prefix_content;
|
||||
|
||||
/*
|
||||
* @Description A structure of information about each of the external
|
||||
* buffer pools used by a port or storage-profile.
|
||||
*/
|
||||
typedef struct t_fm_ext_pool_params {
|
||||
uint8_t id; /**< External buffer pool id */
|
||||
uint16_t size; /**< External buffer pool buffer size */
|
||||
} t_fm_ext_pool_params;
|
||||
|
||||
/*
|
||||
* @Description A structure for informing the driver about the external
|
||||
* buffer pools allocated in the BM and used by a port or a
|
||||
* storage-profile.
|
||||
*/
|
||||
typedef struct t_fm_ext_pools {
|
||||
uint8_t num_of_pools_used;
|
||||
/**< Number of pools use by this port*/
|
||||
t_fm_ext_pool_params ext_buf_pool[FM_PORT_MAX_NUM_OF_EXT_POOLS];
|
||||
/**< Parameters for each port */
|
||||
} t_fm_ext_pools;
|
||||
|
||||
/*
|
||||
* @Description A structure for defining backup BM Pools.
|
||||
*/
|
||||
typedef struct t_fm_backup_bm_pools {
|
||||
uint8_t num_bkup_pools;
|
||||
/**< Number of BM backup pools - must be smaller than
|
||||
* the total number of pools defined for the specified
|
||||
* port.
|
||||
*/
|
||||
uint8_t pool_ids[FM_PORT_MAX_NUM_OF_EXT_POOLS];
|
||||
/**< num_bkup_pools pool id's, specifying which pools
|
||||
* should be used only as backup. Pool id's specified
|
||||
* here must be a subset of the pools used by the
|
||||
* specified port.
|
||||
*/
|
||||
} t_fm_backup_bm_pools;
|
||||
|
||||
/** @} */ /* end of lnx_usr_FM_init_grp group */
|
||||
|
||||
/*
|
||||
* @Group lnx_usr_FM_runtime_control_grp FM Runtime Control Unit
|
||||
*
|
||||
* @Description FM Runtime control unit API functions, definitions and enums.
|
||||
*
|
||||
* The FM driver provides a set of control routines.
|
||||
* These routines may only be called after the module was fully
|
||||
* initialized (both configuration and initialization routines
|
||||
* were called). They are typically used to get information from
|
||||
* hardware (status, counters/statistics, revision etc.), to
|
||||
* modify a current state or to force/enable a required action.
|
||||
* Run-time control may be called whenever necessary and as many
|
||||
* times as needed.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*
|
||||
* @Collection General FM defines.
|
||||
*/
|
||||
#define FM_MAX_NUM_OF_VALID_PORTS (FM_MAX_NUM_OF_OH_PORTS + \
|
||||
FM_MAX_NUM_OF_1G_RX_PORTS + \
|
||||
FM_MAX_NUM_OF_10G_RX_PORTS + \
|
||||
FM_MAX_NUM_OF_1G_TX_PORTS + \
|
||||
FM_MAX_NUM_OF_10G_TX_PORTS)
|
||||
/**< Number of available FM ports */
|
||||
/* @} */
|
||||
|
||||
/** @} */ /* end of lnx_usr_FM_runtime_control_grp group */
|
||||
/** @} */ /* end of lnx_usr_FM_lib_grp group */
|
||||
/** @} */ /* end of lnx_usr_FM_grp group */
|
||||
|
||||
/*
|
||||
* @Description FM Char device ioctls
|
||||
*/
|
||||
|
||||
/*
|
||||
* @Group lnx_ioctl_FM_grp Frame Manager Linux IOCTL API
|
||||
*
|
||||
* @Description FM Linux ioctls definitions and enums
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
/*
|
||||
* @Collection FM IOCTL device ('/dev') definitions
|
||||
*/
|
||||
#define DEV_FM_NAME "fm" /**< Name of the FM chardev */
|
||||
|
||||
#define DEV_FM_MINOR_BASE 0
|
||||
#define DEV_FM_PCD_MINOR_BASE (DEV_FM_MINOR_BASE + 1)
|
||||
/*/dev/fmx-pcd */
|
||||
#define DEV_FM_OH_PORTS_MINOR_BASE (DEV_FM_PCD_MINOR_BASE + 1)
|
||||
/*/dev/fmx-port-ohy */
|
||||
#define DEV_FM_RX_PORTS_MINOR_BASE \
|
||||
(DEV_FM_OH_PORTS_MINOR_BASE + FM_MAX_NUM_OF_OH_PORTS)
|
||||
/*/dev/fmx-port-rxy */
|
||||
#define DEV_FM_TX_PORTS_MINOR_BASE \
|
||||
(DEV_FM_RX_PORTS_MINOR_BASE + FM_MAX_NUM_OF_RX_PORTS)
|
||||
/*/dev/fmx-port-txy */
|
||||
#define DEV_FM_MAX_MINORS \
|
||||
(DEV_FM_TX_PORTS_MINOR_BASE + FM_MAX_NUM_OF_TX_PORTS)
|
||||
|
||||
#define FM_IOC_NUM(n) (n)
|
||||
#define FM_PCD_IOC_NUM(n) ((n) + 20)
|
||||
#define FM_PORT_IOC_NUM(n) ((n) + 70)
|
||||
/* @} */
|
||||
|
||||
#define IOC_FM_MAX_NUM_OF_PORTS 64
|
||||
|
||||
/*
|
||||
* @Description Enum for defining port types
|
||||
* (must match enum e_fm_port_type defined in fm_ext.h)
|
||||
*/
|
||||
typedef enum ioc_fm_port_type {
|
||||
e_IOC_FM_PORT_TYPE_OH_OFFLINE_PARSING = 0, /**< Offline parsing port */
|
||||
e_IOC_FM_PORT_TYPE_RX, /**< 1G Rx port */
|
||||
e_IOC_FM_PORT_TYPE_RX_10G, /**< 10G Rx port */
|
||||
e_IOC_FM_PORT_TYPE_TX, /**< 1G Tx port */
|
||||
e_IOC_FM_PORT_TYPE_TX_10G, /**< 10G Tx port */
|
||||
e_IOC_FM_PORT_TYPE_DUMMY
|
||||
} ioc_fm_port_type;
|
||||
|
||||
typedef struct ioc_fm_obj_t {
|
||||
void *obj;
|
||||
} ioc_fm_obj_t;
|
||||
|
||||
typedef union ioc_fm_api_version_t {
|
||||
struct {
|
||||
uint8_t major;
|
||||
uint8_t minor;
|
||||
uint8_t respin;
|
||||
uint8_t reserved;
|
||||
} version;
|
||||
uint32_t ver;
|
||||
} ioc_fm_api_version_t;
|
||||
|
||||
/*
|
||||
* @Function FM_IOC_GET_API_VERSION
|
||||
*
|
||||
* @Description Reads the FMD IOCTL API version.
|
||||
*
|
||||
* @Param[in,out] ioc_fm_api_version_t The requested counter parameters
|
||||
*
|
||||
* @Return Version's value.
|
||||
*/
|
||||
#define FM_IOC_GET_API_VERSION \
|
||||
_IOR(FM_IOC_TYPE_BASE, FM_IOC_NUM(7), ioc_fm_api_version_t)
|
||||
#define FMD_API_VERSION_MAJOR 21
|
||||
#define FMD_API_VERSION_MINOR 1
|
||||
#define FMD_API_VERSION_RESPIN 0
|
||||
|
||||
uint32_t fm_get_api_version(t_handle h_fm, ioc_fm_api_version_t *p_version);
|
||||
|
||||
|
||||
#endif /* __FM_EXT_H */
|
561
drivers/net/dpaa/fmlib/fm_lib.c
Normal file
561
drivers/net/dpaa/fmlib/fm_lib.c
Normal file
@ -0,0 +1,561 @@
|
||||
/* SPDX-License-Identifier: BSD-3-Clause
|
||||
* Copyright 2008-2016 Freescale Semiconductor Inc.
|
||||
* Copyright 2017-2020 NXP
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <stdbool.h>
|
||||
#include <rte_common.h>
|
||||
|
||||
#include "fm_ext.h"
|
||||
#include "fm_pcd_ext.h"
|
||||
#include "fm_port_ext.h"
|
||||
#include <dpaa_ethdev.h>
|
||||
|
||||
#define DEV_TO_ID(p) \
|
||||
do { \
|
||||
t_device *p_dev = (t_device *)p; \
|
||||
p = UINT_TO_PTR(p_dev->id); \
|
||||
} while (0)
|
||||
|
||||
/* Major and minor are in sync with FMD, respin is for fmlib identification */
|
||||
#define FM_LIB_VERSION_MAJOR 21
|
||||
#define FM_LIB_VERSION_MINOR 1
|
||||
#define FM_LIB_VERSION_RESPIN 0
|
||||
|
||||
#if (FMD_API_VERSION_MAJOR != FM_LIB_VERSION_MAJOR) || \
|
||||
(FMD_API_VERSION_MINOR != FM_LIB_VERSION_MINOR)
|
||||
#warning FMD and FMLIB version mismatch
|
||||
#endif
|
||||
|
||||
t_handle
|
||||
fm_open(uint8_t id)
|
||||
{
|
||||
t_device *p_dev;
|
||||
int fd;
|
||||
char dev_name[20];
|
||||
static bool called;
|
||||
ioc_fm_api_version_t ver;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
p_dev = (t_device *)malloc(sizeof(t_device));
|
||||
if (p_dev == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(dev_name, 0, 20);
|
||||
sprintf(dev_name, "%s%s%d", "/dev/", DEV_FM_NAME, id);
|
||||
fd = open(dev_name, O_RDWR);
|
||||
if (fd < 0) {
|
||||
free(p_dev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p_dev->id = id;
|
||||
p_dev->fd = fd;
|
||||
if (!called) {
|
||||
called = true;
|
||||
fm_get_api_version((t_handle)p_dev, &ver);
|
||||
|
||||
if (ver.version.major != FMD_API_VERSION_MAJOR ||
|
||||
ver.version.minor != FMD_API_VERSION_MINOR ||
|
||||
ver.version.respin != FMD_API_VERSION_RESPIN) {
|
||||
DPAA_PMD_WARN("Compiled against FMD API ver %u.%u.%u",
|
||||
FMD_API_VERSION_MAJOR,
|
||||
FMD_API_VERSION_MINOR, FMD_API_VERSION_RESPIN);
|
||||
DPAA_PMD_WARN("Running with FMD API ver %u.%u.%u",
|
||||
ver.version.major, ver.version.minor,
|
||||
ver.version.respin);
|
||||
}
|
||||
}
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return (t_handle)p_dev;
|
||||
}
|
||||
|
||||
void fm_close(t_handle h_fm)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_fm;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
close(p_dev->fd);
|
||||
free(p_dev);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
}
|
||||
|
||||
uint32_t
|
||||
fm_get_api_version(t_handle h_fm, ioc_fm_api_version_t *p_version)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_fm;
|
||||
int ret;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
ret = ioctl(p_dev->fd, FM_IOC_GET_API_VERSION, p_version);
|
||||
if (ret) {
|
||||
DPAA_PMD_ERR("cannot get API version, error %i (%s)\n",
|
||||
errno, strerror(errno));
|
||||
RETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);
|
||||
}
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
t_handle
|
||||
fm_pcd_open(t_fm_pcd_params *p_fm_pcd_params)
|
||||
{
|
||||
t_device *p_dev;
|
||||
int fd;
|
||||
char dev_name[20];
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
p_dev = (t_device *)malloc(sizeof(t_device));
|
||||
if (p_dev == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(dev_name, 0, 20);
|
||||
sprintf(dev_name, "%s%s%u-pcd", "/dev/", DEV_FM_NAME,
|
||||
(uint32_t)((t_device *)p_fm_pcd_params->h_fm)->id);
|
||||
fd = open(dev_name, O_RDWR);
|
||||
if (fd < 0) {
|
||||
free(p_dev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p_dev->id = ((t_device *)p_fm_pcd_params->h_fm)->id;
|
||||
p_dev->fd = fd;
|
||||
p_dev->owners = 0;
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return (t_handle)p_dev;
|
||||
}
|
||||
|
||||
void
|
||||
fm_pcd_close(t_handle h_fm_pcd)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_fm_pcd;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
close(p_dev->fd);
|
||||
|
||||
if (p_dev->owners) {
|
||||
printf("\nTry delete a prev created pcd handler(owners:%u)!\n",
|
||||
p_dev->owners);
|
||||
return;
|
||||
}
|
||||
|
||||
free(p_dev);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
}
|
||||
|
||||
uint32_t
|
||||
fm_pcd_enable(t_handle h_fm_pcd)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_fm_pcd;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
if (ioctl(p_dev->fd, FM_PCD_IOC_ENABLE))
|
||||
RETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
fm_pcd_disable(t_handle h_fm_pcd)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_fm_pcd;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
if (ioctl(p_dev->fd, FM_PCD_IOC_DISABLE))
|
||||
RETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
t_handle
|
||||
fm_pcd_net_env_characteristics_set(t_handle h_fm_pcd,
|
||||
ioc_fm_pcd_net_env_params_t *params)
|
||||
{
|
||||
t_device *p_pcd_dev = (t_device *)h_fm_pcd;
|
||||
t_device *p_dev = NULL;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
params->id = NULL;
|
||||
|
||||
if (ioctl(p_pcd_dev->fd, FM_PCD_IOC_NET_ENV_CHARACTERISTICS_SET,
|
||||
params))
|
||||
return NULL;
|
||||
|
||||
p_dev = (t_device *)malloc(sizeof(t_device));
|
||||
if (p_dev == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(p_dev, 0, sizeof(t_device));
|
||||
p_dev->h_user_priv = (t_handle)p_pcd_dev;
|
||||
p_pcd_dev->owners++;
|
||||
p_dev->id = PTR_TO_UINT(params->id);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return (t_handle)p_dev;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
fm_pcd_net_env_characteristics_delete(t_handle h_net_env)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_net_env;
|
||||
t_device *p_pcd_dev = NULL;
|
||||
ioc_fm_obj_t id;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
p_pcd_dev = (t_device *)p_dev->h_user_priv;
|
||||
id.obj = UINT_TO_PTR(p_dev->id);
|
||||
|
||||
if (ioctl(p_pcd_dev->fd, FM_PCD_IOC_NET_ENV_CHARACTERISTICS_DELETE,
|
||||
&id))
|
||||
RETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);
|
||||
|
||||
p_pcd_dev->owners--;
|
||||
free(p_dev);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
t_handle
|
||||
fm_pcd_kg_scheme_set(t_handle h_fm_pcd,
|
||||
ioc_fm_pcd_kg_scheme_params_t *params)
|
||||
{
|
||||
t_device *p_pcd_dev = (t_device *)h_fm_pcd;
|
||||
t_device *p_dev = NULL;
|
||||
int ret;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
params->id = NULL;
|
||||
|
||||
if (params->param.modify) {
|
||||
if (params->param.scm_id.scheme_id)
|
||||
DEV_TO_ID(params->param.scm_id.scheme_id);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* correct h_net_env param from scheme */
|
||||
if (params->param.net_env_params.net_env_id)
|
||||
DEV_TO_ID(params->param.net_env_params.net_env_id);
|
||||
|
||||
/* correct next engine params handlers: cc*/
|
||||
if (params->param.next_engine == e_IOC_FM_PCD_CC &&
|
||||
params->param.kg_next_engine_params.cc.tree_id)
|
||||
DEV_TO_ID(params->param.kg_next_engine_params.cc.tree_id);
|
||||
|
||||
ret = ioctl(p_pcd_dev->fd, FM_PCD_IOC_KG_SCHEME_SET, params);
|
||||
if (ret) {
|
||||
DPAA_PMD_ERR(" cannot set kg scheme, error %i (%s)\n",
|
||||
errno, strerror(errno));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p_dev = (t_device *)malloc(sizeof(t_device));
|
||||
if (p_dev == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(p_dev, 0, sizeof(t_device));
|
||||
p_dev->h_user_priv = (t_handle)p_pcd_dev;
|
||||
/* increase owners only if a new scheme is created */
|
||||
if (!params->param.modify)
|
||||
p_pcd_dev->owners++;
|
||||
p_dev->id = PTR_TO_UINT(params->id);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return (t_handle)p_dev;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
fm_pcd_kg_scheme_delete(t_handle h_scheme)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_scheme;
|
||||
t_device *p_pcd_dev = NULL;
|
||||
ioc_fm_obj_t id;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
p_pcd_dev = (t_device *)p_dev->h_user_priv;
|
||||
id.obj = UINT_TO_PTR(p_dev->id);
|
||||
|
||||
if (ioctl(p_pcd_dev->fd, FM_PCD_IOC_KG_SCHEME_DELETE, &id)) {
|
||||
DPAA_PMD_WARN("cannot delete kg scheme, error %i (%s)\n",
|
||||
errno, strerror(errno));
|
||||
RETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);
|
||||
}
|
||||
|
||||
p_pcd_dev->owners--;
|
||||
free(p_dev);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
e_fm_port_type port_type; /**< Port type */
|
||||
uint8_t port_id; /**< Port Id - relative to type */
|
||||
} t_fm_port;
|
||||
|
||||
t_handle
|
||||
fm_port_open(t_fm_port_params *p_fm_port_params)
|
||||
{
|
||||
t_device *p_dev;
|
||||
int fd;
|
||||
char dev_name[30];
|
||||
t_fm_port *p_fm_port;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
p_dev = (t_device *)malloc(sizeof(t_device));
|
||||
if (p_dev == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(p_dev, 0, sizeof(t_device));
|
||||
|
||||
p_fm_port = (t_fm_port *)malloc(sizeof(t_fm_port));
|
||||
if (!p_fm_port) {
|
||||
free(p_dev);
|
||||
return NULL;
|
||||
}
|
||||
memset(p_fm_port, 0, sizeof(t_fm_port));
|
||||
memset(dev_name, 0, sizeof(dev_name));
|
||||
switch (p_fm_port_params->port_type) {
|
||||
case e_FM_PORT_TYPE_OH_OFFLINE_PARSING:
|
||||
sprintf(dev_name, "%s%s%u-port-oh%d", "/dev/", DEV_FM_NAME,
|
||||
(uint32_t)((t_device *)p_fm_port_params->h_fm)->id,
|
||||
p_fm_port_params->port_id);
|
||||
break;
|
||||
case e_FM_PORT_TYPE_RX:
|
||||
sprintf(dev_name, "%s%s%u-port-rx%d", "/dev/", DEV_FM_NAME,
|
||||
(uint32_t)((t_device *)p_fm_port_params->h_fm)->id,
|
||||
p_fm_port_params->port_id);
|
||||
break;
|
||||
case e_FM_PORT_TYPE_RX_10G:
|
||||
sprintf(dev_name, "%s%s%u-port-rx%d", "/dev/", DEV_FM_NAME,
|
||||
(uint32_t)((t_device *)p_fm_port_params->h_fm)->id,
|
||||
FM_MAX_NUM_OF_1G_RX_PORTS + p_fm_port_params->port_id);
|
||||
break;
|
||||
case e_FM_PORT_TYPE_TX:
|
||||
sprintf(dev_name, "%s%s%u-port-tx%d", "/dev/", DEV_FM_NAME,
|
||||
(uint32_t)((t_device *)p_fm_port_params->h_fm)->id,
|
||||
p_fm_port_params->port_id);
|
||||
break;
|
||||
case e_FM_PORT_TYPE_TX_10G:
|
||||
sprintf(dev_name, "%s%s%u-port-tx%d", "/dev/", DEV_FM_NAME,
|
||||
(uint32_t)((t_device *)p_fm_port_params->h_fm)->id,
|
||||
FM_MAX_NUM_OF_1G_TX_PORTS + p_fm_port_params->port_id);
|
||||
break;
|
||||
default:
|
||||
free(p_fm_port);
|
||||
free(p_dev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fd = open(dev_name, O_RDWR);
|
||||
if (fd < 0) {
|
||||
free(p_fm_port);
|
||||
free(p_dev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
p_fm_port->port_type = p_fm_port_params->port_type;
|
||||
p_fm_port->port_id = p_fm_port_params->port_id;
|
||||
p_dev->id = p_fm_port_params->port_id;
|
||||
p_dev->fd = fd;
|
||||
p_dev->h_user_priv = (t_handle)p_fm_port;
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return (t_handle)p_dev;
|
||||
}
|
||||
|
||||
void
|
||||
fm_port_close(t_handle h_fm_port)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_fm_port;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
close(p_dev->fd);
|
||||
if (p_dev->h_user_priv)
|
||||
free(p_dev->h_user_priv);
|
||||
free(p_dev);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
}
|
||||
|
||||
uint32_t
|
||||
fm_port_disable(t_handle h_fm_port)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_fm_port;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
if (ioctl(p_dev->fd, FM_PORT_IOC_DISABLE))
|
||||
RETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
fm_port_enable(t_handle h_fm_port)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_fm_port;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
if (ioctl(p_dev->fd, FM_PORT_IOC_ENABLE))
|
||||
RETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
fm_port_set_pcd(t_handle h_fm_port,
|
||||
ioc_fm_port_pcd_params_t *p)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_fm_port;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
/* correct h_net_env param from t_fm_portPcdParams */
|
||||
DEV_TO_ID(p->net_env_id);
|
||||
|
||||
/* correct pcd structures according to what support was set */
|
||||
if (p->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_CC ||
|
||||
p->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_CC_AND_PLCR ||
|
||||
p->pcd_support == e_IOC_FM_PCD_PRS_CC) {
|
||||
if (p->p_cc_params && p->p_cc_params->cc_tree_id)
|
||||
DEV_TO_ID(p->p_cc_params->cc_tree_id);
|
||||
else
|
||||
DPAA_PMD_WARN("Coarse Classification not set !");
|
||||
}
|
||||
|
||||
if (p->pcd_support == e_IOC_FM_PCD_PRS_KG ||
|
||||
p->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_CC ||
|
||||
p->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_CC_AND_PLCR ||
|
||||
p->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_PLCR){
|
||||
if (p->p_kg_params) {
|
||||
uint32_t i;
|
||||
ioc_fm_port_pcd_kg_params_t *kg_params;
|
||||
|
||||
kg_params = p->p_kg_params;
|
||||
|
||||
for (i = 0; i < kg_params->num_schemes; i++)
|
||||
if (kg_params->scheme_ids[i])
|
||||
DEV_TO_ID(kg_params->scheme_ids[i]);
|
||||
else
|
||||
DPAA_PMD_WARN("Scheme:%u not set!!", i);
|
||||
|
||||
if (kg_params->direct_scheme)
|
||||
DEV_TO_ID(kg_params->direct_scheme_id);
|
||||
} else {
|
||||
DPAA_PMD_WARN("KeyGen not set !");
|
||||
}
|
||||
}
|
||||
|
||||
if (p->pcd_support == e_IOC_FM_PCD_PLCR_ONLY ||
|
||||
p->pcd_support == e_IOC_FM_PCD_PRS_PLCR ||
|
||||
p->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_CC_AND_PLCR ||
|
||||
p->pcd_support == e_IOC_FM_PCD_PRS_KG_AND_PLCR) {
|
||||
if (p->p_plcr_params) {
|
||||
if (p->p_plcr_params->plcr_profile_id)
|
||||
DEV_TO_ID(p->p_plcr_params->plcr_profile_id);
|
||||
else
|
||||
DPAA_PMD_WARN("Policer not set !");
|
||||
}
|
||||
}
|
||||
|
||||
if (p->p_ip_reassembly_manip)
|
||||
DEV_TO_ID(p->p_ip_reassembly_manip);
|
||||
|
||||
if (p->p_capwap_reassembly_manip)
|
||||
DEV_TO_ID(p->p_capwap_reassembly_manip);
|
||||
|
||||
if (ioctl(p_dev->fd, FM_PORT_IOC_SET_PCD, p))
|
||||
RETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
fm_port_delete_pcd(t_handle h_fm_port)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_fm_port;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
if (ioctl(p_dev->fd, FM_PORT_IOC_DELETE_PCD))
|
||||
RETURN_ERROR(MINOR, E_INVALID_OPERATION, NO_MSG);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return E_OK;
|
||||
}
|
||||
|
||||
t_handle
|
||||
create_device(t_handle h_user_priv, t_handle h_dev_id)
|
||||
{
|
||||
t_device *p_user_priv_dev = (t_device *)h_user_priv;
|
||||
t_device *p_dev = NULL;
|
||||
|
||||
_fml_dbg("Calling...\n");
|
||||
|
||||
p_dev = (t_device *)malloc(sizeof(t_device));
|
||||
if (p_dev == NULL)
|
||||
return NULL;
|
||||
|
||||
memset(p_dev, 0, sizeof(t_device));
|
||||
p_dev->h_user_priv = h_user_priv;
|
||||
p_user_priv_dev->owners++;
|
||||
p_dev->id = PTR_TO_UINT(h_dev_id);
|
||||
|
||||
_fml_dbg("Finishing.\n");
|
||||
|
||||
return (t_handle)p_dev;
|
||||
}
|
||||
|
||||
t_handle
|
||||
get_device_id(t_handle h_dev)
|
||||
{
|
||||
t_device *p_dev = (t_device *)h_dev;
|
||||
|
||||
return (t_handle)p_dev->id;
|
||||
}
|
5787
drivers/net/dpaa/fmlib/fm_pcd_ext.h
Normal file
5787
drivers/net/dpaa/fmlib/fm_pcd_ext.h
Normal file
File diff suppressed because it is too large
Load Diff
3350
drivers/net/dpaa/fmlib/fm_port_ext.h
Normal file
3350
drivers/net/dpaa/fmlib/fm_port_ext.h
Normal file
File diff suppressed because it is too large
Load Diff
158
drivers/net/dpaa/fmlib/ncsw_ext.h
Normal file
158
drivers/net/dpaa/fmlib/ncsw_ext.h
Normal file
@ -0,0 +1,158 @@
|
||||
/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
|
||||
* Copyright 2008-2012 Freescale Semiconductor Inc.
|
||||
* Copyright 2017-2020 NXP
|
||||
*/
|
||||
|
||||
#ifndef __NCSW_EXT_H
|
||||
#define __NCSW_EXT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define PTR_TO_UINT(_ptr) ((uintptr_t)(_ptr))
|
||||
#define UINT_TO_PTR(_val) ((void *)(uintptr_t)(_val))
|
||||
|
||||
/* phys_address_t should be uintptr_t */
|
||||
typedef uint64_t phys_address_t;
|
||||
|
||||
/*
|
||||
* @Description Possible RxStore callback responses.
|
||||
*/
|
||||
typedef enum e_rx_store_response {
|
||||
e_RX_STORE_RESPONSE_PAUSE
|
||||
/**< Pause invoking callback with received data; in polling
|
||||
* mode, start again invoking callback only next time user
|
||||
* invokes the receive routine; in interrupt mode, start again
|
||||
* invoking callback only next time a receive event triggers an
|
||||
* interrupt; in all cases, received data that are pending are
|
||||
* not lost, rather, their processing is temporarily deferred;
|
||||
* in all cases, received data are processed in the order in
|
||||
* which they were received.
|
||||
*/
|
||||
, e_RX_STORE_RESPONSE_CONTINUE
|
||||
/**< Continue invoking callback with received data. */
|
||||
} e_rx_store_response;
|
||||
|
||||
|
||||
/*
|
||||
* @Description General Handle
|
||||
*/
|
||||
typedef void *t_handle; /**< handle, used as object's descriptor */
|
||||
|
||||
/* @} */
|
||||
|
||||
/*
|
||||
* @Function t_get_buf_function
|
||||
*
|
||||
* @Description User callback function called by driver to get data buffer.
|
||||
*
|
||||
* User provides this function. Driver invokes it.
|
||||
*
|
||||
* @Param[in] h_buffer_pool A handle to buffer pool manager
|
||||
* @Param[out] p_buf_context_handle Returns the user's private context that
|
||||
* should be associated with the buffer
|
||||
*
|
||||
* @Return Pointer to data buffer, NULL if error
|
||||
*/
|
||||
typedef uint8_t * (t_get_buf_function)(t_handle h_buffer_pool,
|
||||
t_handle *p_buf_context_handle);
|
||||
|
||||
/*
|
||||
* @Function t_put_buf_function
|
||||
*
|
||||
* @Description User callback function called by driver to return data buffer.
|
||||
* User provides this function. Driver invokes it.
|
||||
*
|
||||
* @Param[in] h_buffer_pool A handle to buffer pool manager
|
||||
* @Param[in] p_buffer A pointer to buffer to return
|
||||
* @Param[in] h_buf_context The user's private context associated
|
||||
* with the returned buffer
|
||||
*
|
||||
* @Return E_OK on success; Error code otherwise
|
||||
*/
|
||||
typedef uint32_t (t_put_buf_function)(t_handle h_buffer_pool,
|
||||
uint8_t *p_buffer,
|
||||
t_handle h_buf_context);
|
||||
|
||||
/*
|
||||
* @Function t_phys_to_virt
|
||||
*
|
||||
* @Description Translates a physical address to the matching virtual address.
|
||||
*
|
||||
* @Param[in] addr The physical address to translate.
|
||||
*
|
||||
* @Return Virtual address.
|
||||
*/
|
||||
typedef void *t_phys_to_virt(phys_address_t addr);
|
||||
|
||||
/*
|
||||
* @Function t_virt_to_phys
|
||||
*
|
||||
* @Description Translates a virtual address to the matching physical address.
|
||||
*
|
||||
* @Param[in] addr The virtual address to translate.
|
||||
*
|
||||
* @Return Physical address.
|
||||
*/
|
||||
typedef phys_address_t t_virt_to_phys(void *addr);
|
||||
|
||||
/*
|
||||
* @Description Buffer Pool Information Structure.
|
||||
*/
|
||||
typedef struct t_buffer_pool_info {
|
||||
t_handle h_buffer_pool;
|
||||
/**< A handle to the buffer pool mgr */
|
||||
t_get_buf_function *f_get_buf;
|
||||
/**< User callback to get a free buffer */
|
||||
t_put_buf_function *f_put_buf;
|
||||
/**< User callback to return a buffer */
|
||||
uint16_t buffer_size;
|
||||
/**< Buffer size (in bytes) */
|
||||
t_phys_to_virt *f_phys_to_virt;
|
||||
/**< User callback to translate pool buffers physical addresses
|
||||
* to virtual addresses
|
||||
*/
|
||||
t_virt_to_phys *f_virt_to_phys;
|
||||
/**< User callback to translate pool buffers virtual addresses
|
||||
* to physical addresses
|
||||
*/
|
||||
} t_buffer_pool_info;
|
||||
|
||||
/*
|
||||
* @Description User callback function called by driver with receive data.
|
||||
* User provides this function. Driver invokes it.
|
||||
*
|
||||
* @Param[in] h_app Application's handle, as was provided to the
|
||||
* driver by the user
|
||||
* @Param[in] queue_id Receive queue ID
|
||||
* @Param[in] p_data Pointer to the buffer with received data
|
||||
* @Param[in] h_buf_context The user's private context associated with the
|
||||
* given data buffer
|
||||
* @Param[in] length Length of received data
|
||||
* @Param[in] status Receive status and errors
|
||||
* @Param[in] position Position of buffer in frame
|
||||
* @Param[in] flags Driver-dependent information
|
||||
*
|
||||
* @Retval e_RX_STORE_RESPONSE_CONTINUE order the driver to continue Rx
|
||||
* operation for all ready data.
|
||||
* @Retval e_RX_STORE_RESPONSE_PAUSE order the driver to stop Rx ops.
|
||||
*/
|
||||
typedef e_rx_store_response(t_rx_store_function)(t_handle h_app,
|
||||
uint32_t queue_id,
|
||||
uint8_t *p_data,
|
||||
t_handle h_buf_context,
|
||||
uint32_t length,
|
||||
uint16_t status,
|
||||
uint8_t position,
|
||||
uint32_t flags);
|
||||
|
||||
typedef struct t_device {
|
||||
uintptr_t id; /**< the device id */
|
||||
int fd; /**< the device file descriptor */
|
||||
t_handle h_user_priv;
|
||||
uint32_t owners;
|
||||
} t_device;
|
||||
|
||||
t_handle create_device(t_handle h_user_priv, t_handle h_dev_id);
|
||||
t_handle get_device_id(t_handle h_dev);
|
||||
|
||||
#endif /* __NCSW_EXT_H */
|
411
drivers/net/dpaa/fmlib/net_ext.h
Normal file
411
drivers/net/dpaa/fmlib/net_ext.h
Normal file
@ -0,0 +1,411 @@
|
||||
/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
|
||||
* Copyright 2008-2012 Freescale Semiconductor Inc.
|
||||
* Copyright 2017-2019 NXP
|
||||
*/
|
||||
|
||||
#ifndef __NET_EXT_H
|
||||
#define __NET_EXT_H
|
||||
|
||||
#include "ncsw_ext.h"
|
||||
|
||||
/*
|
||||
* @Description This file contains common and general netcomm headers
|
||||
* definitions.
|
||||
*/
|
||||
|
||||
typedef uint8_t ioc_header_field_ppp_t;
|
||||
|
||||
#define IOC_NET_HF_PPP_PID (1)
|
||||
#define IOC_NET_HF_PPP_COMPRESSED (IOC_NET_HF_PPP_PID << 1)
|
||||
#define IOC_NET_HF_PPP_ALL_FIELDS ((IOC_NET_HF_PPP_PID << 2) - 1)
|
||||
|
||||
typedef uint8_t ioc_header_field_pppoe_t;
|
||||
|
||||
#define ioc_net_hf_pppo_e_ver (1)
|
||||
#define ioc_net_hf_pppo_e_type (ioc_net_hf_pppo_e_ver << 1)
|
||||
#define ioc_net_hf_pppo_e_code (ioc_net_hf_pppo_e_ver << 2)
|
||||
#define ioc_net_hf_pppo_e_sid (ioc_net_hf_pppo_e_ver << 3)
|
||||
#define ioc_net_hf_pppo_e_len (ioc_net_hf_pppo_e_ver << 4)
|
||||
#define ioc_net_hf_pppo_e_session (ioc_net_hf_pppo_e_ver << 5)
|
||||
#define ioc_net_hf_pppo_e_pid (ioc_net_hf_pppo_e_ver << 6)
|
||||
#define ioc_net_hf_pppo_e_all_fields ((ioc_net_hf_pppo_e_ver << 7) - 1)
|
||||
|
||||
#define IOC_NET_HF_PPPMUX_PID (1)
|
||||
#define IOC_NET_HF_PPPMUX_CKSUM (IOC_NET_HF_PPPMUX_PID << 1)
|
||||
#define IOC_NET_HF_PPPMUX_COMPRESSED (IOC_NET_HF_PPPMUX_PID << 2)
|
||||
#define IOC_NET_HF_PPPMUX_ALL_FIELDS ((IOC_NET_HF_PPPMUX_PID << 3) - 1)
|
||||
|
||||
#define IOC_NET_HF_PPPMUX_SUBFRAME_PFF (1)
|
||||
#define IOC_NET_HF_PPPMUX_SUBFRAME_LXT (IOC_NET_HF_PPPMUX_SUBFRAME_PFF << 1)
|
||||
#define IOC_NET_HF_PPPMUX_SUBFRAME_LEN (IOC_NET_HF_PPPMUX_SUBFRAME_PFF << 2)
|
||||
#define IOC_NET_HF_PPPMUX_SUBFRAME_PID (IOC_NET_HF_PPPMUX_SUBFRAME_PFF << 3)
|
||||
#define IOC_NET_HF_PPPMUX_SUBFRAME_USE_PID \
|
||||
(IOC_NET_HF_PPPMUX_SUBFRAME_PFF << 4)
|
||||
#define IOC_NET_HF_PPPMUX_SUBFRAME_ALL_FIELDS \
|
||||
((IOC_NET_HF_PPPMUX_SUBFRAME_PFF << 5) - 1)
|
||||
|
||||
typedef uint8_t ioc_header_field_eth_t;
|
||||
|
||||
#define IOC_NET_HF_ETH_DA (1)
|
||||
#define IOC_NET_HF_ETH_SA (IOC_NET_HF_ETH_DA << 1)
|
||||
#define IOC_NET_HF_ETH_LENGTH (IOC_NET_HF_ETH_DA << 2)
|
||||
#define IOC_NET_HF_ETH_TYPE (IOC_NET_HF_ETH_DA << 3)
|
||||
#define IOC_NET_HF_ETH_FINAL_CKSUM (IOC_NET_HF_ETH_DA << 4)
|
||||
#define IOC_NET_HF_ETH_PADDING (IOC_NET_HF_ETH_DA << 5)
|
||||
#define IOC_NET_HF_ETH_ALL_FIELDS ((IOC_NET_HF_ETH_DA << 6) - 1)
|
||||
|
||||
#define IOC_NET_HF_ETH_ADDR_SIZE 6
|
||||
|
||||
typedef uint16_t ioc_header_field_ip_t;
|
||||
|
||||
#define IOC_NET_HF_IP_VER (1)
|
||||
#define IOC_NET_HF_IP_DSCP (IOC_NET_HF_IP_VER << 2)
|
||||
#define IOC_NET_HF_IP_ECN (IOC_NET_HF_IP_VER << 3)
|
||||
#define IOC_NET_HF_IP_PROTO (IOC_NET_HF_IP_VER << 4)
|
||||
|
||||
#define IOC_NET_HF_IP_PROTO_SIZE 1
|
||||
|
||||
typedef uint16_t ioc_header_field_ipv4_t;
|
||||
|
||||
#define ioc_net_hf_ipv_4_ver (1)
|
||||
#define ioc_net_hf_ipv_4_hdr_len (ioc_net_hf_ipv_4_ver << 1)
|
||||
#define ioc_net_hf_ipv_4_tos (ioc_net_hf_ipv_4_ver << 2)
|
||||
#define ioc_net_hf_ipv_4_total_len (ioc_net_hf_ipv_4_ver << 3)
|
||||
#define ioc_net_hf_ipv_4_id (ioc_net_hf_ipv_4_ver << 4)
|
||||
#define ioc_net_hf_ipv_4_flag_d (ioc_net_hf_ipv_4_ver << 5)
|
||||
#define ioc_net_hf_ipv_4_flag_m (ioc_net_hf_ipv_4_ver << 6)
|
||||
#define ioc_net_hf_ipv_4_offset (ioc_net_hf_ipv_4_ver << 7)
|
||||
#define ioc_net_hf_ipv_4_ttl (ioc_net_hf_ipv_4_ver << 8)
|
||||
#define ioc_net_hf_ipv_4_proto (ioc_net_hf_ipv_4_ver << 9)
|
||||
#define ioc_net_hf_ipv_4_cksum (ioc_net_hf_ipv_4_ver << 10)
|
||||
#define ioc_net_hf_ipv_4_src_ip (ioc_net_hf_ipv_4_ver << 11)
|
||||
#define ioc_net_hf_ipv_4_dst_ip (ioc_net_hf_ipv_4_ver << 12)
|
||||
#define ioc_net_hf_ipv_4_opts (ioc_net_hf_ipv_4_ver << 13)
|
||||
#define ioc_net_hf_ipv_4_opts_COUNT (ioc_net_hf_ipv_4_ver << 14)
|
||||
#define ioc_net_hf_ipv_4_all_fields ((ioc_net_hf_ipv_4_ver << 15) - 1)
|
||||
|
||||
#define ioc_net_hf_ipv_4_addr_size 4
|
||||
#define ioc_net_hf_ipv_4_proto_SIZE 1
|
||||
|
||||
typedef uint8_t ioc_header_field_ipv6_t;
|
||||
|
||||
#define ioc_net_hf_ipv_6_ver (1)
|
||||
#define ioc_net_hf_ipv_6_tc (ioc_net_hf_ipv_6_ver << 1)
|
||||
#define ioc_net_hf_ipv_6_src_ip (ioc_net_hf_ipv_6_ver << 2)
|
||||
#define ioc_net_hf_ipv_6_dst_ip (ioc_net_hf_ipv_6_ver << 3)
|
||||
#define ioc_net_hf_ipv_6_next_hdr (ioc_net_hf_ipv_6_ver << 4)
|
||||
#define ioc_net_hf_ipv_6_fl (ioc_net_hf_ipv_6_ver << 5)
|
||||
#define ioc_net_hf_ipv_6_hop_limit (ioc_net_hf_ipv_6_ver << 6)
|
||||
#define ioc_net_hf_ipv_6_all_fields ((ioc_net_hf_ipv_6_ver << 7) - 1)
|
||||
|
||||
#define ioc_net_hf_ipv6_addr_size 16
|
||||
#define ioc_net_hf_ipv_6_next_hdr_SIZE 1
|
||||
|
||||
#define IOC_NET_HF_ICMP_TYPE (1)
|
||||
#define IOC_NET_HF_ICMP_CODE (IOC_NET_HF_ICMP_TYPE << 1)
|
||||
#define IOC_NET_HF_ICMP_CKSUM (IOC_NET_HF_ICMP_TYPE << 2)
|
||||
#define IOC_NET_HF_ICMP_ID (IOC_NET_HF_ICMP_TYPE << 3)
|
||||
#define IOC_NET_HF_ICMP_SQ_NUM (IOC_NET_HF_ICMP_TYPE << 4)
|
||||
#define IOC_NET_HF_ICMP_ALL_FIELDS ((IOC_NET_HF_ICMP_TYPE << 5) - 1)
|
||||
|
||||
#define IOC_NET_HF_ICMP_CODE_SIZE 1
|
||||
#define IOC_NET_HF_ICMP_TYPE_SIZE 1
|
||||
|
||||
#define IOC_NET_HF_IGMP_VERSION (1)
|
||||
#define IOC_NET_HF_IGMP_TYPE (IOC_NET_HF_IGMP_VERSION << 1)
|
||||
#define IOC_NET_HF_IGMP_CKSUM (IOC_NET_HF_IGMP_VERSION << 2)
|
||||
#define IOC_NET_HF_IGMP_DATA (IOC_NET_HF_IGMP_VERSION << 3)
|
||||
#define IOC_NET_HF_IGMP_ALL_FIELDS ((IOC_NET_HF_IGMP_VERSION << 4) - 1)
|
||||
|
||||
typedef uint16_t ioc_header_field_tcp_t;
|
||||
|
||||
#define IOC_NET_HF_TCP_PORT_SRC (1)
|
||||
#define IOC_NET_HF_TCP_PORT_DST (IOC_NET_HF_TCP_PORT_SRC << 1)
|
||||
#define IOC_NET_HF_TCP_SEQ (IOC_NET_HF_TCP_PORT_SRC << 2)
|
||||
#define IOC_NET_HF_TCP_ACK (IOC_NET_HF_TCP_PORT_SRC << 3)
|
||||
#define IOC_NET_HF_TCP_OFFSET (IOC_NET_HF_TCP_PORT_SRC << 4)
|
||||
#define IOC_NET_HF_TCP_FLAGS (IOC_NET_HF_TCP_PORT_SRC << 5)
|
||||
#define IOC_NET_HF_TCP_WINDOW (IOC_NET_HF_TCP_PORT_SRC << 6)
|
||||
#define IOC_NET_HF_TCP_CKSUM (IOC_NET_HF_TCP_PORT_SRC << 7)
|
||||
#define IOC_NET_HF_TCP_URGPTR (IOC_NET_HF_TCP_PORT_SRC << 8)
|
||||
#define IOC_NET_HF_TCP_OPTS (IOC_NET_HF_TCP_PORT_SRC << 9)
|
||||
#define IOC_NET_HF_TCP_OPTS_COUNT (IOC_NET_HF_TCP_PORT_SRC << 10)
|
||||
#define IOC_NET_HF_TCP_ALL_FIELDS ((IOC_NET_HF_TCP_PORT_SRC << 11) - 1)
|
||||
|
||||
#define IOC_NET_HF_TCP_PORT_SIZE 2
|
||||
|
||||
typedef uint8_t ioc_header_field_sctp_t;
|
||||
|
||||
#define IOC_NET_HF_SCTP_PORT_SRC (1)
|
||||
#define IOC_NET_HF_SCTP_PORT_DST (IOC_NET_HF_SCTP_PORT_SRC << 1)
|
||||
#define IOC_NET_HF_SCTP_VER_TAG (IOC_NET_HF_SCTP_PORT_SRC << 2)
|
||||
#define IOC_NET_HF_SCTP_CKSUM (IOC_NET_HF_SCTP_PORT_SRC << 3)
|
||||
#define IOC_NET_HF_SCTP_ALL_FIELDS ((IOC_NET_HF_SCTP_PORT_SRC << 4) - 1)
|
||||
|
||||
#define IOC_NET_HF_SCTP_PORT_SIZE 2
|
||||
|
||||
typedef uint8_t ioc_header_field_dccp_t;
|
||||
|
||||
#define IOC_NET_HF_DCCP_PORT_SRC (1)
|
||||
#define IOC_NET_HF_DCCP_PORT_DST (IOC_NET_HF_DCCP_PORT_SRC << 1)
|
||||
#define IOC_NET_HF_DCCP_ALL_FIELDS ((IOC_NET_HF_DCCP_PORT_SRC << 2) - 1)
|
||||
|
||||
#define IOC_NET_HF_DCCP_PORT_SIZE 2
|
||||
|
||||
typedef uint8_t ioc_header_field_udp_t;
|
||||
|
||||
#define IOC_NET_HF_UDP_PORT_SRC (1)
|
||||
#define IOC_NET_HF_UDP_PORT_DST (IOC_NET_HF_UDP_PORT_SRC << 1)
|
||||
#define IOC_NET_HF_UDP_LEN (IOC_NET_HF_UDP_PORT_SRC << 2)
|
||||
#define IOC_NET_HF_UDP_CKSUM (IOC_NET_HF_UDP_PORT_SRC << 3)
|
||||
#define IOC_NET_HF_UDP_ALL_FIELDS ((IOC_NET_HF_UDP_PORT_SRC << 4) - 1)
|
||||
|
||||
#define IOC_NET_HF_UDP_PORT_SIZE 2
|
||||
|
||||
typedef uint8_t ioc_header_field_udp_lite_t;
|
||||
|
||||
#define IOC_NET_HF_UDP_LITE_PORT_SRC (1)
|
||||
#define IOC_NET_HF_UDP_LITE_PORT_DST (IOC_NET_HF_UDP_LITE_PORT_SRC << 1)
|
||||
#define IOC_NET_HF_UDP_LITE_ALL_FIELDS \
|
||||
((IOC_NET_HF_UDP_LITE_PORT_SRC << 2) - 1)
|
||||
|
||||
#define IOC_NET_HF_UDP_LITE_PORT_SIZE 2
|
||||
|
||||
typedef uint8_t ioc_header_field_udp_encap_esp_t;
|
||||
|
||||
#define IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC (1)
|
||||
#define IOC_NET_HF_UDP_ENCAP_ESP_PORT_DST \
|
||||
(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 1)
|
||||
#define IOC_NET_HF_UDP_ENCAP_ESP_LEN \
|
||||
(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 2)
|
||||
#define IOC_NET_HF_UDP_ENCAP_ESP_CKSUM \
|
||||
(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 3)
|
||||
#define IOC_NET_HF_UDP_ENCAP_ESP_SPI \
|
||||
(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 4)
|
||||
#define IOC_NET_HF_UDP_ENCAP_ESP_SEQUENCE_NUM \
|
||||
(IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 5)
|
||||
#define IOC_NET_HF_UDP_ENCAP_ESP_ALL_FIELDS \
|
||||
((IOC_NET_HF_UDP_ENCAP_ESP_PORT_SRC << 6) - 1)
|
||||
|
||||
#define IOC_NET_HF_UDP_ENCAP_ESP_PORT_SIZE 2
|
||||
#define IOC_NET_HF_UDP_ENCAP_ESP_SPI_SIZE 4
|
||||
|
||||
#define IOC_NET_HF_IPHC_CID (1)
|
||||
#define IOC_NET_HF_IPHC_CID_TYPE (IOC_NET_HF_IPHC_CID << 1)
|
||||
#define IOC_NET_HF_IPHC_HCINDEX (IOC_NET_HF_IPHC_CID << 2)
|
||||
#define IOC_NET_HF_IPHC_GEN (IOC_NET_HF_IPHC_CID << 3)
|
||||
#define IOC_NET_HF_IPHC_D_BIT (IOC_NET_HF_IPHC_CID << 4)
|
||||
#define IOC_NET_HF_IPHC_ALL_FIELDS ((IOC_NET_HF_IPHC_CID << 5) - 1)
|
||||
|
||||
#define IOC_NET_HF_SCTP_CHUNK_DATA_TYPE (1)
|
||||
#define IOC_NET_HF_SCTP_CHUNK_DATA_FLAGS \
|
||||
(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 1)
|
||||
#define IOC_NET_HF_SCTP_CHUNK_DATA_LENGTH \
|
||||
(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 2)
|
||||
#define IOC_NET_HF_SCTP_CHUNK_DATA_TSN \
|
||||
(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 3)
|
||||
#define IOC_NET_HF_SCTP_CHUNK_DATA_STREAM_ID \
|
||||
(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 4)
|
||||
#define IOC_NET_HF_SCTP_CHUNK_DATA_STREAM_SQN \
|
||||
(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 5)
|
||||
#define IOC_NET_HF_SCTP_CHUNK_DATA_PAYLOAD_PID \
|
||||
(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 6)
|
||||
#define IOC_NET_HF_SCTP_CHUNK_DATA_UNORDERED \
|
||||
(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 7)
|
||||
#define IOC_NET_HF_SCTP_CHUNK_DATA_BEGINNING \
|
||||
(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 8)
|
||||
#define IOC_NET_HF_SCTP_CHUNK_DATA_END \
|
||||
(IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 9)
|
||||
#define IOC_NET_HF_SCTP_CHUNK_DATA_ALL_FIELDS \
|
||||
((IOC_NET_HF_SCTP_CHUNK_DATA_TYPE << 10) - 1)
|
||||
|
||||
#define ioc_net_hf_l2tpv_2_type_bit (1)
|
||||
#define ioc_net_hf_l2tpv_2_length_bit (ioc_net_hf_l2tpv_2_type_bit << 1)
|
||||
#define ioc_net_hf_l2tpv_2_sequence_bit (ioc_net_hf_l2tpv_2_type_bit << 2)
|
||||
#define ioc_net_hf_l2tpv_2_offset_bit (ioc_net_hf_l2tpv_2_type_bit << 3)
|
||||
#define ioc_net_hf_l2tpv_2_priority_bit (ioc_net_hf_l2tpv_2_type_bit << 4)
|
||||
#define ioc_net_hf_l2tpv_2_version (ioc_net_hf_l2tpv_2_type_bit << 5)
|
||||
#define ioc_net_hf_l2tpv_2_len (ioc_net_hf_l2tpv_2_type_bit << 6)
|
||||
#define ioc_net_hf_l2tpv_2_tunnel_id (ioc_net_hf_l2tpv_2_type_bit << 7)
|
||||
#define ioc_net_hf_l2tpv_2_session_id (ioc_net_hf_l2tpv_2_type_bit << 8)
|
||||
#define ioc_net_hf_l2tpv_2_ns (ioc_net_hf_l2tpv_2_type_bit << 9)
|
||||
#define ioc_net_hf_l2tpv_2_nr (ioc_net_hf_l2tpv_2_type_bit << 10)
|
||||
#define ioc_net_hf_l2tpv_2_offset_size (ioc_net_hf_l2tpv_2_type_bit << 11)
|
||||
#define ioc_net_hf_l2tpv_2_first_byte (ioc_net_hf_l2tpv_2_type_bit << 12)
|
||||
#define ioc_net_hf_l2tpv_2_all_fields \
|
||||
((ioc_net_hf_l2tpv_2_type_bit << 13) - 1)
|
||||
|
||||
#define ioc_net_hf_l2tpv_3_ctrl_type_bit (1)
|
||||
#define ioc_net_hf_l2tpv_3_ctrl_length_bit \
|
||||
(ioc_net_hf_l2tpv_3_ctrl_type_bit << 1)
|
||||
#define ioc_net_hf_l2tpv_3_ctrl_sequence_bit \
|
||||
(ioc_net_hf_l2tpv_3_ctrl_type_bit << 2)
|
||||
#define ioc_net_hf_l2tpv_3_ctrl_version (ioc_net_hf_l2tpv_3_ctrl_type_bit << 3)
|
||||
#define ioc_net_hf_l2tpv_3_ctrl_length (ioc_net_hf_l2tpv_3_ctrl_type_bit << 4)
|
||||
#define ioc_net_hf_l2tpv_3_ctrl_control (ioc_net_hf_l2tpv_3_ctrl_type_bit << 5)
|
||||
#define ioc_net_hf_l2tpv_3_ctrl_sent (ioc_net_hf_l2tpv_3_ctrl_type_bit << 6)
|
||||
#define ioc_net_hf_l2tpv_3_ctrl_recv (ioc_net_hf_l2tpv_3_ctrl_type_bit << 7)
|
||||
#define ioc_net_hf_l2tpv_3_ctrl_first_byte \
|
||||
(ioc_net_hf_l2tpv_3_ctrl_type_bit << 8)
|
||||
#define ioc_net_hf_l2tpv_3_ctrl_all_fields \
|
||||
((ioc_net_hf_l2tpv_3_ctrl_type_bit << 9) - 1)
|
||||
|
||||
#define ioc_net_hf_l2tpv_3_sess_type_bit (1)
|
||||
#define ioc_net_hf_l2tpv_3_sess_version (ioc_net_hf_l2tpv_3_sess_type_bit << 1)
|
||||
#define ioc_net_hf_l2tpv_3_sess_id (ioc_net_hf_l2tpv_3_sess_type_bit << 2)
|
||||
#define ioc_net_hf_l2tpv_3_sess_cookie (ioc_net_hf_l2tpv_3_sess_type_bit << 3)
|
||||
#define ioc_net_hf_l2tpv_3_sess_all_fields \
|
||||
((ioc_net_hf_l2tpv_3_sess_type_bit << 4) - 1)
|
||||
|
||||
typedef uint8_t ioc_header_field_vlan_t;
|
||||
|
||||
#define IOC_NET_HF_VLAN_VPRI (1)
|
||||
#define IOC_NET_HF_VLAN_CFI (IOC_NET_HF_VLAN_VPRI << 1)
|
||||
#define IOC_NET_HF_VLAN_VID (IOC_NET_HF_VLAN_VPRI << 2)
|
||||
#define IOC_NET_HF_VLAN_LENGTH (IOC_NET_HF_VLAN_VPRI << 3)
|
||||
#define IOC_NET_HF_VLAN_TYPE (IOC_NET_HF_VLAN_VPRI << 4)
|
||||
#define IOC_NET_HF_VLAN_ALL_FIELDS ((IOC_NET_HF_VLAN_VPRI << 5) - 1)
|
||||
|
||||
#define IOC_NET_HF_VLAN_TCI (IOC_NET_HF_VLAN_VPRI | \
|
||||
IOC_NET_HF_VLAN_CFI | \
|
||||
IOC_NET_HF_VLAN_VID)
|
||||
|
||||
typedef uint8_t ioc_header_field_llc_t;
|
||||
|
||||
#define IOC_NET_HF_LLC_DSAP (1)
|
||||
#define IOC_NET_HF_LLC_SSAP (IOC_NET_HF_LLC_DSAP << 1)
|
||||
#define IOC_NET_HF_LLC_CTRL (IOC_NET_HF_LLC_DSAP << 2)
|
||||
#define IOC_NET_HF_LLC_ALL_FIELDS ((IOC_NET_HF_LLC_DSAP << 3) - 1)
|
||||
|
||||
#define IOC_NET_HF_NLPID_NLPID (1)
|
||||
#define IOC_NET_HF_NLPID_ALL_FIELDS ((IOC_NET_HF_NLPID_NLPID << 1) - 1)
|
||||
|
||||
typedef uint8_t ioc_header_field_snap_t;
|
||||
|
||||
#define IOC_NET_HF_SNAP_OUI (1)
|
||||
#define IOC_NET_HF_SNAP_PID (IOC_NET_HF_SNAP_OUI << 1)
|
||||
#define IOC_NET_HF_SNAP_ALL_FIELDS ((IOC_NET_HF_SNAP_OUI << 2) - 1)
|
||||
|
||||
typedef uint8_t ioc_header_field_llc_snap_t;
|
||||
|
||||
#define IOC_NET_HF_LLC_SNAP_TYPE (1)
|
||||
#define IOC_NET_HF_LLC_SNAP_ALL_FIELDS ((IOC_NET_HF_LLC_SNAP_TYPE << 1) - 1)
|
||||
|
||||
#define IOC_NET_HF_ARP_HTYPE (1)
|
||||
#define IOC_NET_HF_ARP_PTYPE (IOC_NET_HF_ARP_HTYPE << 1)
|
||||
#define IOC_NET_HF_ARP_HLEN (IOC_NET_HF_ARP_HTYPE << 2)
|
||||
#define IOC_NET_HF_ARP_PLEN (IOC_NET_HF_ARP_HTYPE << 3)
|
||||
#define IOC_NET_HF_ARP_OPER (IOC_NET_HF_ARP_HTYPE << 4)
|
||||
#define IOC_NET_HF_ARP_SHA (IOC_NET_HF_ARP_HTYPE << 5)
|
||||
#define IOC_NET_HF_ARP_SPA (IOC_NET_HF_ARP_HTYPE << 6)
|
||||
#define IOC_NET_HF_ARP_TH (IOC_NET_HF_ARP_HTYPE << 7)
|
||||
#define IOC_NET_HF_ARP_TPA (IOC_NET_HF_ARP_HTYPE << 8)
|
||||
#define IOC_NET_HF_ARP_ALL_FIELDS ((IOC_NET_HF_ARP_HTYPE << 9) - 1)
|
||||
|
||||
#define IOC_NET_HF_RFC2684_LLC (1)
|
||||
#define IOC_NET_HF_RFC2684_NLPID (IOC_NET_HF_RFC2684_LLC << 1)
|
||||
#define IOC_NET_HF_RFC2684_OUI (IOC_NET_HF_RFC2684_LLC << 2)
|
||||
#define IOC_NET_HF_RFC2684_PID (IOC_NET_HF_RFC2684_LLC << 3)
|
||||
#define IOC_NET_HF_RFC2684_VPN_OUI (IOC_NET_HF_RFC2684_LLC << 4)
|
||||
#define IOC_NET_HF_RFC2684_VPN_IDX (IOC_NET_HF_RFC2684_LLC << 5)
|
||||
#define IOC_NET_HF_RFC2684_ALL_FIELDS ((IOC_NET_HF_RFC2684_LLC << 6) - 1)
|
||||
|
||||
#define IOC_NET_HF_USER_DEFINED_SRCPORT (1)
|
||||
#define IOC_NET_HF_USER_DEFINED_PCDID (IOC_NET_HF_USER_DEFINED_SRCPORT << 1)
|
||||
#define IOC_NET_HF_USER_DEFINED_ALL_FIELDS \
|
||||
((IOC_NET_HF_USER_DEFINED_SRCPORT << 2) - 1)
|
||||
|
||||
#define IOC_NET_HF_PAYLOAD_BUFFER (1)
|
||||
#define IOC_NET_HF_PAYLOAD_SIZE (IOC_NET_HF_PAYLOAD_BUFFER << 1)
|
||||
#define IOC_NET_HF_MAX_FRM_SIZE (IOC_NET_HF_PAYLOAD_BUFFER << 2)
|
||||
#define IOC_NET_HF_MIN_FRM_SIZE (IOC_NET_HF_PAYLOAD_BUFFER << 3)
|
||||
#define IOC_NET_HF_PAYLOAD_TYPE (IOC_NET_HF_PAYLOAD_BUFFER << 4)
|
||||
#define IOC_NET_HF_FRAME_SIZE (IOC_NET_HF_PAYLOAD_BUFFER << 5)
|
||||
#define IOC_NET_HF_PAYLOAD_ALL_FIELDS ((IOC_NET_HF_PAYLOAD_BUFFER << 6) - 1)
|
||||
|
||||
typedef uint8_t ioc_header_field_gre_t;
|
||||
|
||||
#define IOC_NET_HF_GRE_TYPE (1)
|
||||
#define IOC_NET_HF_GRE_ALL_FIELDS ((IOC_NET_HF_GRE_TYPE << 1) - 1)
|
||||
|
||||
typedef uint8_t ioc_header_field_minencap_t;
|
||||
|
||||
#define IOC_NET_HF_MINENCAP_SRC_IP (1)
|
||||
#define IOC_NET_HF_MINENCAP_DST_IP (IOC_NET_HF_MINENCAP_SRC_IP << 1)
|
||||
#define IOC_NET_HF_MINENCAP_TYPE (IOC_NET_HF_MINENCAP_SRC_IP << 2)
|
||||
#define IOC_NET_HF_MINENCAP_ALL_FIELDS ((IOC_NET_HF_MINENCAP_SRC_IP << 3) - 1)
|
||||
|
||||
typedef uint8_t ioc_header_field_ipsec_ah_t;
|
||||
|
||||
#define IOC_NET_HF_IPSEC_AH_SPI (1)
|
||||
#define IOC_NET_HF_IPSEC_AH_NH (IOC_NET_HF_IPSEC_AH_SPI << 1)
|
||||
#define IOC_NET_HF_IPSEC_AH_ALL_FIELDS ((IOC_NET_HF_IPSEC_AH_SPI << 2) - 1)
|
||||
|
||||
typedef uint8_t ioc_header_field_ipsec_esp_t;
|
||||
|
||||
#define IOC_NET_HF_IPSEC_ESP_SPI (1)
|
||||
#define IOC_NET_HF_IPSEC_ESP_SEQUENCE_NUM (IOC_NET_HF_IPSEC_ESP_SPI << 1)
|
||||
#define IOC_NET_HF_IPSEC_ESP_ALL_FIELDS ((IOC_NET_HF_IPSEC_ESP_SPI << 2) - 1)
|
||||
|
||||
#define IOC_NET_HF_IPSEC_ESP_SPI_SIZE 4
|
||||
|
||||
|
||||
typedef uint8_t ioc_header_field_mpls_t;
|
||||
|
||||
#define IOC_NET_HF_MPLS_LABEL_STACK (1)
|
||||
#define IOC_NET_HF_MPLS_LABEL_STACK_ALL_FIELDS \
|
||||
((IOC_NET_HF_MPLS_LABEL_STACK << 1) - 1)
|
||||
|
||||
typedef uint8_t ioc_header_field_macsec_t;
|
||||
|
||||
#define IOC_NET_HF_MACSEC_SECTAG (1)
|
||||
#define IOC_NET_HF_MACSEC_ALL_FIELDS ((IOC_NET_HF_MACSEC_SECTAG << 1) - 1)
|
||||
|
||||
typedef enum {
|
||||
HEADER_TYPE_NONE = 0,
|
||||
HEADER_TYPE_PAYLOAD,
|
||||
HEADER_TYPE_ETH,
|
||||
HEADER_TYPE_VLAN,
|
||||
HEADER_TYPE_IPV4,
|
||||
HEADER_TYPE_IPV6,
|
||||
HEADER_TYPE_IP,
|
||||
HEADER_TYPE_TCP,
|
||||
HEADER_TYPE_UDP,
|
||||
HEADER_TYPE_UDP_LITE,
|
||||
HEADER_TYPE_IPHC,
|
||||
HEADER_TYPE_SCTP,
|
||||
HEADER_TYPE_SCTP_CHUNK_DATA,
|
||||
HEADER_TYPE_PPPOE,
|
||||
HEADER_TYPE_PPP,
|
||||
HEADER_TYPE_PPPMUX,
|
||||
HEADER_TYPE_PPPMUX_SUBFRAME,
|
||||
HEADER_TYPE_L2TPV2,
|
||||
HEADER_TYPE_L2TPV3_CTRL,
|
||||
HEADER_TYPE_L2TPV3_SESS,
|
||||
HEADER_TYPE_LLC,
|
||||
HEADER_TYPE_LLC_SNAP,
|
||||
HEADER_TYPE_NLPID,
|
||||
HEADER_TYPE_SNAP,
|
||||
HEADER_TYPE_MPLS,
|
||||
HEADER_TYPE_IPSEC_AH,
|
||||
HEADER_TYPE_IPSEC_ESP,
|
||||
HEADER_TYPE_UDP_ENCAP_ESP, /* RFC 3948 */
|
||||
HEADER_TYPE_MACSEC,
|
||||
HEADER_TYPE_GRE,
|
||||
HEADER_TYPE_MINENCAP,
|
||||
HEADER_TYPE_DCCP,
|
||||
HEADER_TYPE_ICMP,
|
||||
HEADER_TYPE_IGMP,
|
||||
HEADER_TYPE_ARP,
|
||||
HEADER_TYPE_CAPWAP,
|
||||
HEADER_TYPE_CAPWAP_DTLS,
|
||||
HEADER_TYPE_RFC2684,
|
||||
HEADER_TYPE_USER_DEFINED_L2,
|
||||
HEADER_TYPE_USER_DEFINED_L3,
|
||||
HEADER_TYPE_USER_DEFINED_L4,
|
||||
HEADER_TYPE_USER_DEFINED_SHIM1,
|
||||
HEADER_TYPE_USER_DEFINED_SHIM2,
|
||||
MAX_HEADER_TYPE_COUNT
|
||||
} ioc_net_header_type;
|
||||
|
||||
#endif /* __NET_EXT_H */
|
@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
# Copyright 2018 NXP
|
||||
# Copyright 2018-2020 NXP
|
||||
|
||||
if not is_linux
|
||||
build = false
|
||||
@ -8,6 +8,7 @@ endif
|
||||
deps += ['mempool_dpaa']
|
||||
|
||||
sources = files('dpaa_ethdev.c',
|
||||
'fmlib/fm_lib.c',
|
||||
'dpaa_rxtx.c')
|
||||
|
||||
if cc.has_argument('-Wno-pointer-arith')
|
||||
|
Loading…
x
Reference in New Issue
Block a user