From eb85fcfd080f4d1c8c0187c0cc20bfc1114d4f2f Mon Sep 17 00:00:00 2001 From: Alexandra Kossovsky Date: Fri, 22 Nov 2024 14:18:12 +0300 Subject: [PATCH] lib/ip: fix build for debug kernel Make on-stack array smaller to avoid warning when building for a kernel with a lot of debug features enabled. Decrease the maximum number of IP fragments per UDP packet from 50 to 46 (and send larger datagrams without checksum). OL-Redmine-Id: 14017 Signed-off-by: Alexandra Kossovsky --- src/lib/transport/ip/udp_send.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/transport/ip/udp_send.c b/src/lib/transport/ip/udp_send.c index 0899e3520..c34d06851 100644 --- a/src/lib/transport/ip/udp_send.c +++ b/src/lib/transport/ip/udp_send.c @@ -126,8 +126,9 @@ static bool ci_ipx_is_mf_set(int af, ci_ipx_hdr_t* ipx) ci_noinline void ci_udp_sendmsg_chksum(ci_netif* ni, ci_ip_pkt_fmt* pkt, int af, ci_ipx_hdr_t* first_hdr) { - /* 1400*50 = 70000, i.e. in normal situation there are <50 fragments */ -#define MAX_IP_FRAGMENTS 50 + /* 1428*46 = 65688 > 65536, i.e. in normal situation there are <=46 + * fragments */ +#define MAX_IP_FRAGMENTS 46 struct iovec iov[MAX_IP_FRAGMENTS]; int n = -1; ci_udp_hdr* udp = TX_PKT_IPX_UDP(af, pkt, true);