PERFORCE change 128760 for review
Kip Macy
kmacy at FreeBSD.org
Tue Nov 6 19:43:23 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=128760
Change 128760 by kmacy at kmacy:storage:toestack on 2007/11/07 03:42:46
add routine for deferring reply handling
Affected files ...
.. //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_tom.c#8 edit
Differences ...
==== //depot/projects/toestack/sys/dev/cxgb/ulp/tom/cxgb_tom.c#8 (text+ko) ====
@@ -45,6 +45,7 @@
#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <sys/socketvar.h>
+#include <sys/taskqueue.h>
#include <net/if.h>
#include <net/route.h>
@@ -113,6 +114,24 @@
.redirect = NULL
};
+
+/*
+ * Add an skb to the deferred skb queue for processing from process context.
+ */
+void
+t3_defer_reply(struct mbuf *m, struct toedev *dev, defer_handler_t handler)
+{
+ struct tom_data *td = TOM_DATA(dev);
+
+ m_set_handler(m, handler);
+ mtx_lock(&td->deferq.lock);
+
+ mbufq_tail(&td->deferq, m);
+ if (mbufq_len(&td->deferq) == 1)
+ taskqueue_enqueue(td->tq, &td->deferq_task);
+ mtx_lock(&td->deferq.lock);
+}
+
void
toepcb_init(struct toepcb *toep)
{
More information about the p4-projects
mailing list