The branch main has been updated by tuexen:

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

commit 15c991fd64b79d8c7ba0ac20fa713a4102d60c1e
Author:     Nick Banks <nickba...@netflix.com>
AuthorDate: 2025-07-24 16:17:35 +0000
Commit:     Michael Tuexen <tue...@freebsd.org>
CommitDate: 2025-07-24 16:17:35 +0000

    tcp: remove trailing whitespaces
    
    Reviewed by:            cc, tuexen, Peter Lei
    Sponsored by:           Netflix, Inc.
    Differential Revision:  https://reviews.freebsd.org/D51437
---
 sys/netinet/in_fib_dxr.c             |  6 +++---
 sys/netinet/tcp_log_buf.h            |  6 +++---
 sys/netinet/tcp_lro.c                | 12 ++++++------
 sys/netinet/tcp_sack.c               |  2 +-
 sys/netinet/tcp_stacks/bbr.c         | 12 ++++++------
 sys/netinet/tcp_stacks/rack.c        |  8 ++++----
 sys/netinet/tcp_stacks/rack_pcm.c    |  4 ++--
 sys/netinet/tcp_stacks/sack_filter.c |  8 ++++----
 sys/netinet/tcp_stacks/sack_filter.h |  2 +-
 sys/netinet/tcp_subr.c               |  2 +-
 sys/netinet/tcp_timer.c              |  4 ++--
 sys/netinet/tcp_usrreq.c             |  8 ++++----
 sys/netinet/tcp_var.h                | 26 +++++++++++++-------------
 13 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c
index b889131b544b..538cd43a88a3 100644
--- a/sys/netinet/in_fib_dxr.c
+++ b/sys/netinet/in_fib_dxr.c
@@ -345,7 +345,7 @@ initheap(struct dxr_aux *da, uint32_t dst_u32, uint32_t 
chunk)
        struct heap_entry *fhp = &da->heap[0];
        struct rtentry *rt;
        struct route_nhop_data rnd;
- 
+
        da->heap_index = 0;
        da->dst.sin_addr.s_addr = htonl(dst_u32);
        rt = fib4_lookup_rt(da->fibnum, da->dst.sin_addr, 0, NHR_UNLOCKED,
@@ -1143,7 +1143,7 @@ dxr_destroy(void *data)
        free(da, M_DXRAUX);
 }
 
-static void 
+static void
 epoch_dxr_destroy(epoch_context_t ctx)
 {
        struct dxr *dxr = __containerof(ctx, struct dxr, epoch_ctx);
@@ -1202,7 +1202,7 @@ dxr_dump_end(void *data, struct fib_dp *dp)
 static enum flm_op_result
 dxr_dump_rib_item(struct rtentry *rt, void *data)
 {
-       
+
        return (FLM_SUCCESS);
 }
 
diff --git a/sys/netinet/tcp_log_buf.h b/sys/netinet/tcp_log_buf.h
index 3e7eef8a1cda..f8c064b6a104 100644
--- a/sys/netinet/tcp_log_buf.h
+++ b/sys/netinet/tcp_log_buf.h
@@ -377,12 +377,12 @@ extern int32_t tcp_trace_point_count;
 
 /*
  * Returns true if any sort of BB logging is enabled,
- * commonly used throughout the codebase. 
+ * commonly used throughout the codebase.
  */
 static inline int
 tcp_bblogging_on(struct tcpcb *tp)
 {
-       if (tp->_t_logstate <= TCP_LOG_STATE_OFF) 
+       if (tp->_t_logstate <= TCP_LOG_STATE_OFF)
                return (0);
        if (tp->_t_logstate == TCP_LOG_VIA_BBPOINTS)
                return (0);
@@ -427,7 +427,7 @@ tcp_set_bblog_state(struct tcpcb *tp, uint8_t ls, uint8_t 
bbpoint)
        }
 }
 
