![]() |
![]() |
This file defines constants, data structures and macros used among the PA LLD, SA LLD and the host. More...
Data Structures | |
struct | pasahoCmdInfo_s |
pasahoCmdInfo_t defines the general short command information More... | |
struct | pasahoLongInfo_s |
pasahoLongInfo_t defines the packet parsing information in the long format. The information is structured as an array of 32 bit values. These values are broken down through macros. This allows the representation to be endian independent to the hardware which operates only on 32 bit values. More... | |
struct | pasahoShortInfo_s |
pasahoShortInfo_t defines the packet parsing information in the short format More... | |
struct | pasahoNextRoute_s |
pasahoNextRoute_t defines the next route command. The command structure is defined as 32 bit values to work with the hardware regardless of the device endianness. More... | |
struct | pasahoComChkCrc_s |
pasahoComChkCrc_t defines the checksum and CRC generation command. The command structure is defined as 32 bit values to wrok with the hardware regardless of the device endianness. More... | |
struct | pasahoReportTimestamp_s |
pasahoReportTimestamp_t defines the report timestamp command. The command structure is defined as 32 bit values to work with the hardware regardless of the device endianness. More... | |
struct | pasahoIpFrag_s |
pasahoIpFrag_t defines the IP Fragmentation command. The command structure is defined as 32 bit values to work with the hardware regardless of the device endianness. More... | |
struct | pasahoPatchMsgLen_s |
pasahoPatchMsgLen_t defines the message length patching command. The command structure is defined as 32 bit values to work with the hardware regardless of the device endianness. More... | |
Defines | |
#define | PA_INV_TF_INDEX 0xFF |
#define | PASAHO_BPATCH_MAX_PATCH_WORDS 4 |
pasahoComBlindPatch_t defines the blind patch command. The command structure is defined as 32 bit values to work with the hardware regardless of the device endianness. | |
PA/SA/Host Commands | |
Define PASS Firmware Commands These values are placed in the 3 msbits of the protocol specific information | |
#define | PASAHO_CONFIGURE 4 |
#define | PASAHO_PARX_PARSECMD 0 |
#define | PASAHO_PARX_MULTI_ROUTE 5 |
#define | PASAHO_PAMOD_CMPT_CHKSUM 0 |
#define | PASAHO_PAMOD_CMPT_CRC 1 |
#define | PASAHO_PAMOD_PATCH 2 |
#define | PASAHO_PAMOD_NROUTE 3 |
#define | PASAHO_PAMOD_REPORT_TIMESTAMP 6 |
#define | PASAHO_PAMOD_GROUP_7 7 |
#define | PASAHO_PAMOD_DUMMY PASAHO_PAMOD_GROUP_7 |
#define | PASAHO_PAMOD_IP_FRAGMENT PASAHO_PAMOD_GROUP_7 |
#define | PASAHO_PAMOD_PATCH_MSG_LEN PASAHO_PAMOD_GROUP_7 |
#define | PASAHO_SA_LONG_INFO 0 |
#define | PASAHO_SA_SHORT_INFO 1 |
#define | PASAHO_SA_AIR_INFO 2 |
PASAHO Common Macros | |
#define | PASAHO_READ_BITFIELD(a, b, c) (((a)>>(b)) & ((1UL<<(c))-1)) |
PASAHO_READ_BITFIELD is used to read the specific bit fields. | |
#define | PASAHO_SET_BITFIELD(a, x, b, c) |
PASAHO_SET_BITFIELD is used to set the specific bit fields. | |
#define | PASAHO_SET_CMDID(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 29,3) |
PASAHO_SET_CMDID is used to set the command ID. | |
#define | PASAHO_PACFG_CMD (((uint32_t)PASAHO_CONFIGURE << 5) << 24) |
PASAHO_PACFG_CMD is used to set the PA configuration command only. | |
PASAHO Long Info Command Macros | |
Macros used by the PASAHO Long Info Command | |
#define | PASAHO_LINFO_READ_CMDID(x) PASAHO_READ_BITFIELD((x)->word0,29,3) |
#define | PASAHO_LINFO_READ_RECLEN(x) PASAHO_READ_BITFIELD((x)->word0,24,5) |
#define | PASAHO_LINFO_READ_START_OFFSET(x) PASAHO_READ_BITFIELD((x)->word0,0,16) |
#define | PASAHO_LINFO_IS_MAC_BROADCAST(x) PASAHO_READ_BITFIELD((x)->word0,16,1) |
#define | PASAHO_LINFO_IS_MAC_MULTICAST(x) PASAHO_READ_BITFIELD((x)->word0,17,1) |
#define | PASAHO_LINFO_READ_MAC_PKTTYPE(x) PASAHO_READ_BITFIELD((x)->word0,16,2) |
#define | PASAHO_LINFO_IS_IP_BROADCAST(x) PASAHO_READ_BITFIELD((x)->word0,18,1) |
#define | PASAHO_LINFO_IS_IP_MULTICAST(x) PASAHO_READ_BITFIELD((x)->word0,19,1) |
#define | PASAHO_LINFO_READ_IP_PKTTYPE(x) PASAHO_READ_BITFIELD((x)->word0,18,2) |
#define | PASAHO_LINFO_READ_END_OFFSET(x) PASAHO_READ_BITFIELD((x)->word1,16,16) |
#define | PASAHO_LINFO_READ_EIDX(x) PASAHO_READ_BITFIELD((x)->word1,11,5) |
#define | PASAHO_LINFO_READ_PMATCH(x) PASAHO_READ_BITFIELD((x)->word1,10,1) |
#define | PASAHO_LINFO_READ_L1_PDSP_ID(x) PASAHO_READ_BITFIELD((x)->word1,6,3) |
#define | PASAHO_LINFO_READ_L1_IDX(x) PASAHO_READ_BITFIELD((x)->word1,0,6) |
#define | PASAHO_LINFO_READ_L3_OFFSET(x) PASAHO_READ_BITFIELD((x)->word2,24,8) |
#define | PASAHO_LINFO_READ_L4_OFFSET(x) PASAHO_READ_BITFIELD((x)->word2,16,8) |
#define | PASAHO_LINFO_READ_L5_OFFSET(x) PASAHO_READ_BITFIELD((x)->word2,8,8) |
#define | PASAHO_LINFO_READ_ESP_AH_OFFSET(x) PASAHO_READ_BITFIELD((x)->word2,0,8) |
#define | PASAHO_LINFO_READ_HDR_BITMASK(x) PASAHO_READ_BITFIELD((x)->word3,21,11) |
#define | PASAHO_LINFO_READ_HDR_BITMASK2(x) PASAHO_READ_BITFIELD((x)->word3, 4,4) |
#define | PASAHO_LINFO_READ_NXT_HDR_TYPE(x) PASAHO_READ_BITFIELD((x)->word3,16,5) |
#define | PASAHO_LINFO_READ_VLAN_COUNT(x) PASAHO_READ_BITFIELD((x)->word3,14,2) |
#define | PASAHO_LINFO_READ_IP_COUNT(x) PASAHO_READ_BITFIELD((x)->word3,8,3) |
#define | PASAHO_LINFO_READ_GRE_COUNT(x) PASAHO_READ_BITFIELD((x)->word3,11,3) |
#define | PASAHO_LINFO_READ_FLAG_FRAG(x) PASAHO_READ_BITFIELD((x)->word3,3,1) |
#define | PASAHO_LINFO_READ_INPORT(x) PASAHO_READ_BITFIELD((x)->word3,0,3) |
#define | PASAHO_LINFO_READ_INNER_IP_OFFSET(x) PASAHO_READ_BITFIELD((x)->word4,16,8) |
#define | PASAHO_LINFO_READ_TSTAMP_MSB(x) PASAHO_READ_BITFIELD((x)->word5,0,16) |
PASAHO Long Info Protocol Indication Macros | |
#define | PASAHO_LINFO_IS_MAC(x) PASAHO_READ_BITFIELD((x)->word3,21,1) |
#define | PASAHO_LINFO_IS_802_3(x) PASAHO_READ_BITFIELD((x)->word3,7,1) |
#define | PASAHO_LINFO_IS_WITH_VLAN(x) PASAHO_LINFO_READ_VLAN_COUNT(x) |
#define | PASAHO_LINFO_IS_WITH_MPLS(x) PASAHO_READ_BITFIELD((x)->word3,23,1) |
#define | PASAHO_LINFO_IS_PPPoE(x) PASAHO_READ_BITFIELD((x)->word3,6,1) |
#define | PASAHO_LINFO_IS_IP(x) PASAHO_LINFO_READ_IP_COUNT(x) |
#define | PASAHO_LINFO_IS_IPSEC_ESP(x) PASAHO_READ_BITFIELD((x)->word3,25,1) |
#define | PASAHO_LINFO_IS_IPSEC_AH(x) PASAHO_READ_BITFIELD((x)->word3,26,1) |
#define | PASAHO_LINFO_IS_UDP(x) PASAHO_READ_BITFIELD((x)->word3,27,1) |
#define | PASAHO_LINFO_IS_UDP_LITE(x) PASAHO_READ_BITFIELD((x)->word3,28,1) |
#define | PASAHO_LINFO_IS_TCP(x) PASAHO_READ_BITFIELD((x)->word3,29,1) |
#define | PASAHO_LINFO_IS_GRE(x) PASAHO_LINFO_READ_GRE_COUNT(x) |
#define | PASAHO_LINFO_IS_GTPU(x) PASAHO_READ_BITFIELD((x)->word3,30,1) |
#define | PASAHO_LINFO_IS_CUSTOM(x) PASAHO_READ_BITFIELD((x)->word3,31,1) |
#define | PASAHO_LINFO_IS_SCTP(x) PASAHO_READ_BITFIELD((x)->word3,4,1) |
#define | PASAHO_LINFO_IS_IPSEC_NAT_T(x) PASAHO_READ_BITFIELD((x)->word3,5,1) |
PASAHO Long Info IpReassm Macros | |
Macros used by the PASAHO PASS-assisted IP Reassembly Operation | |
#define | PASAHO_LINFO_READ_TFINDEX(x) PASAHO_READ_BITFIELD((x)->word4,24,8) |
#define | PASAHO_LINFO_READ_FRANCNT(x) PASAHO_READ_BITFIELD((x)->word4,16,8) |
#define | PASAHO_LINFO_SET_TFINDEX(x, v) PASAHO_SET_BITFIELD((x)->word4,(v),24,8) |
#define | PASAHO_LINFO_SET_FRANCNT(x, v) PASAHO_SET_BITFIELD((x)->word4,(v),16,8) |
#define | PASAHO_LINFO_IS_IPSEC(x) PASAHO_READ_BITFIELD((x)->word3,25,2) |
#define | PASAHO_LINFO_CLR_IPSEC(x) PASAHO_SET_BITFIELD((x)->word3,0,25,2) |
#define | PASAHO_LINFO_CLR_IPSEC_ESP(x) PASAHO_SET_BITFIELD((x)->word3,0,26,1) |
#define | PASAHO_LINFO_CLR_IPSEC_AH(x) PASAHO_SET_BITFIELD((x)->word3,0,25,1) |
#define | PASAHO_LINFO_CLR_FLAG_FRAG(x) PASAHO_SET_BITFIELD((x)->word3,0,3,1) |
#define | PASAHO_LINFO_SET_START_OFFSET(x, v) PASAHO_SET_BITFIELD((x)->word0,(v),0,16) |
#define | PASAHO_LINFO_SET_END_OFFSET(x, v) PASAHO_SET_BITFIELD((x)->word1,(v),16,16) |
#define | PASAHO_LINFO_SET_NULL_PKT_IND(x, v) PASAHO_SET_BITFIELD((x)->word0,(v),21,1) |
PASAHO Short Info Command Macros | |
Macros used by the PASAHO Short Info Command | |
#define | PASAHO_SINFO_READ_CMDID(x) PASAHO_READ_BITFIELD((x)->word0,29,3) |
#define | PASAHO_SINFO_RESD_PAYLOAD_OFFSET(x) PASAHO_READ_BITFIELD((x)->word0,16,8) |
#define | PASAHO_SINFO_READ_PAYLOAD_LENGTH(x) PASAHO_READ_BITFIELD((x)->word0,0,16) |
#define | PASAHO_SINFO_SET_PAYLOAD_OFFSET(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 16, 8) |
#define | PASAHO_SINFO_SET_PAYLOAD_LENGTH(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 0, 16) |
#define | PASAHO_SINFO_FORMAT_CMD(offset, len) (((offset) << 16) | (len) | (PASAHO_SA_SHORT_INFO << 29)) |
PA/SA/HO Header Bitmap Bit Definitions | |
Bitmap definition of the protocol header bitmask at the long info. | |
#define | PASAHO_HDR_BITMASK_MAC (1 << 0) |
#define | PASAHO_HDR_BITMASK_VLAN (1 << 1) |
#define | PASAHO_HDR_BITMASK_MPLS (1 << 2) |
#define | PASAHO_HDR_BITMASK_IP (1 << 3) |
#define | PASAHO_HDR_BITMASK_ESP (1 << 4) |
#define | PASAHO_HDR_BITMASK_AH (1 << 5) |
#define | PASAHO_HDR_BITMASK_UDP (1 << 6) |
#define | PASAHO_HDR_BITMASK_UDPLITE (1 << 7) |
#define | PASAHO_HDR_BITMASK_TCP (1 << 8) |
#define | PASAHO_HDR_BITMASK_GTPU (1 << 9) |
#define | PASAHO_HDR_BITMASK_CUSTOM (1 << 10) |
#define | PASAHO_HDR_BITMASK2_SCTP (1 << 0) |
#define | PASAHO_HDR_BITMASK2_IPSEC_NAT_T (1 << 1) |
#define | PASAHO_HDR_BITMASK2_PPPoE (1 << 2) |
#define | PASAHO_HDR_BITMASK2_802_3 (1 << 3) |
PASAHO Next Route Command Macros | |
Macros used by the PASAHO Next Route Command | |
#define | PASAHO_SET_N(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 28, 1) |
#define | PASAHO_SET_E(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 27, 1) |
#define | PASAHO_SET_DEST(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 24, 3) |
#define | PASAHO_SET_FLOW(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 16, 8) |
#define | PASAHO_SET_QUEUE(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 0, 16) |
#define | PASAHO_SET_PKTTYPE(x, v) PASAHO_SET_BITFIELD((x)->word1, (v), 24, 8) |
#define | PASAHO_SET_TX_PADDING(x, v) PASAHO_SET_BITFIELD((x)->word1, (v), 0, 1) |
#define | PASAHO_SET_TX_STATS(x, v) PASAHO_SET_BITFIELD((x)->word1, (v), 1, 1) |
#define | PASAHO_SET_USR_STATS_INDEX(x, v) PASAHO_SET_BITFIELD((x)->word1, (v), 8, 16) |
PASAHO Checksum/CRC Command Macros | |
Macros used by the ASAHO Checksum/CRC Command | |
#define | PASAHO_CHKCRC_SET_NEG0(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 23, 1) |
#define | PASAHO_CHKCRC_SET_CTRL(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 16, 4) |
#define | PASAHO_CHKCRC_SET_START(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 0, 16) |
#define | PASAHO_CHKCRC_SET_LEN(x, v) PASAHO_SET_BITFIELD((x)->word1, (v), 16, 16) |
#define | PASAHO_CHKCRC_SET_RESULT_OFF(x, v) PASAHO_SET_BITFIELD((x)->word1, (v), 0, 16) |
#define | PASAHO_CHKCRC_SET_INITVAL(x, v) PASAHO_SET_BITFIELD((x)->word2, (v), 16, 16) |
PASAHO Blind Patch Command Macros | |
Macros used by the PASAHO Blind Patch Command | |
#define | PASAHO_BPATCH_SET_PATCH_NBYTES(x, v) PASAHO_SET_BITFIELD((x)->word0, v, 24, 5) |
#define | PASAHO_BPATCH_SET_PATCH_CMDSIZE(x, v) PASAHO_SET_BITFIELD((x)->word0, v, 20, 4) |
#define | PASAHO_BPATCH_SET_OVERWRITE(x, v) PASAHO_SET_BITFIELD((x)->word0, v, 19, 1) |
#define | PASAHO_BPATCH_SET_DELETE(x, v) PASAHO_SET_BITFIELD((x)->word0, v, 18, 1) |
#define | PASAHO_BPATCH_SET_OFFSET(x, v) PASAHO_SET_BITFIELD((x)->word0, v, 0, 16) |
#define | PASAHO_BPATCH_SET_PATCH_BYTE(x, byteNum, byte) PASAHO_SET_BITFIELD((x)->patch[(byteNum) >> 2], byte, ((3 - (byteNum & 0x3)) << 3), 8) |
PASAHO Report Timestamp Command Macros | |
Macros used by the PASAHO Report Timestamp Command | |
#define | PASAHO_SET_REPORT_FLOW(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 16, 8) |
#define | PASAHO_SET_REPORT_QUEUE(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 0, 16) |
PASAHO IP Fragmentation Command Macros | |
Macros used by the PASAHO IP Fragmentation Command | |
#define | PASAHO_SET_SUB_CODE_IP_FRAG(x) PASAHO_SET_BITFIELD((x)->word0, PASAHO_SUB_CMD_IP_FRAG, 24, 5) |
#define | PASAHO_SET_SUB_CODE(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 24, 5) |
#define | PASAHO_SET_IP_OFFSET(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 16, 8) |
#define | PASAHO_SET_MTU_SIZE(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 0, 16) |
PASAHO Message Length Patching Command Macros | |
Macros used by the PASAHO Message Length Patching Command | |
#define | PASAHO_SET_SUB_CODE_PATCH_MSG_LEN(x) PASAHO_SET_BITFIELD((x)->word0, PASAHO_SUB_CMD_PATCH_MSG_LEN, 24, 5) |
#define | PASAHO_SET_MSGLEN_OFFSET(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 16, 8) |
#define | PASAHO_SET_MSGLEN_SIZE(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 15, 1) |
#define | PASAHO_SET_MSGLEN(x, v) PASAHO_SET_BITFIELD((x)->word0, (v), 0, 15) |
Typedefs | |
typedef struct pasahoCmdInfo_s | pasahoCmdInfo_t |
pasahoCmdInfo_t defines the general short command information | |
typedef struct pasahoLongInfo_s | pasahoLongInfo_t |
pasahoLongInfo_t defines the packet parsing information in the long format. The information is structured as an array of 32 bit values. These values are broken down through macros. This allows the representation to be endian independent to the hardware which operates only on 32 bit values. | |
typedef struct pasahoShortInfo_s | pasahoShortInfo_t |
pasahoShortInfo_t defines the packet parsing information in the short format | |
typedef struct pasahoNextRoute_s | pasahoNextRoute_t |
pasahoNextRoute_t defines the next route command. The command structure is defined as 32 bit values to work with the hardware regardless of the device endianness. | |
typedef struct pasahoComChkCrc_s | pasahoComChkCrc_t |
pasahoComChkCrc_t defines the checksum and CRC generation command. The command structure is defined as 32 bit values to wrok with the hardware regardless of the device endianness. | |
typedef struct pasahoReportTimestamp_s | pasahoReportTimestamp_t |
pasahoReportTimestamp_t defines the report timestamp command. The command structure is defined as 32 bit values to work with the hardware regardless of the device endianness. | |
typedef struct pasahoIpFrag_s | pasahoIpFrag_t |
pasahoIpFrag_t defines the IP Fragmentation command. The command structure is defined as 32 bit values to work with the hardware regardless of the device endianness. | |
typedef struct pasahoPatchMsgLen_s | pasahoPatchMsgLen_t |
pasahoPatchMsgLen_t defines the message length patching command. The command structure is defined as 32 bit values to work with the hardware regardless of the device endianness. | |
Enumerations | |
PASS Header Types | |
Definition of protocol header types used at the PASS PDSP Firmwase. In the long info field these values specify what the next header type will be at the next parse offset | |
enum | pasaho_HeaderType_e { PASAHO_HDR_MAC = 0, PASAHO_HDR_VLAN, PASAHO_HDR_MPLS, PASAHO_HDR_IPv4, PASAHO_HDR_IPv6, PASAHO_HDR_IPv6_EXT_HOP, PASAHO_HDR_IPv6_EXT_ROUTE, PASAHO_HDR_IPv6_EXT_FRAG, PASAHO_HDR_IPv6_EXT_DEST, PASAHO_HDR_GRE, PASAHO_HDR_ESP, PASAHO_HDR_ESP_DECODED, PASAHO_HDR_AUTH, PASAHO_HDR_CUSTOM_C1, PASAHO_HDR_PPPoE, PASAHO_HDR_SCTP, PASAHO_HDR_UNKNOWN, PASAHO_HDR_UDP, PASAHO_HDR_UDP_LITE, PASAHO_HDR_TCP, PASAHO_HDR_GTPU, PASAHO_HDR_ESP_DECODED_C2, PASAHO_HDR_CUSTOM_C2 } |
PASS Sub-Command Code | |
Definition of the 5-bit sub-command codes which is used to specify the group 7 commands. | |
enum | pasaho_SubCmdCode_e { PASAHO_SUB_CMD_DUMMY = 0, PASAHO_SUB_CMD_IP_FRAG, PASAHO_SUB_CMD_PATCH_MSG_LEN } |
PASS Packet Type | |
Definition of the MAC or IP packet types. | |
enum | pasaho_pktType_e { PASAHO_PKT_TYPE_UNICAST = 0, PASAHO_PKT_TYPE_BROADCAST, PASAHO_PKT_TYPE_MULTICAST } |
This file defines constants, data structures and macros used among the PA LLD, SA LLD and the host.
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 PA_INV_TF_INDEX 0xFF |
PASS-asssited IP reassembly traffic flow index to indicate that no traffic flow is available