Skip to content

configs: enable CONFIG_NET_FOU_IP_TUNNELS #6204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

lcolitti
Copy link
Contributor

@lcolitti lcolitti commented Jun 4, 2024

The current configs enable fou as a module, but fou is not very useful without CONFIG_NET_FOU_IP_TUNNELS, because it can't be used to actually create tunnels:

$ sudo ip fou add port 12345 ipproto ipip
$ sudo ip link add name fou1 type ipip local any remote 8.8.8.8
encap fou encap-sport auto encap-dport 12345
RTNETLINK answers: Invalid argument

Enable the option by default. This does not increase memory footprint because fou is not loaded by default. Uncompressed module size goes from 26.3KiB to 32.5KiB.

After this change, things work:

$ sudo ip fou add port 12345 ipproto ipip
$ sudo ip link add name fou1 type ipip local any remote 8.8.8.8
encap fou encap-sport auto encap-dport 12345
$ ip link show fou1
8: fou1@NONE: <POINTOPOINT,NOARP> mtu 1472 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ipip 0.0.0.0 peer 8.8.8.8

@pelwell
Copy link
Contributor

pelwell commented Jun 4, 2024

I'm fine with the idea, but that's not how you create defconfig files. Kconfig has a fixed idea of the defconfig file order, and only contains differences from the default configuration. You are supposed to create your .config file, then use make ... savedefconfig to write a file called defconfig, which you should then copy to the appropriate _defconfig file.

If you'd allowed maintainers to make changes to your PR then I would have just fixed it up, but as it is you'll have to do it yourself. These are the required changes:

diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig
index 2066cac1f88c7..08fecfbdfd47f 100644
--- a/arch/arm/configs/bcm2709_defconfig
+++ b/arch/arm/configs/bcm2709_defconfig
@@ -95,7 +95,7 @@ CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
 CONFIG_IP_PIMSM_V1=y
 CONFIG_IP_PIMSM_V2=y
 CONFIG_NET_IPVTI=m
-CONFIG_NET_FOU=m
+CONFIG_NET_FOU_IP_TUNNELS=y
 CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
@@ -1583,4 +1583,3 @@ CONFIG_STACK_TRACER=y
 CONFIG_SCHED_TRACER=y
 CONFIG_BLK_DEV_IO_TRACE=y
 # CONFIG_UPROBE_EVENTS is not set
-CONFIG_NET_FOU_IP_TUNNELS=y
diff --git a/arch/arm/configs/bcm2711_defconfig b/arch/arm/configs/bcm2711_defconfig
index 81e577a83231a..26ca2e35ebe80 100644
--- a/arch/arm/configs/bcm2711_defconfig
+++ b/arch/arm/configs/bcm2711_defconfig
@@ -95,7 +95,7 @@ CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
 CONFIG_IP_PIMSM_V1=y
 CONFIG_IP_PIMSM_V2=y
 CONFIG_NET_IPVTI=m
-CONFIG_NET_FOU=m
+CONFIG_NET_FOU_IP_TUNNELS=y
 CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
@@ -1615,4 +1615,3 @@ CONFIG_STACK_TRACER=y
 CONFIG_SCHED_TRACER=y
 CONFIG_BLK_DEV_IO_TRACE=y
 # CONFIG_UPROBE_EVENTS is not set
-CONFIG_NET_FOU_IP_TUNNELS=y
diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig
index a8143adc1d58a..0b72d3b9fd3bb 100644
--- a/arch/arm/configs/bcmrpi_defconfig
+++ b/arch/arm/configs/bcmrpi_defconfig
@@ -90,7 +90,7 @@ CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
 CONFIG_IP_PIMSM_V1=y
 CONFIG_IP_PIMSM_V2=y
 CONFIG_NET_IPVTI=m
-CONFIG_NET_FOU=m
+CONFIG_NET_FOU_IP_TUNNELS=y
 CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
@@ -1576,4 +1576,3 @@ CONFIG_STACK_TRACER=y
 CONFIG_SCHED_TRACER=y
 CONFIG_BLK_DEV_IO_TRACE=y
 # CONFIG_UPROBE_EVENTS is not set
-CONFIG_NET_FOU_IP_TUNNELS=y
diff --git a/arch/arm64/configs/bcm2711_defconfig b/arch/arm64/configs/bcm2711_defconfig
index 96d77e0418ee4..f225966db21d5 100644
--- a/arch/arm64/configs/bcm2711_defconfig
+++ b/arch/arm64/configs/bcm2711_defconfig
@@ -103,7 +103,7 @@ CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
 CONFIG_IP_PIMSM_V1=y
 CONFIG_IP_PIMSM_V2=y
 CONFIG_NET_IPVTI=m
-CONFIG_NET_FOU=m
+CONFIG_NET_FOU_IP_TUNNELS=y
 CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
@@ -1677,4 +1677,3 @@ CONFIG_SCHED_TRACER=y
 CONFIG_BLK_DEV_IO_TRACE=y
 # CONFIG_UPROBE_EVENTS is not set
 # CONFIG_STRICT_DEVMEM is not set
