netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] rocker: set feature NETIF_F_HW_SWITCH_OFFLOAD
@ 2014-12-05  2:26 roopa
  2014-12-05  3:25 ` Jianhua Xie
  2014-12-05 13:18 ` Sergei Shtylyov
  0 siblings, 2 replies; 8+ messages in thread
From: roopa @ 2014-12-05  2:26 UTC (permalink / raw)
  To: jiri, sfeldma, jhs, bcrl, tgraf, john.fastabend, stephen,
	linville, nhorman, nicolas.dichtel, vyasevic, f.fainelli, buytenh,
	aviadr
  Cc: netdev, davem, shm, gospo, Roopa Prabhu

From: Roopa Prabhu <roopa@cumulusnetworks.com>

This patch just sets the feature flag on rocker ports
---
 drivers/net/ethernet/rocker/rocker.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index fded127..3fe19b0 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -4003,7 +4003,8 @@ static int rocker_probe_port(struct rocker *rocker, unsigned int port_number)
 		       NAPI_POLL_WEIGHT);
 	rocker_carrier_init(rocker_port);
 
-	dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
+	dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER |
+					 NETIF_F_HW_SWITCH_OFFLOAD;
 
 	err = register_netdev(dev);
 	if (err) {
-- 
1.7.10.4

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

* Re: [PATCH 3/3] rocker: set feature NETIF_F_HW_SWITCH_OFFLOAD
  2014-12-05  2:26 [PATCH 3/3] rocker: set feature NETIF_F_HW_SWITCH_OFFLOAD roopa
@ 2014-12-05  3:25 ` Jianhua Xie
  2014-12-05  4:14   ` Roopa Prabhu
  2014-12-05  6:16   ` Scott Feldman
  2014-12-05 13:18 ` Sergei Shtylyov
  1 sibling, 2 replies; 8+ messages in thread
From: Jianhua Xie @ 2014-12-05  3:25 UTC (permalink / raw)
  To: roopa, jiri, sfeldma, jhs, bcrl, tgraf, john.fastabend, stephen,
	linville, nhorman, nicolas.dichtel, vyasevic, f.fainelli, buytenh,
	aviadr
  Cc: netdev, davem, shm, gospo, jianhua Xie


在 2014年12月05日 10:26, roopa@cumulusnetworks.com 写道:
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
> This patch just sets the feature flag on rocker ports
> ---
>   drivers/net/ethernet/rocker/rocker.c |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
> index fded127..3fe19b0 100644
> --- a/drivers/net/ethernet/rocker/rocker.c
> +++ b/drivers/net/ethernet/rocker/rocker.c
> @@ -4003,7 +4003,8 @@ static int rocker_probe_port(struct rocker *rocker, unsigned int port_number)
>   		       NAPI_POLL_WEIGHT);
>   	rocker_carrier_init(rocker_port);
>   
> -	dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
> +	dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER |
> +					 NETIF_F_HW_SWITCH_OFFLOAD;
Do you have a plan on enabling/disabling  this flag dynamically by ethtool?

Thanks & B.R
Jianhua
>   
>   	err = register_netdev(dev);
>   	if (err) {

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

* Re: [PATCH 3/3] rocker: set feature NETIF_F_HW_SWITCH_OFFLOAD
  2014-12-05  3:25 ` Jianhua Xie
@ 2014-12-05  4:14   ` Roopa Prabhu
  2014-12-05  4:44     ` Jianhua Xie
  2014-12-05  6:16   ` Scott Feldman
  1 sibling, 1 reply; 8+ messages in thread
From: Roopa Prabhu @ 2014-12-05  4:14 UTC (permalink / raw)
  To: Jianhua Xie
  Cc: jiri, sfeldma, jhs, bcrl, tgraf, john.fastabend, stephen,
	linville, nhorman, nicolas.dichtel, vyasevic, f.fainelli, buytenh,
	aviadr, netdev, davem, shm, gospo

On 12/4/14, 7:25 PM, Jianhua Xie wrote:
>
> 在 2014年12月05日 10:26, roopa@cumulusnetworks.com 写道:
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>
>> This patch just sets the feature flag on rocker ports
>> ---
>>   drivers/net/ethernet/rocker/rocker.c |    3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/rocker/rocker.c 
>> b/drivers/net/ethernet/rocker/rocker.c
>> index fded127..3fe19b0 100644
>> --- a/drivers/net/ethernet/rocker/rocker.c
>> +++ b/drivers/net/ethernet/rocker/rocker.c
>> @@ -4003,7 +4003,8 @@ static int rocker_probe_port(struct rocker 
>> *rocker, unsigned int port_number)
>>                  NAPI_POLL_WEIGHT);
>>       rocker_carrier_init(rocker_port);
>>   -    dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
>> +    dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER |
>> +                     NETIF_F_HW_SWITCH_OFFLOAD;
> Do you have a plan on enabling/disabling  this flag dynamically by 
> ethtool?

