From 854a7aa23216892561507b7c476babc8751cd32d Mon Sep 17 00:00:00 2001 From: Nick Pleatsikas Date: Tue, 6 Aug 2024 15:35:21 -0700 Subject: [PATCH 1/2] Reduce number of rx buffers in bnxt driver source. This resolve an issue where downloading large files will hang because the driver stops reading new packets. This issue was caused by commit `059c4dc` which changed how drivers are loaded by iPXE. A workaround wherein the number of recieve buffers is reduced from 8 to 2 was identified in the issue listed in the function comment. - Added function to build script to set `NUM_RX_BUFFERS` 2 in the Broadcom NetXtreme driver source before compilation. Signed-off-by: Nick Pleatsikas --- binary/script/build_ipxe.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/binary/script/build_ipxe.sh b/binary/script/build_ipxe.sh index e21e8ef..7e5fc35 100755 --- a/binary/script/build_ipxe.sh +++ b/binary/script/build_ipxe.sh @@ -81,6 +81,14 @@ function customize_aarch_build() { sed -i.bak '/^WORKAROUND_CFLAGS/ s|^|#|' "${ipxe_dir}"/src/arch/arm64/Makefile } +# Workaround for Broadcom NetXtreme driver bug that causes a hang when +# trying to download large files. See this iPXE issue for more detail: +# https://github.com/ipxe/ipxe/issues/1023#issuecomment-1898585257 +function patch_bnxt_rx_buffers() { + local ipxe_dir="$1" + sed -i.bak 's/\(#define NUM_RX_BUFFERS \).*/\12/' "${ipxe_dir}"/src/drivers/net/bnxt/bnxt.h +} + # customize orchestrates the process for adding custom headers to an ipxe compile. function customize() { local ipxe_dir="$1" @@ -90,6 +98,7 @@ function customize() { copy_common_files "${ipxe_dir}" copy_custom_files "${ipxe_dir}" "${ipxe_bin}" customize_aarch_build "${ipxe_dir}" + patch_bnxt_rx_buffers "${ipxe_dir}" } function hasType() { From ec5dda77fece330b569f95998acdafaa63627ced Mon Sep 17 00:00:00 2001 From: Nick Pleatsikas Date: Wed, 7 Aug 2024 14:31:23 -0700 Subject: [PATCH 2/2] Disabled header file backup. Signed-off-by: Nick Pleatsikas --- binary/script/build_ipxe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binary/script/build_ipxe.sh b/binary/script/build_ipxe.sh index 7e5fc35..f8bf1a1 100755 --- a/binary/script/build_ipxe.sh +++ b/binary/script/build_ipxe.sh @@ -86,7 +86,7 @@ function customize_aarch_build() { # https://github.com/ipxe/ipxe/issues/1023#issuecomment-1898585257 function patch_bnxt_rx_buffers() { local ipxe_dir="$1" - sed -i.bak 's/\(#define NUM_RX_BUFFERS \).*/\12/' "${ipxe_dir}"/src/drivers/net/bnxt/bnxt.h + sed -i 's/\(#define NUM_RX_BUFFERS \).*/\12/' "${ipxe_dir}"/src/drivers/net/bnxt/bnxt.h } # customize orchestrates the process for adding custom headers to an ipxe compile.