Skip to content

Commit

Permalink
use Config->Route->DatapathType for data allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
ami-GS committed Sep 7, 2023
1 parent 9720513 commit 02b39de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/platform/datapath_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,9 @@ CxPlatSendDataAlloc(
{
CXPLAT_SEND_DATA* SendData = NULL;
// TODO: fallback?
if (Socket->UseTcp || (Socket->Type == CXPLAT_SOCKET_UDP &&
Socket->RawSocketAvailable &&
!IS_LOOPBACK(Config->Route->RemoteAddress))) {
if (Socket->UseTcp || Config->Route->DatapathType == CXPLAT_DATAPATH_TYPE_XDP ||
(Config->Route->DatapathType == CXPLAT_DATAPATH_TYPE_UNKNOWN &&
Socket->RawSocketAvailable && !IS_LOOPBACK(Config->Route->RemoteAddress))) {
SendData = RawSendDataAlloc(SocketToRaw(Socket), Config);
if (SendData) {
DatapathType(SendData) = CXPLAT_DATAPATH_TYPE_XDP;
Expand Down

0 comments on commit 02b39de

Please sign in to comment.