Page MenuHomeFreeBSD

Split arpresolve() into fast/slow path.
ClosedPublic

Authored by melifaro on Aug 14 2015, 5:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 30, 6:20 PM
Unknown Object (File)
Sep 17 2024, 7:52 PM
Unknown Object (File)
Sep 17 2024, 7:47 PM
Unknown Object (File)
Sep 17 2024, 7:43 PM
Unknown Object (File)
Sep 17 2024, 2:28 PM
Unknown Object (File)
Sep 17 2024, 5:27 AM
Unknown Object (File)
Sep 16 2024, 8:22 PM
Unknown Object (File)
Sep 16 2024, 9:32 AM
Subscribers

Details

Summary

This change isolates the most common case (e.g. successful lookup)
from more complicates scenarios. It also (tries to) make code
more simple by avoiding retry: cycle.

The actual goal is to prepare code to the upcoming change that will
allow LL address retrieval without acquiring LLE lock at all.

Side effects:
Most of the change is just loop unrolling (e.g. splitting first iteration
from second one). However, in cases when we don't have LLE at all
we will do 2 LLE lookups instead of one. Since this situation should be rare
and in general lookups are fast I don't think there is a problem here.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 116
Build 116: arc lint + arc unit

Event Timeline

melifaro retitled this revision from to Split arpresolve() into fast/slow path..
melifaro updated this object.
melifaro edited the test plan for this revision. (Show Details)
melifaro added a reviewer: network.
ae added a reviewer: ae.
ae added a subscriber: ae.

I guess this isn't the last change and you will refactor this code in future. But in case of two lookups, you just can add some flag argument to arpresolve_full and don't do second lookup.

sys/netinet/if_ether.c
348

You forgot to fix function name

This revision is now accepted and ready to land.Aug 16 2015, 9:29 AM
melifaro edited edge metadata.

Aboid second lookup in case of non-existing lle.

This revision now requires review to proceed.Aug 16 2015, 12:12 PM
ae edited edge metadata.
This revision is now accepted and ready to land.Aug 16 2015, 12:16 PM
This revision was automatically updated to reflect the committed changes.