P4C
The P4 Compiler
Loading...
Searching...
No Matches
dpdk/constants.h
1/*
2 * Copyright 2021 Intel Corporation
3 * SPDX-FileCopyrightText: 2021 Intel Corporation
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef BACKENDS_DPDK_CONSTANTS_H_
9#define BACKENDS_DPDK_CONSTANTS_H_
10
11#include "lib/cstring.h"
12
13namespace P4 {
14
16const unsigned table_handle_prefix = 0x00010000;
17const unsigned action_handle_prefix = 0x00020000;
18
20const unsigned dpdk_default_table_size = 65536;
21#define DPDK_MAX_SHIFT_AMOUNT 64
22
25const unsigned default_learner_table_size = 0x10000;
28 10, 30, 60, 120, 300, 43200, 120, 120};
29
31const cstring bfrtSchemaVersion = cstring::literal("1.0.0");
32const cstring tdiSchemaVersion = cstring::literal("0.1");
33
35// FIXME: These should be enum
36#define JHASH0 0
37#define CRC1 1
38#define CRC2 2
39#define CRC3 3
40#define CRC4 4
41#define JHASH5 5
42#define TOEPLITZ 6
44const unsigned initial_member_id = 0;
45const unsigned initial_group_id = 0xFFFFFFFF;
46
48#define IPSEC_SUCCESS 0
49#define IPSEC_PORT_REG_INDEX 0
50#define IPSEC_PORT_REG_SIZE 1
51#define IPSEC_PORT_REG_INDEX_BITWIDTH 32
52#define IPSEC_PORT_REG_INITVAL_BITWIDTH 32
53#define NET_TO_HOST 0
54
56const int dpdk_max_operand_size = 64;
57
58} // namespace P4
59
60#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:13
const int dpdk_max_operand_size
Maximum operand size for unary, binary and ternary operations.
Definition dpdk/constants.h:56
const unsigned table_handle_prefix
Unique handle for action and table.
Definition dpdk/constants.h:16
const unsigned dpdk_default_table_size
Default values.
Definition dpdk/constants.h:20
const unsigned initial_member_id
Initial values for group_id and member_id for action selector and action profile tables.
Definition dpdk/constants.h:44
const unsigned dpdk_learner_max_configurable_timeout_values
Maximum number of configurable timeout values.
Definition dpdk/constants.h:24
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:27
const cstring bfrtSchemaVersion
JSON schema versions.
Definition dpdk/constants.h:31