Ensō 0.4.6
Software API reference
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022, Carnegie Mellon University
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted (subject to the limitations in the disclaimer
6 * below) provided that the following conditions are met:
7 *
8 * * Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of the copyright holder nor the names of its
16 * contributors may be used to endorse or promote products derived from
17 * this software without specific prior written permission.
18 *
19 * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
20 * THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
21 * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
22 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
40#ifndef SOFTWARE_INCLUDE_ENSO_CONFIG_H_
41#define SOFTWARE_INCLUDE_ENSO_CONFIG_H_
42
43#include <enso/consts.h>
44#include <enso/internals.h>
45
46namespace enso {
47
64int insert_flow_entry(struct NotificationBufPair* notification_buf_pair,
65 uint16_t dst_port, uint16_t src_port, uint32_t dst_ip,
66 uint32_t src_ip, uint32_t protocol,
67 uint32_t enso_pipe_id);
68
81int enable_timestamp(struct NotificationBufPair* notification_buf_pair,
82 uint8_t offset = kDefaultRttOffset);
83
91int disable_timestamp(struct NotificationBufPair* notification_buf_pair);
92
129int enable_rate_limit(struct NotificationBufPair* notification_buf_pair,
130 uint16_t num, uint16_t den);
131
139int disable_rate_limit(struct NotificationBufPair* notification_buf_pair);
140
148int enable_round_robin(struct NotificationBufPair* notification_buf_pair);
149
158int disable_round_robin(struct NotificationBufPair* notification_buf_pair);
159
168 struct NotificationBufPair* notification_buf_pair);
169
170} // namespace enso
171
172#endif // SOFTWARE_INCLUDE_ENSO_CONFIG_H_
int enable_timestamp(struct NotificationBufPair *notification_buf_pair, uint8_t offset=kDefaultRttOffset)
Enables hardware timestamping.
Definition: config.cpp:123
int enable_round_robin(struct NotificationBufPair *notification_buf_pair)
Enables packet round robin for the fallback pipes.
Definition: config.cpp:208
int disable_timestamp(struct NotificationBufPair *notification_buf_pair)
Disables hardware timestamping.
Definition: config.cpp:139
int enable_rate_limit(struct NotificationBufPair *notification_buf_pair, uint16_t num, uint16_t den)
Enables hardware rate limit.
Definition: config.cpp:149
int update_fallback_queues_config(struct NotificationBufPair *notification_buf_pair)
Update the device's fallback queues configuration.
Definition: config.cpp:216
int disable_rate_limit(struct NotificationBufPair *notification_buf_pair)
Disables hardware rate limit.
Definition: config.cpp:162
int insert_flow_entry(struct NotificationBufPair *notification_buf_pair, uint16_t dst_port, uint16_t src_port, uint32_t dst_ip, uint32_t src_ip, uint32_t protocol, uint32_t enso_pipe_id)
Inserts flow entry in the data plane flow table that will direct all packets matching the flow entry ...
Definition: config.cpp:97
int disable_round_robin(struct NotificationBufPair *notification_buf_pair)
Disables packet round robin for the fallback pipes. Using a hash of the packet's five tuple to select...
Definition: config.cpp:212
Constants used throughout the codebase. Some of these constants need to be kept in sync with the hard...
Definitions that are internal to Enso. They should not be exposed to applications.