Bugfix,IoUringEngn: fill unassembled slots w/dummy; use separate iovecs
We implemented the feature to fill unassembled slots w/dummy header values for the livox pcloud header. We also fixed a bug where io uring was writing into the last slot only because we were using the same iovec for every SQE.
This commit is contained in:
@@ -28,7 +28,8 @@ class PcloudStimulusBuffer;
|
||||
class IoUringAssemblyEngine
|
||||
{
|
||||
public:
|
||||
explicit IoUringAssemblyEngine(PcloudStimulusBuffer& parent);
|
||||
explicit IoUringAssemblyEngine(
|
||||
PcloudStimulusBuffer& parent, size_t nDgramsPerStagingBufferFrame);
|
||||
~IoUringAssemblyEngine() = default;
|
||||
|
||||
bool setup();
|
||||
@@ -72,7 +73,21 @@ private:
|
||||
SpinLock isAssemblingLock;
|
||||
bool isAssembling;
|
||||
|
||||
void cancelIncompleteAndFillDummies();
|
||||
// Number of datagrams per staging buffer frame
|
||||
size_t nDgramsPerStagingBufferFrame;
|
||||
|
||||
struct SlotAssemblyDesc
|
||||
{
|
||||
bool assembled;
|
||||
struct msghdr msgHdr;
|
||||
struct iovec ioVec;
|
||||
};
|
||||
|
||||
// Track which slots have been successfully assembled and maintain persistent iovecs
|
||||
std::vector<SlotAssemblyDesc> assembledSlotsTracker;
|
||||
|
||||
void fillUnAssembledSlotsWithDummyDgrams();
|
||||
void printSlotBytes(size_t slotIndex, size_t nBytes);
|
||||
void onEventfdRead(
|
||||
const boost::system::error_code& error, std::size_t bytes_transferred);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user