Date: Wed, 31 Oct 2007 04:40:40 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 128387 for review Message-ID: <200710310440.l9V4eeep098830@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=128387 Change 128387 by kmacy@kmacy:storage:toestack on 2007/10/31 04:40:37 ignore events on non-offloaded interfaces drop route lock so as to avoid LOR on t3cdev lock Affected files ... .. //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.c#13 edit Differences ... ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.c#13 (text+ko) ==== @@ -876,7 +876,28 @@ static void cxgb_route_event(void *unused, int event, struct rtentry *rt0, struct rtentry *rt1) { + struct toedev *tdev0, *tdev1 = NULL; + + /* + * ignore events on non-offloaded interfaces + */ + tdev0 = TOEDEV(rt0->rt_ifp); + if (rt1) + tdev1 = TOEDEV(rt1->rt_ifp); + if (tdev0 == NULL && tdev1 == NULL) + return; + /* + * avoid LORs by dropping the route lock but keeping a reference + * + */ + RT_ADDREF(rt0); + RT_UNLOCK(rt0); + if (rt1) { + RT_ADDREF(rt1); + RT_UNLOCK(rt1); + } + switch (event) { case RTEVENT_ARP_UPDATE: { cxgb_neigh_update(rt0); @@ -892,6 +913,14 @@ default: break; } + + RT_LOCK(rt0); + RT_REMREF(rt0); + if (rt1) { + RT_LOCK(rt1); + RT_REMREF(rt1); + } + } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710310440.l9V4eeep098830>