Bug 244004 - vxlan(4) does not support setting of tunnelfib
Summary: vxlan(4) does not support setting of tunnelfib
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Many People
Assignee: Bryan Venteicher
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2020-02-09 13:53 UTC by Luiz Amaral
Modified: 2021-11-03 12:22 UTC (History)
3 users (show)

See Also:


Attachments
Patch for vxlan tunnelfib support (2.07 KB, text/plain)
2020-02-09 13:53 UTC, Luiz Amaral
no flags Details
Patch for vxlan tunnelfib support (2.07 KB, patch)
2020-02-09 18:57 UTC, Luiz Amaral
no flags Details | Diff
VXLAN Tunnelfib patch with fib_lookup logic (2.15 KB, patch)
2021-09-23 20:01 UTC, Luiz Amaral
no flags Details | Diff
VXLAN Tunnelfib patch with fib_lookup logic (2.61 KB, patch)
2021-09-23 20:08 UTC, Luiz Amaral
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luiz Amaral 2020-02-09 13:53:03 UTC
Created attachment 211511 [details]
Patch for vxlan tunnelfib support

I have a FreeBSD router that heavily relies on two different FIBs to do its job.

I needed my vxlan interface to use a different FIB for the outgoing packets encapsulated by the interface, but I discovered that it wasn't implemented yet. 

I implemented this featured based on what was done for the gre(4) and gif(4) interfaces.
Comment 1 Luiz Amaral 2020-02-09 18:57:50 UTC
Created attachment 211517 [details]
Patch for vxlan tunnelfib support
Comment 2 Luiz Amaral 2021-03-18 19:25:01 UTC
Any progress on this issue?

Can I help with anything else here?
Comment 3 Zhenlei Huang 2021-07-27 03:51:25 UTC
Hi Luiz Amaral,
Some logic are missing in your patch 'Patch for vxlan tunnelfib support'. See https://cgit.freebsd.org/src/tree/sys/net/if_vxlan.c#n2536 and https://cgit.freebsd.org/src/tree/sys/net/if_vxlan.c#n2648 .
It looks good if 'fib[4,6]_lookup()' is fixed as well.

@CC Bryan Venteicher
Comment 4 Luiz Amaral 2021-09-23 20:01:00 UTC
Created attachment 228139 [details]
VXLAN Tunnelfib patch with fib_lookup logic

Hi Zhenlei,

The old patch was done against 12.1 and it looks like some things got reworked in 13.0.

I redid the patch against CURRENT and included the changes on the fib[4,6]_lookup functions. 

I did some testing on my machines and it works as expected when tunnelfib is set to a non-default FIB. 

Let me know what you think. 

Luiz
Comment 5 Luiz Amaral 2021-09-23 20:08:52 UTC
Created attachment 228140 [details]
VXLAN Tunnelfib patch with fib_lookup logic

I forgot to include the manpage on the previous patch. This one has it.
Comment 6 Zhenlei Huang 2021-09-24 08:31:49 UTC
(In reply to Luiz Amaral from comment #5)
The patch looks good to me now.
PS: Since STABLE/13 the routing part has changed significantly, see the release note: https://www.freebsd.org/releases/13.0R/relnotes/#network-routing
Comment 7 Luiz Amaral 2021-10-13 16:56:50 UTC
(In reply to Zhenlei Huang from comment #6)
Thank you!

Do I need to do anything else now or do we just wait for Bryan's review?
Comment 8 Zhenlei Huang 2021-11-03 12:22:32 UTC
(In reply to Luiz Amaral from comment #7)
It seems Bryan is out of bandwidth.

Created code review request with slight modification. See https://reviews.freebsd.org/D32820