Page MenuHomeFreeBSD

routing: Enable hash_outbound during nhgrp allocation
AcceptedPublic

Authored by pouria on Fri, Jun 5, 2:11 PM.
Tags
None
Referenced Files
F159098689: D57469.diff
Wed, Jun 10, 2:47 AM
F159086430: D57469.diff
Tue, Jun 9, 11:12 PM
Unknown Object (File)
Tue, Jun 9, 12:22 PM
Unknown Object (File)
Tue, Jun 9, 4:16 AM
Unknown Object (File)
Mon, Jun 8, 12:49 PM
Unknown Object (File)
Sat, Jun 6, 7:36 AM

Details

Reviewers
melifaro
glebius
markj
Group Reviewers
network
Summary

Multipath routes can be added via both RTM_F_CREATE and RTM_F_APPEND.
Therefore, it's possible to have mpath routes without calling
add_route_flags_mpath.

Instead of checking V_fib_hash_outbound for every route append,
check it during nhgrp_ctl initialization, which is only called for
the first multipath request per rib_head.

PR: 293136

Test Plan
  1. Add multipath routes per vnet.
  2. Verify sysctl net.route.hash_outbound.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 73703
Build 70586: arc lint + arc unit

Event Timeline

pouria requested review of this revision.Fri, Jun 5, 2:11 PM

The approach proposed here seems preferable to moving the check into rib_add_route_px(), which I previously suggested as a solution for PR 293136 in Bugzilla.

While the patch proposed for PR 293136 works correctly, it introduces a small amount of overhead. Although minor, this overhead is now visible in the routing update processing path used by BIRD. In a recent flame graph captured on our ASBR running FreeBSD 15.1 and BIRD 3.3.0, it shows up as a slight regression.

Given that, I am inclined to support this simpler approach, as it appears to avoid the additional overhead and keeps route processing on the critical path as efficient as possible.

As I am only an observer on this review and not one of its reviewers, I will leave the final judgment to those more familiar with this part of the codebase.

Not an expert here, but after brief looks good.

This revision is now accepted and ready to land.Mon, Jun 8, 6:30 PM