mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
fec8fe8069
Refreshed all patches Remove upstreamed patches. - 103-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch - 403-mtd_fix_cfi_cmdset_0002_status_check.patch - 001-4.11-01-mtd-m25p80-consider-max-message-size-in-m25p80_read.patch - 001-4.15-08-bcm63xx_enet-correct-clock-usage.patch - 001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch - 900-gen_stats-fix-netlink-stats-padding.patch Introduce a new backported patch to address ext4 breakage, introduced in 4.9.112 - backport-4.9/500-ext4-fix-check-to-prevent-initializing-reserved-inod.patch This patch has been slightly altered to compensate for a new helper function introduced in later kernels. Also add ARM64_SSBD symbol to ARM64 targets still running kernel 4.9 Compile-tested on: ar71xx, bcm2710 Runtime-tested on: ar71xx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
91 lines
2.8 KiB
Diff
91 lines
2.8 KiB
Diff
From 40fc3423b983b864bf70b03199191260ae9b2ea6 Mon Sep 17 00:00:00 2001
|
|
From: Eric Dumazet <edumazet@google.com>
|
|
Date: Sat, 3 Dec 2016 11:14:50 -0800
|
|
Subject: [PATCH 01/10] tcp: tsq: add tsq_flags / tsq_enum
|
|
|
|
This is a cleanup, to ease code review of following patches.
|
|
|
|
Old 'enum tsq_flags' is renamed, and a new enumeration is added
|
|
with the flags used in cmpxchg() operations as opposed to
|
|
single bit operations.
|
|
|
|
Signed-off-by: Eric Dumazet <edumazet@google.com>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
include/linux/tcp.h | 11 ++++++++++-
|
|
net/ipv4/tcp_output.c | 16 ++++++++--------
|
|
2 files changed, 18 insertions(+), 9 deletions(-)
|
|
|
|
--- a/include/linux/tcp.h
|
|
+++ b/include/linux/tcp.h
|
|
@@ -368,7 +368,7 @@ struct tcp_sock {
|
|
u32 *saved_syn;
|
|
};
|
|
|
|
-enum tsq_flags {
|
|
+enum tsq_enum {
|
|
TSQ_THROTTLED,
|
|
TSQ_QUEUED,
|
|
TCP_TSQ_DEFERRED, /* tcp_tasklet_func() found socket was owned */
|
|
@@ -379,6 +379,15 @@ enum tsq_flags {
|
|
*/
|
|
};
|
|
|
|
+enum tsq_flags {
|
|
+ TSQF_THROTTLED = (1UL << TSQ_THROTTLED),
|
|
+ TSQF_QUEUED = (1UL << TSQ_QUEUED),
|
|
+ TCPF_TSQ_DEFERRED = (1UL << TCP_TSQ_DEFERRED),
|
|
+ TCPF_WRITE_TIMER_DEFERRED = (1UL << TCP_WRITE_TIMER_DEFERRED),
|
|
+ TCPF_DELACK_TIMER_DEFERRED = (1UL << TCP_DELACK_TIMER_DEFERRED),
|
|
+ TCPF_MTU_REDUCED_DEFERRED = (1UL << TCP_MTU_REDUCED_DEFERRED),
|
|
+};
|
|
+
|
|
static inline struct tcp_sock *tcp_sk(const struct sock *sk)
|
|
{
|
|
return (struct tcp_sock *)sk;
|
|
--- a/net/ipv4/tcp_output.c
|
|
+++ b/net/ipv4/tcp_output.c
|
|
@@ -789,10 +789,10 @@ static void tcp_tasklet_func(unsigned lo
|
|
}
|
|
}
|
|
|
|
-#define TCP_DEFERRED_ALL ((1UL << TCP_TSQ_DEFERRED) | \
|
|
- (1UL << TCP_WRITE_TIMER_DEFERRED) | \
|
|
- (1UL << TCP_DELACK_TIMER_DEFERRED) | \
|
|
- (1UL << TCP_MTU_REDUCED_DEFERRED))
|
|
+#define TCP_DEFERRED_ALL (TCPF_TSQ_DEFERRED | \
|
|
+ TCPF_WRITE_TIMER_DEFERRED | \
|
|
+ TCPF_DELACK_TIMER_DEFERRED | \
|
|
+ TCPF_MTU_REDUCED_DEFERRED)
|
|
/**
|
|
* tcp_release_cb - tcp release_sock() callback
|
|
* @sk: socket
|
|
@@ -813,7 +813,7 @@ void tcp_release_cb(struct sock *sk)
|
|
nflags = flags & ~TCP_DEFERRED_ALL;
|
|
} while (cmpxchg(&tp->tsq_flags, flags, nflags) != flags);
|
|
|
|
- if (flags & (1UL << TCP_TSQ_DEFERRED))
|
|
+ if (flags & TCPF_TSQ_DEFERRED)
|
|
tcp_tsq_handler(sk);
|
|
|
|
/* Here begins the tricky part :
|
|
@@ -827,15 +827,15 @@ void tcp_release_cb(struct sock *sk)
|
|
*/
|
|
sock_release_ownership(sk);
|
|
|
|
- if (flags & (1UL << TCP_WRITE_TIMER_DEFERRED)) {
|
|
+ if (flags & TCPF_WRITE_TIMER_DEFERRED) {
|
|
tcp_write_timer_handler(sk);
|
|
__sock_put(sk);
|
|
}
|
|
- if (flags & (1UL << TCP_DELACK_TIMER_DEFERRED)) {
|
|
+ if (flags & TCPF_DELACK_TIMER_DEFERRED) {
|
|
tcp_delack_timer_handler(sk);
|
|
__sock_put(sk);
|
|
}
|
|
- if (flags & (1UL << TCP_MTU_REDUCED_DEFERRED)) {
|
|
+ if (flags & TCPF_MTU_REDUCED_DEFERRED) {
|
|
inet_csk(sk)->icsk_af_ops->mtu_reduced(sk);
|
|
__sock_put(sk);
|
|
}
|