From nobody Fri Jun 28 03:41:17 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W9Lnp6yQ8z5P6Lq; Fri, 28 Jun 2024 03:41:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W9Lnn2l0yz4G8y; Fri, 28 Jun 2024 03:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719546077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZT+pStHzi5sCXvrxEFxwhFx1fnaokBmCFWjOI/q+q/g=; b=IedbtMO8P3N4qS3T/BbG/gr8jPvpWRPNNOXt1h5b9bctPF9zFt9gyz5BuxulrCcDOUN1ec 7eGWfNYdOlzjxcPKB7cHYuq+eY+vJSckgP4ml/GyQM4eCj5DzDwW4EuoYPaZdf59I1SXk4 WE28p2MtfxOULbyDBiDuOmHxOzhIsxCXShY0SwT+5r4qm9MGCTVRqEEfUd+NBmtR4HGatO JZhkjskCg7zSurECMhqxykWRb616stqZan7kLWUD98LniXxtDCknDhqbQ6pRI2SnSgGEbI IvqCVsk2k3HZY6RtQNUpF13qV3qj/uCmXklh4xg04GF5/Iou3peVcXfhLlD81A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719546077; a=rsa-sha256; cv=none; b=avnbNXo91QqVh85ijBMG/ryU0s517uImAZdytxqAspCARA4BqMZGkpEOuHRzz42YRO5HcM utJnGMwO2JkaAAfyVQoTB38XE8DjugmJ7P7fb6C41/lQxG0NVmvpDHD9V9pzdrCVbIQJ3K vdXoXdgvwsrDLBPh/9CYvBQZu9XpJkKK+oRZB3LyRaLlIejPbHbr9hejgeoI7s8wPmw3oa GUgT+6yBHvXQQmCi/IwVBKDRAymyn3EBIk7P2B49mo+M4h7X6wsRQKZ4AyhRcXC2Wp3e4Z a0lAPIhJl1mBqgH+T5lfHT43+T/mN2S+THwEcIm/cLFI8e32bupx0kz2xwxVaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719546077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZT+pStHzi5sCXvrxEFxwhFx1fnaokBmCFWjOI/q+q/g=; b=osB5xbQuLiF3eda/j8QSrZCETRF9oXqIGtZfLlGRgslxYi3YF1NJrMCRwBMdMaj1wbFfVN Uipb/Gr9Uwqjv716Ay2+Xen1SXShP9lYnDGusqrizL4tNpDn6ga6Q1DOHEGIUiq71zj1AS f5wFNgvI+Sm+0mnsnCMAuk05l92hnSq3v+c3NtwV+sw6/SaC2oK2tVZgb7s3en2mOWlbvT mttO3hOVhSioYJBCUXdPv2/Nvwx/ms9+AWpY8/LL3L/QuCLHMsdPhrbhv49ZibBmezl4Z/ XywZZnz4r6uhq913+t4rvztwvmVGPsw4Xr8eElE6DxauFC/+we5quNSjYTLOcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W9Lnn2LPFzg9g; Fri, 28 Jun 2024 03:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45S3fHxW011301; Fri, 28 Jun 2024 03:41:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45S3fHcB011298; Fri, 28 Jun 2024 03:41:17 GMT (envelope-from git) Date: Fri, 28 Jun 2024 03:41:17 GMT Message-Id: <202406280341.45S3fHcB011298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 0d8da0df4150 - main - tcp_rack: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d8da0df415091d6ceceb74e4b6f42a15a3269e3 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=0d8da0df415091d6ceceb74e4b6f42a15a3269e3 commit 0d8da0df415091d6ceceb74e4b6f42a15a3269e3 Author: Ryan Libby AuthorDate: 2024-06-28 03:40:12 +0000 Commit: Ryan Libby CommitDate: 2024-06-28 03:40:12 +0000 tcp_rack: avoid gcc -Werror=pointer-to-int-cast on 32-bit arch Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D45752 --- sys/netinet/tcp_stacks/rack.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 551ccc1d337a..b7d9d383fc61 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -2643,6 +2643,7 @@ rack_log_hdwr_pacing(struct tcp_rack *rack, union tcp_log_stackspecific log; struct timeval tv; const struct ifnet *ifp; + uint64_t ifp64; memset(&log, 0, sizeof(log)); log.u_bbr.flex1 = ((hw_rate >> 32) & 0x00000000ffffffff); @@ -2655,8 +2656,9 @@ rack_log_hdwr_pacing(struct tcp_rack *rack, } else ifp = NULL; if (ifp) { - log.u_bbr.flex3 = (((uint64_t)ifp >> 32) & 0x00000000ffffffff); - log.u_bbr.flex4 = ((uint64_t)ifp & 0x00000000ffffffff); + ifp64 = (uintptr_t)ifp; + log.u_bbr.flex3 = ((ifp64 >> 32) & 0x00000000ffffffff); + log.u_bbr.flex4 = (ifp64 & 0x00000000ffffffff); } log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.bw_inuse = rate; @@ -2881,9 +2883,9 @@ rack_log_map_chg(struct tcpcb *tp, struct tcp_rack *rack, memset(&log.u_bbr, 0, sizeof(log.u_bbr)); log.u_bbr.flex8 = flag; log.u_bbr.inhpts = tcp_in_hpts(rack->rc_tp); - log.u_bbr.cur_del_rate = (uint64_t)prev; - log.u_bbr.delRate = (uint64_t)rsm; - log.u_bbr.rttProp = (uint64_t)next; + log.u_bbr.cur_del_rate = (uintptr_t)prev; + log.u_bbr.delRate = (uintptr_t)rsm; + log.u_bbr.rttProp = (uintptr_t)next; log.u_bbr.flex7 = 0; if (prev) { log.u_bbr.flex1 = prev->r_start; @@ -5527,7 +5529,7 @@ skip_measurement: rack_log_pacing_delay_calc(rack, tp->gput_seq, tp->gput_ack, - (uint64_t)rsm, + (uintptr_t)rsm, tp->gput_ts, (((uint64_t)rack->r_ctl.rc_app_limited_cnt << 32) | (uint64_t)rack->r_ctl.rc_gp_output_ts), 9, @@ -12739,7 +12741,7 @@ rack_log_collapse(struct tcp_rack *rack, uint32_t cnt, uint32_t split, uint32_t if (rsm == NULL) log.u_bbr.rttProp = 0; else - log.u_bbr.rttProp = (uint64_t)rsm; + log.u_bbr.rttProp = (uintptr_t)rsm; log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked); TCP_LOG_EVENTP(rack->rc_tp, NULL, @@ -15878,9 +15880,9 @@ rack_fini(struct tcpcb *tp, int32_t tcb_is_purged) log.u_bbr.flex3 = cnt_free; log.u_bbr.inflight = ctf_flight_size(rack->rc_tp, rack->r_ctl.rc_sacked); rsm = tqhash_min(rack->r_ctl.tqh); - log.u_bbr.delRate = (uint64_t)rsm; + log.u_bbr.delRate = (uintptr_t)rsm; rsm = TAILQ_FIRST(&rack->r_ctl.rc_free); - log.u_bbr.cur_del_rate = (uint64_t)rsm; + log.u_bbr.cur_del_rate = (uintptr_t)rsm; log.u_bbr.timeStamp = tcp_get_usecs(&tv); log.u_bbr.pkt_epoch = __LINE__; (void)tcp_log_event(tp, NULL, NULL, NULL, TCP_LOG_OUT, ERRNO_UNK, @@ -18885,7 +18887,7 @@ start_set: rack_log_pacing_delay_calc(rack, tp->gput_seq, tp->gput_ack, - (uint64_t)my_rsm, + (uintptr_t)my_rsm, tp->gput_ts, (((uint64_t)rack->r_ctl.rc_app_limited_cnt << 32) | (uint64_t)rack->r_ctl.rc_gp_output_ts), 9, @@ -18938,7 +18940,7 @@ use_latest: rack_log_pacing_delay_calc(rack, tp->gput_seq, tp->gput_ack, - (uint64_t)my_rsm, + (uintptr_t)my_rsm, tp->gput_ts, (((uint64_t)rack->r_ctl.rc_app_limited_cnt << 32) | (uint64_t)rack->r_ctl.rc_gp_output_ts), 9, __LINE__, NULL, 0); @@ -19754,7 +19756,7 @@ rack_fast_rsm_output(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendma } log.u_bbr.lt_epoch = rack->r_ctl.cwnd_to_use; log.u_bbr.delivered = 0; - log.u_bbr.rttProp = (uint64_t)rsm; + log.u_bbr.rttProp = (uintptr_t)rsm; log.u_bbr.delRate = rsm->r_flags; log.u_bbr.delRate <<= 31; log.u_bbr.delRate |= rack->r_must_retran; @@ -22941,7 +22943,7 @@ send: } log.u_bbr.lt_epoch = cwnd_to_use; log.u_bbr.delivered = sendalot; - log.u_bbr.rttProp = (uint64_t)rsm; + log.u_bbr.rttProp = (uintptr_t)rsm; log.u_bbr.pkt_epoch = __LINE__; if (rsm) { log.u_bbr.delRate = rsm->r_flags;