Page MenuHomeFreeBSD

Split arpresolve() into fast/slow path.
ClosedPublic

Authored by melifaro on Aug 14 2015, 5:31 PM.
Tags
None
Referenced Files
F93760440: D3383.diff
Thu, Sep 12, 7:33 AM
Unknown Object (File)
Mon, Sep 9, 2:38 AM
Unknown Object (File)
Mon, Sep 9, 1:04 AM
Unknown Object (File)
Sun, Sep 8, 7:57 PM
Unknown Object (File)
Sat, Sep 7, 8:11 AM
Unknown Object (File)
Thu, Sep 5, 7:23 AM
Unknown Object (File)
Aug 1 2024, 2:48 PM
Unknown Object (File)
Jul 29 2024, 8:00 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.