Bug 225792 - ECMP is broken since tryforward()
Summary: ECMP is broken since tryforward()
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-net (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2018-02-09 16:25 UTC by Olivier Cochard
Modified: 2021-04-01 02:01 UTC (History)
8 users (show)

See Also:
koobs: mfc-stable12-
koobs: mfc-stable11-


Attachments
ip_tryforward_rout_mpath (1.66 KB, patch)
2019-08-23 03:51 UTC, Kubilay Kocak
no flags Details | Diff
add radix_mpath.h back (1.36 KB, patch)
2019-11-01 01:39 UTC, Simon K.
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Cochard freebsd_committer freebsd_triage 2018-02-09 16:25:42 UTC
For the record: As mentioned into the mailing-list [1], adding "options RADIX_MPATH" doesn't allow any more to use ECMP.
The new ip_tryforward (like the previous fastforward) didn't support ECMP: a FreeBSD router sticks to its first route entry and never try the second entry.

[1] https://lists.freebsd.org/pipermail/freebsd-net/2017-February/047203.html
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-08-23 03:51:40 UTC
Created attachment 206809 [details]
ip_tryforward_rout_mpath

@Olivier I assume this is still an issue in stable/11,12 and CURRENT, can you confirm?

^Triage: Attach patch from Ermal (eri@) on the mailing list thread, which may (likely?) need a re-base against latest CURRENT
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-08-23 03:52:59 UTC
Add ae@ to CC as they mentioned some code would need to be written (which was), in case they can assist with review
Comment 3 Olivier Cochard freebsd_committer freebsd_triage 2019-08-23 07:07:28 UTC
(In reply to Kubilay Kocak from comment #1)

Yes this is still in issue on stable/11/12/current.
Comment 4 Simon K. 2019-11-01 01:39:49 UTC
Created attachment 208751 [details]
add radix_mpath.h back

   IPSEC policy or set sendredirect to "1" would disable tryforward(). Then the packet will fall into the slowpath. AKA. normal ip_input process. But ip_input.c missed some .h files, eg. radix_mpath.h, then ECMP is broken.
   Set sendredirect to "1" is not a good idea for a router, so I add "fastforwarding" back. Now you can set it to "0" to disable fastpath.
   The attached patch I've tested on FB12-stable r354079 is passed.
Comment 5 Alexander V. Chernikov freebsd_committer freebsd_triage 2021-01-29 23:26:05 UTC
Multipath routing support has been rewritten in FreeBSD 13. It's dubbed ROUTE_MPATH and it is included in the GENERIC kernel.

In the new implementation, ECMP works for both IPv4/IPv6 fast/slow path.
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2021-01-31 01:23:01 UTC
(In reply to Alexander V. Chernikov from comment #5)

Is that to say we can/want to resolve this OBE? One question is what this means for stable/12 users (supported version)
Comment 7 Alexander V. Chernikov freebsd_committer freebsd_triage 2021-02-14 23:56:07 UTC
(In reply to Kubilay Kocak from comment #6)
Currently, I don't have plans for merging route stack changes to 12.

Someone can try to merge/test the changes in the diff to check if they fix the situation in 12.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2021-04-01 02:01:51 UTC
^Triage: Resolved (partial OBE) via new ROUTE_MPATH (13), without merge to stable 12/11, so it doesn't resolve the issue as reported (for 11.x). If this is inaccurate, please re-open the issue with additional details.