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;
127constexpr uint32_t kMemorySpacePerQueue = 1 << 12;
129constexpr uint32_t kCacheLineSize = 64;
134static constexpr std::string_view kIpcQueueToAppName =
"enso_ipc_queue_to_app";
135static constexpr std::string_view kIpcQueueFromAppName =
136 "enso_ipc_queue_from_app";
138enum class NotifType : uint8_t {
144 kAllocateNotifBuf = 4,
145 kGetNbFallbackQueues = 5,
160 uint64_t nb_fallback_queues;
166 uint64_t round_robin;
172 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 kPacketRttOffset
Offset of the RTT when timestamp is enabled (in bytes).
constexpr uint32_t kNsPerTimestampCycle
The clock period of the timestamp module in nanoseconds.
constexpr uint32_t kAlignedDscBufPairSize