PERFORCE change 128432 for review
Kip Macy
kmacy at FreeBSD.org
Wed Oct 31 15:22:09 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=128432
Change 128432 by kmacy at kmacy:storage:toestack on 2007/10/31 22:21:20
- free unreferenced rtentry
- remove bogus la_hold check
- call arpresolve to update rtentry before copying into l2t entry
Affected files ...
.. //depot/projects/toestack/sys/dev/cxgb/cxgb_l2t.c#10 edit
Differences ...
==== //depot/projects/toestack/sys/dev/cxgb/cxgb_l2t.c#10 (text+ko) ====
@@ -105,8 +105,7 @@
if (e->neigh) {
RT_LOCK(e->neigh);
- RT_REMREF(e->neigh);
- RT_UNLOCK(e->neigh);
+ RTFREE_LOCKED(e->neigh);
}
e->neigh = rt;
}
@@ -454,7 +453,9 @@
int ifidx = neigh->rt_ifp->if_index;
int hash = arp_hash(addr, ifidx, d);
struct llinfo_arp *la;
-
+
+ arpresolve(neigh->rt_ifp, neigh, NULL, rt_key(neigh), RT_ENADDR(neigh));
+
rw_rlock(&d->lock);
for (e = d->l2tab[hash].first; e; e = e->next)
if (e->addr == addr && e->ifindex == ifidx) {
@@ -476,11 +477,10 @@
if (la->la_asked >= 5 /* arp_maxtries */) {
arpq = e->arpq_head;
e->arpq_head = e->arpq_tail = NULL;
- } else if (la->la_hold == NULL)
+ } else
setup_l2e_send_pending(dev, NULL, e);
} else {
- e->state = (la->la_hold == NULL) ?
- L2T_STATE_VALID : L2T_STATE_STALE;
+ e->state = L2T_STATE_VALID;
if (memcmp(e->dmac, RT_ENADDR(neigh), 6))
setup_l2e_send_pending(dev, NULL, e);
}
More information about the p4-projects
mailing list