netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] openvswitch: Enable tunnel GSO for OVS bridge.
@ 2014-05-25 11:39 Pravin B Shelar
  2014-06-11  9:26 ` Or Gerlitz
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pravin B Shelar @ 2014-05-25 11:39 UTC (permalink / raw)
  To: netdev; +Cc: Pravin B Shelar

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
---
 include/linux/netdev_features.h      | 4 ++++
 net/openvswitch/vport-internal_dev.c | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index e5a5894..12118a5 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -152,6 +152,10 @@ enum {
 #define NETIF_F_ALL_FCOE	(NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \
 				 NETIF_F_FSO)
 
+#define NETIF_F_ALL_ENCAP_GSO   (NETIF_F_GSO_GRE | NETIF_F_GSO_GRE_CSUM | \
+				 NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT |     \
+				 NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_MPLS)
+
 /*
  * If one device supports one of these features, then enable them
  * for all in netdev_increment_features.
diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
index 789af92..b971610 100644
--- a/net/openvswitch/vport-internal_dev.c
+++ b/net/openvswitch/vport-internal_dev.c
@@ -134,7 +134,8 @@ static void do_setup(struct net_device *netdev)
 	netdev->tx_queue_len = 0;
 
 	netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
-			   NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;
+			   NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE |
+			   NETIF_F_ALL_ENCAP_GSO;
 
 	netdev->vlan_features = netdev->features;
 	netdev->features |= NETIF_F_HW_VLAN_CTAG_TX;
-- 
1.9.1

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

* Re: [PATCH 2/2] openvswitch: Enable tunnel GSO for OVS bridge.
  2014-05-25 11:39 [PATCH 2/2] openvswitch: Enable tunnel GSO for OVS bridge Pravin B Shelar
@ 2014-06-11  9:26 ` Or Gerlitz
  2014-06-12  9:27 ` Or Gerlitz
  2014-06-30 21:53 ` Or Gerlitz
  2 siblings, 0 replies; 7+ messages in thread
From: Or Gerlitz @ 2014-06-11  9:26 UTC (permalink / raw)
  To: Pravin B Shelar; +Cc: netdev@vger.kernel.org, Alon Harel

On Sun, May 25, 2014 at 2:39 PM, Pravin B Shelar <pshelar@nicira.com> wrote:
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>

Hi Pravin,

Can you please provide a non-empty change log for this patch... I
understand the patch
addresses some openvswitch use case where offloads are currently
non-coming into play and
you want to support that, right?


> +++ b/include/linux/netdev_features.h
> @@ -152,6 +152,10 @@ enum {
>  #define NETIF_F_ALL_FCOE       (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \
>                                  NETIF_F_FSO)
>
> +#define NETIF_F_ALL_ENCAP_GSO   (NETIF_F_GSO_GRE | NETIF_F_GSO_GRE_CSUM | \
> +                                NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT |     \
> +                                NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_MPLS)

AFAIK OVS supports only VXLAN and GRE tunneling -- wouldn't it be
enough to add here only
NETIF_F_GSO_GRE and NETIF_F_GSO_UDP_TUNNEL?

