Skip to content

Commit dcc8b20

Browse files
committed
net-tcp_bbr: v3: change u64 to unsigned long for bytes in bbr_tso_segs_generic
This change addresses a build failure on 32-bit systems due to undefined division symbols: arm: ERROR: modpost: "__aeabi_uldivmod" [net/ipv4/tcp_bbr.ko] undefined! ERROR: modpost: "__aeabi_ldivmod" [net/ipv4/tcp_bbr.ko] undefined! x86, mips, ppc: ERROR: modpost: "__udivdi3" [net/ipv4/tcp_bbr.ko] undefined! ERROR: modpost: "__divdi3" [net/ipv4/tcp_bbr.ko] undefined! Since `sk->sk_pacing_rate` is already an `unsigned long`, the `bytes` variable is updated to `unsigned long` to resolve these division issues and ensure compatibility across both 32-bit and 64-bit platforms. Signed-off-by: Chen Minqiang <[email protected]>
1 parent 001a430 commit dcc8b20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/tcp_bbr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ static u32 bbr_tso_segs_generic(struct sock *sk, unsigned int mss_now,
481481
{
482482
struct bbr *bbr = inet_csk_ca(sk);
483483
u32 segs, r;
484-
u64 bytes;
484+
unsigned long bytes;
485485

486486
/* Budget a TSO/GSO burst size allowance based on bw (pacing_rate). */
487487
bytes = sk->sk_pacing_rate >> sk->sk_pacing_shift;

0 commit comments

Comments
 (0)