I have not thought about it yet. But if this gets accepted, then yes, I 
will have an ethtool way for drivers who want it.
if we have a IFF_ flag for this (which is also one of my alternate 
proposals), there will be a netlink way to set it on and off.

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

* Re: [PATCH 3/3] rocker: set feature NETIF_F_HW_SWITCH_OFFLOAD
  2014-12-05  4:14   ` Roopa Prabhu
@ 2014-12-05  4:44     ` Jianhua Xie
  0 siblings, 0 replies; 8+ messages in thread
From: Jianhua Xie @ 2014-12-05  4:44 UTC (permalink / raw)
  To: Roopa Prabhu
  Cc: jiri, sfeldma, jhs, bcrl, tgraf, john.fastabend, stephen,
	linville, nhorman, nicolas.dichtel, vyasevic, f.fainelli, buytenh,
	aviadr, netdev, davem, shm, gospo, jianhua Xie


在 2014年12月05日 12:14, Roopa Prabhu 写道:
> On 12/4/14, 7:25 PM, Jianhua Xie wrote:
>>
>> 在 2014年12月05日 10:26, roopa@cumulusnetworks.com 写道:
>>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>>
>>> This patch just sets the feature flag on rocker ports
>>> ---
>>>   drivers/net/ethernet/rocker/rocker.c |    3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/ethernet/rocker/rocker.c 
>>> b/drivers/net/ethernet/rocker/rocker.c
>>> index fded127..3fe19b0 100644
>>> --- a/drivers/net/ethernet/rocker/rocker.c
>>> +++ b/drivers/net/ethernet/rocker/rocker.c
>>> @@ -4003,7 +4003,8 @@ static int rocker_probe_port(struct rocker 
>>> *rocker, unsigned int port_number)
>>>                  NAPI_POLL_WEIGHT);
>>>       rocker_carrier_init(rocker_port);
>>>   -    dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
>>> +    dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER |
>>> +                     NETIF_F_HW_SWITCH_OFFLOAD;
>> Do you have a plan on enabling/disabling  this flag dynamically by 
>> ethtool?
>
> I have not thought about it yet. But if this gets accepted, then yes, 
> I will have an ethtool way for drivers who want it.
> if we have a IFF_ flag for this (which is also one of my alternate 
> proposals), there will be a netlink way to set it on and off.
>
Got it with thanks.
Best Regards.
Jianhua

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

* Re: [PATCH 3/3] rocker: set feature NETIF_F_HW_SWITCH_OFFLOAD
  2014-12-05  3:25 ` Jianhua Xie
  2014-12-05  4:14   ` Roopa Prabhu
@ 2014-12-05  6:16   ` Scott Feldman
  2014-12-05  6:38     ` John Fastabend
  1 sibling, 1 reply; 8+ messages in thread
From: Scott Feldman @ 2014-12-05  6:16 UTC (permalink / raw)
  To: Jianhua Xie
  Cc: Roopa Prabhu, Jiří Pírko, Jamal Hadi Salim,
	Benjamin LaHaise, Thomas Graf, john fastabend,
	stephen@networkplumber.org, John Linville, nhorman@tuxdriver.com,
	Nicolas Dichtel, vyasevic@redhat.com, Florian Fainelli,
	buytenh@wantstofly.org, Aviad Raveh, Netdev, David S. Miller, shm,
	Andy Gospodarek

