From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 741623CB49 for ; Fri, 1 Oct 2021 12:32:44 -0400 (EDT) Received: by mail-ed1-x52d.google.com with SMTP id l7so13195253edq.3 for ; Fri, 01 Oct 2021 09:32:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yi9ZE+i4ekGdFGI/E3UvBEFrpvfcyyV+wk+QG37758Y=; b=Evg8iyjVYCbnQ0LFW/wC32uBDHwmbOarV49piZqTe4fUGn07IzepfabivbW4wVeGUp +yB6ZawmCQZYtdQ41o9FFXrcCndbIBS1IWfAfXg53G8rrP0sOQpEoRPdQBAuySGJG3Rk X2mJJgdq/cjIHiA3bEEmgJWNnVuS04XZLlxKI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yi9ZE+i4ekGdFGI/E3UvBEFrpvfcyyV+wk+QG37758Y=; b=aUjxnaDLmXt3pn1Zb/eLZFH5K09zlW/8vyngelDXrkCWYux5MZQiytuEJ0PPh/N/Yk LWDBVMvsEwIDNm1jvRgCuBE2vA/cKPTyhBSM3j/w9eQ85uQ9eNz2XKRl2iVZt291/zVY UMIGU8DHZSWGdXwPiVFx5Kt+PmQ31k62JkdEyGRfxBoB8xWMdzKa6IeDNymCNIbiB2t0 TOYdf9opw1olHQOB5zzGOmZ8KBzGbCZxTTd/W+t9OXshaAlTfey0Q2rSow+gr4frJ/e5 uEQtjID3sTxM/UGTZ80O81XCkkzaWNivh9NoxalhebWwq+/ex28Q6d/EshjLEbUiq5bR ZXMQ== X-Gm-Message-State: AOAM5319+kOZKHuMwzh7feoPtoWiOn4Mv0aKXXu2L/rxzyw8ZCW/SZBj boolsmkeF+Wu+vfK8xLBmNmBVApCAAxDQOs4epxk/6PdXnrFSvZJrhY/BxHMSbeZ7hTNhKy5gxQ LWrx1uhWyXYcTJeg9haOzVJXJRqQRAlfBhEA= X-Google-Smtp-Source: ABdhPJzyuxqPG6Ozv6TqDd/NUC5ppRxv5P5Gv0FQ8QvH0cZDI3ECQDsP1WnzifaSrb5OSm+NWLRGlQl9exm1jW3Lxtw= X-Received: by 2002:a50:f60a:: with SMTP id c10mr15380457edn.250.1633105963112; Fri, 01 Oct 2021 09:32:43 -0700 (PDT) MIME-Version: 1.0 References: <56ef13985bd34834916aabef978db1f1@EX16-05.ad.unipi.it> In-Reply-To: From: Bob McMahon Date: Fri, 1 Oct 2021 09:32:32 -0700 Message-ID: To: Luigi Rizzo Cc: Dave Taht , "rpm@lists.bufferbloat.net" , Ben Greear , Karl Auerbach , bloat Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000d5387a05cd4d1c75" Subject: Re: [Bloat] Relentless congestion control for testing purposes X-BeenThere: bloat@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: General list for discussing Bufferbloat List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Oct 2021 16:32:44 -0000 --000000000000d5387a05cd4d1c75 Content-Type: multipart/alternative; boundary="000000000000d015c005cd4d1cfc" --000000000000d015c005cd4d1cfc Content-Type: text/plain; charset="UTF-8" hmm, this looks interesting to a test & measurement guy. Can it be done with a setsockopt? I might want to add this as an iperf2 option, particularly if it's broadly available, Thanks, Bob On Fri, Oct 1, 2021 at 9:22 AM Luigi Rizzo wrote: > On Wed, Sep 29, 2021 at 1:17 AM Dave Taht wrote: > > > > In today's rpm meeting I didn't quite manage to make a complicated > > point. This long-ago proposal > > of matt mathis's has often intrigued (inspired? frightened?) me: > > > > > https://datatracker.ietf.org/doc/html/draft-mathis-iccrg-relentless-tcp-00 > > > > where he proposed that a tcp variant have no response at all to loss > > or markings, merely > > replacing lost segments as they are requested, continually ramping up > > until the network > > basically explodes. > > > For a similar purpose, I use the following patch that ignores holes, > thus mostly defeating congestion control. > > The nice thing is that you can just count sent and received bytes > in the application to estimate losses > > commit 9c429c9644f2fd22d5fe2b6f2d4df6fb2a8962b2 > Author: Luigi Rizzo > Date: Fri Oct 1 09:10:44 2021 -0700 > > test: module parameter to ignore holes in TCP > > Sometimes, for testing, it is useful to let the TCP receiver ignore > drops (and defeat congestion control) and accept all packets as if they > were in sequence. This will show whether a connection is sender or > receiver throttled. > > This patch implements the above with 3 > /sys/module/tcp_input/parameters : > - lossy_local_port, lossy_remote_port > if non zero, indicate that sockets matching one of these ports > will be set to ignore drops. (This socker flag could be set with a > setsockopt(), but would require changes in the caller); > - drop_freq > if non zero, one every drop_freq packets will be artificially > dropped on the receive side. > > Example > echo 2345 > /sys/module/tcp_input/parameters/lossy_local_port > echo 10 > /sys/module/tcp_input/parameters/drop_freq # drop one in 10 > > ifconfig lo mtu 600 > nc -l 2345 > /tmp/a & > MSG="this is a test this is a test this is a test count is" > (for ((i=0;i<10000;i++)); do echo "${MSG} ${i}; $i"; done) | nc > 127.0.0.1 2345 > > The output file will have missing lines > > > diff --git a/include/linux/tcp.h b/include/linux/tcp.h > index 48d8a363319e..3bb8888a56af 100644 > --- a/include/linux/tcp.h > +++ b/include/linux/tcp.h > @@ -225,7 +225,8 @@ struct tcp_sock { > u8 compressed_ack; > u8 dup_ack_counter:2, > tlp_retrans:1, /* TLP is a retransmission */ > - unused:5; > + ignore_holes:1, /* ignore holes on rx. test only */ > + unused:4; > u32 chrono_start; /* Start time in jiffies of a TCP chrono */ > u32 chrono_stat[3]; /* Time in jiffies for chrono_stat stats */ > u8 chrono_type:2, /* current chronograph type */ > @@ -250,6 +251,7 @@ struct tcp_sock { > u32 tlp_high_seq; /* snd_nxt at the time of TLP */ > > u32 tcp_tx_delay; /* delay (in usec) added to TX packets */ > + u32 tcp_test_drops; /* artificial packet drops. test only */ > u64 tcp_wstamp_ns; /* departure time for next sent data > packet */ > u64 tcp_clock_cache; /* cache last tcp_clock_ns() (see > tcp_mstamp_refresh()) */ > > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c > index 414c179c28e0..fd770a176a68 100644 > --- a/net/ipv4/tcp.c > +++ b/net/ipv4/tcp.c > @@ -2344,6 +2344,9 @@ static int tcp_recvmsg_locked(struct sock *sk, > struct msghdr *msg, size_t len, > last = skb_peek_tail(&sk->sk_receive_queue); > skb_queue_walk(&sk->sk_receive_queue, skb) { > last = skb; > + /* XXX if we allow holes, update copied_seq */ > + if (tp->ignore_holes && before(*seq, > TCP_SKB_CB(skb)->seq)) > + *seq = TCP_SKB_CB(skb)->seq; > /* Now that we have two receive queues this > * shouldn't happen. > */ > diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c > index 246ab7b5e857..a5161ce78171 100644 > --- a/net/ipv4/tcp_input.c > +++ b/net/ipv4/tcp_input.c > @@ -81,6 +81,14 @@ > #include > #include > > +#include > +static int drop_freq; /* drop one pkt ever this many */ > +module_param(drop_freq, int, 0644); > +static int lossy_local_port = 2345; /* drop pkts, ignore holes on this > port */ > +module_param(lossy_local_port, int, 0644); > +static int lossy_remote_port = 0; /* drop pkts, ignore holes on this port > */ > +module_param(lossy_remote_port, int, 0644); > + > int sysctl_tcp_max_orphans __read_mostly = NR_FILE; > > #define FLAG_DATA 0x01 /* Incoming frame contained data. > */ > @@ -5806,6 +5814,16 @@ void tcp_rcv_established(struct sock *sk, > struct sk_buff *skb) > > tp->rx_opt.saw_tstamp = 0; > > + if (tp->ignore_holes) { > + const u32 seq = TCP_SKB_CB(skb)->seq; > + if (drop_freq && tp->tcp_test_drops++ >= drop_freq) { > + tp->tcp_test_drops = 0; > + goto discard; /* artificial drop */ > + } > + if (after(seq, tp->rcv_nxt)) /* Pretend this is in order */ > + tcp_rcv_nxt_update(tp, seq); > + } > + > /* pred_flags is 0xS?10 << 16 + snd_wnd > * if header_prediction is to be made > * 'S' will always be tp->tcp_header_len >> 2 > @@ -5986,12 +6004,25 @@ void tcp_init_transfer(struct sock *sk, int > bpf_op, struct sk_buff *skb) > tcp_init_buffer_space(sk); > } > > +/* Testing. Conditionally set tp->ignore_holes. Should be a setsockopt */ > +static void tcp_update_ignore_holes(struct sock *sk) > +{ > + if (READ_ONCE(lossy_local_port) == ntohs(inet_sk(sk)->inet_sport) > || > + READ_ONCE(lossy_remote_port) == > ntohs(inet_sk(sk)->inet_dport)) { > + pr_info("XXX ignore holes for ports local %d remote %d\n", > + ntohs(inet_sk(sk)->inet_sport), > + ntohs(inet_sk(sk)->inet_dport)); > + tcp_sk(sk)->ignore_holes = 1; > + } > +} > + > void tcp_finish_connect(struct sock *sk, struct sk_buff *skb) > { > struct tcp_sock *tp = tcp_sk(sk); > struct inet_connection_sock *icsk = inet_csk(sk); > > tcp_set_state(sk, TCP_ESTABLISHED); > + tcp_update_ignore_holes(sk); > icsk->icsk_ack.lrcvtime = tcp_jiffies32; > > if (skb) { > @@ -6476,6 +6507,7 @@ int tcp_rcv_state_process(struct sock *sk, > struct sk_buff *skb) > } > smp_mb(); > tcp_set_state(sk, TCP_ESTABLISHED); > + tcp_update_ignore_holes(sk); > sk->sk_state_change(sk); > > /* Note, that this wakeup is only for marginal crossed SYN > case. > -- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it. --000000000000d015c005cd4d1cfc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
hmm, this looks interesting to a test & measurement gu= y. Can it be done with a setsockopt? I might want to add this as an iperf2 = option, particularly if it's broadly available,

