From patchwork Tue May 4 05:08:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Herbert X-Patchwork-Id: 51563 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BB9BAB7D1E for ; Tue, 4 May 2010 15:09:00 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752649Ab0EDFIz (ORCPT ); Tue, 4 May 2010 01:08:55 -0400 Received: from smtp-out.google.com ([74.125.121.35]:55156 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206Ab0EDFIy (ORCPT ); Tue, 4 May 2010 01:08:54 -0400 Received: from kpbe19.cbf.corp.google.com (kpbe19.cbf.corp.google.com [172.25.105.83]) by smtp-out.google.com with ESMTP id o4458loL009918; Mon, 3 May 2010 22:08:47 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1272949728; bh=CplsqwtMMfwB3u9L7MWyNo9PCEM=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=GEg9WYFhwxCay7c2W0LZlGxAJU3toefkLYHEX+7lvbLSc3ThCyBiGVj+aF+i7wqCe YdmEUgETk77W1imeVUugQ== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=date:from:to:subject:message-id:user-agent:mime-version:content-type; b=BYrhy5EVjHBUHI73yWQ3CAzn0H7nPiEhHnbXlEXWADJsmw4gFMSFtMVZlpS1r0d/k KpTxi0+RMh1bV1Jio6dlg== Received: from pokey.mtv.corp.google.com (pokey.mtv.corp.google.com [172.22.64.87]) by kpbe19.cbf.corp.google.com with ESMTP id o4458kMC017191; Mon, 3 May 2010 22:08:46 -0700 Received: by pokey.mtv.corp.google.com (Postfix, from userid 60832) id D01BE1C48F2; Mon, 3 May 2010 22:08:45 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by pokey.mtv.corp.google.com (Postfix) with ESMTP id AC0351C48EF; Mon, 3 May 2010 22:08:45 -0700 (PDT) Date: Mon, 3 May 2010 22:08:45 -0700 (PDT) From: Tom Herbert To: netdev@vger.kernel.org, aabdulla@nvidia.com, davem@davemloft.net Subject: [PATCH] forcedeth: GRO support Message-ID: User-Agent: Alpine 1.00 (DEB 882 2007-12-20) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add GRO support to forcedeth. Signed-off-by: Tom Herbert --- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 5cf0e66..4a24cc7 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -2817,7 +2817,7 @@ static int nv_rx_process(struct net_device *dev, int limit) dprintk(KERN_DEBUG "%s: nv_rx_process: %d bytes, proto %d accepted.\n", dev->name, len, skb->protocol); #ifdef CONFIG_FORCEDETH_NAPI - netif_receive_skb(skb); + napi_gro_receive(&np->napi, skb); #else netif_rx(skb); #endif @@ -2910,7 +2910,7 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit) if (likely(!np->vlangrp)) { #ifdef CONFIG_FORCEDETH_NAPI - netif_receive_skb(skb); + napi_gro_receive(&np->napi, skb); #else netif_rx(skb); #endif @@ -2918,15 +2918,15 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit) vlanflags = le32_to_cpu(np->get_rx.ex->buflow); if (vlanflags & NV_RX3_VLAN_TAG_PRESENT) { #ifdef CONFIG_FORCEDETH_NAPI - vlan_hwaccel_receive_skb(skb, np->vlangrp, - vlanflags & NV_RX3_VLAN_TAG_MASK); + vlan_gro_receive(&np->napi, np->vlangrp, + vlanflags & NV_RX3_VLAN_TAG_MASK, skb); #else vlan_hwaccel_rx(skb, np->vlangrp, vlanflags & NV_RX3_VLAN_TAG_MASK); #endif } else { #ifdef CONFIG_FORCEDETH_NAPI - netif_receive_skb(skb); + napi_gro_receive(&np->napi, skb); #else netif_rx(skb); #endif @@ -5711,6 +5711,9 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; dev->features |= NETIF_F_TSO; +#ifdef CONFIG_FORCEDETH_NAPI + dev->features |= NETIF_F_GRO; +#endif } np->vlanctl_bits = 0;