Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178192622
D7239.1796225070.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D7239.1796225070.diff
View Options
Index: head/sys/netinet/if_ether.c
===================================================================
--- head/sys/netinet/if_ether.c
+++ head/sys/netinet/if_ether.c
@@ -607,7 +607,7 @@
}
IF_AFDATA_RLOCK(ifp);
- la = lla_lookup(LLTABLE(ifp), LLE_UNLOCKED, dst);
+ la = lla_lookup(LLTABLE(ifp), plle ? LLE_EXCLUSIVE : LLE_UNLOCKED, dst);
if (la != NULL && (la->r_flags & RLLE_VALID) != 0) {
/* Entry found, let's copy lle info */
bcopy(la->r_linkdata, desten, la->r_hdrlen);
@@ -619,9 +619,16 @@
la->r_skip_req = 0; /* Notify that entry was used */
LLE_REQ_UNLOCK(la);
}
+ if (plle) {
+ LLE_ADDREF(la);
+ *plle = la;
+ LLE_WUNLOCK(la);
+ }
IF_AFDATA_RUNLOCK(ifp);
return (0);
}
+ if (plle && la)
+ LLE_WUNLOCK(la);
IF_AFDATA_RUNLOCK(ifp);
return (arpresolve_full(ifp, is_gw, la == NULL ? LLE_CREATE : 0, m, dst,
Index: head/sys/netinet6/nd6.c
===================================================================
--- head/sys/netinet6/nd6.c
+++ head/sys/netinet6/nd6.c
@@ -2222,7 +2222,8 @@
}
IF_AFDATA_RLOCK(ifp);
- ln = nd6_lookup(&dst6->sin6_addr, LLE_UNLOCKED, ifp);
+ ln = nd6_lookup(&dst6->sin6_addr, plle ? LLE_EXCLUSIVE : LLE_UNLOCKED,
+ ifp);
if (ln != NULL && (ln->r_flags & RLLE_VALID) != 0) {
/* Entry found, let's copy lle info */
bcopy(ln->r_linkdata, desten, ln->r_hdrlen);
@@ -2235,9 +2236,15 @@
ln->lle_hittime = time_uptime;
LLE_REQ_UNLOCK(ln);
}
+ if (plle) {
+ LLE_ADDREF(ln);
+ *plle = ln;
+ LLE_WUNLOCK(ln);
+ }
IF_AFDATA_RUNLOCK(ifp);
return (0);
- }
+ } else if (plle && ln)
+ LLE_WUNLOCK(ln);
IF_AFDATA_RUNLOCK(ifp);
return (nd6_resolve_slow(ifp, 0, m, dst6, desten, pflags, plle));
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 2, 3:24 PM (13 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42150770
Default Alt Text
D7239.1796225070.diff (1 KB)
Attached To
Mode
D7239: Fix per-connection L2 caching in fast path
Attached
Detach File
Event Timeline