-static inline uint32_t 
+static inline uint32_t
 tcp_get_bblog_state(struct tcpcb *tp)
 {
        return (tp->_t_logstate);
diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c
index 10afed17bf3b..7512679bd4e9 100644
--- a/sys/netinet/tcp_lro.c
+++ b/sys/netinet/tcp_lro.c
@@ -1301,9 +1301,9 @@ tcp_lro_rx_common(struct lro_ctrl *lc, struct mbuf *m, 
uint32_t csum, bool use_h
                return (TCP_LRO_CANNOT);
 #endif
        if (((m->m_pkthdr.csum_flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) !=
-            ((CSUM_DATA_VALID | CSUM_PSEUDO_HDR))) || 
+            ((CSUM_DATA_VALID | CSUM_PSEUDO_HDR))) ||
            (m->m_pkthdr.csum_data != 0xffff)) {
-               /* 
+               /*
                 * The checksum either did not have hardware offload
                 * or it was a bad checksum. We can't LRO such
                 * a packet.
@@ -1334,7 +1334,7 @@ tcp_lro_rx_common(struct lro_ctrl *lc, struct mbuf *m, 
uint32_t csum, bool use_h
 #endif
        /* If no hardware or arrival stamp on the packet add timestamp */
        if ((m->m_flags & (M_TSTMP_LRO | M_TSTMP)) == 0) {
-               m->m_pkthdr.rcv_tstmp = bintime2ns(&lc->lro_last_queue_time); 
+               m->m_pkthdr.rcv_tstmp = bintime2ns(&lc->lro_last_queue_time);
                m->m_flags |= M_TSTMP_LRO;
        }
 
@@ -1429,9 +1429,9 @@ tcp_lro_rx(struct lro_ctrl *lc, struct mbuf *m, uint32_t 
csum)
        int error;
 
        if (((m->m_pkthdr.csum_flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) !=
-            ((CSUM_DATA_VALID | CSUM_PSEUDO_HDR))) || 
+            ((CSUM_DATA_VALID | CSUM_PSEUDO_HDR))) ||
            (m->m_pkthdr.csum_data != 0xffff)) {
-               /* 
+               /*
                 * The checksum either did not have hardware offload
                 * or it was a bad checksum. We can't LRO such
                 * a packet.
@@ -1481,7 +1481,7 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, struct mbuf *mb)
            ((mb->m_flags & M_TSTMP) == 0)) {
                /* Add in an LRO time since no hardware */
                binuptime(&lc->lro_last_queue_time);
-               mb->m_pkthdr.rcv_tstmp = bintime2ns(&lc->lro_last_queue_time); 
+               mb->m_pkthdr.rcv_tstmp = bintime2ns(&lc->lro_last_queue_time);
                mb->m_flags |= M_TSTMP_LRO;
        }
 
diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c
index 90d789f0e224..4405098a8620 100644
--- a/sys/netinet/tcp_sack.c
+++ b/sys/netinet/tcp_sack.c
@@ -744,7 +744,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq 
th_ack)
        while (cur != NULL) {
                if (!(sblkp >= sack_blocks)) {
                        if (((loss_sblks >= tcprexmtthresh) ||
-                           (loss_thresh > (tcprexmtthresh-1)*tp->t_maxseg))) 
+                           (loss_thresh > (tcprexmtthresh-1)*tp->t_maxseg)))
                                break;
                        loss_thresh += loss_hiack - cur->end;
                        loss_hiack = cur->start;
diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 4345e6d4480e..b232d3f08fe6 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -5126,8 +5126,8 @@ bbr_timeout_rxt(struct tcpcb *tp, struct tcp_bbr *bbr, 
uint32_t cts)
                                tp->t_maxseg = tp->t_pmtud_saved_maxseg;
                                if (tp->t_maxseg < V_tcp_mssdflt) {
                                        /*
-                                        * The MSS is so small we should not 
-                                        * process incoming SACK's since we are 
+                                        * The MSS is so small we should not
+                                        * process incoming SACK's since we are
                                         * subject to attack in such a case.
                                         */
                                        tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
@@ -10141,7 +10141,7 @@ bbr_init(struct tcpcb *tp, void **ptr)
         * flags.
         */
        bbr_stop_all_timers(tp, bbr);
-       /* 
+       /*
         * Validate the timers are not in usec, if they are convert.
         * BBR should in theory move to USEC and get rid of a
         * lot of the TICKS_2 calls.. but for now we stay
@@ -11544,7 +11544,7 @@ bbr_do_segment_nounlock(struct tcpcb *tp, struct mbuf 
*m, struct tcphdr *th,
                bbr_check_bbr_for_state(bbr, cts, __LINE__, (bbr->r_ctl.rc_lost 
- lost));
                if (nxt_pkt == 0) {
                        if ((bbr->r_wanted_output != 0) ||
-                           (tp->t_flags & TF_ACKNOW)) { 
+                           (tp->t_flags & TF_ACKNOW)) {
 
                                bbr->rc_output_starts_timer = 0;
                                did_out = 1;
@@ -13802,8 +13802,8 @@ nomore:
                                        tp->t_maxseg = old_maxseg - 40;
                                        if (tp->t_maxseg < V_tcp_mssdflt) {
                                                /*
-                                                * The MSS is so small we 
should not 
-                                                * process incoming SACK's 
since we are 
+                                                * The MSS is so small we 
should not
+                                                * process incoming SACK's 
since we are
                                                 * subject to attack in such a 
case.
                                                 */
                                                tp->t_flags2 |= 
TF2_PROC_SACK_PROHIBIT;
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index cb2c021967b4..940a4024bb73 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -7888,8 +7888,8 @@ drop_it:
                                tp->t_maxseg = tp->t_pmtud_saved_maxseg;
                                if (tp->t_maxseg < V_tcp_mssdflt) {
                                        /*
-                                        * The MSS is so small we should not 
-                                        * process incoming SACK's since we are 
+                                        * The MSS is so small we should not
+                                        * process incoming SACK's since we are
                                         * subject to attack in such a case.
                                         */
                                        tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
@@ -15561,7 +15561,7 @@ rack_log_pcm(struct tcp_rack *rack, uint8_t mod, 
uint32_t flex1, uint32_t flex2,
        if (tcp_bblogging_on(rack->rc_tp)) {
                union tcp_log_stackspecific log;
                struct timeval tv;
-               
+
                (void)tcp_get_usecs(&tv);
                memset(&log, 0, sizeof(log));
                log.u_bbr.timeStamp = tcp_tv_to_usectick(&tv);
@@ -19912,7 +19912,7 @@ rack_output(struct tcpcb *tp)
                        goto nomore;
                } else {
                        /* Return == 0, if there is more we can send tot_len 
wise fall through and send */
-                       if (tot_len_this_send >= pace_max_seg) 
+                       if (tot_len_this_send >= pace_max_seg)
                                return (ret);
 #ifdef TCP_ACCOUNTING
                        /* We need to re-pin since fast_output un-pined */
diff --git a/sys/netinet/tcp_stacks/rack_pcm.c 
b/sys/netinet/tcp_stacks/rack_pcm.c
index b0e300847c4a..101e6826536c 100644
--- a/sys/netinet/tcp_stacks/rack_pcm.c
+++ b/sys/netinet/tcp_stacks/rack_pcm.c
@@ -172,7 +172,7 @@ rack_update_pcm_ack(struct tcp_rack *rack, int was_cumack, 
uint32_t start, uint3
                goto skip_ack_accounting;
        }
        /*
-        * Record ACK data. 
+        * Record ACK data.
         */
        ack_arrival = tcp_tv_to_lusectick(&rack->r_ctl.act_rcv_time);
        if (SEQ_GT(end, rack->r_ctl.pcm_i.eseq)) {
@@ -305,7 +305,7 @@ skip_ack_accounting:
                                            0, &log, false, NULL, NULL, 0, &tv);
                }
        }
-       /* 
+       /*
         * Here we need a lot to be added including:
         * 1) Some form of measurement, where if we think the measurement
         *    is valid we iterate over the PCM data and come up with a path
diff --git a/sys/netinet/tcp_stacks/sack_filter.c 
b/sys/netinet/tcp_stacks/sack_filter.c
index fc9ee8454a1e..2b70548f3cc6 100644
--- a/sys/netinet/tcp_stacks/sack_filter.c
+++ b/sys/netinet/tcp_stacks/sack_filter.c
@@ -400,7 +400,7 @@ sack_filter_run(struct sack_filter *sf, struct sackblk *in, 
int numblks, tcp_seq
                        break;
                }
                /* Copy it out to the outbound */
-               memcpy(&in[at], &blkboard[i], sizeof(struct sackblk));          
+               memcpy(&in[at], &blkboard[i], sizeof(struct sackblk));
                at++;
                room--;
                /* now lets add it to our sack-board */
@@ -588,7 +588,7 @@ sack_filter_blks(struct tcpcb *tp, struct sack_filter *sf, 
struct sackblk *in, i
 
                sf->sf_ack = th_ack;
                for(i=0, sf->sf_cur=0; i<numblks; i++) {
-                       if ((in[i].end != tp->snd_max) && 
+                       if ((in[i].end != tp->snd_max) &&
                            ((in[i].end - in[i].start) < segmax)) {
                                /*
                                 * We do not accept blocks less than a MSS 
minus all
@@ -707,7 +707,7 @@ main(int argc, char **argv)
        out = stdout;
        memset(&tp, 0, sizeof(tp));
        tp.t_maxseg = 1460;
-       
+
        while ((i = getopt(argc, argv, "dIi:o:?hS:")) != -1) {
                switch (i) {
                case 'S':
@@ -883,7 +883,7 @@ main(int argc, char **argv)
                        } else {
                                printf("can't open sack_setup.bin -- sorry no 
load\n");
                        }
-                       
+
                } else if (strncmp(buffer, "help", 4) == 0) {
 help:
                        fprintf(out, "You can input:\n");
diff --git a/sys/netinet/tcp_stacks/sack_filter.h 
b/sys/netinet/tcp_stacks/sack_filter.h
index b12fcf84567c..a1c0684a4359 100644
--- a/sys/netinet/tcp_stacks/sack_filter.h
+++ b/sys/netinet/tcp_stacks/sack_filter.h
@@ -42,7 +42,7 @@
  * previously processed sack information.
  *
  * The second thing that the sack filter does is help protect against malicious
- * attackers that are trying to attack any linked lists (or other data 
structures) 
+ * attackers that are trying to attack any linked lists (or other data 
structures)
  * that are used in sack processing. Consider an attacker sending in sacks for
  * every other byte of data outstanding. This could in theory drastically split
  * up any scoreboard you are maintaining and make you search through a very 
large
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index db415f6bdf03..26e7e53d540c 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -4537,7 +4537,7 @@ tcp_change_time_units(struct tcpcb *tp, int granularity)
                panic("Unknown granularity:%d tp:%p",
                      granularity, tp);
        }
-#endif 
+#endif
 }
 
 void
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 32ce3001929c..3b9fe7a317b0 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -757,8 +757,8 @@ tcp_timer_rexmt(struct tcpcb *tp)
                                tp->t_maxseg = tp->t_pmtud_saved_maxseg;
                                if (tp->t_maxseg < V_tcp_mssdflt) {
                                        /*
-                                        * The MSS is so small we should not 
-                                        * process incoming SACK's since we are 
+                                        * The MSS is so small we should not
+                                        * process incoming SACK's since we are
                                         * subject to attack in such a case.
                                         */
                                        tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT;
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 687b0d538666..70e4c04b79e5 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1768,9 +1768,9 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt)
                                /*
                                 * Release the ref count the lookup
                                 * acquired.
-                                */ 
+                                */
                                refcount_release(&blk->tfb_refcnt);
-                               /* 
+                               /*
                                 * Now there is a chance that the
                                 * init() function mucked with some
                                 * things before it failed, such as
@@ -1800,7 +1800,7 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt)
                 * new one already.
                 */
                refcount_release(&tp->t_fb->tfb_refcnt);
-               /* 
+               /*
                 * Set in the new stack.
                 */
                tp->t_fb = blk;
@@ -1934,7 +1934,7 @@ tcp_set_cc_mod(struct inpcb *inp, struct sockopt *sopt)
                CC_LIST_RUNLOCK();
                return(ESRCH);
        }
-       /* 
+       /*
         * With a reference the algorithm cannot be removed
         * so we hold a reference through the change process.
         */
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 059b2aff689d..b90f65e83cb1 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -182,7 +182,7 @@ struct tcp_sendfile_track {
  * snd_una). When the response comes back indicating
  * that there was data (return value 1), then the caller
  * can build a sendmap entry based on the range and the
- * times. The next query would then be done at the 
+ * times. The next query would then be done at the
  * newly created sendmap_end. Repeated until sendmap_end == snd_max.
  *
  * Flags in sendmap_flags are defined below as well.
@@ -197,7 +197,7 @@ struct tcp_sendfile_track {
  * The rack_times are a misc collection of information that
  * the old stack might possibly fill in. Of course its possible
  * that an old stack may not have a piece of information. If so
- * then setting that value to zero is advised. Setting any 
+ * then setting that value to zero is advised. Setting any
  * timestamp passed should only place a zero in it when it
  * is unfilled. This may mean that a time is off by a micro-second
  * but this is ok in the grand scheme of things.
@@ -205,13 +205,13 @@ struct tcp_sendfile_track {
  * When switching stacks it is desireable to get as much information
  * from the old stack to the new stack as possible. Though not always
  * will the stack be compatible in the types of information. The
- * init() function needs to take care when it begins changing 
+ * init() function needs to take care when it begins changing
  * things such as inp_flags2 and the timer units to position these
  * changes at a point where it is unlikely they will fail after
  * making such changes. A stack optionally can have an "undo"
- * function  
+ * function
  *
- * To transfer information to the old stack from the new in 
+ * To transfer information to the old stack from the new in
  * respect to LRO and the inp_flags2, the new stack should set
  * the inp_flags2 to what it supports. The old stack in its
  * fini() function should call the tcp_handle_orphaned_packets()
@@ -544,13 +544,13 @@ typedef enum {
  * do is:
  * a) Make sure that the inp_flags2 is setup correctly
  *    for LRO. There are two flags that the previous
- *    stack may have set INP_MBUF_ACKCMP and 
+ *    stack may have set INP_MBUF_ACKCMP and
  *    INP_SUPPORTS_MBUFQ. If the new stack does not
  *    support these it *should* clear the flags.
  * b) Make sure that the timers are in the proper
  *    granularity that the stack wants. The stack
  *    should check the t_tmr_granularity field. Currently
- *    there are two values that it may hold 
+ *    there are two values that it may hold
  *    TCP_TMR_GRANULARITY_TICKS and TCP_TMR_GRANULARITY_USEC.
  *    Use the functions tcp_timer_convert(tp, granularity);
  *    to move the timers to the correct format for your stack.
@@ -558,14 +558,14 @@ typedef enum {
  * The new stack may also optionally query the tfb_chg_query
  * function if the old stack has one. The new stack may ask
  * for one of three entries and can also state to the old
- * stack its support for the INP_MBUF_ACKCMP and 
+ * stack its support for the INP_MBUF_ACKCMP and
  * INP_SUPPORTS_MBUFQ. This is important since if there are
  * queued ack's without that statement the old stack will
  * be forced to discard the queued acks. The requests that
  * can be made for information by the new stacks are:
  *
  * Note also that the tfb_tcp_fb_init() when called can
- * determine if a query is needed by looking at the 
+ * determine if a query is needed by looking at the
  * value passed in the ptr. The ptr is designed to be
  * set in with any allocated memory, but the address
  * of the condtion (ptr == &tp->t_fb_ptr) will be
@@ -573,17 +573,17 @@ typedef enum {
  * setup of a tcb (which means no query would be needed).
  * If, however, the value is not t_fb_ptr, then the caller
  * is in the middle of a stack switch and is the new stack.
- * A query would be appropriate (if the new stack support 
+ * A query would be appropriate (if the new stack support
  * the query mechanism).
  *
  * TCP_QUERY_SENDMAP - Query of outstanding data.
  * TCP_QUERY_TIMERS_UP - Query about running timers.
- * TCP_SUPPORTED_LRO - Declaration in req_param of 
- *                     the inp_flags2 supported by 
+ * TCP_SUPPORTED_LRO - Declaration in req_param of
+ *                     the inp_flags2 supported by
  *                     the new stack.
  * TCP_QUERY_RACK_TIMES        - Enquire about various timestamps
  *                        and states the old stack may be in.
- * 
+ *
  * tfb_tcp_fb_fini is changed to add a flag to tell
  * the old stack if the tcb is being destroyed or
  * not. A one in the flag means the TCB is being

Reply via email to