Data Structures | Defines | Typedefs | Functions
pa.h File Reference

Packet Accelerator (PA) sub-system LLD API and Data Definitions. More...

#include <stdint.h>
#include <stdlib.h>
#include <ti/drv/pa/paver.h>

Data Structures

union  paIpAddr_t
 IP address specification. More...
union  paEntryHandle_t
 A generic entry handle types. More...
struct  paStartCfg_t
 PA start configuration structure. More...
struct  pa_ReassemblyFlow_t
 PA Ip traffic flow information structure. More...
struct  pa_trafficFlow_t
 PA Ip Reassembly control context snap shot Information Structure. More...
struct  paSnapShotDebugInfo_t
 PA Debug Information Structure. More...
struct  paSizeInfo_t
 PA Size Configuration Structure. More...
struct  paRaConfig_t
 PA Reassembly Engine global config structure. More...
struct  paConfig_t
 PA Initialization config structure. More...
struct  paProtocolLimit_t
 Protocol-specific Limitations. More...
struct  paIpReassmConfig_t
 IP Reassembly Configuration Information. More...
struct  paCmdSetConfig_t
 Command Set Configuration Information. More...
struct  paUsrStatsConfig_t
 User-defined Statistics Configuration Information. More...
struct  paQueueDivertConfig_t
 Queue Diversion Configuration Information. More...
struct  paPacketControlConfig_t
 Packet Control Configuration Information. More...
struct  paPacketControl2Config_t
 Packet Control Configuration2 Information. More...
struct  paAclConfig_t
 Stateless ACL Configuration Information. More...
struct  paRaERouteInfo_t
 RA exception Route Information. More...
struct  paRaGroupConfig_t
 PA Reassembly Engine Group Configuration Information. More...
struct  paSysConfig_t
 PA System Configuration Information structure. More...
struct  pa802p1agDetConfig_t
 802.1ag Detection Configuration Information. More...
struct  paIpsecNatTConfig_t
 IPSEC NAT-T Packet Detection Configuration Information. More...
struct  paGtpuConfig_t
 GTP-U Configuration Information. More...
struct  paCmdReply_t
 paCmdReply_t is used to specify command result (from PASS) routing information More...
struct  paCmdNextRoute_t
 Next Route Command. More...
struct  paCmdCrcOp_t
 CRC Generation/Verification Command. More...
struct  paCmdSplitOp_t
 Split Command. More...
struct  paTxChksum_t
 Transmit checksum configuration. More...
struct  paCmdCopy_t
 Copy Command. More...
struct  paCmdMultiRoute_t
 Multi-route Command. More...
struct  paCmdSet_t
 Command Set Command. More...
struct  paPatchInfo_t
 Packet patching configuration. More...
struct  paPayloadInfo_t
 paPayloadInfo_t defines the packet payload information in the short format. It is required by the Security Accelerator sub-system (SASS) More...
struct  paCmdTxTimestamp_t
 Tx timestamp reporting information. More...
struct  paCmdIpFrag_t
 IP fragmentation information. More...
struct  paPatchMsgLenInfo_t
 Message length patching configuration. More...
struct  paCmdUsrStats_t
 User-defined Statistics Command. More...
struct  paCmdSetUsrStats_t
 Command Set plus User-defined Statistics Command. More...
struct  paCmdVerifyPktErr_t
 Verify Packet Error Command. More...
struct  paCmdEfOp_t
 Egress Flow Operation Command. More...
struct  paCmdInfo_t
 PA Command Information structure. More...
struct  paIpInfo_t
 IP lookup information. More...
struct  paIpInfo2_t
 Enhanced IP lookup information. More...
struct  paEthInfo_t
 MAC/Ethernet lookup information. More...
struct  paEthInfo2_t
 Enhanced MAC/Ethernet lookup information. More...
struct  paAclInfo_t
 ACL lookup information. More...
struct  paSrioType11Info_s
 SRIO Type11 header information. More...
struct  paSrioType9Info_s
 SRIO Type9 header information. More...
union  paSrioTypeInfo_t
 Srio message type specific header information. More...
struct  paSrioInfo_t
 SRIO lookup information. More...
struct  paRouteInfo_t
 Packet routing configuration. More...
struct  paEfOpInfo_t
 Egress Flow operation information. More...
struct  paRouteInfo2_t
 Enhanced Packet routing configuration. More...
struct  paPortMirrorConfig_t
 PA Interface based Port Mirror Configuration Information. More...
struct  paPktCaptureConfig_t
 PA Interface based Packet Capture Configuration Information. More...
struct  paDefRouteConfig_t
 PA Interface based Ingress default routing information. More...
struct  paRouteOffset_t
 Enhanced QoS Mode Route offset information. This is per dscp or priority bits. More...
struct  paEQosModeConfig_t
 PA Interfcae based Enhanced QoS mode information. More...
struct  paEmacPortConfig_t
 PA emac port configuration information. More...
struct  paCtrlInfo_t
 PA Control Information structure. More...
struct  paMultiRouteEntry_t
 Packet Multi-route entry configuration. More...
struct  paCrcConfig_t
 CRC Engine configuration. More...
struct  paTimestampConfig_t
 Timestamp configuration. More...
struct  paUsrStatsCounterEntryConfig_t
 User-defined statistics counter entry configuration information. More...
struct  paUsrStatsCounterConfig_t
 User-defined statistics counter configuration information. More...
struct  paUsrStatsConfigInfo_t
 User-defined statistics configuration information. More...
struct  paUsrStatsAlloc_t
 User-defined statistics Allocation information. More...
struct  paClassify1Stats_s
 PA Classify1 Statistics Structure. More...
struct  paClassify2Stats_s
 PA Classify2 Statistics Structure. More...
struct  paModifyStats_s
 PA Modifier Statistics Structure. More...
struct  paCommonStats_s
 PA Common Statistics Structure. More...
struct  paSysStats_s
 PA System Statistics Structure. More...
struct  paUsrStats_s
 PA User-defined Statistics Structure. More...
struct  paRaGroupStats_s
 PA Reassembly Group Statistics Structure. More...
struct  paRaStats_s
 PA RA Statistics Structure. More...
struct  paAclStats_s
 PA ACL Entry Statistics Structure. More...
struct  paTimestamp_t
 PA Timestamp Structure. More...
struct  paParamDesc
 PA API parameters structure. More...
struct  paLut2ParamDesc
 PA LUT2 API parameters structure. More...

Defines

#define pa_PARAMS_NOT_SPECIFIED   0xFFFF
#define pa_LUT_INST_NOT_SPECIFIED   -1
#define pa_LUT1_INDEX_NOT_SPECIFIED   -1
#define pa_MAX_NUM_LUT1_ENTRIES   pa_MAX_NUM_LUT1_ENTRIES_GEN1
#define pa_MAC_ADDR_SIZE   6
 MAC address specification.
#define pa_IPV4_ADDR_SIZE   4
 IPv4 address specification.
#define pa_IPV6_ADDR_SIZE   16
 IPv6 address specificiation.
#define PA_LLD_HANDLE_IP_INNER   ((paHandleL2L3_t)1)
 The un-linked inner IP handle.
#define pa_MAX_IP_REASM_TRAFFIC_FLOWS   32
 Define the maximum number of IP reassembly traffic flows.
#define pa_USR_STATS_MAX_COUNTERS   512
 Define the maximum number of user-defined statistics the module supports.
#define pa_USR_STATS_MAX_64B_COUNTERS   (pa_USR_STATS_MAX_COUNTERS/2)
 Define the maximum number of user-defined 64-bit statistics.
#define pa_USR_STATS_MAX_32B_COUNTERS   pa_USR_STATS_MAX_COUNTERS
 Define the maximum number of user-defined 32-bit statistics.
#define pa_RA_CTRL_USE_LOCAL_DMA   0x0002
#define pa_RA_CTRL_TO_QUEUE   0x0004
#define pa_N_BUFS_GEN1   5
 Define the maximum number of buffers the module can request.
#define pa_MAX_CUSTOM_TYPES_LUT1   4
 The maximum number of LUT1 Custom Types supported.
#define pa_MAX_CUSTOM_TYPES_LUT2   16
 The maximum number of LUT2 Custom Types supported.
