e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags
Subsystems (2)
PATCH 1/1 e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags
From: Yi Zou <[email protected]>
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.
---
drivers/net/e1000/e1000_main.c | 4 +++- drivers/net/e1000e/netdev.c | 4 +++- drivers/net/igb/igb_main.c | 4 +++- drivers/net/ixgb/ixgb_main.c | 4 +++- drivers/net/ixgbe/ixgbe_main.c | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-)
drivers/net/e1000/e1000_main.c +3 -1
@@ -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 ;
drivers/net/e1000e/netdev.c +3 -1
@@ -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 ;
drivers/net/igb/igb_main.c +3 -1
@@ -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 ;
drivers/net/ixgb/ixgb_main.c +3 -1
@@ -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 */
drivers/net/ixgbe/ixgbe_main.c +3 -1
@@ -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 ;
From: Jeff Kirsher <[email protected]>
Date: Wed, 22 Sep 2010 20:57:58 -0700
Quoted 10 lines
From: Yi Zou <[email protected]>
If the
netdev->featuresis set withNETIF_F_HIGHDMA, we should set the correspondingnetdev->vlan_featuresas 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.
Quoted 3 lines
Signed-off-by Yi Zou <[email protected]>Tested-by Emil Tantilov <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
Quoted 13 lines · David Miller
From: Jeff Kirsher <[email protected]>
Date: Wed, 22 Sep 2010 20:57:58 -0700Quoted 10 lines
From: Yi Zou <[email protected]>
If the
netdev->featuresis set withNETIF_F_HIGHDMA, we should set the correspondingnetdev->vlan_featuresas 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.
Quoted 5 lines
Quoted 3 lines
Signed-off-by Yi Zou <[email protected]>Tested-by Emil Tantilov <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>Applied.
Maybe this could be done in core network.
David Miller
maintainerFrom: Eric Dumazet <[email protected]>
Date: Thu, 23 Sep 2010 07:28:10 +0200
Quoted 14 lines · David Miller
Quoted 13 lines
From: Jeff Kirsher <[email protected]>
Date: Wed, 22 Sep 2010 20:57:58 -0700Quoted 10 lines
From: Yi Zou <[email protected]>
If the
netdev->featuresis set withNETIF_F_HIGHDMA, we should set the correspondingnetdev->vlan_featuresas 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.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Signed-off-by Yi Zou <[email protected]>Tested-by Emil Tantilov <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>Applied.
Maybe this could be done in core network.
Indeeed, just as we do for NETIF_F_GRO now.
Quoted 14 lines · Eric Dumazet
Quoted 13 lines · David Miller
From: Jeff Kirsher <[email protected]>
Date: Wed, 22 Sep 2010 20:57:58 -0700Quoted 10 lines
From: Yi Zou <[email protected]>
If the
netdev->featuresis set withNETIF_F_HIGHDMA, we should set the correspondingnetdev->vlan_featuresas 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.
Quoted 10 lines
Quoted 5 lines
Quoted 3 lines
Signed-off-by Yi Zou <[email protected]>Tested-by Emil Tantilov <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>Applied.
Maybe this could be done in core network.
Good suggestion! Do you plan on making a patch Eric? Let me know of any assistance
you need with the Intel LAN dirvers.
Quoted 3 lines · Jeff Kirsher
Good suggestion! Do you plan on making a patch Eric? Let me know of any assistance
you need with the Intel LAN dirvers.
Yes, I'll do it, no worry :)
Thanks !
Quoted 10 lines · Eric Dumazet
Quoted 3 lines · Jeff Kirsher
Good suggestion! Do you plan on making a patch Eric? Let me know of any assistance
you need with the Intel LAN dirvers.Yes, I'll do it, no worry :)
Thanks !
Thank you Eric! I greatly appreciate the work and suggestions.
PATCH 1/1 net: propagate NETIF_F_HIGHDMA to vlans
In reply to Eric DumazetAutomatically allows vlans to get NETIF_F_HIGHDMA if underlying device supports it.
On 32bit arches (and more precisely if CONFIG_HIGHMEM is enabled), it can help to reduce cost of illegal_highdma() and __skb_linearize() calls.
Tested on tg3 , bnx2, bonding, this worked very well.
This is a generalization of a patch provided by Yi Zou & Jeff Kirsher.
--- net/core/dev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
net/core/dev.c +4 -3
@@ -5058,10 +5058,11 @@ int register_netdevice(struct net_device *dev)if (dev->features &NETIF_F_SG ) dev->features |=NETIF_F_GSO ; -/* Enable GRO for vlans by default if dev->features has GRO also. -* vlan_dev_init() will do the dev->features check. +/* Enable GRO and NETIF_F_HIGHDMA for vlans by default, +* vlan_dev_init() will do the dev->features check, so these features +* are enabled only if supported by underlying device. */ - dev->vlan_features |=NETIF_F_GRO ; + dev->vlan_features |= (NETIF_F_GRO |NETIF_F_HIGHDMA ); ret =call_netdevice_notifiers (NETDEV_POST_INIT , dev); ret =notifier_to_errno (ret);
RE: [PATCH net-next-2.6] net: propagate NETIF_F_HIGHDMA to vlans
Quoted 31 lines
Automatically allows vlans to get
NETIF_F_HIGHDMAif underlying device supports it.On 32bit arches (and more precisely if
CONFIG_HIGHMEMis enabled), it can help to reduce cost ofillegal_highdma()and__skb_linearize()calls.Tested on tg3 , bnx2, bonding, this worked very well.
This is a generalization of a patch provided by Yi Zou & Jeff Kirsher.
Signed-off-by Eric Dumazet <[email protected]>--- net/core/dev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)net/core/dev.c +2
-2@@ -5058,10 +5058,11 @@ int register_netdevice(struct net_device *dev)if (dev->features &NETIF_F_SG ) dev->features |=NETIF_F_GSO ; -/* Enable GRO for vlans by default if dev->features has GRO also. -* vlan_dev_init() will do the dev->features check. +/* Enable GRO and NETIF_F_HIGHDMA for vlans by default, +* vlan_dev_init() will do the dev->features check, so these features
net/core/dev.c int register_netdevice(struct net_device *dev) · line 5068
Quoted 7 lines
net/core/dev.c +2
-1+* are enabled only if supported by underlying device. */ - dev->vlan_features |=NETIF_F_GRO ; + dev->vlan_features |= (NETIF_F_GRO |NETIF_F_HIGHDMA ); ret =call_netdevice_notifiers (NETDEV_POST_INIT , dev); ret =notifier_to_errno (ret);
Cool, thanks for taking care of this, Eric.
-yi
Re: [PATCH net-next-2.6] net: propagate NETIF_F_HIGHDMA to vlans
In reply to Eric DumazetFrom: Eric Dumazet <[email protected]>
Date: Thu, 23 Sep 2010 12:46:11 +0200
Quoted 7 lines
Automatically allows vlans to get
NETIF_F_HIGHDMAif underlying device supports it.On 32bit arches (and more precisely if
CONFIG_HIGHMEMis enabled), it can help to reduce cost ofillegal_highdma()and__skb_linearize()calls.
Quoted 5 lines
Tested on tg3 , bnx2, bonding, this worked very well.
This is a generalization of a patch provided by Yi Zou & Jeff Kirsher.
Signed-off-by Eric Dumazet <[email protected]>
Applied, thanks Eric.