Thanks,
Bob
On= Fri, Oct 1, 2021 at 9:22 AM Luigi Rizzo <rizzo@iet.unipi.it> wrote:
On Wed, Sep 29, 2021 at 1:17 AM Dave Taht <dave.taht@gmail.com> wrote:
>
> In today's rpm meeting I didn't quite manage to make a complic= ated
> point. This long-ago proposal
> of matt mathis's has often intrigued (inspired? frightened?) me: >
>
https://datatracker.i= etf.org/doc/html/draft-mathis-iccrg-relentless-tcp-00
>
> where he proposed that a tcp variant have no response at all to loss > or markings, merely
> replacing lost segments as they are requested, continually ramping up<= br> > until the network
> basically explodes.


For a similar purpose, I use the following patch that ignores holes,
thus mostly defeating congestion control.

The nice thing is that you can just count sent and received bytes
in the application to estimate losses

commit 9c429c9644f2fd22d5fe2b6f2d4df6fb2a8962b2
Author: Luigi Rizzo <lrizzo@google.com>
Date:=C2=A0 =C2=A0Fri Oct 1 09:10:44 2021 -0700

=C2=A0 =C2=A0 test: module parameter to ignore holes in TCP

=C2=A0 =C2=A0 Sometimes, for testing, it is useful to let the TCP receiver = ignore
=C2=A0 =C2=A0 drops (and defeat congestion control) and accept all packets = as if they
=C2=A0 =C2=A0 were in sequence. This will show whether a connection is send= er or
=C2=A0 =C2=A0 receiver throttled.

