1 /***********************license start***************
2 * Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
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.
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
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.
35 * For any questions regarding licensing please contact marketing@caviumnetworks.com
37 ***********************license end**************************************/
42 * @file executive-config.h.template
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.
55 * File version info: $Id: executive-config.h.template 41588 2009-03-19 19:41:00Z vmalov $
58 #ifndef __EXECUTIVE_CONFIG_H__
59 #define __EXECUTIVE_CONFIG_H__
61 /* Define to enable the use of simple executive DFA functions */
62 //#define CVMX_ENABLE_DFA_FUNCTIONS
64 /* Define to enable the use of simple executive packet output functions.
65 ** For packet I/O setup enable the helper functions below.
67 //#define CVMX_ENABLE_PKO_FUNCTIONS
69 /* Define to enable the use of simple executive timer bucket functions.
70 ** Refer to cvmx-tim.[ch] for more information
72 //#define CVMX_ENABLE_TIMER_FUNCTIONS
74 /* Define to enable the use of simple executive helper functions. These
75 ** include many harware setup functions. See cvmx-helper.[ch] for
78 //#define CVMX_ENABLE_HELPER_FUNCTIONS
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
84 #define CVMX_HELPER_FIRST_MBUFF_SKIP 184
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
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
97 #define CVMX_HELPER_ENABLE_BACK_PRESSURE 1
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
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
109 /* The following select which fields are used by the PIP to generate
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
125 /* Select skip mode for input ports */
126 #define CVMX_HELPER_INPUT_PORT_SKIP_MODE CVMX_PIP_PORT_CFG_MODE_SKIPL2
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
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
139 /* Force backpressure to be disabled. This overrides all other
140 ** backpressure configuration */
141 #define CVMX_HELPER_DISABLE_RGMII_BACKPRESSURE 1
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
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
154 /* Select the number of low latency memory ports (interfaces) that
155 ** will be configured. Valid values are 1 and 2.
157 #define CVMX_LLM_CONFIG_NUM_PORTS 2
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
162 ** 0: Fix is not enabled
163 ** 1: Fix is enabled, if supported by hardware
165 #define CVMX_ENABLE_LEN_M8_FIX 1
167 #if defined(CVMX_ENABLE_HELPER_FUNCTIONS) && !defined(CVMX_ENABLE_PKO_FUNCTIONS)
168 #define CVMX_ENABLE_PKO_FUNCTIONS
171 /* Enable setting up of TLB entries to trap NULL pointer references */
172 #define CVMX_CONFIG_NULL_POINTER_PROTECT 1
174 /* Enable debug and informational printfs */
175 #define CVMX_CONFIG_ENABLE_DEBUG_PRINTS 1
177 /* Executive resource descriptions provided in cvmx-resources.config */
178 #include "cvmx-resources.config"