#define pa_MAX_CMD_SETS   64
#define pa_MAX_PATCH_BYTES   16
#define pa_MAX_RX_PATCH_BYTES   32
#define pa_NO_MULTI_ROUTE   -1
#define pa_MAX_MULTI_ROUTE_SETS   32
#define pa_MAX_MULTI_ROUTE_ENTRIES   8
#define pa_MAX_NUM_EMAC_PORT_CONFIG_ENTRIES   5
#define pa_USR_STATS_LNK_END   0xFFFF
PALLD Function Return Codes

Error codes returned by PALLD API functions.

#define pa_OK   0
#define pa_ERR_CONFIG   -10
#define pa_INSUFFICIENT_CMD_BUFFER_SIZE   -11
#define pa_INVALID_CMD_REPLY_DEST   -12
#define pa_DUP_ENTRY   -13
#define pa_INVALID_DUP_ENTRY   -14
#define pa_INVALID_TABLE_MORE_SPECIFIC_ENTRY_PRESENT   -15
#define pa_INVALID_MPLS_LABEL   -16
#define pa_HANDLE_TABLE_FULL   -17
#define pa_INVALID_INPUT_HANDLE   -18
#define pa_HANDLE_INACTIVE   -19
#define pa_INVALID_IP_FLOW   -20
#define pa_WARN_ACTIVE_HANDLE_ACKED   -21
#define pa_LUT_ENTRY_FAILED   -22
#define pa_RESUBMIT_COMMAND   -23
#define pa_SYSTEM_STATE_INVALID   -24
#define pa_INVALID_LUT1_INDEX   -25
#define pa_WARN_LNK_CNT_UNSYNC   -26
#define pa_CMDSET_TOO_BIG   -27
#define pa_INVALID_LUT_INST   -28
#define pa_RESOURCE_INIT_DENIED   -29
#define pa_RESOURCE_USE_DENIED   -30
#define pa_RESOURCE_FREE_DENIED   -31
#define pa_FIRMWARE_REVISION_DIFFERENCE   -32
#define pa_VIRTUAL_LINK_TABLE_FULL   -33
#define pa_INVALID_DUP_ACL_ENTRY   -34
#define pa_INVALID_ACL_ACTION   -35
#define pa_INVALID_EF_REC_INDEX   -36
#define pa_EF_REC_CONFIG_ERR   -37
#define pa_PENDING_FC_ENTRY   -38
#define pa_API_UNSUPPORTED   -39
Command buffer minimum sizes

Define command buffer minimum size requirements.

#define pa_ADD_LUT1_MIN_CMD_BUF_SIZE_BYTES   124
#define pa_ADD_MAC_MIN_CMD_BUF_SIZE_BYTES   pa_ADD_LUT1_MIN_CMD_BUF_SIZE_BYTES
#define pa_DEL_HANDLE_MIN_CMD_BUF_SIZE_BYTES   32
#define pa_DEL_L4_HANDLE_MIN_CMD_BUF_SIZE_BYTES   28
#define pa_ADD_IP_MIN_CMD_BUF_SIZE_BYTES   240
#define pa_ADD_LUT2_MIN_CMD_BUF_SIZE_BYTES   48
#define pa_ADD_PORT_MIN_CMD_BUF_SIZE_BYTES   pa_ADD_LUT2_MIN_CMD_BUF_SIZE_BYTES
#define pa_CONFIG_EXCEPTION_ROUTE_MIN_CMD_BUF_SIZE_BYTES   520
#define pa_CONFIG_CRC_ENGINE_MIN_CMD_BUF_SIZE_BYTES   88
#define pa_CONFIG_MULTI_ROUTE_MIN_CMD_BUF_SIZE_BYTES   84
#define pa_SET_CUSTOM_LUT1_MIN_CMD_BUF_SIZE_BYTES   60
#define pa_SET_CUSTOM_LUT2_MIN_CMD_BUF_SIZE_BYTES   36
#define pa_CONFIG_CMD_SET_MIN_CMD_BUF_SIZE_BYTES   144
#define pa_REQUEST_STATS_MIN_CMD_BUF_SIZE_BYTES   24
#define pa_CONFIG_USR_STATS_MIN_CMD_BUF_SIZE_BYTES   2068
#define pa_GLOBAL_CONFIG_MIN_CMD_BUF_SIZE_BYTES   72
#define pa_802_1ag_DET_MIN_CMD_BUF_SIZE_BYTES   24
#define pa_IPSEC_NAT_T_DET_MIN_CMD_BUF_SIZE_BYTES   24
#define pa_GTPU_CONFIG_MIN_CMD_BUF_SIZE_BYTES   24
#define pa_EMAC_PORT_CONFIG_MIN_CMD_BUF_SIZE_BYTES   632
#define pa_MAX_CMD_BUF_SIZE_BYTES   2068
IP Values

Defines the IP version type used.

The packet accelerator module parses both IPv4 and IPv6 network layer headers (see netlayers). This group is used to distinguish which type of header will be used.

#define pa_IPV4   4
#define pa_IPV6   6
#define pa_NUM_BYTES_CUSTOM_LUT1   32
 The number of bytes available for custom lookup.
Handle Types

These values are used to describe what type of handle is referenced.

These values are used only for function Pa_forwardResult. The function returns with a copy of the handle, which the module user should already have, along with the type of handle. The module user can use this information to verify that a particular handle has been fully activated and can be used for linking reference in calls to Pa_addIp, Pa_addCustomLUT1, Pa_addCustomLUT2, Pa_addPort or Pa_addAcl.

#define pa_L2_HANDLE   2
#define pa_L3_HANDLE   3
#define pa_L4_HANDLE   4
#define pa_ACL_HANDLE   10
#define pa_FC_HANDLE   11
#define pa_INVALID_HANDLE   -1
Exception Route Types

These values are used to define exception route conditions.

The exception route defines the global routing information when the exception condition such as LUT1 lookup failure, packet parsing failure, broadcast packet detection and etc. Multiple exception routes can be configured through Pa_configExceptionRoute. All the exception routes are disabled by default.

#define pa_EROUTE_L2L3_FAIL   0
#define pa_EROUTE_VLAN_MAX_DEPTH   1
#define pa_EROUTE_IP_MAX_DEPTH   2
#define pa_EROUTE_MPLS_MAX_DEPTH   3
#define pa_EROUTE_GRE_MAX_DEPTH   4
#define pa_EROUTE_PARSE_FAIL   5
#define pa_EROUTE_L4_FAIL   6
#define pa_EROUTE_IP_FRAG   7
#define pa_EROUTE_IPV6_OPT_FAIL   8
#define pa_EROUTE_UDP_LITE_FAIL   9
#define pa_EROUTE_ROUTE_OPTION   10
#define pa_EROUTE_SYSTEM_FAIL   11
#define pa_EROUTE_MAC_BROADCAST   12
#define pa_EROUTE_MAC_MULTICAST   13
#define pa_EROUTE_IP_BROADCAST   14
#define pa_EROUTE_IP_MULTICAST   15
#define pa_EROUTE_GTPU_MESSAGE_TYPE_1   16
#define pa_EROUTE_GTPU_MESSAGE_TYPE_2   17
#define pa_EROUTE_GTPU_MESSAGE_TYPE_26   18
#define pa_EROUTE_GTPU_MESSAGE_TYPE_31   19
#define pa_EROUTE_GTPU_MESSAGE_TYPE_254   20
#define pa_EROUTE_GTPU_FAIL   21
#define pa_EROUTE_PPPoE_FAIL   22
#define pa_EROUTE_PPPoE_CTRL   23
#define pa_EROUTE_802_1ag   24
#define pa_EROUTE_IP_FAIL   25
#define pa_EROUTE_NAT_T_KEEPALIVE   26
#define pa_EROUTE_NAT_T_CTRL   27
#define pa_EROUTE_NAT_T_DATA   28
#define pa_EROUTE_NAT_T_FAIL   29
#define pa_EROUTE_GTPU_MATCH_FAIL   30
#define pa_EROUTE_MAX   31
Next Header types

These values are used to define the next header (protocol) types for continus parsing after the SRIO and custom parsing.

The next header type can be derived from the upper layer header in a standard Ethernet packet. For SRIO and custom LUT1 lookup, the next header type should be provided by the user in function Pa_setCustomLUT1 and Pa_addSrio.

