aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2010-09-22 13:57:58 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-23 00:20:04 -0400
commit7b872a55c40b7e6f5e257c252f96dde911bd7b2f (patch)
tree8541d31e7ba17083e488104fd4f6fc72d6c71581
parent308fb39a860c816be8741fe783ae7c64e9c1af5d (diff)
e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags
If the netdev->features is set with NETIF_F_HIGHDMA, we should set the corresponding netdev->vlan_features as well to allow VLAN netdev created on top of the real netdev to be able to also benefit from HIGHDMA on 32bit system, reducing the performance hit that is caused by __skb_linearize(), particularly for large send. This is fixed in this patch for all Intel e1000, e1000e, igb, ixgbe, and ixgbe drivers since this should be beneficial to all devices supported by these drivers. Signed-off-by: Yi Zou <yi.zou@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/e1000/e1000_main.c4
-rw-r--r--drivers/net/e1000e/netdev.c4
-rw-r--r--drivers/net/igb/igb_main.c4
-rw-r--r--drivers/net/ixgb/ixgb_main.c4
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c4
5 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 8d9269d12a67..a1daceadca84 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -988,8 +988,10 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
988 (hw->mac_type != e1000_82547)) 988 (hw->mac_type != e1000_82547))
989 netdev->features |= NETIF_F_TSO; 989 netdev->features |= NETIF_F_TSO;
990 990
991 if (pci_using_dac) 991 if (pci_using_dac) {
992 netdev->features |= NETIF_F_HIGHDMA; 992 netdev->features |= NETIF_F_HIGHDMA;
993 netdev->vlan_features |= NETIF_F_HIGHDMA;
994 }
993 995
994 netdev->vlan_features |= NETIF_F_TSO; 996 netdev->vlan_features |= NETIF_F_TSO;
995 netdev->vlan_features |= NETIF_F_HW_CSUM; 997 netdev->vlan_features |= NETIF_F_HW_CSUM;
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index e2c7e0d767b1..4630bad52e74 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -5683,8 +5683,10 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
5683 netdev->vlan_features |= NETIF_F_HW_CSUM; 5683 netdev->vlan_features |= NETIF_F_HW_CSUM;
5684 netdev->vlan_features |= NETIF_F_SG; 5684 netdev->vlan_features |= NETIF_F_SG;
5685 5685
5686 if (pci_using_dac) 5686 if (pci_using_dac) {
5687 netdev->features |= NETIF_F_HIGHDMA; 5687 netdev->features |= NETIF_F_HIGHDMA;
5688 netdev->vlan_features |= NETIF_F_HIGHDMA;
5689 }
5688 5690
5689 if (e1000e_enable_mng_pass_thru(&adapter->hw)) 5691 if (e1000e_enable_mng_pass_thru(&adapter->hw))
5690 adapter->flags |= FLAG_MNG_PT_ENABLED; 5692 adapter->flags |= FLAG_MNG_PT_ENABLED;
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 61892b80d7ad..f915e9cb302e 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1858,8 +1858,10 @@ static int __devinit igb_probe(struct pci_dev *pdev,
1858 netdev->vlan_features |= NETIF_F_IPV6_CSUM; 1858 netdev->vlan_features |= NETIF_F_IPV6_CSUM;
1859 netdev->vlan_features |= NETIF_F_SG; 1859 netdev->vlan_features |= NETIF_F_SG;
1860 1860
1861 if (pci_using_dac) 1861 if (pci_using_dac) {
1862 netdev->features |= NETIF_F_HIGHDMA; 1862 netdev->features |= NETIF_F_HIGHDMA;
1863 netdev->vlan_features |= NETIF_F_HIGHDMA;
1864 }
1863 1865
1864 if (hw->mac.type >= e1000_82576) 1866 if (hw->mac.type >= e1000_82576)
1865 netdev->features |= NETIF_F_SCTP_CSUM; 1867 netdev->features |= NETIF_F_SCTP_CSUM;
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index c2f6e71e1181..80e62578ffa0 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -446,8 +446,10 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
446 NETIF_F_HW_VLAN_FILTER; 446 NETIF_F_HW_VLAN_FILTER;
447 netdev->features |= NETIF_F_TSO; 447 netdev->features |= NETIF_F_TSO;
448 448
449 if (pci_using_dac) 449 if (pci_using_dac) {
450 netdev->features |= NETIF_F_HIGHDMA; 450 netdev->features |= NETIF_F_HIGHDMA;
451 netdev->vlan_features |= NETIF_F_HIGHDMA;
452 }
451 453
452 /* make sure the EEPROM is good */ 454 /* make sure the EEPROM is good */
453 455
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index d03eef96c0ba..0ec4ef2d819e 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -6842,8 +6842,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
6842 netdev->vlan_features |= NETIF_F_FCOE_MTU; 6842 netdev->vlan_features |= NETIF_F_FCOE_MTU;
6843 } 6843 }
6844#endif /* IXGBE_FCOE */ 6844#endif /* IXGBE_FCOE */
6845 if (pci_using_dac) 6845 if (pci_using_dac) {
6846 netdev->features |= NETIF_F_HIGHDMA; 6846 netdev->features |= NETIF_F_HIGHDMA;
6847 netdev->vlan_features |= NETIF_F_HIGHDMA;
6848 }
6847 6849
6848 if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) 6850 if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)
6849 netdev->features |= NETIF_F_LRO; 6851 netdev->features |= NETIF_F_LRO;