1 #ifndef _NSS_CFG_H
2 #define _NSS_CFG_H
3 /**
4 * @file nss_cfg.h
5 *
6 * @brief
7 * This file defines Network Sub-System (NSS) transport layer global configuration constant,
8 * macro definitions and data structures where NSS consists of CPSW, PASS and SASS.
9 * The definitions here are not used by PA LLD itself. Instead, they are used by the application module
10 * which invokes NSS including all PA unit tests and examples.
11 *
12 * \par
13 * NOTE:
14 * (C) Copyright 2014 Texas Instruments, Inc.
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 *
20 * Redistributions of source code must retain the above copyright
21 * notice, this list of conditions and the following disclaimer.
22 *
23 * Redistributions in binary form must reproduce the above copyright
24 * notice, this list of conditions and the following disclaimer in the
25 * documentation and/or other materials provided with the
26 * distribution.
27 *
28 * Neither the name of Texas Instruments Incorporated nor the names of
29 * its contributors may be used to endorse or promote products derived
30 * from this software without specific prior written permission.
31 *
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
37 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
38 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
39 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
40 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
42 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 *
44 */
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
50 /* System level header files */
51 #include <stdint.h>
53 /* NSS level files */
54 #include <ti/drv/pa/nss_if.h>
56 /**
57 * @def NSS_LAYOUT_PARAM_NA
58 * Used if NSS layout parameters are not applicable
59 */
61 #define NSS_LAYOUT_PARAM_NA -1
63 /**
64 * @brief NSS Layout configuration structure definition
65 */
67 typedef struct nssLayout_s
68 {
69 int fNssGen2; /**< 1: NSS Gen2 device */
71 int numRxCpdmaChans; /**< Number of PacketDMA Rx channels */
72 int numTxCpdmaChans; /**< Number of PacketDMA Tx channels */
74 int numTxQueues; /**< Number of Transmit Queues */
76 int txQueueBase; /**< Transmit Queue base */
77 int txLocQueueBase; /**< Local Transmit Queue base (NSS Gen2 only) */
79 int qPaInputIndex; /**< Index to the PASS packet input queue */
80 int qPaMacIndex; /**< Index to the PASS Mac queue for MAC/SRIO configuration packets */
81 int qPaIpIndex; /**< Index to the PASS IP queue for (outer) IP configuration packets */
82 int qPaInnerIpIndex; /**< Index to the PASS Inner IP queue for inner IP configuration packets and
83 IPSEC Tunnel re-entry packets from SASS */
84 int qPaLut2Index; /**< Index to the PASS LUT2 queue for LUT2 configuration packets and
85 IPSEC Transport mode re-entry packets from SASS*/
86 int qPaIpsecIndex; /**< Index to the PASS IPSEC queue for (outer) IP/IPSEC configuration packets */
87 int qPaIpsec2Index; /**< Index to the PASS IPSEC2 queue for inner IP/IPSEC configuration packets */
88 int qPaPostIndex; /**< Index to the PASS Post-Classification queue for Post-Classification
89 related configuration packets */
90 int qPaTxCmdIndex; /**< Index to the PASS Tx command queue for Egress Packets */
92 int qPaFirewallIndex; /**< Index to the PASS (outer) IP firewall queue for (outer) IP firewall configuration
93 packets (NSS Gen2 only) */
94 int qPaFirewall2Index; /**< Index to the PASS Inner IP firewall queue for inner IP firewall configuration
95 packets (NSS Gen2 only)*/
96 int qPaEgress0Index; /**< Index to the PASS Egress stage 0 queue (NSS Gen2 only)*/
97 int qPaEgress1Index; /**< Index to the PASS Egress stage 1 queue (NSS Gen2 only)*/
98 int qPaEgress2Index; /**< Index to the PASS Egress stage 2 queue (NSS Gen2 only)*/
101 int qSaIndex; /**< Index to the SASS input 1 queue for IPSEC and SRTP packets*/
102 int qSa2Index; /**< Index to the SASS input 2 queue for Air-Ciphering and data mode packets */
104 int qCpswEthIndex; /**< Index to the CPSW CPPI port transmit queue */
105 int qCpswEthPri0Index; /**< Index to the CPSW CPPI port transmit queue of priority 0 packets */
106 int qCpswEthPri1Index; /**< Index to the CPSW CPPI port transmit queue of priority 1 packets */
107 int qCpswEthPri2Index; /**< Index to the CPSW CPPI port transmit queue of priority 2 packets */
108 int qCpswEthPri3Index; /**< Index to the CPSW CPPI port transmit queue of priority 3 packets */
109 int qCpswEthPri4Index; /**< Index to the CPSW CPPI port transmit queue of priority 4 packets */
110 int qCpswEthPri5Index; /**< Index to the CPSW CPPI port transmit queue of priority 5 packets */
111 int qCpswEthPri7Index; /**< Index to the CPSW CPPI port transmit queue of priority 6 packets */
112 int qCpswEthPri8Index; /**< Index to the CPSW CPPI port transmit queue of priority 7 packets */
114 int numPaPdsps; /**< Number of PASS PDSPs */
115 int numSaPdsps; /**< Number of SASS PDSPs */
117 const uint32_t *paPdspImage[NSS_PA_MAX_PDSPS]; /**< Array of PA PDSP images */
118 const int paPdspImageSize[NSS_PA_MAX_PDSPS]; /**< Array of PA PDSP image sizes */
120 const uint32_t *saPdspImage[NSS_SA_MAX_PDSPS]; /**< Array of SA PDSP images */
121 const int saPdspImageSize[NSS_SA_MAX_PDSPS]; /**< Array of SA PDSP image sizes */
123 } nssLayout_t;
125 /**
126 * @brief NSS Global configuration structure definition
127 */
128 typedef struct nssGlobalConfigParams_s
129 {
130 /** NSS Layout parameters */
131 nssLayout_t layout;
133 } nssGlobalConfigParams_t;
135 #ifdef __cplusplus
136 }
137 #endif
139 #endif /* NSS_CFG_H_ */