From patchwork Mon May 16 19:42:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shirley Ma X-Patchwork-Id: 789382 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4GJghln029898 for ; Mon, 16 May 2011 19:42:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754194Ab1EPTmW (ORCPT ); Mon, 16 May 2011 15:42:22 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:40928 "EHLO e7.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751857Ab1EPTmV (ORCPT ); Mon, 16 May 2011 15:42:21 -0400 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e7.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p4GJJDMN011598; Mon, 16 May 2011 15:19:13 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p4GJgJx2942280; Mon, 16 May 2011 15:42:19 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p4GJgIJ8011945; Mon, 16 May 2011 15:42:19 -0400 Received: from [9.76.199.162] (sig-9-76-199-162.mts.ibm.com [9.76.199.162]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p4GJgGvn011778; Mon, 16 May 2011 15:42:16 -0400 Subject: [PATCH V5 6/6 net-next] example: enable zero-copy support in ixgbe From: Shirley Ma To: David Miller , mst@redhat.com, Eric Dumazet , Avi Kivity , Arnd Bergmann Cc: netdev@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 16 May 2011 12:42:15 -0700 Message-ID: <1305574935.3456.37.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 16 May 2011 19:42:44 +0000 (UTC) Device can enable zero-copy flag when HIGHDMA is supported. Signed-off-by: Shirley Ma --- drivers/net/ixgbe/ixgbe_main.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" 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/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 2dce3d0..7e9e881 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -7553,6 +7553,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, netdev->vlan_features |= NETIF_F_HIGHDMA; } + /* enable zero-copy when device supports HIGHDMA */ + if (netdev->features & NETIF_F_HIGHDMA) + netdev->features |= NETIF_F_ZEROCOPY; + if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) netdev->features |= NETIF_F_LRO;