Skip to content

Commit

Permalink
Logs and round robin
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks committed Aug 29, 2024
1 parent ca5d8e6 commit 4a6929c
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/platform/datapath_raw_xdp_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,12 @@ CxPlatDpRawInterfaceInitialize(
goto Error;
}

QuicTraceLogVerbose(
XdpInterfaceQueues,
"[ixdp][%p] Initializing %u queues on interface",
Interface,
Interface->QueueCount);

Interface->Queues = CxPlatAlloc(Interface->QueueCount * sizeof(*Interface->Queues), QUEUE_TAG);
if (Interface->Queues == NULL) {
QuicTraceEvent(
Expand Down Expand Up @@ -681,6 +687,7 @@ CxPlatDpRawInterfaceInitialize(
//
// Add each queue to the correct partition.
//
uint16_t RoundRobinIndex = 0;
for (uint16_t i = 0; i < Interface->QueueCount; i++) {
BOOLEAN Found = FALSE;
for (uint16_t j = 0; j < Xdp->PartitionCount; j++) {
Expand All @@ -691,7 +698,12 @@ CxPlatDpRawInterfaceInitialize(
}
}
if (!Found) {
CXPLAT_FRE_ASSERT(FALSE); // TODO - What do we do if there is no partition for this processor?
//
// Assign leftovers based on round robin.
//
XdpWorkerAddQueue(
&Xdp->Partitions[RoundRobinIndex++ % Xdp->PartitionCount],
&Interface->Queues[i]);
}
}

Expand Down Expand Up @@ -1011,6 +1023,12 @@ CxPlatDpRawInitialize(
}
}*/

QuicTraceLogVerbose(
XdpInterfaceInitialize,
"[ixdp][%p] Initializing interface %u",
Interface,
Interface->ActualIfIndex);

Status =
CxPlatDpRawInterfaceInitialize(
Xdp, Interface, ClientRecvContextLength);
Expand Down

0 comments on commit 4a6929c

Please sign in to comment.