=C2=A0 =C2=A0 This patch implements the above with 3 /sys/module/tcp_input/= parameters :
=C2=A0 =C2=A0 - lossy_local_port, lossy_remote_port
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if non zero, indicate that sockets matching one= of these ports
=C2=A0 =C2=A0 =C2=A0 =C2=A0 will be set to ignore drops. (This socker flag = could be set with a
=C2=A0 =C2=A0 =C2=A0 =C2=A0 setsockopt(), but would require changes in the = caller);
=C2=A0 =C2=A0 - drop_freq
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if non zero, one every drop_freq packets will b= e artificially
=C2=A0 =C2=A0 =C2=A0 =C2=A0 dropped on the receive side.

=C2=A0 =C2=A0 Example
=C2=A0 =C2=A0 =C2=A0 echo 2345 > /sys/module/tcp_input/parameters/lossy_= local_port
=C2=A0 =C2=A0 =C2=A0 echo 10 > /sys/module/tcp_input/parameters/drop_fre= q # drop one in 10

=C2=A0 =C2=A0 =C2=A0 ifconfig lo mtu 600
=C2=A0 =C2=A0 =C2=A0 nc -l 2345 > /tmp/a &
=C2=A0 =C2=A0 =C2=A0 MSG=3D"this is a test this is a test this is a te= st count is"
=C2=A0 =C2=A0 =C2=A0 (for ((i=3D0;i<10000;i++)); do echo "${MSG} ${= i}; $i"; done) | nc
127.0.0.1 2345