On Thu, Dec 4, 2014 at 7:25 PM, Jianhua Xie <jianhua.xie@freescale.com> wrote:
>
> 在 2014年12月05日 10:26, roopa@cumulusnetworks.com 写道:
>
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>
>> This patch just sets the feature flag on rocker ports
>> ---
>>   drivers/net/ethernet/rocker/rocker.c |    3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/rocker/rocker.c
>> b/drivers/net/ethernet/rocker/rocker.c
>> index fded127..3fe19b0 100644
>> --- a/drivers/net/ethernet/rocker/rocker.c
>> +++ b/drivers/net/ethernet/rocker/rocker.c
>> @@ -4003,7 +4003,8 @@ static int rocker_probe_port(struct rocker *rocker,
>> unsigned int port_number)
>>                        NAPI_POLL_WEIGHT);
>>         rocker_carrier_init(rocker_port);
>>   -     dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
>> +       dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER |
>> +                                        NETIF_F_HW_SWITCH_OFFLOAD;
>
> Do you have a plan on enabling/disabling  this flag dynamically by ethtool?

Might get it for free if we recycle NETIF_F_HW_L2FW_DOFFLOAD;
NETIF_F_HW_L2FW_DOFFLOAD seems to be supported by ethtool already.

>
> Thanks & B.R
> Jianhua
>
>>         err = register_netdev(dev);
>>         if (err) {
>
>

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

* Re: [PATCH 3/3] rocker: set feature NETIF_F_HW_SWITCH_OFFLOAD
  2014-12-05  6:16   ` Scott Feldman
@ 2014-12-05  6:38     ` John Fastabend
  0 siblings, 0 replies; 8+ messages in thread
From: John Fastabend @ 2014-12-05  6:38 UTC (permalink / raw)
  To: Scott Feldman
  Cc: Jianhua Xie, Roopa Prabhu, Jiří Pírko,
	Jamal Hadi Salim, Benjamin LaHaise, Thomas Graf,
	stephen@networkplumber.org, John Linville, nhorman@tuxdriver.com,
	Nicolas Dichtel, vyasevic@redhat.com, Florian Fainelli,
	buytenh@wantstofly.org, Aviad Raveh, Netdev, David S. Miller, shm,
	Andy Gospodarek

On 12/04/2014 10:16 PM, Scott Feldman wrote:
> On Thu, Dec 4, 2014 at 7:25 PM, Jianhua Xie <jianhua.xie@freescale.com> wrote:
>>
>> 在 2014年12月05日 10:26, roopa@cumulusnetworks.com 写道:
>>
>>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>>>
>>> This patch just sets the feature flag on rocker ports
>>> ---
>>>    drivers/net/ethernet/rocker/rocker.c |    3 ++-
>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/ethernet/rocker/rocker.c
>>> b/drivers/net/ethernet/rocker/rocker.c
>>> index fded127..3fe19b0 100644
>>> --- a/drivers/net/ethernet/rocker/rocker.c
>>> +++ b/drivers/net/ethernet/rocker/rocker.c
>>> @@ -4003,7 +4003,8 @@ static int rocker_probe_port(struct rocker *rocker,
>>> unsigned int port_number)
>>>                         NAPI_POLL_WEIGHT);
>>>          rocker_carrier_init(rocker_port);
>>>    -     dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
>>> +       dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER |
>>> +                                        NETIF_F_HW_SWITCH_OFFLOAD;
>>
>> Do you have a plan on enabling/disabling  this flag dynamically by ethtool?
>
> Might get it for free if we recycle NETIF_F_HW_L2FW_DOFFLOAD;
> NETIF_F_HW_L2FW_DOFFLOAD seems to be supported by ethtool already.

See my other note but ethtool support for feature flags makes
this pretty close to trivial to implement these days.

Take a look @ netdev_features_strings.

