kernel: bump 4.19 to 4.19.113

Remove upstream patches:
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
This commit is contained in:
CN_SZTL 2020-04-01 07:34:17 +08:00
parent 9a4de1f5a2
commit 211fbcc199
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
26 changed files with 219 additions and 226 deletions

View File

@ -8,11 +8,11 @@ endif
LINUX_VERSION-4.9 = .215
LINUX_VERSION-4.14 = .174
LINUX_VERSION-4.19 = .110
LINUX_VERSION-4.19 = .113
LINUX_KERNEL_HASH-4.9.215 = 236f2f47853700f22b9925cb17917d97ff7120fcc8110ec827c5a030a8129f48
LINUX_KERNEL_HASH-4.14.174 = 4c223ca3565d4267b403f7432860d87c8301767eb654d046d268782b18155189
LINUX_KERNEL_HASH-4.19.110 = ca113d2c4a061cbb6efaab60290b10dda0298e3249ff1d0c2327eb3d827c6b96
LINUX_KERNEL_HASH-4.19.113 = b5a0576d5f7e85aeeba4922fba8d9aa2c2a09cd6f48d07265999b890cf97c0e5
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@ -1,71 +0,0 @@
From 82afdcd4ec3c8ca6551cbf7c43c09e2fd240487a Mon Sep 17 00:00:00 2001
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Tue, 10 Mar 2020 15:27:37 +0800
Subject: [PATCH] ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Rafał found an issue that for non-Ethernet interface, if we down and up
frequently, the memory will be consumed slowly.
The reason is we add allnodes/allrouters addressed in multicast list in
ipv6_add_dev(). When link down, we call ipv6_mc_down(), store all multicast
addresses via mld_add_delrec(). But when link up, we don't call ipv6_mc_up()
for non-Ethernet interface to remove the addresses. This makes idev->mc_tomb
getting bigger and bigger. The call stack looks like:
addrconf_notify(NETDEV_REGISTER)
ipv6_add_dev
ipv6_dev_mc_inc(ff01::1)
ipv6_dev_mc_inc(ff02::1)
ipv6_dev_mc_inc(ff02::2)
addrconf_notify(NETDEV_UP)
addrconf_dev_config
/* Alas, we support only Ethernet autoconfiguration. */
return;
addrconf_notify(NETDEV_DOWN)
addrconf_ifdown
ipv6_mc_down
igmp6_group_dropped(ff02::2)
mld_add_delrec(ff02::2)
igmp6_group_dropped(ff02::1)
igmp6_group_dropped(ff01::1)
After investigating, I can't found a rule to disable multicast on
non-Ethernet interface. In RFC2460, the link could be Ethernet, PPP, ATM,
tunnels, etc. In IPv4, it doesn't check the dev type when calls ip_mc_up()
in inetdev_event(). Even for IPv6, we don't check the dev type and call
ipv6_add_dev(), ipv6_dev_mc_inc() after register device.
So I think it's OK to fix this memory consumer by calling ipv6_mc_up() for
non-Ethernet interface.
v2: Also check IFF_MULTICAST flag to make sure the interface supports
multicast
Reported-by: Rafał Miłecki <zajec5@gmail.com>
Tested-by: Rafał Miłecki <zajec5@gmail.com>
Fixes: 74235a25c673 ("[IPV6] addrconf: Fix IPv6 on tuntap tunnels")
Fixes: 1666d49e1d41 ("mld: do not remove mld souce list info when set link down")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/ipv6/addrconf.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3291,6 +3291,10 @@ static void addrconf_dev_config(struct n
(dev->type != ARPHRD_NONE) &&
(dev->type != ARPHRD_RAWIP)) {
/* Alas, we support only Ethernet autoconfiguration. */
+ idev = __in6_dev_get(dev);
+ if (!IS_ERR_OR_NULL(idev) && dev->flags & IFF_UP &&
+ dev->flags & IFF_MULTICAST)
+ ipv6_mc_up(idev);
return;
}

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1777,6 +1777,19 @@ int phy_set_max_speed(struct phy_device
@@ -1781,6 +1781,19 @@ int phy_set_max_speed(struct phy_device
}
EXPORT_SYMBOL(phy_set_max_speed);
@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct device_node *node = phydev->mdio.dev.of_node;
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1049,6 +1049,7 @@ int phy_mii_ioctl(struct phy_device *phy
@@ -1051,6 +1051,7 @@ int phy_mii_ioctl(struct phy_device *phy
int phy_start_interrupts(struct phy_device *phydev);
void phy_print_status(struct phy_device *phydev);
int phy_set_max_speed(struct phy_device *phydev, u32 max_speed);

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1790,6 +1790,36 @@ void phy_support_asym_pause(struct phy_d
@@ -1794,6 +1794,36 @@ void phy_support_asym_pause(struct phy_d
}
EXPORT_SYMBOL(phy_support_asym_pause);
@ -56,7 +56,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct device_node *node = phydev->mdio.dev.of_node;
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1050,6 +1050,7 @@ int phy_start_interrupts(struct phy_devi
@@ -1052,6 +1052,7 @@ int phy_start_interrupts(struct phy_devi
void phy_print_status(struct phy_device *phydev);
int phy_set_max_speed(struct phy_device *phydev, u32 max_speed);
void phy_support_asym_pause(struct phy_device *phydev);

View File

@ -29,7 +29,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -886,8 +886,6 @@ int phy_init_hw(struct phy_device *phyde
@@ -890,8 +890,6 @@ int phy_init_hw(struct phy_device *phyde
if (phydev->drv->soft_reset)
ret = phydev->drv->soft_reset(phydev);

View File

@ -208,7 +208,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
return phydev->drv->read_page(phydev);
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -695,17 +695,6 @@ size_t phy_speeds(unsigned int *speeds,
@@ -697,17 +697,6 @@ size_t phy_speeds(unsigned int *speeds,
void phy_resolve_aneg_linkmode(struct phy_device *phydev);
/**
@ -226,7 +226,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* phy_read - Convenience function for reading a given PHY register
* @phydev: the phy_device struct
* @regnum: register number to read
@@ -760,9 +749,60 @@ static inline int __phy_write(struct phy
@@ -762,9 +751,60 @@ static inline int __phy_write(struct phy
val);
}
@ -287,7 +287,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/**
* __phy_set_bits - Convenience function for setting bits in a PHY register
* @phydev: the phy_device struct
@@ -813,6 +853,66 @@ static inline int phy_clear_bits(struct
@@ -815,6 +855,66 @@ static inline int phy_clear_bits(struct
}
/**
@ -354,7 +354,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* phy_interrupt_is_valid - Convenience function for testing a given PHY irq
* @phydev: the phy_device struct
*
@@ -888,18 +988,6 @@ static inline bool phy_is_pseudo_fixed_l
@@ -890,18 +990,6 @@ static inline bool phy_is_pseudo_fixed_l
return phydev->is_pseudo_fixed_link;
}

View File

@ -191,7 +191,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
}
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -795,13 +795,21 @@ int phy_write_mmd(struct phy_device *phy
@@ -797,13 +797,21 @@ int phy_write_mmd(struct phy_device *phy
*/
int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);

View File

@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
*
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1098,6 +1098,7 @@ int genphy_write_mmd_unsupported(struct
@@ -1100,6 +1100,7 @@ int genphy_write_mmd_unsupported(struct
/* Clause 45 PHY */
int genphy_c45_restart_aneg(struct phy_device *phydev);

View File

@ -54,7 +54,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
#include <linux/mdio.h>
#include <linux/io.h>
#include <linux/uaccess.h>
@@ -944,6 +945,65 @@ void phy_attached_print(struct phy_devic
@@ -948,6 +949,65 @@ void phy_attached_print(struct phy_devic
EXPORT_SYMBOL(phy_attached_print);
/**
@ -120,7 +120,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* phy_attach_direct - attach a network device to a given PHY device pointer
* @dev: network device to attach
* @phydev: Pointer to phy_device to attach
@@ -1016,6 +1076,9 @@ int phy_attach_direct(struct net_device
@@ -1020,6 +1080,9 @@ int phy_attach_direct(struct net_device
phydev->attached_dev = dev;
dev->phydev = phydev;
@ -130,7 +130,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
/* Some Ethernet drivers try to connect to a PHY device before
* calling register_netdevice() -> netdev_register_kobject() and
* does the dev->dev.kobj initialization. Here we only check for
@@ -1950,6 +2013,9 @@ static int phy_remove(struct device *dev
@@ -1954,6 +2017,9 @@ static int phy_remove(struct device *dev
phydev->state = PHY_DOWN;
mutex_unlock(&phydev->lock);
@ -151,7 +151,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
struct sk_buff;
/*
@@ -382,6 +384,8 @@ struct phy_c45_device_ids {
@@ -383,6 +385,8 @@ struct phy_c45_device_ids {
* irq: IRQ number of the PHY's interrupt (-1 if none)
* phy_timer: The timer for handling the state machine
* phy_queue: A work_queue for the phy_mac_interrupt
@ -160,7 +160,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* attached_dev: The attached enet driver's device instance ptr
* adjust_link: Callback for the enet controller to respond to
* changes in the link state.
@@ -471,6 +475,9 @@ struct phy_device {
@@ -473,6 +477,9 @@ struct phy_device {
struct mutex lock;
@ -170,7 +170,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
struct phylink *phylink;
struct net_device *attached_dev;
@@ -1031,6 +1038,10 @@ int phy_suspend(struct phy_device *phyde
@@ -1033,6 +1040,10 @@ int phy_suspend(struct phy_device *phyde
int phy_resume(struct phy_device *phydev);
int __phy_resume(struct phy_device *phydev);
int phy_loopback(struct phy_device *phydev, bool enable);

View File

@ -37,7 +37,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -335,7 +335,7 @@ static int phy_bus_match(struct device *
@@ -339,7 +339,7 @@ static int phy_bus_match(struct device *
if (phydev->is_c45) {
for (i = 1; i < num_ids; i++) {
@ -46,7 +46,7 @@ Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
continue;
if ((phydrv->phy_id & phydrv->phy_id_mask) ==
@@ -623,10 +623,13 @@ static int get_phy_id(struct mii_bus *bu
@@ -627,10 +627,13 @@ static int get_phy_id(struct mii_bus *bu
*/
struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45)
{

View File

@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
help
This option adds the flow table core infrastructure.
@@ -986,6 +985,15 @@ config NETFILTER_XT_TARGET_NOTRACK
@@ -974,6 +973,15 @@ config NETFILTER_XT_TARGET_NOTRACK
depends on NETFILTER_ADVANCED
select NETFILTER_XT_TARGET_CT
@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+obj-$(CONFIG_NETFILTER_XT_TARGET_FLOWOFFLOAD) += xt_FLOWOFFLOAD.o
obj-$(CONFIG_NETFILTER_XT_TARGET_HL) += xt_HL.o
obj-$(CONFIG_NETFILTER_XT_TARGET_HMARK) += xt_HMARK.o
obj-$(CONFIG_NETFILTER_XT_TARGET_IMQ) += xt_IMQ.o
obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
--- /dev/null
+++ b/net/netfilter/xt_FLOWOFFLOAD.c
@@ -0,0 +1,422 @@

View File

@ -1,3 +1,5 @@
diff --git a/include/net/netfilter/nf_conntrack_ecache.h b/include/net/netfilter/nf_conntrack_ecache.h
index 12d967b..c2b98b6 100644
--- a/include/net/netfilter/nf_conntrack_ecache.h
+++ b/include/net/netfilter/nf_conntrack_ecache.h
@@ -71,6 +71,10 @@ struct nf_ct_event {
@ -65,6 +67,8 @@
return nf_conntrack_eventmask_report(1 << event, ct, 0, 0);
}
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h
index e469e85..1d31db8 100644
--- a/include/net/netns/conntrack.h
+++ b/include/net/netns/conntrack.h
@@ -114,7 +114,11 @@ struct netns_ct {
@ -79,11 +83,13 @@
struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
struct nf_ip_net nf_ct_proto;
#if defined(CONFIG_NF_CONNTRACK_LABELS)
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index 63073be..08d7aab 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -136,6 +136,14 @@ config NF_CONNTRACK_RTCACHE
To compile it as a module, choose M here. If unsure, say N.
The module will be called nf_conntrack_rtcache.
@@ -118,6 +118,14 @@ config NF_CONNTRACK_EVENTS
If unsure, say `N'.
+config NF_CONNTRACK_CHAIN_EVENTS
+ bool "Register multiple callbacks to ct events"
@ -96,9 +102,11 @@
config NF_CONNTRACK_TIMEOUT
bool 'Connection tracking timeout'
depends on NETFILTER_ADVANCED
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 6bd1508..9b81c7c 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -2249,6 +2249,10 @@ int nf_conntrack_init_net(struct net *ne
@@ -2167,6 +2167,10 @@ int nf_conntrack_init_net(struct net *ne
ret = nf_conntrack_proto_pernet_init(net);
if (ret < 0)
goto err_proto;
@ -109,6 +117,8 @@
return 0;
err_proto:
diff --git a/net/netfilter/nf_conntrack_ecache.c b/net/netfilter/nf_conntrack_ecache.c
index da9df2d..e0e2a8f 100644
--- a/net/netfilter/nf_conntrack_ecache.c
+++ b/net/netfilter/nf_conntrack_ecache.c
@@ -18,6 +18,9 @@
@ -258,6 +268,8 @@
EXPORT_SYMBOL_GPL(nf_conntrack_unregister_notifier);
int nf_ct_expect_register_notifier(struct net *net,
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 04111c1..8c741f7 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -28,6 +28,11 @@
@ -270,9 +282,9 @@
+#endif
+
#include <linux/slab.h>
#include <linux/siphash.h>
@@ -621,14 +626,22 @@ static size_t ctnetlink_nlmsg_size(const
#include <linux/netfilter.h>
@@ -618,14 +623,22 @@ static size_t ctnetlink_nlmsg_size(const
;
}
@ -295,7 +307,7 @@
struct nf_conn *ct = item->ct;
struct sk_buff *skb;
unsigned int type;
@@ -3335,9 +3348,15 @@ static int ctnetlink_stat_exp_cpu(struct
@@ -3290,9 +3303,15 @@ static int ctnetlink_stat_exp_cpu(struct
}
#ifdef CONFIG_NF_CONNTRACK_EVENTS

View File

@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
depends on NETFILTER_ADVANCED
help
H.323 is a VoIP signalling protocol from ITU-T. As one of the most
@@ -1077,7 +1076,6 @@ config NETFILTER_XT_TARGET_SECMARK
@@ -1089,7 +1088,6 @@ config NETFILTER_XT_TARGET_SECMARK
config NETFILTER_XT_TARGET_TCPMSS
tristate '"TCPMSS" target support'

View File

@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
EXPORT_SYMBOL(default_qdisc_ops);
/* Main transmission queue. */
@@ -1025,7 +1025,7 @@ static void attach_one_default_qdisc(str
@@ -1033,7 +1033,7 @@ static void attach_one_default_qdisc(str
void *_unused)
{
struct Qdisc *qdisc;

View File

@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -612,207 +612,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
@@ -620,207 +620,6 @@ struct Qdisc_ops noqueue_qdisc_ops __rea
.owner = THIS_MODULE,
};

View File

@ -1,6 +1,6 @@
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -555,6 +555,12 @@ struct phy_driver {
@@ -557,6 +557,12 @@ struct phy_driver {
/* Determines the negotiated speed and duplex */
int (*read_status)(struct phy_device *phydev);
@ -15,7 +15,7 @@
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1577,6 +1577,9 @@ int genphy_update_link(struct phy_device
@@ -1581,6 +1581,9 @@ int genphy_update_link(struct phy_device
{
int status;

View File

@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
*/
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2547,6 +2547,10 @@ static inline int pskb_trim(struct sk_bu
@@ -2566,6 +2566,10 @@ static inline int pskb_trim(struct sk_bu
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
}
@ -67,7 +67,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/**
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
* @skb: buffer to alter
@@ -2678,16 +2682,6 @@ static inline struct sk_buff *dev_alloc_
@@ -2697,16 +2701,6 @@ static inline struct sk_buff *dev_alloc_
}
@ -101,8 +101,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3253,10 +3253,20 @@ static int xmit_one(struct sk_buff *skb,
if (!list_empty(&ptype_all) || !list_empty(&dev->ptype_all))
@@ -3261,10 +3261,20 @@ static int xmit_one(struct sk_buff *skb,
#endif
dev_queue_xmit_nit(skb, dev);
- len = skb->len;
@ -136,7 +136,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <net/protocol.h>
#include <net/dst.h>
@@ -503,6 +504,22 @@ skb_fail:
@@ -555,6 +556,22 @@ skb_fail:
}
EXPORT_SYMBOL(__napi_alloc_skb);

View File

@ -232,7 +232,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!pe)
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2749,6 +2749,8 @@ static const struct seq_operations vmall
@@ -2752,6 +2752,8 @@ static const struct seq_operations vmall
static int __init proc_vmalloc_init(void)
{
@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -3486,6 +3486,8 @@ static __net_initdata struct pernet_oper
@@ -3489,6 +3489,8 @@ static __net_initdata struct pernet_oper
static int __init proto_init(void)
{

View File

@ -1,6 +1,5 @@
diff -Naupr linux-4.19.94_orig/drivers/net/Kconfig linux-4.19.94/drivers/net/Kconfig
--- linux-4.19.94_orig/drivers/net/Kconfig 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/drivers/net/Kconfig 2020-01-10 13:42:29.421018717 +0200
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -278,6 +278,125 @@ config RIONET_RX_SIZE
depends on RIONET
default "128"
@ -127,9 +126,8 @@ diff -Naupr linux-4.19.94_orig/drivers/net/Kconfig linux-4.19.94/drivers/net/Kco
config TUN
tristate "Universal TUN/TAP device driver support"
depends on INET
diff -Naupr linux-4.19.94_orig/drivers/net/Makefile linux-4.19.94/drivers/net/Makefile
--- linux-4.19.94_orig/drivers/net/Makefile 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/drivers/net/Makefile 2020-01-10 13:42:29.422018717 +0200
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_DUMMY) += dummy.o
obj-$(CONFIG_EQUALIZER) += eql.o
obj-$(CONFIG_IFB) += ifb.o
@ -138,9 +136,8 @@ diff -Naupr linux-4.19.94_orig/drivers/net/Makefile linux-4.19.94/drivers/net/Ma
obj-$(CONFIG_MACVLAN) += macvlan.o
obj-$(CONFIG_MACVTAP) += macvtap.o
obj-$(CONFIG_MII) += mii.o
diff -Naupr linux-4.19.94_orig/drivers/net/imq.c linux-4.19.94/drivers/net/imq.c
--- linux-4.19.94_orig/drivers/net/imq.c 1970-01-01 02:00:00.000000000 +0200
+++ linux-4.19.94/drivers/net/imq.c 2020-01-10 14:50:39.274108733 +0200
--- /dev/null
+++ b/drivers/net/imq.c
@@ -0,0 +1,963 @@
+/*
+ * Pseudo-driver for the intermediate queue device.
@ -1105,9 +1102,8 @@ diff -Naupr linux-4.19.94_orig/drivers/net/imq.c linux-4.19.94/drivers/net/imq.c
+MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See https://github.com/imq/linuximq/wiki for more information.");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS_RTNL_LINK("imq");
diff -Naupr linux-4.19.94_orig/include/linux/imq.h linux-4.19.94/include/linux/imq.h
--- linux-4.19.94_orig/include/linux/imq.h 1970-01-01 02:00:00.000000000 +0200
+++ linux-4.19.94/include/linux/imq.h 2020-01-10 13:42:30.105018732 +0200
--- /dev/null
+++ b/include/linux/imq.h
@@ -0,0 +1,13 @@
+#ifndef _IMQ_H
+#define _IMQ_H
@ -1122,9 +1118,8 @@ diff -Naupr linux-4.19.94_orig/include/linux/imq.h linux-4.19.94/include/linux/i
+
+#endif /* _IMQ_H */
+
diff -Naupr linux-4.19.94_orig/include/linux/netdevice.h linux-4.19.94/include/linux/netdevice.h
--- linux-4.19.94_orig/include/linux/netdevice.h 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/include/linux/netdevice.h 2020-01-10 13:42:30.106018732 +0200
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1905,6 +1905,11 @@ struct net_device {
/*
* Cache lines mostly used on receive path (including eth_type_trans())
@ -1137,7 +1132,7 @@ diff -Naupr linux-4.19.94_orig/include/linux/netdevice.h linux-4.19.94/include/l
/* Interface address info used in eth_type_trans() */
unsigned char *dev_addr;
@@ -3938,6 +3943,19 @@ static inline void netif_tx_unlock_bh(st
@@ -3940,6 +3945,19 @@ static inline void netif_tx_unlock_bh(st
} \
}
@ -1157,9 +1152,8 @@ diff -Naupr linux-4.19.94_orig/include/linux/netdevice.h linux-4.19.94/include/l
static inline void netif_tx_disable(struct net_device *dev)
{
unsigned int i;
diff -Naupr linux-4.19.94_orig/include/linux/netfilter/xt_IMQ.h linux-4.19.94/include/linux/netfilter/xt_IMQ.h
--- linux-4.19.94_orig/include/linux/netfilter/xt_IMQ.h 1970-01-01 02:00:00.000000000 +0200
+++ linux-4.19.94/include/linux/netfilter/xt_IMQ.h 2020-01-10 13:42:30.107018732 +0200
--- /dev/null
+++ b/include/linux/netfilter/xt_IMQ.h
@@ -0,0 +1,9 @@
+#ifndef _XT_IMQ_H
+#define _XT_IMQ_H
@ -1170,9 +1164,8 @@ diff -Naupr linux-4.19.94_orig/include/linux/netfilter/xt_IMQ.h linux-4.19.94/in
+
+#endif /* _XT_IMQ_H */
+
diff -Naupr linux-4.19.94_orig/include/linux/netfilter_ipv4/ipt_IMQ.h linux-4.19.94/include/linux/netfilter_ipv4/ipt_IMQ.h
--- linux-4.19.94_orig/include/linux/netfilter_ipv4/ipt_IMQ.h 1970-01-01 02:00:00.000000000 +0200
+++ linux-4.19.94/include/linux/netfilter_ipv4/ipt_IMQ.h 2020-01-10 13:42:30.107018732 +0200
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ipt_IMQ.h
@@ -0,0 +1,10 @@
+#ifndef _IPT_IMQ_H
+#define _IPT_IMQ_H
@ -1184,9 +1177,8 @@ diff -Naupr linux-4.19.94_orig/include/linux/netfilter_ipv4/ipt_IMQ.h linux-4.19
+
+#endif /* _IPT_IMQ_H */
+
diff -Naupr linux-4.19.94_orig/include/linux/netfilter_ipv6/ip6t_IMQ.h linux-4.19.94/include/linux/netfilter_ipv6/ip6t_IMQ.h
--- linux-4.19.94_orig/include/linux/netfilter_ipv6/ip6t_IMQ.h 1970-01-01 02:00:00.000000000 +0200
+++ linux-4.19.94/include/linux/netfilter_ipv6/ip6t_IMQ.h 2020-01-10 13:42:30.107018732 +0200
--- /dev/null
+++ b/include/linux/netfilter_ipv6/ip6t_IMQ.h
@@ -0,0 +1,10 @@
+#ifndef _IP6T_IMQ_H
+#define _IP6T_IMQ_H
@ -1198,9 +1190,8 @@ diff -Naupr linux-4.19.94_orig/include/linux/netfilter_ipv6/ip6t_IMQ.h linux-4.1
+
+#endif /* _IP6T_IMQ_H */
+
diff -Naupr linux-4.19.94_orig/include/linux/skbuff.h linux-4.19.94/include/linux/skbuff.h
--- linux-4.19.94_orig/include/linux/skbuff.h 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/include/linux/skbuff.h 2020-01-10 14:06:24.162050295 +0200
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -40,6 +40,10 @@
#include <linux/in6.h>
#include <linux/if_packet.h>
@ -1287,9 +1278,8 @@ diff -Naupr linux-4.19.94_orig/include/linux/skbuff.h linux-4.19.94/include/linu
nf_bridge_get(src->nf_bridge);
#endif
#if IS_ENABLED(CONFIG_NETFILTER_XT_TARGET_TRACE) || defined(CONFIG_NF_TABLES)
diff -Naupr linux-4.19.94_orig/include/net/netfilter/nf_queue.h linux-4.19.94/include/net/netfilter/nf_queue.h
--- linux-4.19.94_orig/include/net/netfilter/nf_queue.h 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/include/net/netfilter/nf_queue.h 2020-01-10 13:42:30.109018732 +0200
--- a/include/net/netfilter/nf_queue.h
+++ b/include/net/netfilter/nf_queue.h
@@ -31,6 +31,12 @@ struct nf_queue_handler {
void nf_register_queue_handler(struct net *net, const struct nf_queue_handler *qh);
void nf_unregister_queue_handler(struct net *net);
@ -1303,9 +1293,8 @@ diff -Naupr linux-4.19.94_orig/include/net/netfilter/nf_queue.h linux-4.19.94/in
void nf_queue_entry_get_refs(struct nf_queue_entry *entry);
void nf_queue_entry_release_refs(struct nf_queue_entry *entry);
diff -Naupr linux-4.19.94_orig/include/net/pkt_sched.h linux-4.19.94/include/net/pkt_sched.h
--- linux-4.19.94_orig/include/net/pkt_sched.h 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/include/net/pkt_sched.h 2020-01-10 13:42:30.109018732 +0200
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -114,6 +114,8 @@ bool sch_direct_xmit(struct sk_buff *skb
void __qdisc_run(struct Qdisc *q);
@ -1315,10 +1304,9 @@ diff -Naupr linux-4.19.94_orig/include/net/pkt_sched.h linux-4.19.94/include/net
static inline void qdisc_run(struct Qdisc *q)
{
if (qdisc_run_begin(q)) {
diff -Naupr linux-4.19.94_orig/include/net/sch_generic.h linux-4.19.94/include/net/sch_generic.h
--- linux-4.19.94_orig/include/net/sch_generic.h 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/include/net/sch_generic.h 2020-01-10 13:42:30.109018732 +0200
@@ -704,6 +704,13 @@ static inline int qdisc_enqueue(struct s
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -705,6 +705,13 @@ static inline int qdisc_enqueue(struct s
return sch->enqueue(skb, sch, to_free);
}
@ -1332,9 +1320,8 @@ diff -Naupr linux-4.19.94_orig/include/net/sch_generic.h linux-4.19.94/include/n
static inline bool qdisc_is_percpu_stats(const struct Qdisc *q)
{
return q->flags & TCQ_F_CPUSTATS;
diff -Naupr linux-4.19.94_orig/include/uapi/linux/netfilter.h linux-4.19.94/include/uapi/linux/netfilter.h
--- linux-4.19.94_orig/include/uapi/linux/netfilter.h 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/include/uapi/linux/netfilter.h 2020-01-10 13:42:30.109018732 +0200
--- a/include/uapi/linux/netfilter.h
+++ b/include/uapi/linux/netfilter.h
@@ -14,7 +14,8 @@
#define NF_QUEUE 3
#define NF_REPEAT 4
@ -1345,9 +1332,8 @@ diff -Naupr linux-4.19.94_orig/include/uapi/linux/netfilter.h linux-4.19.94/incl
/* we overload the higher bits for encoding auxiliary data such as the queue
* number or errno values. Not nice, but better than additional function
diff -Naupr linux-4.19.94_orig/net/core/dev.c linux-4.19.94/net/core/dev.c
--- linux-4.19.94_orig/net/core/dev.c 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/net/core/dev.c 2020-01-10 13:42:30.110018732 +0200
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -142,6 +142,9 @@
#include <linux/hrtimer.h>
#include <linux/netfilter_ingress.h>
@ -1380,9 +1366,8 @@ diff -Naupr linux-4.19.94_orig/net/core/dev.c linux-4.19.94/net/core/dev.c
static struct sk_buff *validate_xmit_vlan(struct sk_buff *skb,
netdev_features_t features)
{
diff -Naupr linux-4.19.94_orig/net/core/skbuff.c linux-4.19.94/net/core/skbuff.c
--- linux-4.19.94_orig/net/core/skbuff.c 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/net/core/skbuff.c 2020-01-10 13:53:44.039033565 +0200
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -81,6 +81,58 @@ struct kmem_cache *skbuff_head_cache __r
static struct kmem_cache *skbuff_fclone_cache __ro_after_init;
int sysctl_max_skb_frags __read_mostly = MAX_SKB_FRAGS;
@ -1495,10 +1480,9 @@ diff -Naupr linux-4.19.94_orig/net/core/skbuff.c linux-4.19.94/net/core/skbuff.c
}
static int
diff -Naupr linux-4.19.94_orig/net/netfilter/Kconfig linux-4.19.94/net/netfilter/Kconfig
--- linux-4.19.94_orig/net/netfilter/Kconfig 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/net/netfilter/Kconfig 2020-01-10 13:42:30.111018732 +0200
@@ -920,6 +920,18 @@ config NETFILTER_XT_TARGET_LOG
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -932,6 +932,18 @@ config NETFILTER_XT_TARGET_LOG
To compile it as a module, choose M here. If unsure, say N.
@ -1517,10 +1501,9 @@ diff -Naupr linux-4.19.94_orig/net/netfilter/Kconfig linux-4.19.94/net/netfilter
config NETFILTER_XT_TARGET_MARK
tristate '"MARK" target support'
depends on NETFILTER_ADVANCED
diff -Naupr linux-4.19.94_orig/net/netfilter/Makefile linux-4.19.94/net/netfilter/Makefile
--- linux-4.19.94_orig/net/netfilter/Makefile 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/net/netfilter/Makefile 2020-01-10 13:42:30.111018732 +0200
@@ -142,6 +142,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CT) +=
--- a/net/netfilter/Makefile
+++ b/net/netfilter/Makefile
@@ -145,6 +145,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CT) +=
obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o
obj-$(CONFIG_NETFILTER_XT_TARGET_HL) += xt_HL.o
obj-$(CONFIG_NETFILTER_XT_TARGET_HMARK) += xt_HMARK.o
@ -1528,9 +1511,8 @@ diff -Naupr linux-4.19.94_orig/net/netfilter/Makefile linux-4.19.94/net/netfilte
obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
obj-$(CONFIG_NETFILTER_XT_TARGET_LOG) += xt_LOG.o
obj-$(CONFIG_NETFILTER_XT_TARGET_NETMAP) += xt_NETMAP.o
diff -Naupr linux-4.19.94_orig/net/netfilter/core.c linux-4.19.94/net/netfilter/core.c
--- linux-4.19.94_orig/net/netfilter/core.c 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/net/netfilter/core.c 2020-01-10 13:42:30.111018732 +0200
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -518,6 +518,11 @@ int nf_hook_slow(struct sk_buff *skb, st
if (ret == 0)
ret = -EPERM;
@ -1543,9 +1525,8 @@ diff -Naupr linux-4.19.94_orig/net/netfilter/core.c linux-4.19.94/net/netfilter/
case NF_QUEUE:
ret = nf_queue(skb, state, e, s, verdict);
if (ret == 1)
diff -Naupr linux-4.19.94_orig/net/netfilter/nf_queue.c linux-4.19.94/net/netfilter/nf_queue.c
--- linux-4.19.94_orig/net/netfilter/nf_queue.c 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/net/netfilter/nf_queue.c 2020-01-10 13:49:09.686027527 +0200
--- a/net/netfilter/nf_queue.c
+++ b/net/netfilter/nf_queue.c
@@ -29,6 +29,23 @@
* receives, no matter what.
*/
@ -1627,9 +1608,8 @@ diff -Naupr linux-4.19.94_orig/net/netfilter/nf_queue.c linux-4.19.94/net/netfil
err = nf_queue(skb, &entry->state, hooks, i, verdict);
if (err == 1)
goto next_hook;
diff -Naupr linux-4.19.94_orig/net/netfilter/xt_IMQ.c linux-4.19.94/net/netfilter/xt_IMQ.c
--- linux-4.19.94_orig/net/netfilter/xt_IMQ.c 1970-01-01 02:00:00.000000000 +0200
+++ linux-4.19.94/net/netfilter/xt_IMQ.c 2020-01-10 13:42:30.112018732 +0200
--- /dev/null
+++ b/net/netfilter/xt_IMQ.c
@@ -0,0 +1,72 @@
+/*
+ * This target marks packets to be enqueued to an imq device
@ -1703,9 +1683,8 @@ diff -Naupr linux-4.19.94_orig/net/netfilter/xt_IMQ.c linux-4.19.94/net/netfilte
+MODULE_ALIAS("ipt_IMQ");
+MODULE_ALIAS("ip6t_IMQ");
+
diff -Naupr linux-4.19.94_orig/net/sched/sch_generic.c linux-4.19.94/net/sched/sch_generic.c
--- linux-4.19.94_orig/net/sched/sch_generic.c 2020-01-09 11:19:10.000000000 +0200
+++ linux-4.19.94/net/sched/sch_generic.c 2020-01-10 13:42:30.112018732 +0200
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -292,6 +292,14 @@ trace:
return skb;
}

View File

@ -15,21 +15,24 @@ Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -141,4 +141,4 @@
@@ -139,8 +139,8 @@ struct inet_connection_sock {
} icsk_mtup;
u32 icsk_user_timeout;
- u64 icsk_ca_priv[88 / sizeof(u64)];
-#define ICSK_CA_PRIV_SIZE (11 * sizeof(u64))
+ u64 icsk_ca_priv[104 / sizeof(u64)];
+#define ICSK_CA_PRIV_SIZE (13 * sizeof(u64))
};
diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
#define ICSK_TIME_RETRANS 1 /* Retransmit timer */
--- a/net/ipv4/tcp_bbr.c
+++ b/net/ipv4/tcp_bbr.c
@@ -117,2 +117,10 @@
@@ -115,6 +115,14 @@ struct bbr {
unused_b:5;
u32 prior_cwnd; /* prior cwnd upon entering loss recovery */
u32 full_bw; /* recent bw, to estimate if pipe is full */
+
+ /* For tracking ACK aggregation: */
@ -40,7 +43,11 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
+ extra_acked_win_idx:1, /* current index in extra_acked array */
+ unused_c:6;
};
@@ -176,2 +184,11 @@
#define CYCLE_LEN 8 /* number of phases in a pacing gain cycle */
@@ -174,6 +182,15 @@ static const u32 bbr_lt_bw_diff = 4000 /
/* If we estimate we're policed, use lt_bw for this many round trips: */
static const u32 bbr_lt_bw_max_rtts = 48;
+/* Gain factor for adding extra_acked to target cwnd: */
+static const int bbr_extra_acked_gain = BBR_UNIT;
@ -52,7 +59,11 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
+static const u32 bbr_extra_acked_max_us = 100 * 1000;
+
static void bbr_check_probe_rtt_done(struct sock *sk);
@@ -202,2 +219,12 @@
/* Do we estimate that STARTUP filled the pipe? */
@@ -200,6 +217,16 @@ static u32 bbr_bw(const struct sock *sk)
return bbr->lt_use_bw ? bbr->lt_bw : bbr_max_bw(sk);
}
+/* Return maximum extra acked in past k-2k round trips,
+ * where k = bbr_extra_acked_win_rtts.
@ -65,12 +76,20 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
+}
+
/* Return rate in bytes per second, optionally with a gain.
@@ -307,2 +338,4 @@
* The order here is chosen carefully to avoid overflow of u64. This should
* work for input rates of up to 2.9Tbit/sec and gain of 2.89x.
@@ -305,6 +332,8 @@ static void bbr_cwnd_event(struct sock *
if (event == CA_EVENT_TX_START && tp->app_limited) {
bbr->idle_restart = 1;
+ bbr->ack_epoch_mstamp = tp->tcp_mstamp;
+ bbr->ack_epoch_acked = 0;
/* Avoid pointless buffer overflows: pace at est. bw if we don't
@@ -317,6 +350,5 @@
* need more speed (we're restarting from idle and app-limited).
*/
@@ -315,30 +344,19 @@ static void bbr_cwnd_event(struct sock *
}
}
-/* Find target cwnd. Right-size the cwnd based on min RTT and the
- * estimated bottleneck bandwidth:
@ -79,7 +98,9 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
- * cwnd = bw * min_rtt * gain = BDP * gain
+ * bdp = bw * min_rtt * gain
*
@@ -326,17 +358,7 @@
* The key factor, gain, controls the amount of queue. While a small gain
* builds a smaller queue, it becomes more vulnerable to noise in RTT
* measurements (e.g., delayed ACKs or other ACK compression effects). This
* noise may cause BBR to under-estimate the rate.
- *
- * To achieve full performance in high-speed paths, we budget enough cwnd to
@ -99,7 +120,11 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
- u32 cwnd;
+ u32 bdp;
u64 w;
@@ -355,3 +377,20 @@
/* If we've never had a valid RTT sample, cap cwnd at the initial
@@ -353,7 +371,24 @@ static u32 bbr_target_cwnd(struct sock *
w = (u64)bw * bbr->min_rtt_us;
/* Apply a gain to the given value, then remove the BW_SCALE shift. */
- cwnd = (((w * gain) >> BBR_SCALE) + BW_UNIT - 1) / BW_UNIT;
+ bdp = (((w * gain) >> BBR_SCALE) + BW_UNIT - 1) / BW_UNIT;
@ -121,12 +146,18 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
+{
+ struct bbr *bbr = inet_csk_ca(sk);
@@ -364,3 +403,3 @@
/* Allow enough full-sized skbs in flight to utilize end systems. */
cwnd += 3 * bbr_tso_segs_goal(sk);
@@ -362,12 +397,39 @@ static u32 bbr_target_cwnd(struct sock *
cwnd = (cwnd + 1) & ~1U;
/* Ensure gain cycling gets inflight above BDP even for small BDPs. */
- if (bbr->mode == BBR_PROBE_BW && gain > BBR_UNIT)
+ if (bbr->mode == BBR_PROBE_BW && bbr->cycle_idx == 0)
cwnd += 2;
@@ -370,2 +409,29 @@
return cwnd;
}
+/* Find inflight based on min RTT and the estimated bottleneck bandwidth. */
+static u32 bbr_inflight(struct sock *sk, u32 bw, int gain)
@ -156,7 +187,11 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
+}
+
/* An optimization in BBR to reduce losses: On the first round of recovery, we
@@ -430,4 +496,11 @@
* follow the packet conservation principle: send P packets per P packets acked.
* After that, we slow-start and send at most 2*P packets per P packets acked.
@@ -428,8 +490,15 @@ static void bbr_set_cwnd(struct sock *sk
if (bbr_set_cwnd_to_recover_or_restore(sk, rs, acked, &cwnd))
goto done;
+ target_cwnd = bbr_bdp(sk, bw, gain);
+
@ -169,32 +204,55 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
/* If we're below target cwnd, slow start cwnd toward target cwnd. */
- target_cwnd = bbr_target_cwnd(sk, bw, gain);
if (bbr_full_bw_reached(sk)) /* only cut cwnd if we filled the pipe */
@@ -472,3 +545,3 @@
cwnd = min(cwnd + acked, target_cwnd);
else if (cwnd < target_cwnd || tp->delivered < TCP_INIT_CWND)
@@ -470,14 +539,14 @@ static bool bbr_is_next_cycle_phase(stru
if (bbr->pacing_gain > BBR_UNIT)
return is_full_length &&
(rs->losses || /* perhaps pacing_gain*BDP won't fit */
- inflight >= bbr_target_cwnd(sk, bw, bbr->pacing_gain));
+ inflight >= bbr_inflight(sk, bw, bbr->pacing_gain));
@@ -479,3 +552,3 @@
/* A pacing_gain < 1.0 tries to drain extra queue we added if bw
* probing didn't find more bw. If inflight falls to match BDP then we
* estimate queue is drained; persisting would underutilize the pipe.
*/
return is_full_length ||
- inflight <= bbr_target_cwnd(sk, bw, BBR_UNIT);
+ inflight <= bbr_inflight(sk, bw, BBR_UNIT);
}
@@ -489,4 +562,2 @@
static void bbr_advance_cycle_phase(struct sock *sk)
@@ -487,8 +556,6 @@ static void bbr_advance_cycle_phase(stru
bbr->cycle_idx = (bbr->cycle_idx + 1) & (CYCLE_LEN - 1);
bbr->cycle_mstamp = tp->delivered_mstamp;
- bbr->pacing_gain = bbr->lt_use_bw ? BBR_UNIT :
- bbr_pacing_gain[bbr->cycle_idx];
}
@@ -508,4 +579,2 @@
/* Gain cycling: cycle pacing gain to converge to fair share of available bw. */
@@ -506,8 +573,6 @@ static void bbr_reset_startup_mode(struc
struct bbr *bbr = inet_csk_ca(sk);
bbr->mode = BBR_STARTUP;
- bbr->pacing_gain = bbr_high_gain;
- bbr->cwnd_gain = bbr_high_gain;
}
@@ -517,4 +586,2 @@
static void bbr_reset_probe_bw_mode(struct sock *sk)
@@ -515,8 +580,6 @@ static void bbr_reset_probe_bw_mode(stru
struct bbr *bbr = inet_csk_ca(sk);
bbr->mode = BBR_PROBE_BW;
- bbr->pacing_gain = BBR_UNIT;
- bbr->cwnd_gain = bbr_cwnd_gain;
bbr->cycle_idx = CYCLE_LEN - 1 - prandom_u32_max(bbr_cycle_rand);
@@ -701,2 +768,63 @@
bbr_advance_cycle_phase(sk); /* flip to next phase of gain cycle */
}
@@ -699,6 +762,67 @@ static void bbr_update_bw(struct sock *s
}
}
+/* Estimates the windowed max degree of ack aggregation.
+ * This is used to provision extra in-flight data to keep sending during
@ -258,7 +316,11 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
+}
+
/* Estimate when the pipe is full, using the change in delivery rate: BBR
@@ -735,6 +863,4 @@
* estimates that STARTUP filled the pipe if the estimated bw hasn't changed by
* at least bbr_full_bw_thresh (25%) after bbr_full_bw_cnt (3) non-app-limited
@@ -733,14 +857,12 @@ static void bbr_check_drain(struct sock
if (bbr->mode == BBR_STARTUP && bbr_full_bw_reached(sk)) {
bbr->mode = BBR_DRAIN; /* drain queue we created */
- bbr->pacing_gain = bbr_drain_gain; /* pace slow to drain */
- bbr->cwnd_gain = bbr_high_gain; /* maintain cwnd */
@ -266,17 +328,25 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
- bbr_target_cwnd(sk, bbr_max_bw(sk), BBR_UNIT);
+ bbr_inflight(sk, bbr_max_bw(sk), BBR_UNIT);
} /* fall through to check if in-flight is already small: */
@@ -742,3 +868,3 @@
if (bbr->mode == BBR_DRAIN &&
tcp_packets_in_flight(tcp_sk(sk)) <=
- bbr_target_cwnd(sk, bbr_max_bw(sk), BBR_UNIT))
+ bbr_inflight(sk, bbr_max_bw(sk), BBR_UNIT))
bbr_reset_probe_bw_mode(sk); /* we estimate queue is drained */
@@ -798,4 +924,2 @@
}
@@ -796,8 +918,6 @@ static void bbr_update_min_rtt(struct so
if (bbr_probe_rtt_mode_ms > 0 && filter_expired &&
!bbr->idle_restart && bbr->mode != BBR_PROBE_RTT) {
bbr->mode = BBR_PROBE_RTT; /* dip, drain queue */
- bbr->pacing_gain = BBR_UNIT;
- bbr->cwnd_gain = BBR_UNIT;
bbr_save_cwnd(sk); /* note cwnd so we can restore it */
@@ -827,2 +951,31 @@
bbr->probe_rtt_done_stamp = 0;
}
@@ -825,13 +945,44 @@ static void bbr_update_min_rtt(struct so
bbr->idle_restart = 0;
}
+static void bbr_update_gains(struct sock *sk)
+{
@ -308,15 +378,20 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
+}
+
static void bbr_update_model(struct sock *sk, const struct rate_sample *rs)
@@ -830,2 +983,3 @@
{
bbr_update_bw(sk, rs);
+ bbr_update_ack_aggregation(sk, rs);
bbr_update_cycle_phase(sk, rs);
@@ -834,2 +988,3 @@
bbr_check_full_bw_reached(sk, rs);
bbr_check_drain(sk, rs);
bbr_update_min_rtt(sk, rs);
+ bbr_update_gains(sk);
}
@@ -880,2 +1035,9 @@
static void bbr_main(struct sock *sk, const struct rate_sample *rs)
@@ -878,6 +1029,13 @@ static void bbr_init(struct sock *sk)
bbr_reset_lt_bw_sampling(sk);
bbr_reset_startup_mode(sk);
+ bbr->ack_epoch_mstamp = tp->tcp_mstamp;
+ bbr->ack_epoch_acked = 0;
@ -326,3 +401,5 @@ diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c
+ bbr->extra_acked[1] = 0;
+
cmpxchg(&sk->sk_pacing_status, SK_PACING_NONE, SK_PACING_NEEDED);
}

View File

@ -269,7 +269,7 @@
+#endif /*_IPT_WEBURL_H*/
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
@@ -417,5 +417,25 @@ config IP_NF_ARP_MANGLE
@@ -418,5 +418,25 @@ config IP_NF_ARP_MANGLE
endif # IP_NF_ARPTABLES
@ -297,7 +297,7 @@
--- a/net/ipv4/netfilter/Makefile
+++ b/net/ipv4/netfilter/Makefile
@@ -55,6 +55,10 @@ obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o
@@ -53,6 +53,10 @@ obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o
obj-$(CONFIG_IP_NF_SECURITY) += iptable_security.o
# matches
@ -3908,7 +3908,6 @@
+module_init(init);
+module_exit(fini);
+
--- /dev/null
+++ b/net/ipv4/netfilter/ipt_bandwidth.mod.c
@@ -0,0 +1,20 @@
@ -4077,7 +4076,6 @@
+module_init(init);
+module_exit(fini);
+
--- /dev/null
+++ b/net/ipv4/netfilter/ipt_timerange.mod.c
@@ -0,0 +1,20 @@
@ -5423,7 +5421,6 @@
+
+module_init(init);
+module_exit(fini);
--- /dev/null
+++ b/net/ipv4/netfilter/ipt_weburl.c
@@ -0,0 +1,537 @@
@ -5964,7 +5961,6 @@
+
+module_init(init);
+module_exit(fini);
--- /dev/null
+++ b/net/ipv4/netfilter/ipt_weburl.mod.c
@@ -0,0 +1,20 @@

View File

@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
@@ -3265,6 +3267,7 @@ static int packet_create(struct net *net
@@ -3266,6 +3268,7 @@ static int packet_create(struct net *net
mutex_init(&po->pg_vec_lock);
po->rollover = NULL;
po->prot_hook.func = packet_rcv;
@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
@@ -3885,6 +3888,16 @@ packet_setsockopt(struct socket *sock, i
@@ -3886,6 +3889,16 @@ packet_setsockopt(struct socket *sock, i
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
return 0;
}
@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
default:
return -ENOPROTOOPT;
}
@@ -3937,6 +3950,13 @@ static int packet_getsockopt(struct sock
@@ -3938,6 +3951,13 @@ static int packet_getsockopt(struct sock
case PACKET_VNET_HDR:
val = po->has_vnet_hdr;
break;

View File

@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2511,7 +2511,7 @@ static inline int pskb_network_may_pull(
@@ -2530,7 +2530,7 @@ static inline int pskb_network_may_pull(
* NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
*/
#ifndef NET_SKB_PAD

View File

@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#endif
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -799,6 +799,7 @@ struct sk_buff {
@@ -812,6 +812,7 @@ struct sk_buff {
#ifdef CONFIG_TLS_DEVICE
__u8 decrypted:1;
#endif
@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
__u16 tc_index; /* traffic control index */
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5454,6 +5454,9 @@ static enum gro_result dev_gro_receive(s
@@ -5464,6 +5464,9 @@ static enum gro_result dev_gro_receive(s
int same_flow;
int grow;
@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (netif_elide_gro(skb->dev))
goto normal;
@@ -7112,6 +7115,48 @@ static void __netdev_adjacent_dev_unlink
@@ -7122,6 +7125,48 @@ static void __netdev_adjacent_dev_unlink
&upper_dev->adj_list.lower);
}
@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int __netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev, bool master,
void *upper_priv, void *upper_info,
@@ -7162,6 +7207,7 @@ static int __netdev_upper_dev_link(struc
@@ -7172,6 +7217,7 @@ static int __netdev_upper_dev_link(struc
if (ret)
return ret;
@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
ret = notifier_to_errno(ret);
@@ -7254,6 +7300,7 @@ void netdev_upper_dev_unlink(struct net_
@@ -7264,6 +7310,7 @@ void netdev_upper_dev_unlink(struct net_
__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
&changeupper_info.info);
@@ -7893,6 +7940,7 @@ int dev_set_mac_address(struct net_devic
@@ -7903,6 +7950,7 @@ int dev_set_mac_address(struct net_devic
if (err)
return err;
dev->addr_assign_type = NET_ADDR_SET;

View File

@ -171,7 +171,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/**
* Search the device tree for the best MAC address to use. 'mac-address' is
* checked first, because that is supposed to contain to "most recent" MAC
@@ -65,11 +193,18 @@ static const void *of_get_mac_addr(struc
@@ -65,11 +198,18 @@ static const void *of_get_mac_addr(struc
* addresses. Some older U-Boots only initialized 'local-mac-address'. In
* this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
* but is all zeros.

View File

@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1201,6 +1201,9 @@ void phy_detach(struct phy_device *phyde
@@ -1205,6 +1205,9 @@ void phy_detach(struct phy_device *phyde
struct module *ndev_owner = dev->dev.parent->driver->owner;
struct mii_bus *bus;
@ -23,7 +23,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
sysfs_remove_link(&phydev->mdio.dev.kobj, "attached_dev");
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -567,6 +567,12 @@ struct phy_driver {
@@ -569,6 +569,12 @@ struct phy_driver {
*/
int (*did_interrupt)(struct phy_device *phydev);