e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags
authorYi Zou <yi.zou@intel.com>
Wed, 22 Sep 2010 17:57:58 +0000 (17:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Sep 2010 04:20:04 +0000 (21:20 -0700)
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>
drivers/net/e1000/e1000_main.c
drivers/net/e1000e/netdev.c
drivers/net/igb/igb_main.c
drivers/net/ixgb/ixgb_main.c
drivers/net/ixgbe/ixgbe_main.c

index 8d9269d12a67f3b7eb69f3fbf65b0483fb14cbee..a1daceadca84c74ce9e287132327999c6d3abf3f 100644 (file)
@@ -988,8 +988,10 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
           (hw->mac_type != e1000_82547))
                netdev->features |= NETIF_F_TSO;
 
-       if (pci_using_dac)
+       if (pci_using_dac) {
                netdev->features |= NETIF_F_HIGHDMA;
+               netdev->vlan_features |= NETIF_F_HIGHDMA;
+       }
 
        netdev->vlan_features |= NETIF_F_TSO;
        netdev->vlan_features |= NETIF_F_HW_CSUM;
index e2c7e0d767b1861c05edec6b008b49020b78e7ad..4630bad52e74ca9f47f9431db9610558bd613905 100644 (file)
@@ -5683,8 +5683,10 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
        netdev->vlan_features |= NETIF_F_HW_CSUM;
        netdev->vlan_features |= NETIF_F_SG;
 
-       if (pci_using_dac)
+       if (pci_using_dac) {
                netdev->features |= NETIF_F_HIGHDMA;
+               netdev->vlan_features |= NETIF_F_HIGHDMA;
+       }
 
        if (e1000e_enable_mng_pass_thru(&adapter->hw))
                adapter->flags |= FLAG_MNG_PT_ENABLED;
index 61892b80d7ada4eaff14c0e6d1987de87e24eab9..f915e9cb302e592affad866e830b5ceac8096c4d 100644 (file)
@@ -1858,8 +1858,10 @@ static int __devinit igb_probe(struct pci_dev *pdev,
        netdev->vlan_features |= NETIF_F_IPV6_CSUM;
        netdev->vlan_features |= NETIF_F_SG;
 
-       if (pci_using_dac)
+       if (pci_using_dac) {
                netdev->features |= NETIF_F_HIGHDMA;
+               netdev->vlan_features |= NETIF_F_HIGHDMA;
+       }
 
        if (hw->mac.type >= e1000_82576)
                netdev->features |= NETIF_F_SCTP_CSUM;
index c2f6e71e1181e66a810049e8bf886e541474fd27..80e62578ffa029d3a1c9c219a9dea9dc00087277 100644 (file)
@@ -446,8 +446,10 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                           NETIF_F_HW_VLAN_FILTER;
        netdev->features |= NETIF_F_TSO;
 
-       if (pci_using_dac)
+       if (pci_using_dac) {
                netdev->features |= NETIF_F_HIGHDMA;
+               netdev->vlan_features |= NETIF_F_HIGHDMA;
+       }
 
        /* make sure the EEPROM is good */
 
index d03eef96c0ba22831b9610edce8fbe28c636555b..0ec4ef2d819e72616f4c2018354e5bb9397c320d 100644 (file)
@@ -6842,8 +6842,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
                netdev->vlan_features |= NETIF_F_FCOE_MTU;
        }
 #endif /* IXGBE_FCOE */
-       if (pci_using_dac)
+       if (pci_using_dac) {
                netdev->features |= NETIF_F_HIGHDMA;
+               netdev->vlan_features |= NETIF_F_HIGHDMA;
+       }
 
        if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)
                netdev->features |= NETIF_F_LRO;