diff --git a/src/platform/datapath_raw_xdp_win.c b/src/platform/datapath_raw_xdp_win.c index f8d7810f1c..ff1697fec2 100644 --- a/src/platform/datapath_raw_xdp_win.c +++ b/src/platform/datapath_raw_xdp_win.c @@ -1697,9 +1697,9 @@ CxPlatXdpTx( ProdCount++; } - if (ProdCount > 0 || + if ((ProdCount > 0 && (XskRingProducerSubmit(&Queue->TxRing, ProdCount), TRUE)) || (CompCount > 0 && XskRingProducerReserve(&Queue->TxRing, MAXUINT32, &TxIndex) != Queue->TxRing.Size)) { - XskRingProducerSubmit(&Queue->TxRing, ProdCount); + MemoryBarrier(); if (Xdp->TxAlwaysPoke || XskRingProducerNeedPoke(&Queue->TxRing)) { XSK_NOTIFY_RESULT_FLAGS OutFlags; QUIC_STATUS Status = Xdp->XdpApi->XskNotifySocket(Queue->TxXsk, XSK_NOTIFY_FLAG_POKE_TX, 0, &OutFlags);