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)
Thu, Aug 1, 2:48 PM
Unknown Object (File)
Mon, Jul 29, 8:00 PM
Unknown Object (File)
Mon, Jul 29, 6:07 AM
Unknown Object (File)
Fri, Jul 26, 9:31 PM
Unknown Object (File)
Jul 16 2024, 11:49 AM
Unknown Object (File)
Jul 16 2024, 11:46 AM
Unknown Object (File)
Jul 13 2024, 9:14 PM
Unknown Object (File)
Jul 9 2024, 4:51 PM
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 Not Applicable
Unit
Tests Not Applicable

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
347 ↗(On Diff #7949)

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.