PERFORCE change 124878 for review
Kip Macy
kmacy at FreeBSD.org
Tue Aug 7 23:38:04 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=124878
Change 124878 by kmacy at kmacy_home:ethng on 2007/08/08 06:37:35
once the service threads have started the qsets are owned by the
corresponding thread - have the thread release per-qset resources
on exit
Affected files ...
.. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#6 edit
.. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#2 edit
.. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#5 edit
Differences ...
==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_main.c#6 (text+ko) ====
@@ -683,8 +683,11 @@
if (isset(&sc->open_device_map, OFFLOAD_DEVMAP_BIT))
offload_close(&sc->tdev);
}
+#endif
+
+#ifndef IFNET_MULTIQUEUE
+ t3_free_sge_resources(sc);
#endif
- t3_free_sge_resources(sc);
free(sc->filters, M_DEVBUF);
t3_sge_free(sc);
==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_multiq.c#2 (text+ko) ====
@@ -101,7 +101,6 @@
int dropped = 0;
if (qs->flags & QS_EXITING) {
- printf("exiting freeing mbuf\n");
m_freem(m);
return (0);
}
@@ -136,9 +135,6 @@
if (dropped)
m_freem(m);
}
-
- if (qs->fl[0].sdesc[0].map != NULL)
- panic("at end bad map at 0 pidx=%d cidx=%d gen=%d", qs->fl[0].pidx, qs->fl[0].cidx, qs->fl[0].gen);
return (0);
}
@@ -582,9 +578,11 @@
thread_lock(td);
sched_unbind(td);
thread_unlock(td);
-
- device_printf(qs->port->adapter->dev, "exiting thread for cpu%d\n", qs->cpuid);
+
+ if (bootverbose)
+ device_printf(qs->port->adapter->dev, "exiting thread for cpu%d\n", qs->cpuid);
+ t3_free_qset(qs->port->adapter, qs);
qs->flags &= ~QS_RUNNING;
kthread_exit(0);
}
==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#5 (text+ko) ====
@@ -1595,10 +1595,13 @@
t3_free_sge_resources(adapter_t *sc)
{
int i, nqsets;
-
+
+#ifdef IFNET_MULTIQUEUE
+ panic("%s should not be called when IFNET_MULTIQUEUE is defined", __FUNCTION__);
+#endif
for (nqsets = i = 0; i < (sc)->params.nports; i++)
nqsets += sc->port[i].nqsets;
-
+
for (i = 0; i < nqsets; ++i)
t3_free_qset(sc, &sc->sge.qs[i]);
}
More information about the p4-projects
mailing list