From d28b93f634c13b64ed2b944d1cd427ce752477b7 Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 19 Sep 2018 23:12:10 +0800 Subject: [PATCH] update kmod-bbr --- include/target.mk | 2 +- package/lean/bbr/Makefile | 14 ++++++------- package/lean/bbr/src/Makefile | 2 +- .../lean/bbr/src/{tcp_bbr_mod.c => tcp_bbr.c} | 20 +++++++++---------- 4 files changed, 19 insertions(+), 19 deletions(-) rename package/lean/bbr/src/{tcp_bbr_mod.c => tcp_bbr.c} (98%) diff --git a/include/target.mk b/include/target.mk index 92e43820b..362a936ac 100644 --- a/include/target.mk +++ b/include/target.mk @@ -22,7 +22,7 @@ luci-app-sfe luci-app-flowoffload luci-app-nlbwmon # For nas targets DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm # For router targets -DEFAULT_PACKAGES.router:=dnsmasq-full iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload kmod-bbr_mod +DEFAULT_PACKAGES.router:=dnsmasq-full iptables ip6tables ppp ppp-mod-pppoe firewall kmod-ipt-offload kmod-bbr DEFAULT_PACKAGES.bootloader:= ifneq ($(DUMP),) diff --git a/package/lean/bbr/Makefile b/package/lean/bbr/Makefile index d27ca6f74..4fc5732c5 100644 --- a/package/lean/bbr/Makefile +++ b/package/lean/bbr/Makefile @@ -1,21 +1,21 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_NAME:=bbr_mod +PKG_NAME:=bbr PKG_RELEASE:=1 include $(INCLUDE_DIR)/package.mk -define KernelPackage/bbr_mod +define KernelPackage/bbr SUBMENU:=Network Support - TITLE:=Modified bbr tcp congestion control + TITLE:=bbr tcp congestion control DEPENDS:=@LINUX_4_14 - FILES:=$(PKG_BUILD_DIR)/tcp_bbr_mod.ko + FILES:=$(PKG_BUILD_DIR)/tcp_bbr.ko KCONFIG:= endef -define KernelPackage/bbr_mod/description - Kernel module of modified BBR tcp congestion control +define KernelPackage/bbr/description + Kernel module of BBR tcp congestion control endef EXTRA_KCONFIG:= \ @@ -43,4 +43,4 @@ define Build/Compile modules endef -$(eval $(call KernelPackage,bbr_mod)) +$(eval $(call KernelPackage,bbr)) diff --git a/package/lean/bbr/src/Makefile b/package/lean/bbr/src/Makefile index ec3e7d183..4266f8d23 100644 --- a/package/lean/bbr/src/Makefile +++ b/package/lean/bbr/src/Makefile @@ -1 +1 @@ -obj-m := tcp_bbr_mod.o +obj-m := tcp_bbr.o diff --git a/package/lean/bbr/src/tcp_bbr_mod.c b/package/lean/bbr/src/tcp_bbr.c similarity index 98% rename from package/lean/bbr/src/tcp_bbr_mod.c rename to package/lean/bbr/src/tcp_bbr.c index 6aac1e34c..25c5a0b60 100644 --- a/package/lean/bbr/src/tcp_bbr_mod.c +++ b/package/lean/bbr/src/tcp_bbr.c @@ -126,7 +126,7 @@ static const int bbr_bw_rtts = CYCLE_LEN + 2; /* Window length of min_rtt filter (in sec): */ static const u32 bbr_min_rtt_win_sec = 10; /* Minimum time (in ms) spent at bbr_cwnd_min_target in BBR_PROBE_RTT mode: */ -static const u32 bbr_probe_rtt_mode_ms = 100; +static const u32 bbr_probe_rtt_mode_ms = 200; /* Skip TSO below the following bandwidth (bits/sec): */ static const int bbr_min_tso_rate = 1200000; @@ -135,19 +135,19 @@ static const int bbr_min_tso_rate = 1200000; * and send the same number of packets per RTT that an un-paced, slow-starting * Reno or CUBIC flow would: */ -static const int bbr_high_gain = BBR_UNIT * 3000 / 1000 + 1; +static const int bbr_high_gain = BBR_UNIT * 2885 / 1000 + 1; /* The pacing gain of 1/high_gain in BBR_DRAIN is calculated to typically drain * the queue created in BBR_STARTUP in a single round: */ -static const int bbr_drain_gain = BBR_UNIT * 1000 / 3000; +static const int bbr_drain_gain = BBR_UNIT * 1000 / 2885; /* The gain for deriving steady-state cwnd tolerates delayed/stretched ACKs: */ static const int bbr_cwnd_gain = BBR_UNIT * 2; /* The pacing_gain values for the PROBE_BW gain cycle, to discover/share bw: */ static const int bbr_pacing_gain[] = { - BBR_UNIT * 6 / 4, /* probe for more available bw */ + BBR_UNIT * 5 / 4, /* probe for more available bw */ BBR_UNIT * 3 / 4, /* drain queue and/or yield bw to other flows */ - BBR_UNIT * 5 / 4, BBR_UNIT * 5 / 4, BBR_UNIT * 5 / 4, /* cruise at 1.0*bw to utilize pipe, */ - BBR_UNIT * 6 / 4, BBR_UNIT * 6 / 4, BBR_UNIT * 6 / 4 /* without creating excess queue... */ + BBR_UNIT, BBR_UNIT, BBR_UNIT, /* cruise at 1.0*bw to utilize pipe, */ + BBR_UNIT, BBR_UNIT, BBR_UNIT /* without creating excess queue... */ }; /* Randomize the starting gain cycling phase over N phases: */ static const u32 bbr_cycle_rand = 7; @@ -170,9 +170,9 @@ static const u32 bbr_lt_intvl_min_rtts = 4; /* If lost/delivered ratio > 20%, interval is "lossy" and we may be policed: */ static const u32 bbr_lt_loss_thresh = 50; /* If 2 intervals have a bw ratio <= 1/8, their bw is "consistent": */ -static const u32 bbr_lt_bw_ratio = BBR_UNIT / 4; +static const u32 bbr_lt_bw_ratio = BBR_UNIT / 8; /* If 2 intervals have a bw diff <= 4 Kbit/sec their bw is "consistent": */ -static const u32 bbr_lt_bw_diff = 4000 / 4; +static const u32 bbr_lt_bw_diff = 4000 / 8; /* If we estimate we're policed, use lt_bw for this many round trips: */ static const u32 bbr_lt_bw_max_rtts = 48; @@ -927,7 +927,7 @@ static void bbr_set_state(struct sock *sk, u8 new_state) static struct tcp_congestion_ops tcp_bbr_cong_ops __read_mostly = { .flags = TCP_CONG_NON_RESTRICTED, - .name = "tcp_bbr_mod", + .name = "bbr", .owner = THIS_MODULE, .init = bbr_init, .cong_control = bbr_main, @@ -959,4 +959,4 @@ MODULE_AUTHOR("Neal Cardwell "); MODULE_AUTHOR("Yuchung Cheng "); MODULE_AUTHOR("Soheil Hassas Yeganeh "); MODULE_LICENSE("Dual BSD/GPL"); -MODULE_DESCRIPTION("TCP BBR (Bottleneck Bandwidth and RTT)"); \ No newline at end of file +MODULE_DESCRIPTION("TCP BBR (Bottleneck Bandwidth and RTT)");