跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • bbrplus的编译
未分類
3 3 月 2020

bbrplus的编译

悟雨 大佬有话说 :

bbrplus的编译

引用海运的
安装编译环境
yum install -y ncurses-devel make gcc bc bison flex elfutils-libelf-devel openssl-devel rpm-build
yum install -y dpkg-dev #生成deb包依赖
ubuntu
apt install build-essential libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf
下载4.14版内核:
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.14.*.tar.xz
tar xf linux-4.14.*.tar.xz

patch:
diff -urN aa/include/net/inet_connection_sock.h bb/include/net/inet_connection_sock.h
— aa/include/net/inet_connection_sock.h       2019-12-14 17:07:48.190502969 +0800
+++ bb/include/net/inet_connection_sock.h       2019-12-14 17:08:06.373215456 +0800
@@ -136,8 +136,8 @@
      } icsk_mtup;
      u32                     icsk_user_timeout;

–       u64                     icsk_ca_priv;
-#define ICSK_CA_PRIV_SIZE      (11 * sizeof(u64))
+       u64                     icsk_ca_priv;
+#define ICSK_CA_PRIV_SIZE      (14 * sizeof(u64))
};

#define ICSK_TIME_RETRANS      1       /* Retransmit timer */
diff -urN aa/net/ipv4/Makefile bb/net/ipv4/Makefile
— aa/net/ipv4/Makefile      2019-12-14 17:09:40.204731772 +0800
+++ bb/net/ipv4/Makefile      2019-12-14 17:09:47.147621995 +0800
@@ -44,7 +44,7 @@
obj-$(CONFIG_INET_UDP_DIAG) += udp_diag.o
obj-$(CONFIG_INET_RAW_DIAG) += raw_diag.o
obj-$(CONFIG_NET_TCPPROBE) += tcp_probe.o
-obj-$(CONFIG_TCP_CONG_BBR) += tcp_bbr.o
+obj-$(CONFIG_TCP_CONG_BBR) += tcp_bbrplus.o
obj-$(CONFIG_TCP_CONG_BIC) += tcp_bic.o
obj-$(CONFIG_TCP_CONG_CDG) += tcp_cdg.o
obj-$(CONFIG_TCP_CONG_CUBIC) += tcp_cubic.o
diff -urN aa/net/ipv4/tcp_output.c bb/net/ipv4/tcp_output.c
— aa/net/ipv4/tcp_output.c    2019-12-14 17:08:48.488549518 +0800
+++ bb/net/ipv4/tcp_output.c    2019-12-14 17:08:55.061445594 +0800
@@ -1834,6 +1834,7 @@

      return !after(end_seq, tcp_wnd_end(tp));
}
+EXPORT_SYMBOL(tcp_snd_wnd_test);

/* Trim TSO SKB to LEN bytes, put the remaining data into a new packet
* which is put after SKB on the list.It is very much like

看不懂? 那看这个
修改linux-4.14.*/include/net/inet_connection_sock.h
u64 icsk_ca_priv;
define ICSK_CA_PRIV_SIZE (14 * sizeof(u64))
这两段数值改为112和14,如上

修改/net/ipv4/tcp_output.c
tcp_snd_wnd_test函数大括号后}
换行添加EXPORT_SYMBOL(tcp_snd_wnd_test);

添加tcp_bbrplus.c,删除/net/ipv4/tcp_bbr.c
修改linux-4.14.91/net/ipv4/Makefile,
obj-$(CONFIG_TCP_CONG_BBR) += tcp_bbrplus.o,bbr改为bbrplus

tcp_bbrplus.c
https://raw.githubusercontent.com/cx9208/bbrplus/master/tcp_bbrplus.c

打开编译选项并开启编译bbr为模块:
make menuconfig

禁用签名调试及编译
scripts/config –disable MODULE_SIG
scripts/config –disable DEBUG_INFO

编译内核生成centos rpm或ubuntu deb包,注意如果使用make rpm-pkg则每次编译前会先clean,如果重复编译会很慢!
make binrpm-pkg
make bindeb-pkg

https://github.com/cx9208/bbrplus
https://blog.csdn.net/dog250/article/details/80629551

你们说断流,那自己编译下看看
我编译的168就这么编译的 我编译的版本不止168

这里提一点dog250那边提到的数字是88->104   11->13
上面提到的是数字是88->11211->14
至于为什么这么改 我也不知道
129的版本用的哪个数字 我不知道 得问https://github.com/cx9208

有没有现成的源码?有
https://github.com/ylx2016/kernel/releases/download/4.14.166-bbrplus/linux-4.14.166bbrplus.zip

my49cn 大佬有话说 :

可能是168内核tcp处理有改动了吧。这不是你的错。。有些东西确实是老版本好。大佬你的脚本很好用。基本上我每台鸡鸡都要用的

悟雨 大佬有话说 :

my49cn 大佬有话说 : 2020-3-3 11:43
可能是168内核tcp处理有改动了吧。这不是你的错。。有些东西确实是老版本好。大佬你的脚本很好用。基本上我 …

那我改天把脚本里面降级到129的bbrplus吧

三不 大佬有话说 :

爱你

陈浩南 大佬有话说 :

进来学习一下,

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具