[linux] 17/29: net: prevent ABI changes in 4.9.74
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Tue Jan 23 17:14:07 UTC 2018
This is an automated email from the git hooks/post-receive script.
corsac pushed a commit to branch stretch
in repository linux.
commit 159e709d7d25fecfa1d9aa2ce7d178e87183e83a
Author: Yves-Alexis Perez <corsac at debian.org>
Date: Mon Jan 8 11:59:32 2018 +0100
net: prevent ABI changes in 4.9.74
---
...invalidate-rate-samples-during-SACK-reneg.patch | 136 +++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 137 insertions(+)
diff --git a/debian/patches/debian/revert-tcp-invalidate-rate-samples-during-SACK-reneg.patch b/debian/patches/debian/revert-tcp-invalidate-rate-samples-during-SACK-reneg.patch
new file mode 100644
index 0000000..1a2b599
--- /dev/null
+++ b/debian/patches/debian/revert-tcp-invalidate-rate-samples-during-SACK-reneg.patch
@@ -0,0 +1,136 @@
+From 6bab53619e8dc848c9fd16eef2c0aab037440daa Mon Sep 17 00:00:00 2001
+From: Yves-Alexis Perez <corsac at debian.org>
+Date: Mon, 8 Jan 2018 10:58:43 +0100
+Subject: [PATCH] Revert "tcp: invalidate rate samples during SACK reneging"
+
+This reverts commit e74fe7268e7eadb2880d3842fe167131220d5616 which is
+d4761754b4fb2ef8d9a1e9d121c4bec84e1fe292 upstream. Prevent changing the
+tcp_sock structure, causing an ABI change.
+---
+ include/linux/tcp.h | 3 +--
+ include/net/tcp.h | 2 +-
+ net/ipv4/tcp.c | 1 -
+ net/ipv4/tcp_input.c | 10 ++--------
+ net/ipv4/tcp_rate.c | 10 +++-------
+ 5 files changed, 7 insertions(+), 19 deletions(-)
+
+diff --git a/include/linux/tcp.h b/include/linux/tcp.h
+index f50b717ce644..647532b0eb03 100644
+--- a/include/linux/tcp.h
++++ b/include/linux/tcp.h
+@@ -219,8 +219,7 @@ struct tcp_sock {
+ } rack;
+ u16 advmss; /* Advertised MSS */
+ u8 rate_app_limited:1, /* rate_{delivered,interval_us} limited? */
+- is_sack_reneg:1, /* in recovery from loss with SACK reneg? */
+- unused:6;
++ unused:7;
+ u8 nonagle : 4,/* Disable Nagle algorithm? */
+ thin_lto : 1,/* Use linear timeouts for thin streams */
+ thin_dupack : 1,/* Fast retransmit on first dupack */
+diff --git a/include/net/tcp.h b/include/net/tcp.h
+index caf35e062639..fba4fc46871d 100644
+--- a/include/net/tcp.h
++++ b/include/net/tcp.h
+@@ -1001,7 +1001,7 @@ void tcp_rate_skb_sent(struct sock *sk, struct sk_buff *skb);
+ void tcp_rate_skb_delivered(struct sock *sk, struct sk_buff *skb,
+ struct rate_sample *rs);
+ void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
+- bool is_sack_reneg, struct skb_mstamp *now, struct rate_sample *rs);
++ struct skb_mstamp *now, struct rate_sample *rs);
+ void tcp_rate_check_app_limited(struct sock *sk);
+
+ /* These functions determine how the current flow behaves in respect of SACK
+diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
+index 05d2bde00864..dd33c785ce16 100644
+--- a/net/ipv4/tcp.c
++++ b/net/ipv4/tcp.c
+@@ -2297,7 +2297,6 @@ int tcp_disconnect(struct sock *sk, int flags)
+ tp->snd_cwnd_cnt = 0;
+ tp->window_clamp = 0;
+ tcp_set_ca_state(sk, TCP_CA_Open);
+- tp->is_sack_reneg = 0;
+ tcp_clear_retrans(tp);
+ inet_csk_delack_init(sk);
+ /* Initialize rcv_mss to TCP_MIN_MSS to avoid division by 0
+diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
+index 2f107e46355c..05255a286888 100644
+--- a/net/ipv4/tcp_input.c
++++ b/net/ipv4/tcp_input.c
+@@ -1966,8 +1966,6 @@ void tcp_enter_loss(struct sock *sk)
+ NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPSACKRENEGING);
+ tp->sacked_out = 0;
+ tp->fackets_out = 0;
+- /* Mark SACK reneging until we recover from this loss event. */
+- tp->is_sack_reneg = 1;
+ }
+ tcp_clear_all_retrans_hints(tp);
+
+@@ -2465,7 +2463,6 @@ static bool tcp_try_undo_recovery(struct sock *sk)
+ return true;
+ }
+ tcp_set_ca_state(sk, TCP_CA_Open);
+- tp->is_sack_reneg = 0;
+ return false;
+ }
+
+@@ -2497,10 +2494,8 @@ static bool tcp_try_undo_loss(struct sock *sk, bool frto_undo)
+ NET_INC_STATS(sock_net(sk),
+ LINUX_MIB_TCPSPURIOUSRTOS);
+ inet_csk(sk)->icsk_retransmits = 0;
+- if (frto_undo || tcp_is_sack(tp)) {
++ if (frto_undo || tcp_is_sack(tp))
+ tcp_set_ca_state(sk, TCP_CA_Open);
+- tp->is_sack_reneg = 0;
+- }
+ return true;
+ }
+ return false;
+@@ -3594,7 +3589,6 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
+ struct tcp_sacktag_state sack_state;
+ struct rate_sample rs = { .prior_delivered = 0 };
+ u32 prior_snd_una = tp->snd_una;
+- bool is_sack_reneg = tp->is_sack_reneg;
+ u32 ack_seq = TCP_SKB_CB(skb)->seq;
+ u32 ack = TCP_SKB_CB(skb)->ack_seq;
+ bool is_dupack = false;
+@@ -3717,7 +3711,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
+ tcp_schedule_loss_probe(sk);
+ delivered = tp->delivered - delivered; /* freshly ACKed or SACKed */
+ lost = tp->lost - lost; /* freshly marked lost */
+- tcp_rate_gen(sk, delivered, lost, is_sack_reneg, &now, &rs);
++ tcp_rate_gen(sk, delivered, lost, &now, &rs);
+ tcp_cong_control(sk, ack, delivered, flag, &rs);
+ tcp_xmit_recovery(sk, rexmit);
+ return 1;
+diff --git a/net/ipv4/tcp_rate.c b/net/ipv4/tcp_rate.c
+index 18309f58ab8d..9be1581a5a08 100644
+--- a/net/ipv4/tcp_rate.c
++++ b/net/ipv4/tcp_rate.c
+@@ -106,7 +106,7 @@ void tcp_rate_skb_delivered(struct sock *sk, struct sk_buff *skb,
+
+ /* Update the connection delivery information and generate a rate sample. */
+ void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
+- bool is_sack_reneg, struct skb_mstamp *now, struct rate_sample *rs)
++ struct skb_mstamp *now, struct rate_sample *rs)
+ {
+ struct tcp_sock *tp = tcp_sk(sk);
+ u32 snd_us, ack_us;
+@@ -124,12 +124,8 @@ void tcp_rate_gen(struct sock *sk, u32 delivered, u32 lost,
+
+ rs->acked_sacked = delivered; /* freshly ACKed or SACKed */
+ rs->losses = lost; /* freshly marked lost */
+- /* Return an invalid sample if no timing information is available or
+- * in recovery from loss with SACK reneging. Rate samples taken during
+- * a SACK reneging event may overestimate bw by including packets that
+- * were SACKed before the reneg.
+- */
+- if (!rs->prior_mstamp.v64 || is_sack_reneg) {
++ /* Return an invalid sample if no timing information is available. */
++ if (!rs->prior_mstamp.v64) {
+ rs->delivered = -1;
+ rs->interval_us = -1;
+ return;
+--
+2.15.1
+
diff --git a/debian/patches/series b/debian/patches/series
index a7a48c6..2e60abb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -190,3 +190,4 @@ debian/revert-bpf-one-perf-event-close-won-t-free-bpf-program-atta.patch
debian/revert-mm-hugetlbfs-introduce-split-to-vm_operations.patch
debian/revert-dma-fence-Introduce-drm_fence_set_error-helpe.patch
debian/revert-lib-genalloc.c-make-the-avail-variable-an-ato.patch
+debian/revert-tcp-invalidate-rate-samples-during-SACK-reneg.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list