P4C
The P4 Compiler
Loading...
Searching...
No Matches
dpdk/constants.h
1/*
2Copyright 2021 Intel Corporation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17#ifndef BACKENDS_DPDK_CONSTANTS_H_
18#define BACKENDS_DPDK_CONSTANTS_H_
19
20#include "lib/cstring.h"
21
22namespace P4 {
23
25const unsigned table_handle_prefix = 0x00010000;
26const unsigned action_handle_prefix = 0x00020000;
27
29const unsigned dpdk_default_table_size = 65536;
30#define DPDK_MAX_SHIFT_AMOUNT 64
31
34const unsigned default_learner_table_size = 0x10000;
37 10, 30, 60, 120, 300, 43200, 120, 120};
38
40const cstring bfrtSchemaVersion = cstring::literal("1.0.0");
41const cstring tdiSchemaVersion = cstring::literal("0.1");
42
44// FIXME: These should be enum
45#define JHASH0 0
46#define CRC1 1
47#define CRC2 2
48#define CRC3 3
49#define CRC4 4
50#define JHASH5 5
51#define TOEPLITZ 6
53const unsigned initial_member_id = 0;
54const unsigned initial_group_id = 0xFFFFFFFF;
55
57#define IPSEC_SUCCESS 0
58#define IPSEC_PORT_REG_INDEX 0
59#define IPSEC_PORT_REG_SIZE 1
60#define IPSEC_PORT_REG_INDEX_BITWIDTH 32
61#define IPSEC_PORT_REG_INITVAL_BITWIDTH 32
62#define NET_TO_HOST 0
63
65const int dpdk_max_operand_size = 64;
66
67} // namespace P4
68
69#endif /* BACKENDS_DPDK_CONSTANTS_H_ */
Definition cstring.h:85
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24
const int dpdk_max_operand_size
Maximum operand size for unary, binary and ternary operations.
Definition dpdk/constants.h:65
const unsigned table_handle_prefix
Unique handle for action and table.
Definition dpdk/constants.h:25
const unsigned dpdk_default_table_size
Default values.
Definition dpdk/constants.h:29
const unsigned initial_member_id
Initial values for group_id and member_id for action selector and action profile tables.
Definition dpdk/constants.h:53
const unsigned dpdk_learner_max_configurable_timeout_values
Maximum number of configurable timeout values.
Definition dpdk/constants.h:33
const unsigned default_learner_table_timeout[dpdk_learner_max_configurable_timeout_values]
Default timeout values for learner table to support common protocol states.
Definition dpdk/constants.h:36
const cstring bfrtSchemaVersion
JSON schema versions.
Definition dpdk/constants.h:40