]> CyberLeo.Net >> Repos - FreeBSD/releng/8.2.git/blob - sys/contrib/octeon-sdk/executive-config.h.template
Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.
[FreeBSD/releng/8.2.git] / sys / contrib / octeon-sdk / executive-config.h.template
1 /***********************license start***************
2  * Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
3  * reserved.
4  *
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met:
9  *
10  *     * Redistributions of source code must retain the above copyright
11  *       notice, this list of conditions and the following disclaimer.
12  *
13  *     * Redistributions in binary form must reproduce the above
14  *       copyright notice, this list of conditions and the following
15  *       disclaimer in the documentation and/or other materials provided
16  *       with the distribution.
17  *
18  *     * Neither the name of Cavium Networks nor the names of
19  *       its contributors may be used to endorse or promote products
20  *       derived from this software without specific prior written
21  *       permission.
22  *
23  * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
24  * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS
25  * OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH
26  * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
27  * REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT
28  * DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES
29  * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR
30  * PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET
31  * POSSESSION OR CORRESPONDENCE TO DESCRIPTION.  THE ENTIRE RISK ARISING OUT
32  * OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
33  *
34  *
35  * For any questions regarding licensing please contact marketing@caviumnetworks.com
36  *
37  ***********************license end**************************************/
38
39
40
41 /*! 
42  * @file executive-config.h.template
43  *
44  * This file is a template for the executive-config.h file that each
45  * application that uses the simple exec must provide.  Each application
46  * should have an executive-config.h file in a directory named 'config'.
47  * If the application uses other components, config files for those
48  * components should be placed in the config directory as well.  The 
49  * macros defined in this file control the configuration and functionality
50  * provided by the simple executive.  Available macros are commented out
51  * and documented in this file.
52  */
53
54 /*
55  * File version info: $Id: executive-config.h.template 41588 2009-03-19 19:41:00Z vmalov $
56  *
57  */
58 #ifndef __EXECUTIVE_CONFIG_H__
59 #define __EXECUTIVE_CONFIG_H__
60
61 /* Define to enable the use of simple executive DFA functions */
62 //#define CVMX_ENABLE_DFA_FUNCTIONS
63
64 /* Define to enable the use of simple executive packet output functions.
65 ** For packet I/O setup enable the helper functions below. 
66 */ 
67 //#define CVMX_ENABLE_PKO_FUNCTIONS
68
69 /* Define to enable the use of simple executive timer bucket functions. 
70 ** Refer to cvmx-tim.[ch] for more information
71 */
72 //#define CVMX_ENABLE_TIMER_FUNCTIONS
73
74 /* Define to enable the use of simple executive helper functions. These
75 ** include many harware setup functions.  See cvmx-helper.[ch] for
76 ** details.
77 */
78 //#define CVMX_ENABLE_HELPER_FUNCTIONS
79
80 /* CVMX_HELPER_FIRST_MBUFF_SKIP is the number of bytes to reserve before
81 ** the beginning of the packet. If necessary, override the default  
82 ** here.  See the IPD section of the hardware manual for MBUFF SKIP 
83 ** details.*/ 
84 #define CVMX_HELPER_FIRST_MBUFF_SKIP 184
85
86 /* CVMX_HELPER_NOT_FIRST_MBUFF_SKIP is the number of bytes to reserve in each
87 ** chained packet element. If necessary, override the default here */
88 #define CVMX_HELPER_NOT_FIRST_MBUFF_SKIP 0
89
90 /* CVMX_HELPER_ENABLE_BACK_PRESSURE controls whether back pressure is enabled
91 ** for all input ports. This controls if IPD sends backpressure to all ports if
92 ** Octeon's FPA pools don't have enough packet or work queue entries. Even when
93 ** this is off, it is still possible to get backpressure from individual
94 ** hardware ports. When configuring backpressure, also check
95 ** CVMX_HELPER_DISABLE_*_BACKPRESSURE below. If necessary, override the default
96 ** here */
97 #define CVMX_HELPER_ENABLE_BACK_PRESSURE 1
98
99 /* CVMX_HELPER_ENABLE_IPD controls if the IPD is enabled in the helper
100 **  function. Once it is enabled the hardware starts accepting packets. You
101 **  might want to skip the IPD enable if configuration changes are need
102 **  from the default helper setup. If necessary, override the default here */
103 #define CVMX_HELPER_ENABLE_IPD 1
104
105 /* CVMX_HELPER_INPUT_TAG_TYPE selects the type of tag that the IPD assigns
106 ** to incoming packets. */
107 #define CVMX_HELPER_INPUT_TAG_TYPE CVMX_POW_TAG_TYPE_ORDERED
108
109 /* The following select which fields are used by the PIP to generate
110 ** the tag on INPUT
111 ** 0: don't include
112 ** 1: include */
113 #define CVMX_HELPER_INPUT_TAG_IPV6_SRC_IP       0
114 #define CVMX_HELPER_INPUT_TAG_IPV6_DST_IP       0
115 #define CVMX_HELPER_INPUT_TAG_IPV6_SRC_PORT     0
116 #define CVMX_HELPER_INPUT_TAG_IPV6_DST_PORT     0
117 #define CVMX_HELPER_INPUT_TAG_IPV6_NEXT_HEADER  0
118 #define CVMX_HELPER_INPUT_TAG_IPV4_SRC_IP       0
119 #define CVMX_HELPER_INPUT_TAG_IPV4_DST_IP       0
120 #define CVMX_HELPER_INPUT_TAG_IPV4_SRC_PORT     0
121 #define CVMX_HELPER_INPUT_TAG_IPV4_DST_PORT     0
122 #define CVMX_HELPER_INPUT_TAG_IPV4_PROTOCOL     0
123 #define CVMX_HELPER_INPUT_TAG_INPUT_PORT        1
124
125 /* Select skip mode for input ports */
126 #define CVMX_HELPER_INPUT_PORT_SKIP_MODE        CVMX_PIP_PORT_CFG_MODE_SKIPL2
127
128 /* Define the number of queues per output port */
129 #define CVMX_HELPER_PKO_QUEUES_PER_PORT_INTERFACE0      1
130 #define CVMX_HELPER_PKO_QUEUES_PER_PORT_INTERFACE1      1
131
132 /* Configure PKO to use per-core queues (PKO lockless operation). 
133 ** Please see the related SDK documentation for PKO that illustrates 
134 ** how to enable and configure this option. */
135 //#define CVMX_ENABLE_PKO_LOCKLESS_OPERATION 1
136 //#define CVMX_HELPER_PKO_MAX_PORTS_INTERFACE0 8
137 //#define CVMX_HELPER_PKO_MAX_PORTS_INTERFACE1 8
138
139 /* Force backpressure to be disabled.  This overrides all other
140 ** backpressure configuration */
141 #define CVMX_HELPER_DISABLE_RGMII_BACKPRESSURE 1
142
143 /* Disable the SPI4000's processing of backpressure packets and backpressure
144 ** generation. When this is 1, the SPI4000 will not stop sending packets when
145 ** receiving backpressure. It will also not generate backpressure packets when
146 ** its internal FIFOs are full. */
147 #define CVMX_HELPER_DISABLE_SPI4000_BACKPRESSURE 1
148
149 /* CVMX_HELPER_SPI_TIMEOUT is used to determine how long the SPI initialization
150 ** routines wait for SPI training. You can override the value using
151 ** executive-config.h if necessary */
152 #define CVMX_HELPER_SPI_TIMEOUT 10
153
154 /* Select the number of low latency memory ports (interfaces) that
155 ** will be configured.  Valid values are 1 and 2.
156 */
157 #define CVMX_LLM_CONFIG_NUM_PORTS 2
158
159 /* Enable the fix for PKI-100 errata ("Size field is 8 too large in WQE and next
160 ** pointers"). If CVMX_ENABLE_LEN_M8_FIX is set to 0, the fix for this errata will 
161 ** not be enabled. 
162 ** 0: Fix is not enabled
163 ** 1: Fix is enabled, if supported by hardware
164 */
165 #define CVMX_ENABLE_LEN_M8_FIX  1
166
167 #if defined(CVMX_ENABLE_HELPER_FUNCTIONS) && !defined(CVMX_ENABLE_PKO_FUNCTIONS)
168 #define CVMX_ENABLE_PKO_FUNCTIONS
169 #endif
170
171 /* Enable setting up of TLB entries to trap NULL pointer references */
172 #define CVMX_CONFIG_NULL_POINTER_PROTECT        1
173
174 /* Enable debug and informational printfs */
175 #define CVMX_CONFIG_ENABLE_DEBUG_PRINTS         1
176
177 /* Executive resource descriptions provided in cvmx-resources.config */
178 #include "cvmx-resources.config"
179
180 #endif