WARNING: line length of 95 exceeds 80 columns #62: FILE: net/ipv4/tcp_cubic.c:84: + * sudo sh -c "echo '1' > /sys/module/your_module_name/parameters/slow_start_mode" WARNING: line length of 96 exceeds 80 columns #64: FILE: net/ipv4/tcp_cubic.c:86: + * sudo sh -c "echo '2' > /sys/module/cubic_with_search/parameters/slow_start_mode" WARNING: line length of 96 exceeds 80 columns #66: FILE: net/ipv4/tcp_cubic.c:88: + * sudo sh -c "echo '0' > /sys/module/cubic_with_search/parameters/slow_start_mode" WARNING: line length of 100 exceeds 80 columns #71: FILE: net/ipv4/tcp_cubic.c:93: +#define SEARCH_EXTRA_BINS 15 /* Number of additional bins to cover data after shiftting by RTT */ WARNING: line length of 94 exceeds 80 columns #72: FILE: net/ipv4/tcp_cubic.c:94: +#define SEARCH_TOTAL_BINS 25 /* Total number of bins containing essential bins to cover RTT WARNING: line length of 85 exceeds 80 columns #122: FILE: net/ipv4/tcp_cubic.c:143: + u8 sample_cnt;/* number of samples to decide curr_rtt */ WARNING: line length of 93 exceeds 80 columns #126: FILE: net/ipv4/tcp_cubic.c:147: + u32 last_ack; /* last time when the ACK spacing is close */ WARNING: line length of 86 exceeds 80 columns #127: FILE: net/ipv4/tcp_cubic.c:148: + u32 curr_rtt; /* the minimum rtt of current round */ WARNING: line length of 97 exceeds 80 columns #132: FILE: net/ipv4/tcp_cubic.c:153: + u32 bin_duration_us; /* duration of each bin in microsecond */ WARNING: line length of 95 exceeds 80 columns #134: FILE: net/ipv4/tcp_cubic.c:155: + u32 bin_end_us; /* end time of the latest bin in microsecond */ WARNING: line length of 90 exceeds 80 columns #135: FILE: net/ipv4/tcp_cubic.c:156: + u16 bin[SEARCH_TOTAL_BINS]; /* array to keep bytes for bins */ WARNING: line length of 96 exceeds 80 columns #137: FILE: net/ipv4/tcp_cubic.c:158: + u8 scale_factor; /* scale factor to fit the value with bin size*/ CHECK: multiple assignments should be avoided #170: FILE: net/ipv4/tcp_cubic.c:190: + ca->hystart.round_start = ca->hystart.last_ack = bictcp_clock_us(sk); WARNING: line length of 85 exceeds 80 columns #214: FILE: net/ipv4/tcp_cubic.c:408: + if (slow_start_mode == SS_HYSTART && after(ack, ca->hystart.end_seq)) WARNING: line length of 82 exceeds 80 columns #266: FILE: net/ipv4/tcp_cubic.c:496: + now - ca->hystart.round_start, threshold, WARNING: line length of 93 exceeds 80 columns #267: FILE: net/ipv4/tcp_cubic.c:497: + ca->delay_min, hystart_ack_delay(sk), tp->snd_cwnd); WARNING: line length of 99 exceeds 80 columns #335: FILE: net/ipv4/tcp_cubic.c:562: + ca->search.bin_duration_us = (rtt_us * search_window_duration_factor) / (SEARCH_BINS * 10); WARNING: line length of 90 exceeds 80 columns #357: FILE: net/ipv4/tcp_cubic.c:584: + passed_bins = ((now_us - ca->search.bin_end_us) / ca->search.bin_duration_us) + 1; WARNING: line length of 82 exceeds 80 columns #359: FILE: net/ipv4/tcp_cubic.c:586: + /* If we passed more than search_missed_bins_threshold bins, need to reset WARNING: line length of 85 exceeds 80 columns #368: FILE: net/ipv4/tcp_cubic.c:595: + for (i = ca->search.curr_idx + 1; i < ca->search.curr_idx + passed_bins; i++) WARNING: line length of 84 exceeds 80 columns #389: FILE: net/ipv4/tcp_cubic.c:616: + s32 left, s32 right, u32 fraction) WARNING: line length of 94 exceeds 80 columns #397: FILE: net/ipv4/tcp_cubic.c:624: + /* If we are interpolating using the very first bin, the "previous" bin value is 0. */ WARNING: line length of 89 exceeds 80 columns #399: FILE: net/ipv4/tcp_cubic.c:626: + delivered += (ca->search.bin[left % SEARCH_TOTAL_BINS]) * fraction / 100; WARNING: line length of 99 exceeds 80 columns #402: FILE: net/ipv4/tcp_cubic.c:629: + - ca->search.bin[(left - 1) % SEARCH_TOTAL_BINS]) * fraction / 100; WARNING: line length of 93 exceeds 80 columns #421: FILE: net/ipv4/tcp_cubic.c:648: + /* If cwnd rollback is enabled, the code calculates the initial round-trip time (RTT) WARNING: line length of 96 exceeds 80 columns #422: FILE: net/ipv4/tcp_cubic.c:649: + * and determines the congestion index (`cong_idx`) from which to compute the overshoot. WARNING: line length of 91 exceeds 80 columns #423: FILE: net/ipv4/tcp_cubic.c:650: + * The overshoot represents the excess bytes delivered beyond the estimated target, WARNING: line length of 93 exceeds 80 columns #424: FILE: net/ipv4/tcp_cubic.c:651: + * which is calculated over a window defined by the current and the rollback indices. WARNING: line length of 96 exceeds 80 columns #426: FILE: net/ipv4/tcp_cubic.c:653: + * The rollback logic adjusts the congestion window (`snd_cwnd`) based on the overshoot: WARNING: line length of 94 exceeds 80 columns #427: FILE: net/ipv4/tcp_cubic.c:654: + * 1. It first computes the overshoot congestion window (`overshoot_cwnd`), derived by WARNING: line length of 95 exceeds 80 columns #429: FILE: net/ipv4/tcp_cubic.c:656: + * 2. It reduces `snd_cwnd` by the calculated overshoot while ensuring it does not fall WARNING: line length of 98 exceeds 80 columns #430: FILE: net/ipv4/tcp_cubic.c:657: + * below the initial congestion window (`TCP_INIT_CWND`), which acts as a safety guard. WARNING: line length of 97 exceeds 80 columns #431: FILE: net/ipv4/tcp_cubic.c:658: + * 3. If the overshoot exceeds the current congestion window, it resets `snd_cwnd` to the WARNING: line length of 97 exceeds 80 columns #432: FILE: net/ipv4/tcp_cubic.c:659: + * initial value, providing a safeguard to avoid a drastic drop in case of miscalcula- WARNING: line length of 98 exceeds 80 columns #435: FILE: net/ipv4/tcp_cubic.c:662: + * After adjusting the congestion window, the slow start threshold (`snd_ssthresh`) is set WARNING: line length of 98 exceeds 80 columns #443: FILE: net/ipv4/tcp_cubic.c:670: + cong_idx = ca->search.curr_idx - ((2 * initial_rtt) / ca->search.bin_duration_us); WARNING: line length of 92 exceeds 80 columns #445: FILE: net/ipv4/tcp_cubic.c:672: + /* Calculate the overshoot based on the delivered bytes between cong_idx and WARNING: line length of 90 exceeds 80 columns #449: FILE: net/ipv4/tcp_cubic.c:676: + ca->search.curr_idx, 0); WARNING: line length of 96 exceeds 80 columns #451: FILE: net/ipv4/tcp_cubic.c:678: + /* Calculate the rollback congestion window based on overshoot divided by MSS */ WARNING: line length of 83 exceeds 80 columns #454: FILE: net/ipv4/tcp_cubic.c:681: + /* Reduce the current congestion window (cwnd) with a safety guard: WARNING: line length of 83 exceeds 80 columns #455: FILE: net/ipv4/tcp_cubic.c:682: + * It doesn't drop below the initial cwnd (TCP_INIT_CWND) or is not WARNING: line length of 82 exceeds 80 columns #456: FILE: net/ipv4/tcp_cubic.c:683: + * larger than the current cwnd (e.g., In the case of a TCP reset) WARNING: line length of 94 exceeds 80 columns #459: FILE: net/ipv4/tcp_cubic.c:686: + tp->snd_cwnd = max(tp->snd_cwnd - overshoot_cwnd, (u32)TCP_INIT_CWND); WARNING: line length of 89 exceeds 80 columns #482: FILE: net/ipv4/tcp_cubic.c:709: + /* by receiving the first ack packet, initialize bin duration and bin end time */ WARNING: line length of 85 exceeds 80 columns #494: FILE: net/ipv4/tcp_cubic.c:721: + /* check if there is enough bins after shift for computing previous window */ WARNING: line length of 98 exceeds 80 columns #497: FILE: net/ipv4/tcp_cubic.c:724: + if (prev_idx >= SEARCH_BINS && (ca->search.curr_idx - prev_idx) < SEARCH_EXTRA_BINS - 1) { WARNING: line length of 84 exceeds 80 columns #498: FILE: net/ipv4/tcp_cubic.c:725: + /* Calculate delivered bytes for the current and previous windows */ WARNING: line length of 100 exceeds 80 columns #501: FILE: net/ipv4/tcp_cubic.c:728: + ca->search.curr_idx - SEARCH_BINS, WARNING: line length of 90 exceeds 80 columns #502: FILE: net/ipv4/tcp_cubic.c:729: + ca->search.curr_idx, 0); WARNING: line length of 93 exceeds 80 columns #507: FILE: net/ipv4/tcp_cubic.c:734: + prev_delv_bytes = search_compute_delivered_window(sk, prev_idx - SEARCH_BINS, WARNING: line length of 86 exceeds 80 columns #508: FILE: net/ipv4/tcp_cubic.c:735: + prev_idx, fraction); WARNING: line length of 99 exceeds 80 columns #515: FILE: net/ipv4/tcp_cubic.c:742: + if ((2 * prev_delv_bytes) >= curr_delv_bytes && norm_diff >= search_thresh) WARNING: line length of 81 exceeds 80 columns #536: FILE: net/ipv4/tcp_cubic.c:776: + } else if (slow_start_mode == SS_HYSTART && !ca->hystart.found && WARNING: From:/Signed-off-by: email address mismatch: 'From: Feng Li ' != 'Signed-off-by: Feng Li ' total: 0 errors, 53 warnings, 1 checks, 498 lines checked NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Commit 51763894d81e ("TCP: SEARCH a new slow start algorithm to replace Hystart in TCP Cubic") has style problems, please review. NOTE: Ignored message types: ALLOC_SIZEOF_STRUCT BAD_REPORTED_BY_LINK CAMELCASE COMMIT_LOG_LONG_LINE GIT_COMMIT_ID MACRO_ARG_REUSE NO_AUTHOR_SIGN_OFF NOTE: If any of the errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. total: 0 errors, 53 warnings, 1 checks, 498 lines checked