#define pa_HDR_TYPE_MAC   0
#define pa_HDR_TYPE_IPV4   1
#define pa_HDR_TYPE_IPV6   2
#define pa_HDR_TYPE_CUSTOM_LUT1   3
#define pa_HDR_TYPE_UDP   4
#define pa_HDR_TYPE_UDP_LITE   5
#define pa_HDR_TYPE_TCP   6
#define pa_HDR_TYPE_CUSTOM_LUT2   7
#define pa_HDR_TYPE_UNKNOWN   8
PA Packet Debug information type

Debug information type in paSnapShotDebugInfo_t

#define pa_DBG_INFO_TYPE_REASSEMBLY_ENABLE   0x0001
#define pa_RA_MAX_HEAP_REGIONS   2
 PA Reassembly Engine related constant definitions.
#define pa_RA_NUM_GROUPS   2
#define pa_PROTOCOL_LIMIT_NUM_VLANS_DEF   2
 Protocol Limit related constant definitions.
#define pa_PROTOCOL_LIMIT_NUM_IP_DEF   2
#define pa_PROTOCOL_LIMIT_NUM_GRE_DEF   2
#define pa_PROTOCOL_LIMIT_NUM_VLANS_MAX   3
#define pa_PROTOCOL_LIMIT_NUM_IP_MAX   7
#define pa_PROTOCOL_LIMIT_NUM_GRE_MAX   7
PA Packet Control Bit Definitions

Bitmap definition of the ctrlBitMap in paPacketControlConfig_t and paPacketControl2Config_t.

#define pa_PKT_CTRL_HDR_VERIFY_PPPoE   0x0001
#define pa_PKT_CTRL_HDR_VERIFY_IP   0x0002
#define pa_PKT_CTRL_MAC_PADDING_CHK   0x0004
#define pa_PKT_CTRL_IP_FRAGS_TO_EROUTE   0x0008
#define pa_PKT_CTRL_L3OFFSET_TO_INNER_IP   0x0010
#define pa_PKT_CTRL_EMAC_IF_IGRESS_CLONE   0x0020
#define pa_PKT_CTRL_EMAC_IF_EGRESS_CLONE   0x0040
#define pa_PKT_CTRL_EMAC_IF_INGRESS_DEFAULT_ROUTE   0x0080
#define pa_PKT_CTRL_EMAC_IF_EGRESS_EQoS_MODE   0x0100
PA Packet Control Valid Bit Definitions

Bitmap definition of the validBitmap in paPacketControl2Config_t.

#define pa_PKT_CTRL2_VALID_PPPoE_HDR_CHECK   pa_PKT_CTRL_HDR_VERIFY_PPPoE
#define pa_PKT_CTRL2_VALID_IP_HDR_CHECK   pa_PKT_CTRL_HDR_VERIFY_IP
#define pa_PKT_CTRL2_VALID_MAC_PADDING_CHECK   pa_PKT_CTRL_MAC_PADDING_CHK
#define pa_PKT_CTRL2_VALID_IP_FRAGS_TO_EROUTE   pa_PKT_CTRL_IP_FRAGS_TO_EROUTE
#define pa_PKT_CTRL2_VALID_L3_OFFSET   pa_PKT_CTRL_L3OFFSET_TO_INNER_IP
#define pa_PKT_CTRL2_VALID_EMAC_IF_IGRESS_CLONE   pa_PKT_CTRL_EMAC_IF_IGRESS_CLONE
#define pa_PKT_CTRL2_VALID_EMAC_IF_EGRESS_CLONE   pa_PKT_CTRL_EMAC_IF_EGRESS_CLONE
#define pa_PKT_CTRL2_VALID_EMAC_IF_INGRESS_DEFAULT_ROUTE   pa_PKT_CTRL_EMAC_IF_INGRESS_DEFAULT_ROUTE
#define pa_PKT_CTRL2_VALID_EMAC_IF_EGRESS_EQoS_MODE   pa_PKT_CTRL_EMAC_IF_EGRESS_EQoS_MODE
#define pa_PKT_CTRL2_VALID_PADDING_STATS_INDEX   0x8000
PA ACL action types

Define the ACL action types.

Define actions to be taken when an ACL entry is matched

#define pa_ACL_ACTION_PERMIT   0
#define pa_ACL_ACTION_DENY   1
#define pa_ACL_ACTION_MARK   2
#define pa_ACL_ACTION_HOST   3
#define pa_ACL_ACTION_MAX   pa_ACL_ACTION_HOST
PA RA Control Bit Definitions

Bitmap definition of the ctrlBitMap in paRaGroupConfig_t.

#define pa_RA_CTRL_ENABLE   0x0001
PA 802.1ag Detector Control Bit Definitions

Bitmap definition of the ctrlBitMap in pa802p1agDetConfig_t.

#define pa_802_1ag_DETECT_ENABLE   0x0001
#define pa_802_1ag_DETECT_STANDARD   0x0002
PA IPSEC NAT-T Control Bit Definitions

Bitmap definition of the ctrlBitMap in paIpsecNatTConfig_t.

#define pa_IPSEC_NAT_T_CTRL_ENABLE   0x0001
#define pa_IPSEC_NAT_T_CTRL_LOC_LUT1   0x0002
PA GTPU Control Bit Definitions

Bitmap definition of the ctrlBitmap in paGtpuConfig_t.

#define pa_GTPU_CTRL_USE_LINK   0x0001
PA Memory Buffer Index

Define the buffer inedex of the PA LLD memory blocks.

#define pa_BUF_INST   0
#define pa_BUF_L2_TABLE   1
#define pa_BUF_L3_TABLE   2
#define pa_BUF_USR_STATS_TABLE   3
#define pa_BUF_VLINK_TABLE   4
#define pa_BUF_ACL_TABLE   5
#define pa_BUF_FC_TABLE   6
Routed Packet Destinations

The module user specifies packet destinations for packets exiting the packet accelerator sub-system.

The destination of packets that leave the packet accelerator sub-system are provided to the module in the paRouteInfo_t structure and passed to the module through the Pa_addMac, Pa_addSrio, Pa_addIp, Pa_addCustomLUT1, Pa_addCustomLUT2 and Pa_addPort functions

#define pa_DEST_DISCARD   3
#define pa_DEST_CONTINUE_PARSE_LUT1   4
#define pa_DEST_CONTINUE_PARSE_LUT2   5
#define pa_DEST_HOST   6
#define pa_DEST_EMAC   7
#define pa_DEST_SASS   8
#define pa_DEST_SASS_LOC_DMA   11
#define pa_DEST_SRIO   9
#define pa_DEST_CASCADED_FORWARDING_LUT1   10
#define pa_DEST_EFLOW   12
#define pa_DEST_RES_1   20
#define pa_DEST_RES_2   21
Ethernet MAC port

The module user specifies the Ethernet MAC port of the ingress and egress packets.

In the from-network direction, the module user can specify the input port as one of classification parameters. In the to-network direction, the module user can force the egress packets to be sent over the specified destination Ethernet MAC port of the switch regreless of its states or configurations.

#define pa_EMAC_PORT_NOT_SPECIFIED   0
#define pa_EMAC_PORT_0   1
#define pa_EMAC_PORT_1   2
#define pa_EMAC_PORT_2   3
#define pa_EMAC_PORT_3   4
#define pa_EMAC_PORT_4   5
#define pa_EMAC_PORT_5   6
#define pa_EMAC_PORT_6   7
#define pa_EMAC_PORT_7   8
#define pa_CPPI_PORT   pa_EMAC_PORT_NOT_SPECIFIED
Ethernet MAC Output Control Bit Definition

Bitmap definition of the emacCtrl at paRouteInfo_t.

#define pa_EMAC_CTRL_PORT_MASK   0x0F
#define pa_EMAC_CTRL_CRC_DISABLE   0x80
Custom Classification Types

The module user specifies the custom classification types.

The optional custom classification rule may be used to further parse and calssify the incoming packet.

#define pa_CUSTOM_TYPE_NONE   0
#define pa_CUSTOM_TYPE_LUT1   1
#define pa_CUSTOM_TYPE_LUT2   2
Command/Transmit Packet Destinations for first generation NSS

These values specify the offsets to the NSS Tx base queue and they are used by the module user to deliver the configuration packets to the specific PDSP Cluster within PASS.

