Date: Wed, 31 Oct 2007 22:22:08 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 128432 for review Message-ID: <200710312222.l9VMM8c8039951@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=128432 Change 128432 by kmacy@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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710312222.l9VMM8c8039951>