Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 2711

kernel-2.6.18-238.el5.src.rpm

From: Andy Gospodarek <gospo@redhat.com>
Date: Fri, 3 Sep 2010 21:51:44 -0400
Subject: [net] igb/igbvf: turn on TSO for VLAN interfaces
Message-id: <1283550704-5205-1-git-send-email-gospo@redhat.com>
Patchwork-id: 28156
O-Subject: [PATCH RHEL5.6] igb/igbvf: turn on TSO for VLAN interfaces
Bugzilla: 629457
RH-Acked-by: David S. Miller <davem@redhat.com>
RH-Acked-by: Stefan Assmann <sassmann@redhat.com>
RH-Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>

This patch enables VLAN interfaces based on igb and igbvf interfaces to
use TSO.  This has been tested by me and results in a drop in CPU
utilization from ~25% to ~12% when TSO is enabled.

This patch added this support upstream for igb:

	commit 48f29ffc509748f5b82d7690561e98f851241a19
	Author: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
	Date:   Thu Jun 5 04:06:27 2008 -0700

	    igb: allow vlan devices to use TSO and TCP CSUM offload

and the original igbvf submission already included support for TSO on
VLANs.

This patch will help resolve 629457.

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 29ee097..c379edd 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1820,6 +1820,8 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 	netdev->features |= NETIF_F_TSO;
 	netdev->features |= NETIF_F_TSO6;
 	netdev->features |= NETIF_F_GRO;
+	netdev->features |= NETIF_F_VLAN_TSO;
+	netdev->features |= NETIF_F_VLAN_CSUM;
 
 	if (pci_using_dac)
 		netdev->features |= NETIF_F_HIGHDMA;
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 6571fb8..df4b36e 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -2751,6 +2751,8 @@ static int __devinit igbvf_probe(struct pci_dev *pdev,
 
 	netdev->features |= NETIF_F_TSO;
 	netdev->features |= NETIF_F_TSO6;
+	netdev->features |= NETIF_F_VLAN_TSO;
+	netdev->features |= NETIF_F_VLAN_CSUM;
 
 	if (pci_using_dac)
 		netdev->features |= NETIF_F_HIGHDMA;