41#ifndef SOFTWARE_INCLUDE_ENSO_CONSTS_H_
42#define SOFTWARE_INCLUDE_ENSO_CONSTS_H_
54#define MAX_NB_APPS 1024
55#define MAX_NB_FLOWS 8192
57constexpr uint32_t kMaxNbApps = MAX_NB_APPS;
58constexpr uint32_t kMaxNbFlows = MAX_NB_FLOWS;
60constexpr uint32_t kMaxTransferLen = 131072;
63constexpr uint32_t kBatchSize = 64;
65#ifndef NOTIFICATION_BUF_SIZE
68#define NOTIFICATION_BUF_SIZE 16384
70constexpr uint32_t kNotificationBufSize = NOTIFICATION_BUF_SIZE;
75#define ENSO_PIPE_SIZE 32768
77constexpr uint32_t kEnsoPipeSize = ENSO_PIPE_SIZE;
79constexpr uint32_t kMaxPendingTxRequests = kNotificationBufSize - 1;
82constexpr uint32_t kBufPageSize = 1UL << 21;
85static constexpr std::string_view kHugePageDefaultPrefix =
"/mnt/huge/enso";
86static constexpr std::string_view kHugePageRxPipePathPrefix =
"_rx_pipe:";
87static constexpr std::string_view kHugePagePathPrefix =
"_tx_pipe:";
88static constexpr std::string_view kHugePageNotifBufPathPrefix =
"_notif_buf:";
89static constexpr std::string_view kHugePageQueuePathPrefix =
"_queue:";
97static_assert(ENSO_PIPE_SIZE * 64 == kBufPageSize,
"Unsupported buffer size");
104 ((kNotificationBufSize * 64 * 2 - 1) / kBufPageSize + 1) * kBufPageSize;
128constexpr uint32_t kMemorySpacePerQueue = 1 << 12;
130constexpr uint32_t kCacheLineSize = 64;
135static constexpr std::string_view kIpcQueueToAppName =
"enso_ipc_queue_to_app";
136static constexpr std::string_view kIpcQueueFromAppName =
137 "enso_ipc_queue_from_app";
139enum class NotifType : uint8_t {
145 kAllocateNotifBuf = 4,
146 kGetNbFallbackQueues = 5,
161 uint64_t nb_fallback_queues;
167 uint64_t round_robin;
173 uint64_t notif_buf_id;
constexpr uint32_t kMaxHardwareFlitRate
Maximum number of flits (64 byte chunks) that the hardware can send per second.
constexpr uint32_t kNsPerTimestampCycle
The clock period of the timestamp module in nanoseconds.
constexpr uint8_t kDefaultRttOffset
Default timestamp offset of the RTT when timestamp is enabled (in bytes). Uses bytes 4–7 of IPv4 head...
constexpr uint32_t kAlignedDscBufPairSize