FD.io VPP
v16.09
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
platform_common.h
Go to the documentation of this file.
1
/*
2
*---------------------------------------------------------------------------
3
* platform_common.h -- file has all platform related macros defined as NULL
4
* included "platform_common_override.h will have actual
5
* platform specific defines
6
*
7
* Copyright (c) 2011-2013 Cisco and/or its affiliates.
8
* Licensed under the Apache License, Version 2.0 (the "License");
9
* you may not use this file except in compliance with the License.
10
* You may obtain a copy of the License at:
11
*
12
* http://www.apache.org/licenses/LICENSE-2.0
13
*
14
* Unless required by applicable law or agreed to in writing, software
15
* distributed under the License is distributed on an "AS IS" BASIS,
16
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
* See the License for the specific language governing permissions and
18
* limitations under the License.
19
*---------------------------------------------------------------------------
20
*/
21
#ifndef __PLATFORM_COMMON_H__
22
#define __PLATFORM_COMMON_H__
23
24
/* $$$ FIXME causes printf format warnings */
25
#define PLATFORM_DEBUG_PRINT(...)
/* printf(__VA_ARGS__) */
26
#define PLATFORM_FILL_DST_ADDR_PORT_TABLE
27
#define PLATFORM_SET_CTX_RU_TX_FROM_NODE(ctx, value)
28
#define PLATFORM_SET_CTX_RU_TX_DST_IPPORT_IDX(ctx, value)
29
#define PLATFORM_SET_CTX_RU_TX_PKT_TYPE(ctx, type)
30
#define PLATFORM_SET_RX_VRF(ctx, rx_vrf, hardcode, mask)
31
#define PLATFORM_SET_TX_VRF(ctx, tx_vrf)
32
/* PLATFORM_CNAT_SET_RX_VRF definition is not same as PLATFORM_SET_RX_VRF,
33
* So, maintaining two different definitions
34
*/
35
#define PLATFORM_CNAT_SET_RX_VRF(ctx, rx_vrf, proto)
36
#define PLATFORM_CNAT_SET_TX_VRF(ctx, tx_vrf)
37
38
#define PLATFORM_PRINT_TESTING_PG()
39
#define PLATFORM_INIT_TEMP_SENSORS()
40
#define PLATFORM_READ_CPU_SENSORS(value)
41
#define PLATFORM_SET_TEMP_READ_BLOCK(var, val)
42
#define PLATFORM_NFV9_DISP_NODE_IDX
43
44
45
/* Assumption is, syslog packets
46
* are sent out via same channel as that of NFV9.
47
* Has to be overridden if this assumption is false.
48
*/
49
#define PLATFORM_SYSLOG_DISP_NODE_IDX PLATFORM_NFV9_DISP_NODE_IDX
50
51
#define PLATFORM_CNAT_DB_DUMP_POLICY_PRINT()
52
#define PLATFORM_PRINT_CTX_VALUES(ctx)
53
#define PLATFORM_ADD_VRF_MAP_HANDLE_PARTITION(uidb_index, partition_id)
54
#define PLATFORM_DEL_VRF_MAP_HANDLE_PARTITION(uidb_index, partition_id)
55
#define PLATFORM_ALLOC_NFV9_PKT_BUFFER(ctx, to_lc_cpu)
56
#define PLATFORM_SET_DSLITE_ENABLE_FLAG(uidb_index, dslite_id)
57
#define PLATFORM_CHECK_DSLITE_ENABLE_FLAG
58
59
#define PLATFORM_CNAT_INSTS 1
60
#define PLATFORM_HANDLE_TTL_DECREMENT 0 // Don't handle TTL in NAT44 Application (default).
61
62
// For ISM, we need to copy the ipv6->hop_limit to ipv4 ttl.
63
#define PLATFORM_6RD_COPY_TTL_IPV6_TO_IPV4 0
64
65
//For ISM case, need to allow as the TTL decrement happens at ingress LC
66
#define PLATFORM_6RD_ALLOW_TTL_1 0
67
68
#define PLATFORM_HANDLE_ICMP_TTL_EXPIRED 0 // Don't handle ICMP_ERROR msg for TTL <=1 in NAT44 App (default).
69
70
#define PLATFORM_IPV4_FRAG_FRAG_HOLD_LIMIT 1
71
#define PLATFORM_MAX_IPV4_CTX_ENTRIES 1
72
#define PLATFORM_MAPE_FRAG 0
73
74
#define PLATFORM_ADDR_MASK_PER_CORE 0
75
#define PLATFORM_ADDR_MASK_PER_CORE_PER_PARTITION 0
76
#define PLATFORM_MAX_CORES 1
77
#define PLATFORM_MAX_CORES_PER_PARTITION 1
78
#define PLATFORM_MAX_NAT_ENTRIES 1
79
#define PLATFORM_MAX_USER_ENTRIES 1
80
#define PLATFORM_CNAT_MAX_ADDR_POOL_SIZE 0x1
81
#define PLATFORM_DBL_SUPPORT 0
/* Default no DBL support, no NAT44 session table */
82
83
#define PLATFORM_MAX_DB_ENTRY_PER_SCAN 1
84
#define PLATFORM_MAX_DB_ENTRY_SELECTED_PER_SCAN 1
85
#define MAX_COMBINED_DB_ENTRIES_PER_SCAN 0
86
87
#define PLATFORM_CNAT_TIMEOUT_IPPROT_MASK 0
88
#define PLATFORM_CNAT_TIMEOUT_PORTPROT_MASK 0
89
90
#define PLATFORM_MAX_SHOW_BUFFER_SIZE 1700
91
#define PLATFORM_MAX_TRANSLATION_ENTRIES (50)
92
#define PLATFORM_MAX_UTIL_ENTRIES (100)
93
#define PLATFORM_MAX_NAT44_UTIL_ENTRIES ((64)/PLATFORM_MAX_CORES)
94
95
#define PLATFORM_CNAT_NFV9_SHIM_HDR_OFFSET 0
96
#define PLATFORM_CNAT_NFV9_L2_ENCAPS_OFFSET 0
97
98
99
/* Below are nat64 statful related define */
100
#define PLATFORM_NAT64_SET_RX_VRF(rx_vrf, proto, inst_id) \
101
rx_vrf = proto | (inst_id & CNAT_VRF_MASK);
102
103
#define PLATFORM_NAT64_MAX_TRANSLATION_ENTRIES (30)
104
#define PLATFORM_DS_LITE_MAX_TRANSLATION_ENTRIES (30)
105
106
#define PLATFORM_SET_NAT64_ENABLE_FLAG(uidb_index, nat64_id) \
107
{ \
108
nat64_set_enable_flag(nat64_id, ENABLE); \
109
}
110
111
#define PLATFORM_CHECK_NAT64_ENABLE_FLAG 1
112
#define PLATFORM_SET_MAPE_ENABLE_FLAG(uidb_index, mape_id)
113
#define PLATFORM_CHECK_MAPE_ENABLE_FLAG 1
114
115
/* very small number , PD has correct value.
116
this is bcoz, if platform doesnt support nat64..shudnt take too much..*/
117
#define PLATFORM_NAT64_MAX_SESSIONS 10
118
#define PLATFORM_NAT64_TIMEOUT_HASH_SIZE 10
119
#define PLATFORM_MAP_ADDR_PER_CORE 1024
120
121
#define ENABLE 1
122
#define DISABLE 0
123
124
/* Platform Xlat inline learn function */
125
#define PLATFORM_INLINE_LEARN_FUNC(a,b,c)
126
127
128
/* Checksum calculation to be done in software */
129
#define PLATFORM_XLAT_SW_CHECKSUM_CALC 0
130
131
132
/* Below include overrides all the above null defs and defines platform specific
133
define */
134
#include "
platform_common_override.h
"
135
136
#endif
/* __PLATFORM_COMMON_H__ */
platform_common_override.h
plugins
vcgn-plugin
vcgn
platform_common.h
Generated on Fri Nov 18 2016 06:17:32 for FD.io VPP by
1.8.11