>
>>
>> Thanks & B.R
>> Jianhua
>>
>>>          err = register_netdev(dev);
>>>          if (err) {
>>
>>


-- 
John Fastabend         Intel Corporation

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

* Re: [PATCH 3/3] rocker: set feature NETIF_F_HW_SWITCH_OFFLOAD
  2014-12-05  2:26 [PATCH 3/3] rocker: set feature NETIF_F_HW_SWITCH_OFFLOAD roopa
  2014-12-05  3:25 ` Jianhua Xie
@ 2014-12-05 13:18 ` Sergei Shtylyov
  2014-12-05 14:04   ` Roopa Prabhu
  1 sibling, 1 reply; 8+ messages in thread
From: Sergei Shtylyov @ 2014-12-05 13:18 UTC (permalink / raw)
  To: roopa, jiri, sfeldma, jhs, bcrl, tgraf, john.fastabend, stephen,
	linville, nhorman, nicolas.dichtel, vyasevic, f.fainelli, buytenh,
	aviadr
  Cc: netdev, davem, shm, gospo

Hello.

On 12/5/2014 5:26 AM, roopa@cumulusnetworks.com wrote:

> From: Roopa Prabhu <roopa@cumulusnetworks.com>

> This patch just sets the feature flag on rocker ports

    You didn't sign off on any of your patches, hence they can't be applied.

> ---
>   drivers/net/ethernet/rocker/rocker.c |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
> index fded127..3fe19b0 100644
> --- a/drivers/net/ethernet/rocker/rocker.c
> +++ b/drivers/net/ethernet/rocker/rocker.c
> @@ -4003,7 +4003,8 @@ static int rocker_probe_port(struct rocker *rocker, unsigned int port_number)
>   		       NAPI_POLL_WEIGHT);
>   	rocker_carrier_init(rocker_port);
>
> -	dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
> +	dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER |
> +					 NETIF_F_HW_SWITCH_OFFLOAD;

    There was no need tho break the line.

[...]

WBR, Sergei

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

* Re: [PATCH 3/3] rocker: set feature NETIF_F_HW_SWITCH_OFFLOAD
  2014-12-05 13:18 ` Sergei Shtylyov
@ 2014-12-05 14:04   ` Roopa Prabhu
  0 siblings, 0 replies; 8+ messages in thread
From: Roopa Prabhu @ 2014-12-05 14:04 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: jiri, sfeldma, jhs, bcrl, tgraf, john.fastabend, stephen,
	linville, nhorman, nicolas.dichtel, vyasevic, f.fainelli, buytenh,
	aviadr, netdev, davem, shm, gospo

ack, will fix them.

On 12/5/14, 5:18 AM, Sergei Shtylyov wrote:
> Hello.
>
> On 12/5/2014 5:26 AM, roopa@cumulusnetworks.com wrote:
>
>> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
>> This patch just sets the feature flag on rocker ports
>
>    You didn't sign off on any of your patches, hence they can't be 
> applied.
>
>> ---
>>   drivers/net/ethernet/rocker/rocker.c |    3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ethernet/rocker/rocker.c 
>> b/drivers/net/ethernet/rocker/rocker.c
>> index fded127..3fe19b0 100644
>> --- a/drivers/net/ethernet/rocker/rocker.c
>> +++ b/drivers/net/ethernet/rocker/rocker.c
>> @@ -4003,7 +4003,8 @@ static int rocker_probe_port(struct rocker 
>> *rocker, unsigned int port_number)
>>                  NAPI_POLL_WEIGHT);
>>       rocker_carrier_init(rocker_port);
>>
>> -    dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
>> +    dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER |
>> +                     NETIF_F_HW_SWITCH_OFFLOAD;
>
>    There was no need tho break the line.
>
> [...]
>
> WBR, Sergei
>
> -- 
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-12-05 14:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-05  2:26 [PATCH 3/3] rocker: set feature NETIF_F_HW_SWITCH_OFFLOAD roopa
2014-12-05  3:25 ` Jianhua Xie
2014-12-05  4:14   ` Roopa Prabhu
2014-12-05  4:44     ` Jianhua Xie
2014-12-05  6:16   ` Scott Feldman
2014-12-05  6:38     ` John Fastabend
2014-12-05 13:18 ` Sergei Shtylyov
2014-12-05 14:04   ` Roopa Prabhu

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