Skip to content

Commit 9711f0f

Browse files
authored
Add kernel configs necessary for enabling traffic control's (tc) NETEM (#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>
1 parent 2734a9e commit 9711f0f

2 files changed

Lines changed: 60 additions & 8 deletions

File tree

bazel/pl_qemu_kernels.bzl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616

1717
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
1818

19-
kernel_build_date = 20230406145001
19+
kernel_build_date = 20230516231333
2020
kernel_catalog = {
21-
"4.14.254": "47e9159d229694f8a78a0fceb8acf4438d345c6a62fb6c99337893d6b76f18a4",
22-
"4.19.254": "78d7d59d30d3eed06abb10754985e1b4abb54b652b62f79e6f81b6648efd134a",
23-
"5.10.173": "7043331f05cbd1023a84ad366eb662556963557b3da93ea651ab3a38410dfb5e",
24-
"5.15.101": "4e68bef1ac3ee5f696683b6ffceb5f8042427942851f54dda4eeaa26696267cf",
25-
"5.4.235": "65a568ed5d4d1c5ad9502794402a8ca0a821315bd643cd0e8aa064c94df6ebe9",
26-
"6.1.18": "b2f4a134d7c4a84a129b7b977f54740dceeb48233b8beeefcd86be04a531dcde",
21+
"4.14.254": "17e9ec8e081f98f38d23e5deb4ed0d29cc9785e19e842289d2f8ecd4f0263605",
22+
"4.19.254": "2246f6f7a7949b721e228b94affd93fdb3a6e4262a589f870df232624daf6123",
23+
"5.10.173": "d9033d193d44a3abcd1e14ab7757052e1ba104753e9a45f371356aac222f7381",
24+
"5.15.101": "50d6150186856211ec0a3fc752568daf89f569c0c7b911c53cba402dd330041a",
25+
"5.4.235": "29ec911b99a55deebdc1538903b350c93dc33fe2e4d3a92dbd4020f6992d8aba",
26+
"6.1.18": "29f85b949a57b4b7f3c88c4c5459420b61247a71c05a7c1aa9a8d038fdc7a80b",
2727
}
2828

2929
def kernel_version_to_name(version):

tools/docker/kernel_builder/kernel.config

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,59 @@ CONFIG_LLC=y
12211221
# CONFIG_PHONET is not set
12221222
# CONFIG_6LOWPAN is not set
12231223
# CONFIG_IEEE802154 is not set
1224-
# CONFIG_NET_SCHED is not set
1224+
CONFIG_NET_SCHED=y
1225+
1226+
#
1227+
# Queueing/Scheduling
1228+
#
1229+
# CONFIG_NET_SCH_CBQ is not set
1230+
# CONFIG_NET_SCH_HTB is not set
1231+
# CONFIG_NET_SCH_HFSC is not set
1232+
# CONFIG_NET_SCH_PRIO is not set
1233+
# CONFIG_NET_SCH_MULTIQ is not set
1234+
# CONFIG_NET_SCH_RED is not set
1235+
# CONFIG_NET_SCH_SFB is not set
1236+
# CONFIG_NET_SCH_SFQ is not set
1237+
# CONFIG_NET_SCH_TEQL is not set
1238+
# CONFIG_NET_SCH_TBF is not set
1239+
# CONFIG_NET_SCH_CBS is not set
1240+
# CONFIG_NET_SCH_ETF is not set
1241+
# CONFIG_NET_SCH_TAPRIO is not set
1242+
# CONFIG_NET_SCH_GRED is not set
1243+
# CONFIG_NET_SCH_DSMARK is not set
1244+
CONFIG_NET_SCH_NETEM=y
1245+
# CONFIG_NET_SCH_DRR is not set
1246+
# CONFIG_NET_SCH_MQPRIO is not set
1247+
# CONFIG_NET_SCH_SKBPRIO is not set
1248+
# CONFIG_NET_SCH_CHOKE is not set
1249+
# CONFIG_NET_SCH_QFQ is not set
1250+
# CONFIG_NET_SCH_CODEL is not set
1251+
# CONFIG_NET_SCH_FQ_CODEL is not set
1252+
# CONFIG_NET_SCH_CAKE is not set
1253+
# CONFIG_NET_SCH_FQ is not set
1254+
# CONFIG_NET_SCH_HHF is not set
1255+
# CONFIG_NET_SCH_PIE is not set
1256+
# CONFIG_NET_SCH_PLUG is not set
1257+
# CONFIG_NET_SCH_ETS is not set
1258+
# CONFIG_NET_SCH_DEFAULT is not set
1259+
1260+
#
1261+
# Classification
1262+
#
1263+
# CONFIG_NET_CLS_BASIC is not set
1264+
# CONFIG_NET_CLS_ROUTE4 is not set
1265+
# CONFIG_NET_CLS_FW is not set
1266+
# CONFIG_NET_CLS_U32 is not set
1267+
# CONFIG_NET_CLS_RSVP is not set
1268+
# CONFIG_NET_CLS_RSVP6 is not set
1269+
# CONFIG_NET_CLS_FLOW is not set
1270+
# CONFIG_NET_CLS_CGROUP is not set
1271+
# CONFIG_NET_CLS_BPF is not set
1272+
# CONFIG_NET_CLS_FLOWER is not set
1273+
# CONFIG_NET_CLS_MATCHALL is not set
1274+
# CONFIG_NET_EMATCH is not set
1275+
# CONFIG_NET_CLS_ACT is not set
1276+
CONFIG_NET_SCH_FIFO=y
12251277
# CONFIG_DCB is not set
12261278
# CONFIG_DNS_RESOLVER is not set
12271279
# CONFIG_BATMAN_ADV is not set

0 commit comments

Comments
 (0)