Note:
These values are used by LLD as the return value of cmdDest of PASS configuration APIs. They are defined here for reference purpose only.
#define pa_CMD_TX_DEST_0_GEN1   0
#define pa_CMD_TX_DEST_1_GEN1   1
#define pa_CMD_TX_DEST_2_GEN1   2
#define pa_CMD_TX_DEST_3_GEN1   3
#define pa_CMD_TX_DEST_4_GEN1   4
#define pa_CMD_TX_DEST_5_GEN1   5
Command/Transmit Packet Destinations for second generation NSS

These values specify the offset to the NSS Tx base queue and they are used by the module user to deliver the configuration packets to the specific PDSP Cluster within PASS.

Note:
These values are used by LLD as the return value of cmdDest of PASS configuration APIs. They are defined here for reference purpose only.
#define pa_CMD_TX_DEST_0_GEN2   8
#define pa_CMD_TX_DEST_1_GEN2   9
#define pa_CMD_TX_DEST_2_GEN2   10
#define pa_CMD_TX_DEST_3_GEN2   11
#define pa_CMD_TX_DEST_4_GEN2   12
#define pa_CMD_TX_DEST_5_GEN2   13
#define pa_CMD_TX_DEST_6_GEN2   14
#define pa_CMD_TX_DEST_7_GEN2   15
#define pa_CMD_TX_DEST_8_GEN2   16
Command/Transmit Packet Destinations for NSS

Define the command destination based on the compiler switch NSS_GEN2 to cover both Command/Transmit Packet Destinations for first generation NSS and Command/Transmit Packet Destinations for second generation NSS. These values are used by the LLD only and are not required by the application.

#define pa_CMD_TX_DEST_0   pa_CMD_TX_DEST_0_GEN1
#define pa_CMD_TX_DEST_1   pa_CMD_TX_DEST_1_GEN1
#define pa_CMD_TX_DEST_2   pa_CMD_TX_DEST_2_GEN1
#define pa_CMD_TX_DEST_3   pa_CMD_TX_DEST_3_GEN1
#define pa_CMD_TX_DEST_4   pa_CMD_TX_DEST_4_GEN1
#define pa_CMD_TX_DEST_5   pa_CMD_TX_DEST_5_GEN1
PA LUT1 Instance Destinations

These values are used by the module user to specify the LUT1 table instance used by the specified IP, ACL or customLUT1 entry.

Note:
PA LLD will determine the appropriate LUT1 instance to add/configure LUT1 entry based on the types of API and the linking information in normal operation, i.e. when lutInst is set to pa_LUT_INST_NOT_SPECIFIED. These values are only used by module users, who want to maintain their own LUT1 tables, to overwrite the default rules.
#define pa_LUT1_INST_0_0   0
#define pa_LUT1_INST_0_1   1
#define pa_LUT1_INST_1_0   2
#define pa_LUT1_INST_1_1   3
#define pa_LUT1_INST_2_0   4
#define pa_LUT1_INST_3_0   5
#define pa_LUT1_INST_4_0   6
#define pa_LUT1_INST_5_0   7
#define pa_LUT1_INST_0_GEN1   0
#define pa_LUT1_INST_1_GEN1   1
#define pa_LUT1_INST_2_GEN1   2
#define pa_LUT1_INST_MAX_GEN1   pa_LUT1_INST_2_GEN1
#define pa_LUT1_INST_0_GEN2   pa_LUT1_INST_0_0
#define pa_LUT1_INST_1_GEN2   pa_LUT1_INST_1_0
#define pa_LUT1_INST_2_GEN2   pa_LUT1_INST_4_0
#define pa_LUT1_INST_MAX_GEN2   pa_LUT1_INST_5_0
Common LUT1 instance for NSS

Define the LUT1 instance based on the compiler switch NSS_GEN2 to cover both generations of NSS. These values are intended to be used by the LLD only. For the application which maintain the LUT1 tables should either use the LUT1 instance definitions with _GEN1 and _GEN2 suffix or these definitions with the compiler switch NSS_GEN2 defined or undefined.

#define pa_LUT1_INST_0   pa_LUT1_INST_0_GEN1
#define pa_LUT1_INST_1   pa_LUT1_INST_1_GEN1
#define pa_LUT1_INST_2   pa_LUT1_INST_2_GEN1
#define pa_LUT1_INST_MAX   pa_LUT1_INST_MAX_GEN1
PA ACL Lut Instance Destinations

These values are used by the module user to specify the ACL Lut instance

Note:
These definitions are valid for the second generation PASS only.
#define pa_ACL_INST_OUTER_IP   pa_LUT1_INST_0_1
#define pa_ACL_INST_INNER_IP   pa_LUT1_INST_3_0
PA CRC Engine Instance Destinations

These values are used by the module user to specify the CRC Engine instance

Note:
These definitions are valid for the second generation PASS only.
#define pa_CRC_INST_0_0   0
#define pa_CRC_INST_1_0   1
#define pa_CRC_INST_4_0   2
#define pa_CRC_INST_5_0   3
#define pa_CRC_INST_6_0   4
#define pa_CRC_INST_6_1   5
#define pa_CRC_INST_MAX   pa_CRC_INST_6_1
PA RA Instance Destinations

These values are used by the module user to specify the RA instance (group)

Note:
These definitions are valid for the second generation PASS only.
#define pa_RA_INST_0   0
#define pa_RA_INST_1   1
#define pa_RA_INST_MAX   pa_RA_INST_1
PA Command Codes

Define the commands which can be executed in PASS

A single command or a set of commands can be executed to support fully-offloaded data path in both the transmit (to network) and receive (from network) directions. In the to-network direction, the list of commands formatted by the module should be stored as the protocol-specific information at the packet descriptor with the packet. The commands will be executed in order at PASS and the associated security accelerator sub-system (SASS). The executed commands will be removed by PASS and SASS so that the output packet will not contain any command. In the from-network direction, the list of commands formatted by the module will be stored at the PASS as a command set which can be referred to by the command set index. A single command including a command set can be executed per the enhanced routing information paRouteInfo_t after a LUT1 or LUT2 matches.

Note:
The packet offset specified at each command of the command list should be strictly in ascending order becasue the PASS processes the list of commands in order and it can not move backwards. The command violating the order requirement may be detected and rejected by the API Pa_formatTxCmd and Pa_configCmdSet. In the case, the order constraint can not be validated at the LLD, the violating command will be ignored by the PASS.
#define pa_CMD_NONE   0
#define pa_CMD_NEXT_ROUTE   1
#define pa_CMD_CRC_OP   2
#define pa_CMD_COPY_DATA_TO_PSINFO   3
#define pa_CMD_PATCH_DATA   4
#define pa_CMD_TX_CHECKSUM   5
#define pa_CMD_MULTI_ROUTE   6
#define pa_CMD_REPORT_TX_TIMESTAMP   7
#define pa_CMD_REMOVE_HEADER   8
#define pa_CMD_REMOVE_TAIL   9
#define pa_CMD_CMDSET   10
#define pa_CMD_SA_PAYLOAD   11
#define pa_CMD_IP_FRAGMENT   12
#define pa_CMD_USR_STATS   13
#define pa_CMD_CMDSET_AND_USR_STATS   14
#define pa_CMD_PATCH_MSG_LEN   15
#define pa_CMD_VERIFY_PKT_ERROR   16
#define pa_CMD_SPLIT   17
#define pa_CMD_EF_OP   18
PA Routing Control Info Bit Definitions

Bitmap definition of the ctrlBitField in paCmdNextRoute_t.

#define pa_NEXT_ROUTE_PARAM_PRESENT   0x0001
#define pa_NEXT_ROUTE_PROC_NEXT_CMD   0x0002
#define pa_NEXT_ROUTE_PROC_MULTI_ROUTE   0x0004
#define pa_NEXT_ROUTE_TX_L2_PADDING   0x0008
#define pa_NEXT_ROUTE_PROC_USR_STATS   0x0010
CRC Frame types

Define the frame types which are used to extract and derive the CRC operation parameters such as CRC starting offset and CRC payload length from the frame header.

Both the payload length and the byte location where CRC calculation begins may vary in some protocl frame such as WCDMA FP HS-DSCH Data Frame type 2 and type 3. The CRC Frame type is used for PASS to extract and/or derive the CRC starting offset and payload length.

