From owner-p4-projects@FreeBSD.ORG Tue Apr 24 22:54:15 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 953CE16A403; Tue, 24 Apr 2007 22:54:15 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E24516A400 for ; Tue, 24 Apr 2007 22:54:15 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 3E50E13C459 for ; Tue, 24 Apr 2007 22:54:15 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l3OMsFTx036420 for ; Tue, 24 Apr 2007 22:54:15 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l3OMsFSn036412 for perforce@freebsd.org; Tue, 24 Apr 2007 22:54:15 GMT (envelope-from kmacy@freebsd.org) Date: Tue, 24 Apr 2007 22:54:15 GMT Message-Id: <200704242254.l3OMsFSn036412@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 118761 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2007 22:54:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=118761 Change 118761 by kmacy@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); }