=C2=A0 =C2=A0 The output file will have missing lines


diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 48d8a363319e..3bb8888a56af 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -225,7 +225,8 @@ struct tcp_sock {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 u8=C2=A0 =C2=A0 =C2=A0 compressed_ack;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 u8=C2=A0 =C2=A0 =C2=A0 dup_ack_counter:2,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 tlp_retrans:1,=C2= =A0 /* TLP is a retransmission */
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0unused:5;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ignore_holes:1, /* = ignore holes on rx. test only */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0unused:4;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 u32=C2=A0 =C2=A0 =C2=A0chrono_start;=C2=A0 =C2= =A0/* Start time in jiffies of a TCP chrono */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 u32=C2=A0 =C2=A0 =C2=A0chrono_stat[3]; /* Time = in jiffies for chrono_stat stats */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 u8=C2=A0 =C2=A0 =C2=A0 chrono_type:2,=C2=A0 /* = current chronograph type */
@@ -250,6 +251,7 @@ struct tcp_sock {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 u32=C2=A0 =C2=A0 =C2=A0tlp_high_seq;=C2=A0 =C2= =A0/* snd_nxt at the time of TLP */

=C2=A0 =C2=A0 =C2=A0 =C2=A0 u32=C2=A0 =C2=A0 =C2=A0tcp_tx_delay;=C2=A0 =C2= =A0/* delay (in usec) added to TX packets */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0u32=C2=A0 =C2=A0 =C2=A0tcp_test_drops; /* artif= icial packet drops. test only */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 u64=C2=A0 =C2=A0 =C2=A0tcp_wstamp_ns;=C2=A0 /* = departure time for next sent data packet */
=C2=A0 =C2=A0 =C2=A0 =C2=A0 u64=C2=A0 =C2=A0 =C2=A0tcp_clock_cache; /* cach= e last tcp_clock_ns() (see
tcp_mstamp_refresh()) */

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 414c179c28e0..fd770a176a68 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2344,6 +2344,9 @@ static int tcp_recvmsg_locked(struct sock *sk,
struct msghdr *msg, size_t len,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 last =3D skb_peek_t= ail(&sk->sk_receive_queue);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 skb_queue_walk(&= ;sk->sk_receive_queue, skb) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 last =3D skb;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0/* XXX if we allow holes, update copied_seq */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0if (tp->ignore_holes && before(*seq,
TCP_SKB_CB(skb)->seq))
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*seq =3D TCP_SKB_CB(skb)->seq;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 /* Now that we have two receive queues this
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0* shouldn't happen.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0*/
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 246ab7b5e857..a5161ce78171 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -81,6 +81,14 @@
=C2=A0#include <net/busy_poll.h>
=C2=A0#include <net/mptcp.h>

+#include <linux/module.h>
+static int drop_freq; /* drop one pkt ever this many */
+module_param(drop_freq, int, 0644);
+static int lossy_local_port =3D 2345; /* drop pkts, ignore holes on this p= ort */
+module_param(lossy_local_port, int, 0644);
+static int lossy_remote_port =3D 0; /* drop pkts, ignore holes on this por= t */
+module_param(lossy_remote_port, int, 0644);
+
=C2=A0int sysctl_tcp_max_orphans __read_mostly =3D NR_FILE;

=C2=A0#define FLAG_DATA=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x0= 1 /* Incoming frame contained data.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*/
@@ -5806,6 +5814,16 @@ void tcp_rcv_established(struct sock *sk,
struct sk_buff *skb)

=C2=A0 =C2=A0 =C2=A0 =C2=A0 tp->rx_opt.saw_tstamp =3D 0;

+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (tp->ignore_holes) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0const u32 seq =3D T= CP_SKB_CB(skb)->seq;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (drop_freq &= & tp->tcp_test_drops++ >=3D drop_freq) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0tp->tcp_test_drops =3D 0;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0goto discard;=C2=A0 =C2=A0/* artificial drop */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (after(seq, tp-&= gt;rcv_nxt)) /* Pretend this is in order */
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0tcp_rcv_nxt_update(tp, seq);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}
+
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /*=C2=A0 =C2=A0 =C2=A0 pred_flags is 0xS?10 <= ;< 16 + snd_wnd
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*=C2=A0 =C2=A0 =C2=A0 if header_predictio= n is to be made
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*=C2=A0 =C2=A0 =C2=A0 'S' will al= ways be tp->tcp_header_len >> 2
@@ -5986,12 +6004,25 @@ void tcp_init_transfer(struct sock *sk, int
bpf_op, struct sk_buff *skb)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 tcp_init_buffer_space(sk);
=C2=A0}

+/* Testing. Conditionally set tp->ignore_holes. Should be a setsockopt = */
+static void tcp_update_ignore_holes(struct sock *sk)
+{
+=C2=A0 =C2=A0 =C2=A0 =C2=A0if (READ_ONCE(lossy_local_port) =3D=3D ntohs(in= et_sk(sk)->inet_sport) ||
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0READ_ONCE(lossy_remote_port) =3D= =3D ntohs(inet_sk(sk)->inet_dport)) {
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0pr_info("XXX i= gnore holes for ports local %d remote %d\n",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0ntohs(inet_sk(sk)->inet_sport),
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0ntohs(inet_sk(sk)->inet_dport));
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tcp_sk(sk)->igno= re_holes =3D 1;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0}
+}
+
=C2=A0void tcp_finish_connect(struct sock *sk, struct sk_buff *skb)
=C2=A0{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 struct tcp_sock *tp =3D tcp_sk(sk);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 struct inet_connection_sock *icsk =3D inet_csk(= sk);

=C2=A0 =C2=A0 =C2=A0 =C2=A0 tcp_set_state(sk, TCP_ESTABLISHED);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0tcp_update_ignore_holes(sk);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 icsk->icsk_ack.lrcvtime =3D tcp_jiffies32;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 if (skb) {
@@ -6476,6 +6507,7 @@ int tcp_rcv_state_process(struct sock *sk,
struct sk_buff *skb)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 smp_mb();
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 tcp_set_state(sk, T= CP_ESTABLISHED);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tcp_update_ignore_h= oles(sk);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sk->sk_state_cha= nge(sk);

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Note, that this = wakeup is only for marginal crossed SYN case.

This ele= ctronic communication and the information and any files transmitted with it= , or attached to it, are confidential and are intended solely for the use o= f the individual or entity to whom it is addressed and may contain informat= ion that is confidential, legally privileged, protected by privacy laws, or= otherwise restricted from disclosure to anyone else. If you are not the in= tended recipient or the person responsible for delivering the e-mail to the= intended recipient, you are hereby notified that any use, copying, distrib= uting, dissemination, forwarding, printing, or copying of this e-mail is st= rictly prohibited. If you received this e-mail in error, please return the = e-mail to the sender, delete it from your computer, and destroy any printed= copy of it. --000000000000d015c005cd4d1cfc-- --000000000000d5387a05cd4d1c75 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQagYJKo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