Note:
Only the following frame types are supported.
#define pa_CRC_OP_FRAME_TYPE_IUB_FP_HS_DSCH_TYPE2   0
#define pa_CRC_OP_FRAME_TYPE_IUB_FP_HS_DSCH_TYPE3   1
#define pa_CRC_OP_FRAME_TYPE_MAX   pa_CRC_OP_FRAME_TYPE_IUB_FP_HS_DSCH_TYPE3
PA CRC Command Control Info Bit Definitions

Bitmap definition of the ctrlBitField in paCmdCrcOp_t.

#define pa_CRC_OP_CRC_VALIDATE   0x0001
#define pa_CRC_OP_PAYLOAD_LENGTH_IN_HEADER   0x0002
#define pa_CRC_OP_PAYLOAD_LENGTH_OFFSET_IS_NEGATIVE   0x0004
#define pa_CRC_OP_CRC_FRAME_TYPE   0x0008
#define pa_CRC_OP_CRC_RESULT_FOLLOW_PAYLOAD   0x0010
PA SPLIT Command Control Info Bit Definitions

Bitmap definition of the ctrlBitField in paCmdSplitOp_t.

#define pa_SPLIT_OP_FRAME_TYPE   0x0001
PA Copy Command Control Info Bit Definitions

Bitmap definition of the ctrlBitField in paCmdCopy_t.

#define pa_COPY_OP_FROM_END   0x0001
PA Patch Command Control Info Bit Definitions

Bitmap definition of the ctrlBitField in paPatchInfo_t.

#define pa_PATCH_OP_INSERT   0x0001
#define pa_PATCH_OP_MAC_HDR   0x0002
#define pa_PATCH_OP_DELETE   0x0004
PA Packet Error Info Bit Definitions

Bitmap definition of the errorBitfield in paCmdVerifyPktErr_t.

#define pa_PKT_ERR_IP_CHECKSUM   0x0001
#define pa_PKT_ERR_L4_CHECKSUM   0x0002
#define pa_PKT_ERR_CRC   0x0004
PA Egress Flow Command Control Info Bit Definitions

Bitmap definition of the ctrlBitField in paCmdEfOp_t.

#define pa_EF_OP_CMD_FC_LOOKUP   0x0001
#define pa_EF_OP_CMD_VALID_LVL1   0x0010
#define pa_EF_OP_CMD_VALID_LVL2   0x0020
#define pa_EF_OP_CMD_VALID_LVL3   0x0040
#define pa_EF_OP_CMD_VALID_LVL4   0x0080
PA IP Info Valid Bit Definitions

Bitmap definition of the validBitmap in paIpInfo2_t.

#define pa_IP_INFO_VALID_SRC   (1<<0)
#define pa_IP_INFO_VALID_DST   (1<<1)
#define pa_IP_INFO_VALID_SPI   (1<<2)
#define pa_IP_INFO_VALID_FLOW   (1<<3)
#define pa_IP_INFO_VALID_GREPROTO   (1<<4)
#define pa_IP_INFO_VALID_PROTO   (1<<5)
#define pa_IP_INFO_VALID_TOS   (1<<6)
#define pa_IP_INFO_VALID_SCTPPORT   (1<<7)
PA ETH Info Valid Bit Definitions

Bitmap definition of the validBitmap in paEthInfo2_t.

#define pa_ETH_INFO_VALID_SRC   (1<<0)
#define pa_ETH_INFO_VALID_DST   (1<<1)
#define pa_ETH_INFO_VALID_VLAN   (1<<2)
#define pa_ETH_INFO_VALID_ETHERTYPE   (1<<3)
#define pa_ETH_INFO_VALID_MPLSTAG   (1<<4)
#define pa_ETH_INFO_VALID_INPORT   (1<<5)
PA ACL Matching Info Valid Bit Definitions

Bitmap definition of the validBitfield in paAclInfo_t. It allows selective ACL matching parameters

#define pa_ACL_INFO_VALID_SRC_IP   0x0001
#define pa_ACL_INFO_VALID_SRC_IP_MASK   0x0002
#define pa_ACL_INFO_VALID_DST_IP   0x0004
#define pa_ACL_INFO_VALID_DST_IP_MASK   0x0008
#define pa_ACL_INFO_VALID_CTRL_FLAG   0x0010
#define pa_ACL_INFO_VALID_PROTO   0x0020
#define pa_ACL_INFO_VALID_DSCP   0x0040
#define pa_ACL_INFO_VALID_SRC_PORT   0x0100
#define pa_ACL_INFO_VALID_DST_PORT   0x0200
PA ACL Info Control Flag Definitions

Bitmap definition of the ctrlFlags and ctrlFlagsMask in paAclnfo_t.

#define pa_ACL_INFO_CONTROL_FLAG_FRAG   0x0001
#define pa_ACL_INFO_CONTROL_FLAG_CONTAIN_L4   0x0002
SRIO Type Values

Defines the SRIO message types.

The packet accelerator sub-system parses both SRIO Type 9 and Type 11 message headers (see netlayers). This group is used to distinguish which type of header will be used.

#define pa_SRIO_TYPE_9   9
#define pa_SRIO_TYPE_11   11
SRIO Transport Type Values

Defines the SRIO tansport types used.

#define pa_SRIO_TRANSPORT_TYPE_0   0
#define pa_SRIO_TRANSPORT_TYPE_1   1
PA SRIO Info Valid Bit Definitions

Bitmap definition of the validBitMap in paSrioInfo_t.

#define pa_SRIO_INFO_VALID_SRC_ID   0x0001
#define pa_SRIO_INFO_VALID_DEST_ID   0x0002
#define pa_SRIO_INFO_VALID_ID   (pa_SRIO_INFO_VALID_SRC_ID | pa_SRIO_INFO_VALID_DEST_ID)
#define pa_SRIO_INFO_VALID_CC   0x0004
#define pa_SRIO_INFO_VALID_PRI   0x0008
#define pa_SRIO_INFO_VALID_TYPE_INFO_STREAMID   0x0010
#define pa_SRIO_INFO_VALID_TYPE_INFO_COS   0x0020
#define pa_SRIO_INFO_VALID_TYPE_INFO_MAILBOX   0x0010
#define pa_SRIO_INFO_VALID_TYPE_INFO_LETTER   0x0020
#define pa_SRIO_INFO_VALID_TYPE_INFO
PA Egress Flow Operation Info Control Flag Definitions

Bitmap definition of the ctrlFlags in paEfOpInfo_t.

#define pa_EF_OP_CONTROL_FLAG_FC_LOOKUP   0x0001
PA Egress Flow Operation Info Valid Bit Definitions

Bitmap definition of the validBitfield in paEfOpInfo_t. It allows selective Egress Flow opertaion parameters

#define pa_EF_OP_INFO_VALID_LVL1   0x0001
#define pa_EF_OP_INFO_VALID_LVL2   0x0002
#define pa_EF_OP_INFO_VALID_LVL3   0x0004
#define pa_EF_OP_INFO_VALID_LVL4   0x0008
PA Route Info Valid Bit Definitions

Bitmap definition of the validBitMap in paRouteInfo2_t.

#define pa_ROUTE_INFO_VALID_MROUTEINDEX   (1<<0)
#define pa_ROUTE_INFO_VALID_PKTTYPE_EMAC   (1<<1)
#define pa_ROUTE_INFO_VALID_PCMD   (1<<2)
#define pa_ROUTE_INFO_VALID_PRIORITY_TYPE   (1<<3)
PA Packet Capture/Port Mirror Control Bit Definitions

Bitmap definition of the ctrlBitMap in paPortMirrorConfig_t and paPktCaptureConfig_t.

#define pa_PKT_CLONE_ENABLE   1
#define pa_PKT_CLONE_INGRESS   2
PA Default Route Types

These values are used to define interface-based ingress default route types.

The interface-based ingress default route defines the global routing information for the packet types such as multicast packet, broadcast packet and non-matched unicast packet.

#define pa_DROUTE_MULTICAST   0
#define pa_DROUTE_BROADCAST   1
#define pa_DROUTE_NO_MATCH   2
#define pa_DROUTE_MAX   3
PA Interface based Ingress Packet Default Route Control Bit Definitions

Bitmap definition of the ctrlBitMap in paDefRouteConfig_t

#define pa_EMAC_IF_DEFAULT_ROUTE_MC_ENABLE   0x0001
#define pa_EMAC_IF_DEFAULT_ROUTE_BC_ENABLE   0x0002
#define pa_EMAC_IF_DEFAULT_ROUTE_UC_ENABLE   0x0004
#define pa_EMAC_IF_DEFAULT_ROUTE_MC_PRE_CLASSIFY_ENABLE   0x0008
#define pa_EMAC_IF_DEFAULT_ROUTE_BC_PRE_CLASSIFY_ENABLE   0x0010
PA enhanced QoS Control Bits Definitions

Bitmap definition of the ctrlBitMap in paEQosModeConfig_t

#define pa_IF_EQoS_ROUTE_DP_BIT_MODE   0x0001
#define pa_IF_EQoS_PRIORITY_OVERRIDE_ENABLE   0x0002
#define pa_IF_EQoS_VLAN_OVERRIDE_ENABLE   0x0004
PA EMAC Port Configuration Type

Define the PA EMAC port configuration types used at paEmacPortConfig_t

#define pa_EMAC_PORT_CFG_MIRROR   0
#define pa_EMAC_PORT_CFG_PKT_CAPTURE   1
#define pa_EMAC_PORT_CFG_DEFAULT_ROUTE   2
#define pa_EMAC_PORT_CFG_EQoS_MODE   3
PA Control Code

Define the PA LLD control code

#define pa_CONTROL_SYS_CONFIG   0
#define pa_CONTROL_802_1ag_CONFIG   1
#define pa_CONTROL_IPSEC_NAT_T_CONFIG   2
#define pa_CONTROL_GTPU_CONFIG   3
#define pa_CONTROL_EMAC_PORT_CONFIG   4
#define pa_CONTROL_RA_CONFIG   5
#define pa_CONTROL_MAX_CONFIG_GEN1   pa_CONTROL_EMAC_PORT_CONFIG
#define pa_CONTROL_MAX_CONFIG_GEN2   pa_CONTROL_RA_CONFIG
Multiroute Entry Control Info Bit Definitions

Bitmap definition of the ctrlBitField in paMultiRouteEntry_t.

#define pa_MULTI_ROUTE_DESCRIPTOR_ONLY   0x01
#define pa_MULTI_ROUTE_REPLACE_SWINFO   0x02
CRC Engine Configuration Control Info Bit Definitions

Bitmap definition of the ctrlBitField in paCrcConfig_t.

#define pa_CRC_CONFIG_RIGHT_SHIFT   0x0001
#define pa_CRC_CONFIG_INVERSE_RESULT   0x0002
User-defined Statistics Counter Configuration Control Info Bit Definitions

Bitmap definition of the ctrlBitField in paUsrStatsCounterConfig_t

#define pa_USR_STATS_CONFIG_RESET   0x0001
User-defined Statistics Allocation Control Info Bit Definitions

Bitmap definition of the ctrlBitField in paUsrStatsAlloc_t

#define pa_USR_STATS_ALLOC_64B_CNT   0x0001
#define pa_USR_STATS_ALLOC_CNT_PRESENT   0x0002
PA Sub-system Queries and States

PA Sub-system reset state and query arguments used by API function Pa_resetControl

#define pa_STATE_RESET   0
#define pa_STATE_ENABLE   1
#define pa_STATE_QUERY   2
#define pa_STATE_INCONSISTENT   3
#define pa_STATE_INVALID_REQUEST   4
#define pa_STATE_ENABLE_FAILED   5
#define pa_STATE_RESOURCE_USE_DENIED   6
PA API Parameter Valid Bit Definitions

Bitmap definition of the validBitMap in paParamDesc.

#define pa_PARAM_VALID_LUTINST   (1<<0)
#define pa_PARAM_VALID_INDEX   (1<<1)
#define pa_PARAM_VALID_PREVLINK   (1<<2)
#define pa_PARAM_VALID_NEXTLINK   (1<<3)
PA LUT2 API Parameter Valid Bit Definitions

Bitmap definition of the validBitmap in paLut2ParamDesc.

#define pa_LUT2_PARAM_VALID_CTRL_BITMAP   (1<<0)
#define pa_LUT2_PARAM_VALID_DIVERTQ   (1<<1)
PA LUT2 API Common Parameters Control Flag Definitions

Bitmap definition of the ctrlFlags in paLut2ParamDesc.

#define pa_LUT2_INFO_CONTROL_FLAG_REPLACE   (1<<0)
VirtualLnkTypes

Defines the virtual link destination type

Note:
The packet accelerator module supports linking to virtual links at OuterIp only at the moment.
#define pa_VIRTUAL_LNK_TYPE_MAC   0
#define pa_VIRTUAL_LNK_TYPE_OUTER_IP   1
#define pa_VIRTUAL_LNK_TYPE_INNER_IP   2
LUT2 Port Size Values

Defines the LUT2 port size supported by PA.

The PA LUT2 supports both 16-bit and 32-bit entry matching. It can be used to classify based on the UDP/IP 16-bit destination port with or without upper layer link or the GTP-U 32-bit Tunnel ID. No other Layer 4 or Layer 5 protocol is supported.

#define pa_LUT2_PORT_SIZE_16   0
#define pa_LUT2_PORT_SIZE_32   1

Typedefs

typedef void * Pa_Handle
 Specification of Pa_Handle.
typedef void * paHandleL2L3_t
 PA handle specification for L2 and L3 (LUT1) handles.
typedef void * paLnkHandle_t
 PA link handle specification for L2, L3 (LUT1) and virtual link handles.
typedef void * paHandleAcl_t
 PA handle specification for ACL (LUT1) handles.
typedef void * paHandleFc_t
 PA handle specification for Flow Cache (LUT1) handles.
typedef uint32_t paHandleL4_t [3]
 PA handle specification for L4 (LUT2) handles.
typedef void * pa_RmHnd
 pa RM Handle
typedef void * paCmd_t
 Pointer to the buffer where the PASS command is placed.
typedef int paReturn_t
 The return type for module functions.
typedef struct paSrioType11Info_s paSrioType11Info_t
 SRIO Type11 header information.
typedef struct paSrioType9Info_s paSrioType9Info_t
 SRIO Type9 header information.
typedef int paSSstate_t
 paSState_t defines the operating state of the packet accelerator sub-system
typedef struct paClassify1Stats_s paClassify1Stats_t
 PA Classify1 Statistics Structure.
typedef struct paClassify2Stats_s paClassify2Stats_t
 PA Classify2 Statistics Structure.
typedef struct paModifyStats_s paModifyStats_t
 PA Modifier Statistics Structure.
typedef struct paCommonStats_s paCommonStats_t
 PA Common Statistics Structure.
typedef struct paSysStats_s paSysStats_t
 PA System Statistics Structure.
typedef struct paUsrStats_s paUsrStats_t
 PA User-defined Statistics Structure.
typedef struct paRaGroupStats_s paRaGroupStats_t
 PA Reassembly Group Statistics Structure.
typedef struct paRaStats_s paRaStats_t
 PA RA Statistics Structure.
typedef struct paAclStats_s paAclStats_t
 PA ACL Entry Statistics Structure.

Enumerations

User-defined Ststaistics Counter Sizes

Definition of Counter size of the User-defined Statistics

enum  paUsrStatsSizes_e { pa_USR_STATS_SIZE_32B = 0, pa_USR_STATS_SIZE_64B }
Priority-based or Interface-based routing mode

paRoutePriIntf_e is used to specify the mode of priority-based or interface-based routing. PASS forwards the matched packets to the desired QoS queue which is equal to the base queue plus an offset specified by the VLAN priority or DSCP value in prority-based routing such as pa_ROUTE_PRIORITY_VLAN or pa_ROUTE_PRIORITY_DSCP. PASS forwards the matched packets to the desired host queue which is equal to the base queue plus an offset as the EMAC port (interface) number with the CPPI flow which is equal to the base flow number plus the EMAC port (interface) number optionally in interface-based routing such as pa_ROUTE_INTF or pa_ROUTE_INTF_W_FLOW. PASS forwards the matched packets to the derived QoS queue with derived CPPI flow based on the algorithm specified at Ingress Default Route Operation in EQoS routing

Note:
: There is some use cases where output packets from QoS are delivered to PASS for pre-routing operation such as tx timestamp report and both egress and ingress forwarding packets go through the same QoS. To support this use case, the PASS is enhanced to delay the post-classification command set execution until the packets re-entering PASS from QoS if Priority-based routing is selected.
enum  paRoutePriIntf_e {
  pa_ROUTE_PRIORITY_VLAN = 1, pa_ROUTE_PRIORITY_DSCP, pa_ROUTE_INTF, pa_ROUTE_INTF_W_FLOW,
  pa_ROUTE_EQoS_MODE
}
Multi-route group configuration mode

Definition of Multi-route group configuration mode supported in PA sub-system

enum  paMultiRouteModes_e { pa_MULTI_ROUTE_MODE_CONFIG = 0, pa_MULTI_ROUTE_MODE_RESET }
CRC Sizes

Definition of CRC sizes supported in PA sub-system

enum  paCrcSizes_e { pa_CRC_SIZE_8 = 0, pa_CRC_SIZE_16, pa_CRC_SIZE_24, pa_CRC_SIZE_32 }
Timestamp Scaler Factor

Definition of PA timestamp scaler factor supported in PA sub-system

Note:
pa_TIMESTAMP_SCALER_FACTOR_1 is not supported. It is defined here for reference purpose.
enum  paTimestampScalerFactor_e
User-defined Ststaistics Counter Types

Definition of Counter types of the User-defined Statistics

enum  paUsrStatsTypes_e { pa_USR_STATS_TYPE_PACKET = 0, pa_USR_STATS_TYPE_BYTE, pa_USR_STATS_TYPE_DISABLE }

Functions

paReturn_t Pa_getBufferReq (paSizeInfo_t *sizeCfg, int sizes[], int aligns[])
 Pa_getBufferReq returns the memory requirements for the PA driver.
paReturn_t Pa_create (paConfig_t *cfg, void *bases[], Pa_Handle *pHandle)
 Pa_create creates the PA driver instance.
void Pa_startCfg (Pa_Handle handle, paStartCfg_t *startCfg)
 Pa_startCfg Adds PA configuration.
paReturn_t Pa_close (Pa_Handle handle, void *bases[])
 Pa_close decativates the PA driver instance.