> +
>  /*
>   * If one device supports one of these features, then enable them
>   * for all in netdev_increment_features.
> diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
> index 789af92..b971610 100644
> --- a/net/openvswitch/vport-internal_dev.c
> +++ b/net/openvswitch/vport-internal_dev.c
> @@ -134,7 +134,8 @@ static void do_setup(struct net_device *netdev)
>         netdev->tx_queue_len = 0;
>
>         netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
> -                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;
> +                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE |
> +                          NETIF_F_ALL_ENCAP_GSO;
>
>         netdev->vlan_features = netdev->features;
>         netdev->features |= NETIF_F_HW_VLAN_CTAG_TX;

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

* Re: [PATCH 2/2] openvswitch: Enable tunnel GSO for OVS bridge.
  2014-05-25 11:39 [PATCH 2/2] openvswitch: Enable tunnel GSO for OVS bridge Pravin B Shelar
  2014-06-11  9:26 ` Or Gerlitz
@ 2014-06-12  9:27 ` Or Gerlitz
  2014-06-12 15:41   ` Pravin Shelar
  2014-06-30 21:53 ` Or Gerlitz
  2 siblings, 1 reply; 7+ messages in thread
From: Or Gerlitz @ 2014-06-12  9:27 UTC (permalink / raw)
  To: Pravin B Shelar; +Cc: netdev@vger.kernel.org

On Sun, May 25, 2014 at 2:39 PM, Pravin B Shelar <pshelar@nicira.com> wrote:
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
> ---
>  include/linux/netdev_features.h      | 4 ++++
>  net/openvswitch/vport-internal_dev.c | 3 ++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
> index e5a5894..12118a5 100644
> --- a/include/linux/netdev_features.h
> +++ b/include/linux/netdev_features.h
> @@ -152,6 +152,10 @@ enum {
>  #define NETIF_F_ALL_FCOE       (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \
>                                  NETIF_F_FSO)
>
> +#define NETIF_F_ALL_ENCAP_GSO   (NETIF_F_GSO_GRE | NETIF_F_GSO_GRE_CSUM | \
> +                                NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT |     \
> +                                NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_MPLS)
> +
>  /*
>   * If one device supports one of these features, then enable them
>   * for all in netdev_increment_features.
> diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
> index 789af92..b971610 100644
> --- a/net/openvswitch/vport-internal_dev.c
> +++ b/net/openvswitch/vport-internal_dev.c
> @@ -134,7 +134,8 @@ static void do_setup(struct net_device *netdev)
>         netdev->tx_queue_len = 0;
>
>         netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
> -                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;
> +                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE |
> +                          NETIF_F_ALL_ENCAP_GSO;
>
>         netdev->vlan_features = netdev->features;
>         netdev->features |= NETIF_F_HW_VLAN_CTAG_TX;

OK, I guess this commit is similar in spirit to 82d8189 "veth: extend
features to support tunneling"

So in that respect, don't you need to set also dev->hw_enc_features
for the NETIF_F_GSO_YYY to come into play?

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

* Re: [PATCH 2/2] openvswitch: Enable tunnel GSO for OVS bridge.
  2014-06-12  9:27 ` Or Gerlitz
@ 2014-06-12 15:41   ` Pravin Shelar
  0 siblings, 0 replies; 7+ messages in thread
From: Pravin Shelar @ 2014-06-12 15:41 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: netdev@vger.kernel.org

On Thu, Jun 12, 2014 at 2:27 AM, Or Gerlitz <or.gerlitz@gmail.com> wrote:
> On Sun, May 25, 2014 at 2:39 PM, Pravin B Shelar <pshelar@nicira.com> wrote:
>> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
>> ---
>>  include/linux/netdev_features.h      | 4 ++++
>>  net/openvswitch/vport-internal_dev.c | 3 ++-
>>  2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
>> index e5a5894..12118a5 100644
>> --- a/include/linux/netdev_features.h
>> +++ b/include/linux/netdev_features.h
>> @@ -152,6 +152,10 @@ enum {
>>  #define NETIF_F_ALL_FCOE       (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \
>>                                  NETIF_F_FSO)
>>
>> +#define NETIF_F_ALL_ENCAP_GSO   (NETIF_F_GSO_GRE | NETIF_F_GSO_GRE_CSUM | \
>> +                                NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT |     \
>> +                                NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_MPLS)
>> +
>>  /*
>>   * If one device supports one of these features, then enable them
>>   * for all in netdev_increment_features.
>> diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
>> index 789af92..b971610 100644
>> --- a/net/openvswitch/vport-internal_dev.c
>> +++ b/net/openvswitch/vport-internal_dev.c
>> @@ -134,7 +134,8 @@ static void do_setup(struct net_device *netdev)
>>         netdev->tx_queue_len = 0;
>>
>>         netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
>> -                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;
>> +                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE |
>> +                          NETIF_F_ALL_ENCAP_GSO;
>>
>>         netdev->vlan_features = netdev->features;
>>         netdev->features |= NETIF_F_HW_VLAN_CTAG_TX;
>
> OK, I guess this commit is similar in spirit to 82d8189 "veth: extend
> features to support tunneling"
>
> So in that respect, don't you need to set also dev->hw_enc_features
> for the NETIF_F_GSO_YYY to come into play?

Right, I will send updated patch.

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

* Re: [PATCH 2/2] openvswitch: Enable tunnel GSO for OVS bridge.
  2014-05-25 11:39 [PATCH 2/2] openvswitch: Enable tunnel GSO for OVS bridge Pravin B Shelar
  2014-06-11  9:26 ` Or Gerlitz
  2014-06-12  9:27 ` Or Gerlitz
@ 2014-06-30 21:53 ` Or Gerlitz
  2014-06-30 23:37   ` Pravin Shelar
  2 siblings, 1 reply; 7+ messages in thread
From: Or Gerlitz @ 2014-06-30 21:53 UTC (permalink / raw)
  To: Pravin B Shelar; +Cc: netdev@vger.kernel.org

On Sun, May 25, 2014 at 2:39 PM, Pravin B Shelar <pshelar@nicira.com> wrote:
>
> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>



Hi Pravin, ping... this addresses a real life use case where offloads
didn't come into play, right? can you respin the patch with non-empty
change-log so people can review/ack it? --> and we'll have upstream
support for that case.

Or.



>
> ---
>  include/linux/netdev_features.h      | 4 ++++
>  net/openvswitch/vport-internal_dev.c | 3 ++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
> index e5a5894..12118a5 100644
> --- a/include/linux/netdev_features.h
> +++ b/include/linux/netdev_features.h
> @@ -152,6 +152,10 @@ enum {
>  #define NETIF_F_ALL_FCOE       (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \
>                                  NETIF_F_FSO)
>
> +#define NETIF_F_ALL_ENCAP_GSO   (NETIF_F_GSO_GRE | NETIF_F_GSO_GRE_CSUM | \
> +                                NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT |     \
> +                                NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_MPLS)
> +
>  /*
>   * If one device supports one of these features, then enable them
>   * for all in netdev_increment_features.
> diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
> index 789af92..b971610 100644
> --- a/net/openvswitch/vport-internal_dev.c
> +++ b/net/openvswitch/vport-internal_dev.c
> @@ -134,7 +134,8 @@ static void do_setup(struct net_device *netdev)
>         netdev->tx_queue_len = 0;
>
>         netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
> -                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;
> +                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE |
> +                          NETIF_F_ALL_ENCAP_GSO;
>
>         netdev->vlan_features = netdev->features;
>         netdev->features |= NETIF_F_HW_VLAN_CTAG_TX;
> --
> 1.9.1
>
> --
> 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] 7+ messages in thread

* Re: [PATCH 2/2] openvswitch: Enable tunnel GSO for OVS bridge.
  2014-06-30 21:53 ` Or Gerlitz
@ 2014-06-30 23:37   ` Pravin Shelar
  2014-07-01  0:32     ` Tom Herbert
  0 siblings, 1 reply; 7+ messages in thread
From: Pravin Shelar @ 2014-06-30 23:37 UTC (permalink / raw)
  To: Or Gerlitz; +Cc: netdev@vger.kernel.org, Tom Herbert

On Mon, Jun 30, 2014 at 2:53 PM, Or Gerlitz <or.gerlitz@gmail.com> wrote:
> On Sun, May 25, 2014 at 2:39 PM, Pravin B Shelar <pshelar@nicira.com> wrote:
>>
>> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
>
>
>
> Hi Pravin, ping... this addresses a real life use case where offloads
> didn't come into play, right? can you respin the patch with non-empty
> change-log so people can review/ack it? --> and we'll have upstream
> support for that case.
>
This patch is blocked by double encap issue. You can read mail thread
on first patch http://marc.info/?l=linux-netdev&m=140236173911474&w=2

Tom is going to fix GSO for packets with multiple encapsulations.
After that it would be safe to enable tunnel offloading features for
OVS.

Thanks,
Pravin.

> Or.
>
>
>
>>
>> ---
>>  include/linux/netdev_features.h      | 4 ++++
>>  net/openvswitch/vport-internal_dev.c | 3 ++-
>>  2 files changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
>> index e5a5894..12118a5 100644
>> --- a/include/linux/netdev_features.h
>> +++ b/include/linux/netdev_features.h
>> @@ -152,6 +152,10 @@ enum {
>>  #define NETIF_F_ALL_FCOE       (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \
>>                                  NETIF_F_FSO)
>>
>> +#define NETIF_F_ALL_ENCAP_GSO   (NETIF_F_GSO_GRE | NETIF_F_GSO_GRE_CSUM | \
>> +                                NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT |     \
>> +                                NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_MPLS)
>> +
>>  /*
>>   * If one device supports one of these features, then enable them
>>   * for all in netdev_increment_features.
>> diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
>> index 789af92..b971610 100644
>> --- a/net/openvswitch/vport-internal_dev.c
>> +++ b/net/openvswitch/vport-internal_dev.c
>> @@ -134,7 +134,8 @@ static void do_setup(struct net_device *netdev)
>>         netdev->tx_queue_len = 0;
>>
>>         netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
>> -                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;
>> +                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE |
>> +                          NETIF_F_ALL_ENCAP_GSO;
>>
>>         netdev->vlan_features = netdev->features;
>>         netdev->features |= NETIF_F_HW_VLAN_CTAG_TX;
>> --
>> 1.9.1
>>
>> --
>> 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] 7+ messages in thread

* Re: [PATCH 2/2] openvswitch: Enable tunnel GSO for OVS bridge.
  2014-06-30 23:37   ` Pravin Shelar
@ 2014-07-01  0:32     ` Tom Herbert
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Herbert @ 2014-07-01  0:32 UTC (permalink / raw)
  To: Pravin Shelar; +Cc: Or Gerlitz, netdev@vger.kernel.org

On Mon, Jun 30, 2014 at 4:37 PM, Pravin Shelar <pshelar@nicira.com> wrote:
> On Mon, Jun 30, 2014 at 2:53 PM, Or Gerlitz <or.gerlitz@gmail.com> wrote:
>> On Sun, May 25, 2014 at 2:39 PM, Pravin B Shelar <pshelar@nicira.com> wrote:
>>>
>>> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
>>
>>
>>
>> Hi Pravin, ping... this addresses a real life use case where offloads
>> didn't come into play, right? can you respin the patch with non-empty
>> change-log so people can review/ack it? --> and we'll have upstream
>> support for that case.
>>
> This patch is blocked by double encap issue. You can read mail thread
> on first patch http://marc.info/?l=linux-netdev&m=140236173911474&w=2
>
> Tom is going to fix GSO for packets with multiple encapsulations.
> After that it would be safe to enable tunnel offloading features for
> OVS.
>
I have some working patches for that but would like to get checksum
changes finished first. The first patch is reasonable to keep things
moving and should be okay to undo.

> Thanks,
> Pravin.
>
>> Or.
>>
>>
>>
>>>
>>> ---
>>>  include/linux/netdev_features.h      | 4 ++++
>>>  net/openvswitch/vport-internal_dev.c | 3 ++-
>>>  2 files changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
>>> index e5a5894..12118a5 100644
>>> --- a/include/linux/netdev_features.h
>>> +++ b/include/linux/netdev_features.h
>>> @@ -152,6 +152,10 @@ enum {
>>>  #define NETIF_F_ALL_FCOE       (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \
>>>                                  NETIF_F_FSO)
>>>
>>> +#define NETIF_F_ALL_ENCAP_GSO   (NETIF_F_GSO_GRE | NETIF_F_GSO_GRE_CSUM | \
>>> +                                NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT |     \
>>> +                                NETIF_F_GSO_UDP_TUNNEL | NETIF_F_GSO_MPLS)
>>> +
>>>  /*
>>>   * If one device supports one of these features, then enable them
>>>   * for all in netdev_increment_features.
>>> diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c
>>> index 789af92..b971610 100644
>>> --- a/net/openvswitch/vport-internal_dev.c
>>> +++ b/net/openvswitch/vport-internal_dev.c
>>> @@ -134,7 +134,8 @@ static void do_setup(struct net_device *netdev)
>>>         netdev->tx_queue_len = 0;
>>>
>>>         netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
>>> -                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;
>>> +                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE |
>>> +                          NETIF_F_ALL_ENCAP_GSO;
>>>
>>>         netdev->vlan_features = netdev->features;
>>>         netdev->features |= NETIF_F_HW_VLAN_CTAG_TX;
>>> --
>>> 1.9.1
>>>
>>> --
>>> 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] 7+ messages in thread

end of thread, other threads:[~2014-07-01  0:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-25 11:39 [PATCH 2/2] openvswitch: Enable tunnel GSO for OVS bridge Pravin B Shelar
2014-06-11  9:26 ` Or Gerlitz
2014-06-12  9:27 ` Or Gerlitz
2014-06-12 15:41   ` Pravin Shelar
2014-06-30 21:53 ` Or Gerlitz
2014-06-30 23:37   ` Pravin Shelar
2014-07-01  0:32     ` Tom Herbert

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