Page MenuHomeFreeBSD

Split arpresolve() into fast/slow path.
ClosedPublic

Authored by melifaro on Aug 14 2015, 5:31 PM.
Tags
None
Referenced Files
F94596900: D3383.id7949.diff
Tue, Sep 17, 7:52 PM
F94594946: D3383.id7978.diff
Tue, Sep 17, 7:47 PM
F94593544: D3383.id7979.diff
Tue, Sep 17, 7:43 PM
F94519401: D3383.diff
Tue, Sep 17, 2:28 PM
F94410344: D3383.diff
Tue, Sep 17, 5:27 AM
F94300863: D3383.diff
Mon, Sep 16, 8:22 PM
Unknown Object (File)
Mon, Sep 16, 9:32 AM
Unknown Object (File)
Thu, Sep 12, 7:33 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 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.