Date: Fri, 19 Oct 2007 19:30:48 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 127791 for review Message-ID: <200710191930.l9JJUm9s077129@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127791 Change 127791 by kmacy@kmacy_home:ethng on 2007/10/19 19:30:15 change t3_l2t_get to take an ifnet * Affected files ... .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.c#4 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.h#4 edit .. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.c#7 edit Differences ... ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.c#4 (text+ko) ==== @@ -357,14 +357,14 @@ } struct l2t_entry * -t3_l2t_get(struct t3cdev *dev, struct rtentry *neigh, - unsigned int smt_idx) +t3_l2t_get(struct t3cdev *dev, struct rtentry *neigh, struct ifnet *ifp) { struct l2t_entry *e; struct l2t_data *d = L2DATA(dev); u32 addr = *(u32 *) rt_key(neigh); int ifidx = neigh->rt_ifp->if_index; int hash = arp_hash(addr, ifidx, d); + unsigned int smt_idx = ((struct port_info *)ifp->if_softc)->port_id; rw_wlock(&d->lock); for (e = d->l2tab[hash].first; e; e = e->next) ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_l2t.h#4 (text+ko) ==== @@ -125,7 +125,7 @@ void t3_l2e_free(struct l2t_data *d, struct l2t_entry *e); void t3_l2t_update(struct t3cdev *dev, struct rtentry *ifp); struct l2t_entry *t3_l2t_get(struct t3cdev *dev, struct rtentry *neigh, - unsigned int smt_idx); + struct ifnet *ifp); int t3_l2t_send_slow(struct t3cdev *dev, struct mbuf *m, struct l2t_entry *e); void t3_l2t_send_event(struct t3cdev *dev, struct l2t_entry *e); ==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_offload.c#7 (text+ko) ==== @@ -1250,7 +1250,7 @@ } /* Add new L2T entry */ - e = t3_l2t_get(tdev, new, ((struct port_info *)new->rt_ifp->if_softc)->port_id); + e = t3_l2t_get(tdev, new, new->rt_ifp); if (!e) { log(LOG_ERR, "%s: couldn't allocate new l2t entry!\n", __FUNCTION__);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710191930.l9JJUm9s077129>