PERFORCE change 127791 for review

Kip Macy kmacy at FreeBSD.org
Fri Oct 19 12:30:49 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=127791

Change 127791 by kmacy at 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__);


More information about the p4-projects mailing list