StagingBuff: Unify constraints into IOEngineConstraints
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
#include "stagingBuffer.h"
|
||||
#include <unistd.h>
|
||||
|
||||
namespace smo {
|
||||
namespace stim_buff {
|
||||
|
||||
// Static defaults for io_uring
|
||||
const StagingBuffer::InputEngineConstraints
|
||||
StagingBuffer::InputEngineConstraints::ioUringConstraints(
|
||||
4096, // slotStartAlignmentByteVal (page alignment for DMA)
|
||||
const StagingBuffer::IOEngineConstraints
|
||||
StagingBuffer::IOEngineConstraints::ioUringConstraints(
|
||||
static_cast<size_t>(sysconf(_SC_PAGE_SIZE)), // slotStartAlignmentByteVal (page alignment for DMA)
|
||||
1472 // slotPadToNBytes (MTU 1500 - UDP/IP header 28)
|
||||
);
|
||||
|
||||
// Static defaults for OpenCL input
|
||||
const StagingBuffer::IOEngineConstraints
|
||||
StagingBuffer::IOEngineConstraints::openClInputConstraints(
|
||||
static_cast<size_t>(sysconf(_SC_PAGE_SIZE)), // slotStartAlignmentByteVal (page alignment)
|
||||
sizeof(void *) // slotPadToNBytes (pointer size)
|
||||
);
|
||||
|
||||
} // namespace stim_buff
|
||||
} // namespace smo
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user