-CONFIG_NET_FOU_IP_TUNNELS=y
diff --git a/arch/arm64/configs/bcm2712_defconfig b/arch/arm64/configs/bcm2712_defconfig
index 28210de6b7b0d..bf1ea6d9da623 100644
--- a/arch/arm64/configs/bcm2712_defconfig
+++ b/arch/arm64/configs/bcm2712_defconfig
@@ -106,7 +106,7 @@ CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
 CONFIG_IP_PIMSM_V1=y
 CONFIG_IP_PIMSM_V2=y
 CONFIG_NET_IPVTI=m
-CONFIG_NET_FOU=m
+CONFIG_NET_FOU_IP_TUNNELS=y
 CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
@@ -1680,4 +1680,3 @@ CONFIG_SCHED_TRACER=y
 CONFIG_BLK_DEV_IO_TRACE=y
 # CONFIG_UPROBE_EVENTS is not set
 # CONFIG_STRICT_DEVMEM is not set
-CONFIG_NET_FOU_IP_TUNNELS=y
diff --git a/arch/arm64/configs/bcmrpi3_defconfig b/arch/arm64/configs/bcmrpi3_defconfig
index 21d58ecca0f5a..1193daa46f3bb 100644
--- a/arch/arm64/configs/bcmrpi3_defconfig
+++ b/arch/arm64/configs/bcmrpi3_defconfig
@@ -97,7 +97,7 @@ CONFIG_IP_MROUTE=y
 CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
 CONFIG_IP_PIMSM_V1=y
 CONFIG_IP_PIMSM_V2=y
-CONFIG_NET_FOU=m
+CONFIG_NET_FOU_IP_TUNNELS=y
 CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
@@ -1559,4 +1559,3 @@ CONFIG_STACK_TRACER=y
 CONFIG_SCHED_TRACER=y
 CONFIG_BLK_DEV_IO_TRACE=y
 # CONFIG_UPROBE_EVENTS is not set
-CONFIG_NET_FOU_IP_TUNNELS=y

The current configs enable fou as a module, but fou is not very
useful without CONFIG_NET_FOU_IP_TUNNELS, because it can't be
used to actually create tunnels:

$ sudo ip fou add port 12345 ipproto ipip
$ sudo ip link add name fou1 type ipip local any remote 8.8.8.8 \
      encap fou encap-sport auto encap-dport 12345
RTNETLINK answers: Invalid argument

Enable the option by default. This does not increase memory
footprint because fou is not loaded by default. Uncompressed
module size goes from 26.3KiB to 32.5KiB.

After this change, things work:

$ sudo ip fou add port 12345 ipproto ipip
$ sudo ip link add name fou1 type ipip local any remote 8.8.8.8 \
      encap fou encap-sport auto encap-dport 12345
$ ip link show fou1
8: fou1@NONE: <POINTOPOINT,NOARP> mtu 1472 qdisc noop state DOWN [...]
    link/ipip 0.0.0.0 peer 8.8.8.8

Signed-off-by: Lorenzo Colitti <[email protected]>
@lcolitti
Copy link
Contributor Author

lcolitti commented Jun 4, 2024

Hmm. I'm pretty sure I did click "allow edits by maintainers". But trying again.

@lcolitti
Copy link
Contributor Author

lcolitti commented Jun 4, 2024

BTW, should I create a PR for rpi-6.1.y as well? My pi 4s are running 6.1.21 at the moment, but which is several months old, so I'm not sure if that branch is still actively maintained.

@popcornmix
Copy link
Collaborator

BTW, should I create a PR for rpi-6.1.y as well? My pi 4s are running 6.1.21 at the moment, but which is several months old, so I'm not sure if that branch is still actively maintained.

No new features on 6.1. Security fixes only.

@pelwell pelwell merged commit 085e8b4 into raspberrypi:rpi-6.6.y Jun 4, 2024
12 checks passed
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Jun 7, 2024
kernel: configs: enable CONFIG_NET_FOU_IP_TUNNELS
See: raspberrypi/linux#6204

kernel: dts: bcm2712-rpi: Move rpi-otp nodes onto a bus
See: raspberrypi/linux#6197

kernel: vc4/hdmi: Fix Hsync and Vsync polarity changes
See: raspberrypi/linux#6193

kernel: Update DAC8x to support 384khz
See: raspberrypi/linux#6187

kernel: DTS: overlays: add mmio-hi parameter to pciex1-compat-pi5
See: raspberrypi/linux#6186
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jun 12, 2024
kernel: configs: enable CONFIG_NET_FOU_IP_TUNNELS
See: raspberrypi/linux#6204

kernel: dts: bcm2712-rpi: Move rpi-otp nodes onto a bus
See: raspberrypi/linux#6197

kernel: vc4/hdmi: Fix Hsync and Vsync polarity changes
See: raspberrypi/linux#6193

kernel: Update DAC8x to support 384khz
See: raspberrypi/linux#6187

kernel: DTS: overlays: add mmio-hi parameter to pciex1-compat-pi5
See: raspberrypi/linux#6186
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.

3 participants