Add build flag to disable GSO on posix for interop runner (#1395)

The interop runner has issues with GSO, where it says its supported but it is not. Add a flag to completely disable GSO on the interop runner
This commit is contained in:
Thad House 2021-03-29 09:44:18 -07:00 коммит произвёл GitHub
Родитель 3103b2e6b9
Коммит 04cda53929
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -131,6 +131,7 @@ option(QUIC_RANDOM_ALLOC_FAIL "Randomly fails allocation calls" OFF)
option(QUIC_TLS_SECRETS_SUPPORT "Enable export of TLS secrets" OFF)
option(QUIC_TELEMETRY_ASSERTS "Enable telemetry asserts in release builds" OFF)
option(QUIC_USE_SYSTEM_LIBCRYPTO "Use system libcrypto if openssl TLS" OFF)
option(QUIC_DISABLE_POSIX_GSO "Disable GSO for systems that say they support it but don't" OFF)
# FindLTTngUST does not exist before CMake 3.6, so disable logging for older cmake versions
if (${CMAKE_VERSION} VERSION_LESS "3.6.0")
@ -342,6 +343,10 @@ else()
list(APPEND QUIC_COMMON_DEFINES CX_PLATFORM_LINUX)
endif()
if (QUIC_DISABLE_POSIX_GSO)
list(APPEND QUIC_COMMON_DEFINES DISABLE_POSIX_GSO)
endif()
if (QUIC_ENABLE_SANITIZERS)
set(QUIC_ENABLE_LOGGING OFF)
message(WARNING "LTTng logging is incompatible with sanitizers. Skipping logging")

Просмотреть файл

@ -14,7 +14,8 @@ RUN chmod +x /src/scripts/install-powershell-docker.sh
RUN /src/scripts/install-powershell-docker.sh
ENV PATH="/root/.dotnet/tools:${PATH}"
RUN cmake -DQUIC_BUILD_TEST=OFF -DQUIC_BUILD_PERF=OFF \
-DQUIC_ENABLE_LOGGING=on -DQUIC_TLS_SECRETS_SUPPORT=on ..
-DQUIC_ENABLE_LOGGING=on -DQUIC_TLS_SECRETS_SUPPORT=on \
-DQUIC_DISABLE_POSIX_GSO=on ..
RUN cmake --build .
FROM martenseemann/quic-network-simulator-endpoint

Просмотреть файл

@ -37,6 +37,12 @@ CXPLAT_STATIC_ASSERT((SIZEOF_STRUCT_MEMBER(QUIC_BUFFER, Buffer) == sizeof(void*)
//
#define CXPLAT_LARGE_SEND_BUFFER_SIZE 0xFFFF
#ifdef DISABLE_POSIX_GSO
#ifdef UDP_SEGMENT
#undef UDP_SEGMENT
#endif
#endif
//
// A receive block to receive a UDP packet over the sockets.
//