Skip to content

Commit

Permalink
Disable Segmentation Support on EIO (#3867) (#3877)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Sep 26, 2023
1 parent c3e071f commit 7fa092b
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/generated/linux/datapath_epoll.c.clog.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,24 @@ tracepoint(CLOG_DATAPATH_EPOLL_C, DatapathSend , arg2, arg3, arg4, arg5, arg6_le



/*----------------------------------------------------------
// Decoder Ring for LibraryError
// [ lib] ERROR, %s.
// QuicTraceEvent(
LibraryError,
"[ lib] ERROR, %s.",
"Disabling segmentation support globally");
// arg2 = arg2 = "Disabling segmentation support globally" = arg2
----------------------------------------------------------*/
#ifndef _clog_3_ARGS_TRACE_LibraryError
#define _clog_3_ARGS_TRACE_LibraryError(uniqueId, encoded_arg_string, arg2)\
tracepoint(CLOG_DATAPATH_EPOLL_C, LibraryError , arg2);\

#endif




#ifdef __cplusplus
}
#endif
Expand Down
19 changes: 19 additions & 0 deletions src/generated/linux/datapath_epoll.c.clog.h.lttng.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,22 @@ TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, DatapathSend,
ctf_sequence(char, arg7, arg7, unsigned int, arg7_len)
)
)



/*----------------------------------------------------------
// Decoder Ring for LibraryError
// [ lib] ERROR, %s.
// QuicTraceEvent(
LibraryError,
"[ lib] ERROR, %s.",
"Disabling segmentation support globally");
// arg2 = arg2 = "Disabling segmentation support globally" = arg2
----------------------------------------------------------*/
TRACEPOINT_EVENT(CLOG_DATAPATH_EPOLL_C, LibraryError,
TP_ARGS(
const char *, arg2),
TP_FIELDS(
ctf_string(arg2, arg2)
)
)
23 changes: 23 additions & 0 deletions src/platform/datapath_epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -2465,12 +2465,35 @@ CxPlatSendDataSend(
Status = QUIC_STATUS_PENDING;
} else {
Status = errno;
#ifdef UDP_SEGMENT
QuicTraceEvent(
DatapathErrorStatus,
"[data][%p] ERROR, %u, %s.",
SocketContext->Binding,
Status,
"sendmsg (GSO) failed");
#else
QuicTraceEvent(
DatapathErrorStatus,
"[data][%p] ERROR, %u, %s.",
SocketContext->Binding,
Status,
"sendmmsg failed");
#endif

if (Status == EIO &&
SocketContext->Binding->Datapath->Features & CXPLAT_DATAPATH_FEATURE_SEND_SEGMENTATION) {
//
// EIO generally indicates the GSO isn't supported by the NIC,
// so disable segmentation on the datapath globally.
//
QuicTraceEvent(
LibraryError,
"[ lib] ERROR, %s.",
"Disabling segmentation support globally");
SocketContext->Binding->Datapath->Features &=
~CXPLAT_DATAPATH_FEATURE_SEND_SEGMENTATION;
}

//
// Unreachable events can sometimes come synchronously.
Expand Down

0 comments on commit 7fa092b

Please sign in to comment.