PERFORCE change 118761 for review

Kip Macy kmacy at FreeBSD.org
Tue Apr 24 22:54:15 UTC 2007


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

Change 118761 by kmacy at kmacy_vt-x:opentoe_init on 2007/04/24 22:53:37

	FreeBSD doesn't have anything that is a good impedance match
	for Linux's softirq - handle bundling of offload packets in the
	driver

Affected files ...

.. //depot/projects/opentoe/sys/dev/cxgb/cxgb_sge.c#17 edit

Differences ...

==== //depot/projects/opentoe/sys/dev/cxgb/cxgb_sge.c#17 (text+ko) ====

@@ -1889,33 +1889,6 @@
 }
 
 /**
- *	offload_enqueue - add an offload packet to an SGE offload receive queue
- *	@q: the SGE response queue
- *	@m: the packet
- *
- *	Add a new offload packet to an SGE response queue's offload packet
- *	queue.  If the packet is the first on the queue it schedules the RX
- *	softirq to process the queue.
- */
-static __inline void
-offload_enqueue(struct sge_rspq *q, struct mbuf *m)
-{
-	m->m_next = NULL;
-	if (q->rx_tail)
-		q->rx_tail->m_nextpkt = m;
-	else {
-#ifdef notyet
-		struct sge_qset *qs = rspq_to_qset(q);
-
-		if (__netif_rx_schedule_prep(qs->netdev))
-			__netif_rx_schedule(qs->netdev);
-#endif		
-		q->rx_head = m;
-	}
-	q->rx_tail = m;
-}
-
-/**
  *	deliver_partial_bundle - deliver a (partial) bundle of Rx offload pkts
  *	@tdev: the offload device that will be receiving the packets
  *	@q: the SGE response queue that assembled the bundle
@@ -1943,16 +1916,12 @@
 	rq->offload_pkts++;
 	m->m_pkthdr.header = mtod(m, void *);
 	    
-	if (__predict_false(rq->polling)) {
-		rx_gather[gather_idx++] = m;
-		if (gather_idx == RX_BUNDLE_SIZE) {
-			cxgb_ofld_recv(tdev, rx_gather, RX_BUNDLE_SIZE);
-			gather_idx = 0;
-			rq->offload_bundles++;
-		}
-	} else
-		offload_enqueue(rq, m);
-
+	rx_gather[gather_idx++] = m;
+	if (gather_idx == RX_BUNDLE_SIZE) {
+		cxgb_ofld_recv(tdev, rx_gather, RX_BUNDLE_SIZE);
+		gather_idx = 0;
+		rq->offload_bundles++;
+	}
 	return (gather_idx);
 }
 


More information about the p4-projects mailing list