Skip to content

Commit

Permalink
adjust newer xdp api restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
ami-GS committed Nov 12, 2024
1 parent 058c635 commit ee5f896
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/platform/datapath_raw_xdp_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ CxPlatGetRssQueueProcessors(
if (QUIC_FAILED(Status)) { return Status; }

XSK_UMEM_REG TxUmem = {0};
UINT32 EnableAffinity = 1;
TxUmem.Address = &TxPacket;
TxUmem.ChunkSize = sizeof(XDP_TX_PACKET);
TxUmem.Headroom = FIELD_OFFSET(XDP_TX_PACKET, FrameBuffer);
Expand All @@ -189,6 +190,9 @@ CxPlatGetRssQueueProcessors(
Status = XskSetSockopt(TxXsk, XSK_SOCKOPT_TX_COMPLETION_RING_SIZE, &TxRingSize, sizeof(TxRingSize));
if (QUIC_FAILED(Status)) { CloseHandle(TxXsk); return Status; }

Status = XskSetSockopt(TxXsk, XSK_SOCKOPT_TX_PROCESSOR_AFFINITY, &EnableAffinity, sizeof(EnableAffinity));
if (QUIC_FAILED(Status)) { CloseHandle(TxXsk); return Status; }

uint32_t Flags = XSK_BIND_FLAG_TX;
Status = XskBind(TxXsk, InterfaceIndex, i, Flags);
if (QUIC_FAILED(Status)) {
Expand Down Expand Up @@ -1268,16 +1272,11 @@ RawSocketUpdateQeo(

BOOLEAN AtLeastOneSucceeded = FALSE;
for (CXPLAT_LIST_ENTRY* Entry = Xdp->Interfaces.Flink; Entry != &Xdp->Interfaces; Entry = Entry->Flink) {
// if (Xdp->XdpQeoSet != NULL) {
// Status =
// Xdp->XdpQeoSet(
// CONTAINING_RECORD(Entry, XDP_INTERFACE, Link)->XdpHandle,
// Connections,
// sizeof(Connections));
if (FALSE) {
} else {
Status = E_NOINTERFACE;
}
Status =
XdpQeoSet(
CONTAINING_RECORD(Entry, XDP_INTERFACE, Link)->XdpHandle,
Connections,
sizeof(Connections));
if (QUIC_FAILED(Status)) {
QuicTraceEvent(
LibraryErrorStatus,
Expand Down

0 comments on commit ee5f896

Please sign in to comment.