paReturn_t Pa_control (Pa_Handle handle, paCtrlInfo_t *ctrl, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_control performs system-level control and configuration.
paReturn_t Pa_addSrio (Pa_Handle iHandle, int index, paSrioInfo_t *srioInfo, uint16_t nextHdr, uint16_t nextHdrOffset, paRouteInfo_t *routeInfo, paRouteInfo_t *nextRtFail, paHandleL2L3_t *handle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_addSrio adds a SRIO entry to the L2 table.
paReturn_t Pa_addMac (Pa_Handle iHandle, int index, paEthInfo_t *ethInfo, paRouteInfo_t *routeInfo, paRouteInfo_t *nextRtFail, paHandleL2L3_t *handle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_addMac adds a mac address to the L2 table.
paReturn_t Pa_addMac2 (Pa_Handle iHandle, paEthInfo2_t *ethInfo, paParamDesc *params, paLnkHandle_t *retHandle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_addMac2 adds a mac address to the L2 table.
paReturn_t Pa_delHandle (Pa_Handle iHandle, paHandleL2L3_t *handle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_delHandle deletes a MAC/SRIO or IP handle.
paReturn_t Pa_delL4Handle (Pa_Handle iHandle, paHandleL4_t handle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_delL4Handle deletes a UDP/TCP/GTPU/CustomLUT2 handle.
paReturn_t Pa_delAclHandle (Pa_Handle iHandle, paHandleAcl_t *handle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_delAclHandle deletes an ACL handle.
paReturn_t Pa_addIp (Pa_Handle iHandle, int lutInst, int index, paIpInfo_t *ipInfo, paHandleL2L3_t prevLink, paRouteInfo_t *routeInfo, paRouteInfo_t *nextRtFail, paHandleL2L3_t *retHandle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_addIp adds an IP address to the L3 table.
paReturn_t Pa_addIp2 (Pa_Handle iHandle, paIpInfo2_t *ipInfo, paParamDesc *params, paLnkHandle_t *retHandle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_addIp2 adds an IP address to the L3 table.
paReturn_t Pa_addVirtualLink (Pa_Handle iHandle, paLnkHandle_t *vlinkHdl, int8_t lnkType)
 Pa_addVirtualLink allocates a new virtual link within the PA instance.
paReturn_t Pa_delVirtualLink (Pa_Handle iHandle, paLnkHandle_t *vlinkHdl)
 Pa_delVirtualLink frees the specified virtual link within the PA instance.
paReturn_t Pa_allocUsrStats (Pa_Handle iHandle, int *pNumCnt, paUsrStatsAlloc_t *cntList)
 Pa_allocUsrStats allocates or verifies a set of user-defined statistics.
paReturn_t Pa_freeUsrStats (Pa_Handle iHandle, int numCnt, uint16_t *cntList)
 Pa_freeUsrStats free a set of user-defined statistics.
paReturn_t Pa_addAcl (Pa_Handle iHandle, int aclInst, int aclAction, paAclInfo_t *aclInfo, paHandleL2L3_t prevLink, paHandleAcl_t nextEntry, paHandleAcl_t *retHandle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_addAcl adds an ACL entry to the ACL table.
paReturn_t Pa_addPort (Pa_Handle iHandle, int portSize, uint32_t destPort, paHandleL2L3_t linkHandle, uint16_t fReplace, uint16_t divertQ, paRouteInfo_t *routeInfo, paHandleL4_t retHandle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_addPort adds a destination port to the L4 (LUT2) table.
paReturn_t Pa_addPort2 (Pa_Handle iHandle, int portSize, uint32_t destPort, paHandleL2L3_t linkHandle, paLut2ParamDesc *params, paRouteInfo2_t *routeInfo, paHandleL4_t retHandle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_addPort2 adds a destination port to the L4 (LUT2) table.
paReturn_t Pa_setCustomLUT1 (Pa_Handle iHandle, uint16_t custIndex, uint16_t parseByteOffset, uint16_t nextHdr, uint16_t nextHdrOffset, uint8_t byteMasks[pa_NUM_BYTES_CUSTOM_LUT1], paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_setCustomLUT1 performs the global configuration for level 3 (LUT1) custom lookups.
paReturn_t Pa_addCustomLUT1 (Pa_Handle iHandle, uint16_t custIndex, int lutInst, int index, uint8_t match[pa_NUM_BYTES_CUSTOM_LUT1], paHandleL2L3_t prevLink, paRouteInfo_t *routeInfo, paRouteInfo_t *nextRtFail, paHandleL2L3_t *retHandle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_AddCustomLUT1 adds a custom lookup entry to the lookup tables (LUT1).
paReturn_t Pa_setCustomLUT2 (Pa_Handle iHandle, uint16_t custIndex, uint16_t handleLink, uint16_t custHdrSize, uint16_t byteOffsets[pa_NUM_BYTES_CUSTOM_LUT2], uint8_t byteMasks[pa_NUM_BYTES_CUSTOM_LUT2], uint8_t setMask, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_setCustomLUT2 performs the global configuration for level 4 (LUT2) custom lookups.
paReturn_t Pa_addCustomLUT2 (Pa_Handle iHandle, uint16_t custIndex, uint8_t match[pa_NUM_BYTES_CUSTOM_LUT2], paHandleL2L3_t prevLink, uint16_t fReplace, uint16_t divertQ, paRouteInfo_t *routeInfo, paHandleL4_t retHandle, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_addCustomLUT2 adds a custom lookup to the LUT2 lookup tables.
paReturn_t Pa_forwardResult (Pa_Handle iHandle, void *vresult, paEntryHandle_t *retHandle, int *handleType, int *cmdDest)
 Pa_forwardResult examines the reply of the sub-system to a command.
paReturn_t Pa_configExceptionRoute (Pa_Handle iHandle, int nRoute, int *routeTypes, paRouteInfo_t *eRoutes, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_configExceptionRoute configures the routing of packets based on a exception condition such as MAC briadcast, multicast or error packet.
paReturn_t Pa_configExceptionRoute2 (Pa_Handle iHandle, int nRoute, int *routeTypes, paRouteInfo2_t *eRoutes, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_configExceptionRoute2 configures the routing of packets based on a exception condition such as MAC briadcast, multicast or error packet.
paReturn_t Pa_configCmdSet (Pa_Handle iHandle, uint16_t index, int nCmd, paCmdInfo_t *cmdInfo, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_configCmdSet configures the command set which consists of a list of commands.
paReturn_t Pa_configMultiRoute (Pa_Handle iHandle, paMultiRouteModes_e mode, uint16_t index, uint16_t nRoute, paMultiRouteEntry_t *routeEntry, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_configMultiRouteSet configures the multi-route group which consists of packet multi-route entries.
paReturn_t Pa_configCrcEngine (Pa_Handle iHandle, uint16_t index, paCrcConfig_t *cfgInfo, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_configCrcEngine configures the specified CRC engine.
paReturn_t Pa_configUsrStats (Pa_Handle iHandle, paUsrStatsConfigInfo_t *cfgInfo, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_configUsrStats configures the user-defined statistics operation.
paReturn_t Pa_configTimestamp (Pa_Handle iHandle, paTimestampConfig_t *cfgInfo)
 Pa_configTimestamp configures the PA timer which is used to generate 48-bit timestamp.
paReturn_t Pa_getTimestamp (Pa_Handle iHandle, paTimestamp_t *pTimestamp)
 Pa_getTimestamp returns the 48-bit system timestamp.
paReturn_t Pa_requestStats (Pa_Handle iHandle, uint16_t doClear, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest)
 Pa_requestStats requests sub-system statistics (PASS Gen1 only)
paReturn_t Pa_querySysStats (Pa_Handle iHandle, uint16_t doClear, paSysStats_t *pSysStats)
 Pa_querySysStats requests sub-system statistics (PASS Gen2)
paReturn_t Pa_getDbgpInfo (Pa_Handle iHandle, paSnapShotDebugInfo_t *dbgInfo)
 Pa_getDbgpInfo provides the snap shot of internal information for debug purpose only.
paSysStats_tPa_formatStatsReply (Pa_Handle handle, paCmd_t cmd)
 Pa_formatStatsReply formats the stats reply from the PA (PASS Gen1 only)
paReturn_t Pa_requestUsrStats (Pa_Handle iHandle, uint16_t doClear, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest, paUsrStats_t *pUsrStats)
 Pa_requestUsrStats requests user-defined statistics.
#define pa_USR_STATS_CLEAR_ALL   0
 Indicate that the complete set of user-defined statistics should be leared.
#define pa_RESET_SUBSYSTEM()
 pa_RESET_SUBSYSTEM is used to reset the Sub-system
#define pa_ENABLE_SUBSYSTEM()
 pa_ENABLE_SUBSYSTEM enables the subsystem.
#define pa_DOWNLOAD_MODULE(id, img, size)
 pa_DOWNLOAD_MODULE downloads an image
#define pa_GET_SYSTEM_STATE(x)
 pa_GET_SYSETM_STATE returns the state of the subsystem
#define pa_SET_TX_CHKSUM_LENGTH(datap, cnum, len)   PASAHO_CHKCRC_SET_LEN ((&(((pasahoComChkCrc_t *)datap)[cnum])), len)
 pa_SET_TX_CHKSUM_LENGTH sets the tx checksum length in a tx route block
#define pa_SET_TX_CHKSUM_INITVAL(datap, cnum, val)   PASAHO_CHKCRC_SET_INITVAL ((&(((pasahoComChkCrc_t *)datap)[cnum])), val)
 pa_SET_TX_INITVAL sets the initial value in a tx route block
paReturn_t Pa_requestUsrStatsList (Pa_Handle iHandle, uint16_t doClear, uint16_t nCnt, uint16_t *cntIndex, paCmd_t cmd, uint16_t *cmdSize, paCmdReply_t *reply, int *cmdDest, paUsrStats_t *pUsrStats)
 Pa_requestUsrStatsList is an advanced version of API Pa_requestUsrStats. It requests user-defined statistics with option to clear entire or a subset of statistics.
paReturn_t Pa_formatUsrStatsReply (Pa_Handle handle, paCmd_t cmd, paUsrStats_t *pUsrStats)
 Pa_formatUsrStatsReply formats the user-defined statistics reply from the PASS.
paReturn_t Pa_queryRaStats (Pa_Handle iHandle, uint16_t doClear, paRaStats_t *pRaStats)
 Pa_queryRaStats queries RA statistics (PASS Gen2 only)
paReturn_t Pa_queryAclStats (Pa_Handle iHandle, paHandleAcl_t aclHandle, uint16_t doClear, paAclStats_t *pAclStats)
 Pa_queryAclStats queries ACL per-entry statistics (PASS Gen2 only)
paReturn_t Pa_formatTxRoute (paTxChksum_t *chk0, paTxChksum_t *chk1, paRouteInfo_t *route, void *cmdBuffer, uint16_t *cmdSize)
 Pa_formatTxRoute formats the commands to add checksums and route a Tx packet.
paReturn_t Pa_formatRoutePatch (paRouteInfo_t *route, paPatchInfo_t *patch, void *cmdBuffer, uint16_t *cmdSize)
 Pa_formatRoutePatch formats the commands to route a packet and blind patch.
paReturn_t Pa_formatTxCmd (int nCmd, paCmdInfo_t *cmdInfo, uint16_t offset, void *cmdBuffer, uint16_t *cmdSize)
 Pa_formatTxCmd formats a list of commands to be executed on the packets to be transmitted over the network.
paSSstate_t Pa_resetControl (Pa_Handle iHandle, paSSstate_t newState)
 Pa_resetControl controls the reset state of the Sub-system.
paReturn_t Pa_downloadImage (Pa_Handle iHandle, int modId, void *image, int sizeBytes)
 Pa_downloadImage downloads a PDSP image to a sub-system with the packet processing modules in reset.
paReturn_t Pa_getHandleRefCount (Pa_Handle iHandle, paHandleL2L3_t l2l3handle, uint16_t *refCount)
 Pa_getHandleRefCount returns the number of reference channels linked to the LUT1 handle.
paReturn_t Pa_getPDSPVersion (Pa_Handle iHandle, int modId, uint32_t *pVersion)
 Pa_getPDSPVersion returns the PA PDSP version information.
uint32_t Pa_getVersion (void)
 Pa_getVersion returns the PA LLD version information.
const char * Pa_getVersionStr (void)
 Pa_getVersionStr returns the PA LLD version string.

Detailed Description

Packet Accelerator (PA) sub-system LLD API and Data Definitions.

path ti/drv/pa/pa.h

============================================================================ Copyright (c) Texas Instruments Incorporated 2009-2013

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Define Documentation

The un-linked inner IP handle.

This handle value is used to specify an inner IP (tunnel) which the application does not want to link to an outer IP address.

#define pa_LUT1_INDEX_NOT_SPECIFIED   -1

Used if LUT1 index is not specified In the case, the PASS will use the first available entry

#define pa_LUT_INST_NOT_SPECIFIED   -1

Used if LUT1(or LUT2) instance is not specified In the case, the PA LLD will decide which LUT instance to use based on the API type and the previous link information

The maximum number of multi-route entries per muli-route set

#define pa_MAX_MULTI_ROUTE_SETS   32

The maximum number of multi-route sets supported

The maximum number of emac port configuration entries for interfcae-based EMAC operations. Please note that this number is limited by the PASS internal memory size and therefore it may be smaller than the number of available EMAC ports.

#define pa_MAX_NUM_LUT1_ENTRIES   pa_MAX_NUM_LUT1_ENTRIES_GEN1

The maximum number of LUT1 entries

Note:
These definitions are not used by LLD. They are defined here for reference purpose only.
#define pa_MAX_RX_PATCH_BYTES   32

PATCH Command within a command set

#define pa_NO_MULTI_ROUTE   -1

Multi Route not enabled in this route

#define pa_PARAMS_NOT_SPECIFIED   0xFFFF

Used for unspecified classification parameters

Number of GRE layers supported: default value

Number of GRE layers supported: maximum value

Number of IP layers supported: default value

Number of IP layers supported: maximum value

Protocol Limit related constant definitions.

Number of VLAN supported: default value

Number of VLAN supported: maximum value

#define pa_RA_MAX_HEAP_REGIONS   2

PA Reassembly Engine related constant definitions.

Maxmium number of RA Heap Regions

#define pa_RA_NUM_GROUPS   2

Number of RA groups

#define pa_USR_STATS_CLEAR_ALL   0

Indicate that the complete set of user-defined statistics should be leared.

This constant indicates that all user-defined statistics should be cleared

#define pa_USR_STATS_LNK_END   0xFFFF

Indicate that there is no next layer counter


Copyright 2014, Texas Instruments Incorporated