The branch main has been updated by rlibby:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=c02a8caf50bb68cb675fdef30ed803cc67a3bdac

commit c02a8caf50bb68cb675fdef30ed803cc67a3bdac
Author:     Ryan Libby <[email protected]>
AuthorDate: 2024-06-28 03:37:26 +0000
Commit:     Ryan Libby <[email protected]>
CommitDate: 2024-06-28 03:37:26 +0000

    tcp_bbr: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch
    
    Reviewed by:    tuexen
    Differential Revision:  https://reviews.freebsd.org/D45751
---
 sys/netinet/tcp_stacks/bbr.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index cee8da71af0b..cb87932fa8db 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -2356,11 +2356,11 @@ bbr_log_to_event(struct tcp_bbr *bbr, uint32_t cts, 
int32_t to_num)
                log.u_bbr.flex1 = bbr->bbr_timer_src;
                log.u_bbr.flex2 = 0;
                log.u_bbr.flex3 = bbr->r_ctl.rc_hpts_flags;
-               ar = (uint64_t)(bbr->r_ctl.rc_resend);
+               ar = (uintptr_t)(bbr->r_ctl.rc_resend);
                ar >>= 32;
                ar &= 0x00000000ffffffff;
                log.u_bbr.flex4 = (uint32_t)ar;
-               ar = (uint64_t)bbr->r_ctl.rc_resend;
+               ar = (uintptr_t)bbr->r_ctl.rc_resend;
                ar &= 0x00000000ffffffff;
                log.u_bbr.flex5 = (uint32_t)ar;
                log.u_bbr.flex6 = TICKS_2_USEC(bbr->rc_tp->t_rxtcur);
@@ -2718,12 +2718,13 @@ bbr_type_log_hdwr_pacing(struct tcp_bbr *bbr, const 
struct ifnet *ifp,
 {
        if (tcp_bblogging_on(bbr->rc_tp)) {
                union tcp_log_stackspecific log;
+               uint64_t ifp64 = (uintptr_t)ifp;
 
                bbr_fill_in_logging_data(bbr, &log.u_bbr, cts);
                log.u_bbr.flex1 = ((hw_rate >> 32) & 0x00000000ffffffff);
                log.u_bbr.flex2 = (hw_rate & 0x00000000ffffffff);
-               log.u_bbr.flex3 = (((uint64_t)ifp  >> 32) & 0x00000000ffffffff);
-               log.u_bbr.flex4 = ((uint64_t)ifp & 0x00000000ffffffff);
+               log.u_bbr.flex3 = ((ifp64  >> 32) & 0x00000000ffffffff);
+               log.u_bbr.flex4 = (ifp64 & 0x00000000ffffffff);
                log.u_bbr.bw_inuse = rate;
                log.u_bbr.flex5 = line;
                log.u_bbr.flex6 = error;

Reply via email to