Page MenuHomeFreeBSD

net/if.c: Add fib-aware ifa_ifwithaddr()
AcceptedPublic

Authored by pouria on Fri, Jul 17, 4:17 PM.
Tags
None
Referenced Files
F163065152: D58305.diff
Sun, Jul 19, 6:41 PM
F163020314: D58305.diff
Sun, Jul 19, 6:39 AM
Unknown Object (File)
Sat, Jul 18, 5:05 PM
Unknown Object (File)
Sat, Jul 18, 6:16 AM

Details

Reviewers
glebius
markj
bnovkov
Group Reviewers
network
Summary

Add FIB selection logic by introducing ifa_ifwithaddr_fib() to
support FIB-specific lookups. Then have ifa_ifwithaddr() wrap it
with RT_ALL_FIBS.

Diff Detail

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

Event Timeline

sys/net/if.c
1746

The ARGSUSED is no longer relevant today and for this function it is not even correct. A very good change to remove it once and for all.

This revision is now accepted and ready to land.Fri, Jul 17, 4:22 PM
This revision now requires review to proceed.Fri, Jul 17, 4:24 PM
pouria added inline comments.
sys/net/if.c
1746

The ARGSUSED is no longer relevant today and for this function it is not even correct. A very good change to remove it once and for all.

I've removed all of it in this file. Should I do this, or should I only remove it from that specific function?

sys/net/if.c
1746

No, please don't mix the cleaning sweep with a new KPI change into one commit. It doesn't make sense to copy the comment, so just drop it from this change.

The cleaning sweep should be a separate revision. You can actually go wider than just this file, probably cover entire sys/net*. That would of course require Src Committers and srcmgr as reviewers. IMHO, everybody should approve. But there might be some disagreement. I don't know of any modern use for this comment.

sys/net/if.c
1754

It would be great to introduce a fib-aware flavor of this interface as well, otherwise we'll end up repeating the NET_EPOCH_{ENTER,EXIT} pattern every time we call ifa_ifwithaddr_fib

bz added inline comments.
sys/net/if.c
1746

lint-ers (lint, flexelint, ..) used to evaluate this to not warn about unused function arguments if my memory serves me right. One would hope that unused is the better annotation these days? @phk may know more details.

sys/net/if.c
1746

lint-ers (lint, flexelint, ..) used to evaluate this to not warn about unused function arguments if my memory serves me right. One would hope that __unused is the better annotation these days?

All correct!

pouria marked an inline comment as done.

Revert removed ARGUSED comments on other functions.
Address @bnovkov comment by adding ifa_ifwithaddr_fib_check() version.

This revision is now accepted and ready to land.Fri, Jul 17, 11:53 PM

@bnovkov Should I wait for you to test, or are we good to land this?