]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - sys/contrib/octeon-sdk/cvmx-helper-check-defines.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / sys / contrib / octeon-sdk / cvmx-helper-check-defines.h
1 /***********************license start***************
2  * Copyright (c) 2003-2010  Cavium Inc. (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 Inc. 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  * This Software, including technical data, may be subject to U.S. export  control
24  * laws, including the U.S. Export Administration Act and its  associated
25  * regulations, and may be subject to export or import  regulations in other
26  * countries.
27
28  * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
29  * AND WITH ALL FAULTS AND CAVIUM INC. MAKES NO PROMISES, REPRESENTATIONS OR
30  * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO
31  * THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR
32  * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM
33  * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE,
34  * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF
35  * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
36  * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE  RISK ARISING OUT OF USE OR
37  * PERFORMANCE OF THE SOFTWARE LIES WITH YOU.
38  ***********************license end**************************************/
39
40
41
42
43
44
45
46 /**
47  * @file
48  *
49  * Validate defines required by cvmx-helper. This header file
50  * validates a number of defines required for cvmx-helper to
51  * function properly. It either supplies a default or fails
52  * compile if a define is incorrect.
53  *
54  * <hr>$Revision: 70030 $<hr>
55  */
56 #ifndef __CVMX_HELPER_CHECK_DEFINES_H__
57 #define __CVMX_HELPER_CHECK_DEFINES_H__
58
59 /* CVMX_HELPER_FIRST_MBUFF_SKIP is the number of bytes to reserve before
60     the beginning of the packet. Override in executive-config.h */
61 #ifndef CVMX_HELPER_FIRST_MBUFF_SKIP
62 #define CVMX_HELPER_FIRST_MBUFF_SKIP 184
63 #warning WARNING: default CVMX_HELPER_FIRST_MBUFF_SKIP used.  Defaults deprecated, please set in executive-config.h
64 #endif
65
66 /* CVMX_HELPER_NOT_FIRST_MBUFF_SKIP is the number of bytes to reserve in each
67     chained packet element. Override in executive-config.h */
68 #ifndef CVMX_HELPER_NOT_FIRST_MBUFF_SKIP
69 #define CVMX_HELPER_NOT_FIRST_MBUFF_SKIP 0
70 #warning WARNING: default CVMX_HELPER_NOT_FIRST_MBUFF_SKIP used.  Defaults deprecated, please set in executive-config.h
71 #endif
72
73 /* CVMX_HELPER_ENABLE_IPD controls if the IPD is enabled in the helper
74     function. Once it is enabled the hardware starts accepting packets. You
75     might want to skip the IPD enable if configuration changes are need
76     from the default helper setup. Override in executive-config.h */
77 #ifndef CVMX_HELPER_ENABLE_IPD
78 #define CVMX_HELPER_ENABLE_IPD 1
79 #warning WARNING: default CVMX_HELPER_ENABLE_IPD used.  Defaults deprecated, please set in executive-config.h
80 #endif
81
82 /* Set default (defaults are deprecated) input tag type */
83 #ifndef  CVMX_HELPER_INPUT_TAG_TYPE
84 #define  CVMX_HELPER_INPUT_TAG_TYPE CVMX_POW_TAG_TYPE_ORDERED
85 #warning WARNING: default CVMX_HELPER_INPUT_TAG_TYPE used.  Defaults deprecated, please set in executive-config.h
86 #endif
87
88 #ifndef CVMX_HELPER_INPUT_PORT_SKIP_MODE
89 #define CVMX_HELPER_INPUT_PORT_SKIP_MODE        CVMX_PIP_PORT_CFG_MODE_SKIPL2
90 #warning WARNING: default CVMX_HELPER_INPUT_PORT_SKIP_MODE used.  Defaults deprecated, please set in executive-config.h
91 #endif
92
93 #if defined(CVMX_ENABLE_HELPER_FUNCTIONS) && !defined(CVMX_HELPER_INPUT_TAG_INPUT_PORT)
94 #error CVMX_HELPER_INPUT_TAG_* values for determining tag hash inputs must be defined in executive-config.h
95 #endif
96
97 #endif