netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next-2.6 PATCH] e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags
@ 2010-09-23  3:57 Jeff Kirsher
  2010-09-23  4:20 ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff Kirsher @ 2010-09-23  3:57 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, bphilips, Yi Zou, Jeff Kirsher

From: Yi Zou <yi.zou@intel.com>

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>
---

 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(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 8d9269d..a1dacea 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,
 	   (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;
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index e2c7e0d..4630bad 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,
 	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;
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 61892b8..f915e9c 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,
 	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;
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index c2f6e71..80e6257 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)
 			   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 */
 
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index d03eef9..0ec4ef2 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,
 		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;


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [net-next-2.6 PATCH] e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags
  2010-09-23  3:57 [net-next-2.6 PATCH] e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags Jeff Kirsher
@ 2010-09-23  4:20 ` David Miller
  2010-09-23  5:28   ` Eric Dumazet
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2010-09-23  4:20 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, bphilips, yi.zou

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 22 Sep 2010 20:57:58 -0700

> From: Yi Zou <yi.zou@intel.com>
> 
> 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>

Applied.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [net-next-2.6 PATCH] e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags
  2010-09-23  4:20 ` David Miller
@ 2010-09-23  5:28   ` Eric Dumazet
  2010-09-23  6:00     ` David Miller
  2010-09-23  6:06     ` Jeff Kirsher
  0 siblings, 2 replies; 10+ messages in thread
From: Eric Dumazet @ 2010-09-23  5:28 UTC (permalink / raw)
  To: David Miller; +Cc: jeffrey.t.kirsher, netdev, gospo, bphilips, yi.zou

Le mercredi 22 septembre 2010 à 21:20 -0700, David Miller a écrit :
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Wed, 22 Sep 2010 20:57:58 -0700
> 
> > From: Yi Zou <yi.zou@intel.com>
> > 
> > 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>
> 
> Applied.


Maybe this could be done in core network.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [net-next-2.6 PATCH] e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags
  2010-09-23  5:28   ` Eric Dumazet
@ 2010-09-23  6:00     ` David Miller
  2010-09-23  6:06     ` Jeff Kirsher
  1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2010-09-23  6:00 UTC (permalink / raw)
  To: eric.dumazet; +Cc: jeffrey.t.kirsher, netdev, gospo, bphilips, yi.zou

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 23 Sep 2010 07:28:10 +0200

> Le mercredi 22 septembre 2010 à 21:20 -0700, David Miller a écrit :
>> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date: Wed, 22 Sep 2010 20:57:58 -0700
>> 
>> > From: Yi Zou <yi.zou@intel.com>
>> > 
>> > 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>
>> 
>> Applied.
> 
> Maybe this could be done in core network.

Indeeed, just as we do for NETIF_F_GRO now.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [net-next-2.6 PATCH] e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags
  2010-09-23  5:28   ` Eric Dumazet
  2010-09-23  6:00     ` David Miller
@ 2010-09-23  6:06     ` Jeff Kirsher
  2010-09-23  6:13       ` Eric Dumazet
  1 sibling, 1 reply; 10+ messages in thread
From: Jeff Kirsher @ 2010-09-23  6:06 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev, gospo, bphilips, yi.zou

On Wed, Sep 22, 2010 at 22:28, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le mercredi 22 septembre 2010 à 21:20 -0700, David Miller a écrit :
>> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>> Date: Wed, 22 Sep 2010 20:57:58 -0700
>>
>> > From: Yi Zou <yi.zou@intel.com>
>> >
>> > 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>
>>
>> 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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [net-next-2.6 PATCH] e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags
  2010-09-23  6:06     ` Jeff Kirsher
@ 2010-09-23  6:13       ` Eric Dumazet
  2010-09-23  6:17         ` Jeff Kirsher
  2010-09-23 10:46         ` [PATCH net-next-2.6] net: propagate NETIF_F_HIGHDMA to vlans Eric Dumazet
  0 siblings, 2 replies; 10+ messages in thread
From: Eric Dumazet @ 2010-09-23  6:13 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: David Miller, netdev, gospo, bphilips, yi.zou

Le mercredi 22 septembre 2010 à 23:06 -0700, Jeff Kirsher a écrit :

> 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 !



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [net-next-2.6 PATCH] e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags
  2010-09-23  6:13       ` Eric Dumazet
@ 2010-09-23  6:17         ` Jeff Kirsher
  2010-09-23 10:46         ` [PATCH net-next-2.6] net: propagate NETIF_F_HIGHDMA to vlans Eric Dumazet
  1 sibling, 0 replies; 10+ messages in thread
From: Jeff Kirsher @ 2010-09-23  6:17 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev, gospo, bphilips, yi.zou

On Wed, Sep 22, 2010 at 23:13, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le mercredi 22 septembre 2010 à 23:06 -0700, Jeff Kirsher a écrit :
>
>> 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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH net-next-2.6] net: propagate NETIF_F_HIGHDMA to vlans
  2010-09-23  6:13       ` Eric Dumazet
  2010-09-23  6:17         ` Jeff Kirsher
@ 2010-09-23 10:46         ` Eric Dumazet
  2010-09-23 16:30           ` Zou, Yi
  2010-09-27  1:27           ` David Miller
  1 sibling, 2 replies; 10+ messages in thread
From: Eric Dumazet @ 2010-09-23 10:46 UTC (permalink / raw)
  To: Jeff Kirsher, David Miller; +Cc: netdev, gospo, bphilips, yi.zou

Automatically 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.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 net/core/dev.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 2c7934f..e0c0b86 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -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);



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* RE: [PATCH net-next-2.6] net: propagate NETIF_F_HIGHDMA to vlans
  2010-09-23 10:46         ` [PATCH net-next-2.6] net: propagate NETIF_F_HIGHDMA to vlans Eric Dumazet
@ 2010-09-23 16:30           ` Zou, Yi
  2010-09-27  1:27           ` David Miller
  1 sibling, 0 replies; 10+ messages in thread
From: Zou, Yi @ 2010-09-23 16:30 UTC (permalink / raw)
  To: Eric Dumazet, Kirsher, Jeffrey T, David Miller
  Cc: netdev@vger.kernel.org, gospo@redhat.com, bphilips@novell.com

> 
> Automatically 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.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
>  net/core/dev.c |    7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 2c7934f..e0c0b86 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -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);
> 
Cool, thanks for taking care of this, Eric.

-yi

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net-next-2.6] net: propagate NETIF_F_HIGHDMA to vlans
  2010-09-23 10:46         ` [PATCH net-next-2.6] net: propagate NETIF_F_HIGHDMA to vlans Eric Dumazet
  2010-09-23 16:30           ` Zou, Yi
@ 2010-09-27  1:27           ` David Miller
  1 sibling, 0 replies; 10+ messages in thread
From: David Miller @ 2010-09-27  1:27 UTC (permalink / raw)
  To: eric.dumazet; +Cc: jeffrey.t.kirsher, netdev, gospo, bphilips, yi.zou

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 23 Sep 2010 12:46:11 +0200

> Automatically 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.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied, thanks Eric.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-09-27  1:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-23  3:57 [net-next-2.6 PATCH] e1000/e1000e/igb/ixgb/ixgbe: set NETIF_F_HIGHDMA for VLAN feature flags Jeff Kirsher
2010-09-23  4:20 ` David Miller
2010-09-23  5:28   ` Eric Dumazet
2010-09-23  6:00     ` David Miller
2010-09-23  6:06     ` Jeff Kirsher
2010-09-23  6:13       ` Eric Dumazet
2010-09-23  6:17         ` Jeff Kirsher
2010-09-23 10:46         ` [PATCH net-next-2.6] net: propagate NETIF_F_HIGHDMA to vlans Eric Dumazet
2010-09-23 16:30           ` Zou, Yi
2010-09-27  1:27           ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).