netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bridge: Set vlan_features to allow offloads on vlans.
@ 2013-05-22 15:46 Vlad Yasevich
  2013-05-22 16:12 ` Ben Hutchings
  0 siblings, 1 reply; 3+ messages in thread
From: Vlad Yasevich @ 2013-05-22 15:46 UTC (permalink / raw)
  To: netdev; +Cc: bridge, Vlad Yasevich

When vlan device is configured on top of the brige, it does
not support any offload capabilities because the bridge
device does not initiliaze vlan_fatures.  Set vlan_fatures to
be equivalent to hw_fatures.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
---
 net/bridge/br_device.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 9673128..126f2c2 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -352,6 +352,7 @@ void br_dev_setup(struct net_device *dev)
 	dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
 			   NETIF_F_GSO_MASK | NETIF_F_HW_CSUM |
 			   NETIF_F_HW_VLAN_CTAG_TX;
+	dev->vlan_features = dev->hw_features;
 
 	br->dev = dev;
 	spin_lock_init(&br->lock);
-- 
1.7.7.6

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

* Re: [PATCH] bridge: Set vlan_features to allow offloads on vlans.
  2013-05-22 15:46 [PATCH] bridge: Set vlan_features to allow offloads on vlans Vlad Yasevich
@ 2013-05-22 16:12 ` Ben Hutchings
  2013-05-22 16:39   ` Vlad Yasevich
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2013-05-22 16:12 UTC (permalink / raw)
  To: Vlad Yasevich; +Cc: netdev, bridge

On Wed, 2013-05-22 at 11:46 -0400, Vlad Yasevich wrote:
> When vlan device is configured on top of the brige, it does
> not support any offload capabilities because the bridge
> device does not initiliaze vlan_fatures.  Set vlan_fatures to
> be equivalent to hw_fatures.
> 
> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
> ---
>  net/bridge/br_device.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
> index 9673128..126f2c2 100644
> --- a/net/bridge/br_device.c
> +++ b/net/bridge/br_device.c
> @@ -352,6 +352,7 @@ void br_dev_setup(struct net_device *dev)
>  	dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
>  			   NETIF_F_GSO_MASK | NETIF_F_HW_CSUM |
>  			   NETIF_F_HW_VLAN_CTAG_TX;
> +	dev->vlan_features = dev->hw_features;

I think you need to mask out NETIF_F_HW_VLAN_CTAG_TX (although maybe the
vlan driver should take care of that itself).

Ben.

>  	br->dev = dev;
>  	spin_lock_init(&br->lock);

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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

* Re: [PATCH] bridge: Set vlan_features to allow offloads on vlans.
  2013-05-22 16:12 ` Ben Hutchings
@ 2013-05-22 16:39   ` Vlad Yasevich
  0 siblings, 0 replies; 3+ messages in thread
From: Vlad Yasevich @ 2013-05-22 16:39 UTC (permalink / raw)
  To: Ben Hutchings; +Cc: netdev, bridge

On 05/22/2013 12:12 PM, Ben Hutchings wrote:
> On Wed, 2013-05-22 at 11:46 -0400, Vlad Yasevich wrote:
>> When vlan device is configured on top of the brige, it does
>> not support any offload capabilities because the bridge
>> device does not initiliaze vlan_fatures.  Set vlan_fatures to
>> be equivalent to hw_fatures.
>>
>> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
>> ---
>>   net/bridge/br_device.c |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
>> index 9673128..126f2c2 100644
>> --- a/net/bridge/br_device.c
>> +++ b/net/bridge/br_device.c
>> @@ -352,6 +352,7 @@ void br_dev_setup(struct net_device *dev)
>>   	dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
>>   			   NETIF_F_GSO_MASK | NETIF_F_HW_CSUM |
>>   			   NETIF_F_HW_VLAN_CTAG_TX;
>> +	dev->vlan_features = dev->hw_features;
>
> I think you need to mask out NETIF_F_HW_VLAN_CTAG_TX (although maybe the
> vlan driver should take care of that itself).
>

Yep, you are right.  I guess it would confuse things a bit 802.1ad was
configured on top of the bridge.

I'll fix that.
-vlad

> Ben.
>
>>   	br->dev = dev;
>>   	spin_lock_init(&br->lock);
>

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

end of thread, other threads:[~2013-05-22 16:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22 15:46 [PATCH] bridge: Set vlan_features to allow offloads on vlans Vlad Yasevich
2013-05-22 16:12 ` Ben Hutchings
2013-05-22 16:39   ` Vlad Yasevich

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