Skip to content

Commit

Permalink
add barrier missing between producer submit and needpoke check (#4593)
Browse files Browse the repository at this point in the history
* add barrier missing between producer submit and needpoke check

* submit tx ring only if prod > 0
  • Loading branch information
mtfriesen authored Oct 8, 2024
1 parent bdb85ee commit ae550a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/datapath_raw_xdp_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ae550a2

Please sign in to comment.