Skip to content

Add kernel configs necessary for enabling traffic control's (tc) NETEM#1334

Merged
zasgar merged 3 commits intopixie-io:mainfrom
ddelnano:ddelnano/add-netem-to-qemu-kernels
May 17, 2023
Merged

Add kernel configs necessary for enabling traffic control's (tc) NETEM#1334
zasgar merged 3 commits intopixie-io:mainfrom
ddelnano:ddelnano/add-netem-to-qemu-kernels

Conversation

@ddelnano
Copy link
Copy Markdown
Member

@ddelnano ddelnano commented May 12, 2023

Summary: Add kernel configs necessary for enabling traffic control's (tc) NETEM

The goal with this change is to enable more advanced network shaping during BPF testing. For example, the recently added tcp stats source connector tracks tcp retransmissions, but we don't have a way to cause these retransmissions in order to verify that functionality works.

I'd like to use the tc-netem functionality to inject latency into a network interface that specific gtests can listen on (thinking link local interface that specific tests can opt themselves into). Configuring that interface and providing a nice c++ interface to it will come in later changes.

Busybox provides a tc utility, so I don't think any additional userspace tools are necessary. I will validate that the userspace component of this works once this kernel is available. If there are good ways to do this ahead of time, I'm happy to do that validation. It seems like I need to push a kernel to gcs or find a way for bazel to use a local kernel to do that.

Relevant Issues: N/A

Type of change: /kind test-infra

Test Plan: Verified the following the ensure the kernel config applied correctly

  • Verified compiling our oldest and newest kernel results in net/sched/sch_netem.o built into the kernel
$ make -C tools/docker .build/kernel_build/linux-build-6.1.18.tar.gz 2>&1 | grep sch_netem
  CC      net/sched/sch_netem.o

$ make -C tools/docker .build/kernel_build/linux-build-4.14.254.tar.gz 2>&1 | grep sch_netem
  CC      net/sched/sch_netem.o
  • Verified that within the docker image that the .config and .config.old file maintained the added kernel configs (P382)

Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
@ddelnano ddelnano requested a review from a team May 12, 2023 16:03
@ddelnano ddelnano requested a review from a team May 12, 2023 16:29
vihangm added 2 commits May 16, 2023 23:16
 #ci:bpf-build-all-kernels

Signed-off-by: Vihang Mehta <vihang@pixielabs.ai>
Signed-off-by: Vihang Mehta <vihang@pixielabs.ai>
@zasgar zasgar merged commit 9711f0f into pixie-io:main May 17, 2023
ddelnano added a commit to k8sstormcenter/pixie that referenced this pull request Feb 25, 2026
pixie-io#1334)

Summary: Add kernel configs necessary for enabling traffic control's
(tc) NETEM

The goal with this change is to enable more advanced network shaping
during BPF testing. For example, the recently added tcp stats source
connector tracks tcp retransmissions, but we don't have a way to cause
these retransmissions in order to verify that functionality works.

I'd like to use the
[tc-netem](https://man7.org/linux/man-pages/man8/tc-netem.8.html)
functionality to inject latency into a network interface that specific
gtests can listen on (thinking link local interface that specific tests
can opt themselves into). Configuring that interface and providing a
nice c++ interface to it will come in later changes.

Busybox provides a [tc
utility](https://boxmatrix.info/wiki/Property:tc_(bbcmd)), so I don't
think any additional userspace tools are necessary. I will validate that
the userspace component of this works once this kernel is available. If
there are good ways to do this ahead of time, I'm happy to do that
validation. It seems like I need to push a kernel to gcs or find a way
for bazel to use a local kernel to do that.

Relevant Issues: N/A

Type of change: /kind test-infra

Test Plan: Verified the following the ensure the kernel config applied
correctly
- [x] Verified compiling our oldest and newest kernel results in
`net/sched/sch_netem.o` built into the kernel
```
$ make -C tools/docker .build/kernel_build/linux-build-6.1.18.tar.gz 2>&1 | grep sch_netem
  CC      net/sched/sch_netem.o

$ make -C tools/docker .build/kernel_build/linux-build-4.14.254.tar.gz 2>&1 | grep sch_netem
  CC      net/sched/sch_netem.o
```
Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
ddelnano added a commit to k8sstormcenter/pixie that referenced this pull request Feb 25, 2026
pixie-io#1334)

Summary: Add kernel configs necessary for enabling traffic control's
(tc) NETEM

The goal with this change is to enable more advanced network shaping
during BPF testing. For example, the recently added tcp stats source
connector tracks tcp retransmissions, but we don't have a way to cause
these retransmissions in order to verify that functionality works.

I'd like to use the
[tc-netem](https://man7.org/linux/man-pages/man8/tc-netem.8.html)
functionality to inject latency into a network interface that specific
gtests can listen on (thinking link local interface that specific tests
can opt themselves into). Configuring that interface and providing a
nice c++ interface to it will come in later changes.

Busybox provides a [tc
utility](https://boxmatrix.info/wiki/Property:tc_(bbcmd)), so I don't
think any additional userspace tools are necessary. I will validate that
the userspace component of this works once this kernel is available. If
there are good ways to do this ahead of time, I'm happy to do that
validation. It seems like I need to push a kernel to gcs or find a way
for bazel to use a local kernel to do that.

Relevant Issues: N/A

Type of change: /kind test-infra

Test Plan: Verified the following the ensure the kernel config applied
correctly
- [x] Verified compiling our oldest and newest kernel results in
`net/sched/sch_netem.o` built into the kernel
```
$ make -C tools/docker .build/kernel_build/linux-build-6.1.18.tar.gz 2>&1 | grep sch_netem
  CC      net/sched/sch_netem.o

$ make -C tools/docker .build/kernel_build/linux-build-4.14.254.tar.gz 2>&1 | grep sch_netem
  CC      net/sched/sch_netem.o
```
Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants