Re: [bbr-dev] Help on building kernel module

520 views
Skip to first unread message

Neal Cardwell

unread,
Feb 23, 2021, 10:27:47 AM2/23/21
to Antonius Idvorean, BBR Development
Hi,

It looks like you were trying to build the tcp_bbr2.c file as an "out-of-tree" module in the context of some other source tree (here perhaps an Ubuntu "5.4.0-65-generic" kernel), outside the context of the https://github.com/google/bbr/tree/v2alpha branch. Unfortunately, this will not work, since the tcp_bbr2.c code depends on changes inside the core Linux TCP stack. Because of this, the tcp_bbr2.c code can only be built either:

(a) inside the context of the https://github.com/google/bbr/tree/v2alpha branch source tree, or

(b) by cherry-picking or rebasing the tcp_bbr2 patch series on top of some other Linux kernel source tree of a similar vintage (Linux 5.10 or newer)

Hope that helps.

best,
neal


On Tue, Feb 23, 2021 at 5:57 AM 'Antonius Idvorean' via BBR Development <bbr...@googlegroups.com> wrote:
Hello,

I'm quite new to congestion control algorithms and I'm trying to do some research on BBRv2. I tried the gce-install.sh script from the Repo which is working for me on a local VM but since my desired testing environment isn't so easily accessible I'm trying to just compile the kernel module and use that.
My environment is an Ubuntu 20.04 VM (kernel version 5.4.0-65-generic) and I used the following Makefile to compile other CC algorithms:

obj-m := tcp_bbr2.o

KDIR    := /lib/modules/$(shell uname -r)/build

all:
$(MAKE) -C $(KDIR) M=$(shell pwd) modules

clean:
$(MAKE) -C $(KDIR) M=$(shell pwd) clean

But under this circumstance it doesn't work for BBRv2. While making a lot of errors and  warning occur and it finished with:

cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:275: /home/a/bbr2/tcp_bbr2.o] Error 1
make[1]: *** [Makefile:1757: /home/a/bbr2] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-65-generic'
make: *** [Makefile:6: all] Error 2

Has someone experienced the same and might want to share his/her solution since I'm also new to linux kernels and kernel modules?

I hope I'm at the right place here for that.

Thanks in advance,
Antonius 

--
You received this message because you are subscribed to the Google Groups "BBR Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbr-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbr-dev/509a51f0-13b1-47e0-863a-ffa68a94c0f9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages