* Performance regression 3.11 with macvlan between 2 linux guests (bisected)
@ 2013-08-21 12:38 Christian Borntraeger
2013-08-21 18:04 ` Vlad Yasevich
0 siblings, 1 reply; 5+ messages in thread
From: Christian Borntraeger @ 2013-08-21 12:38 UTC (permalink / raw)
To: Vlad Yasevich
Cc: David S. Miller, netdev, Michael S. Tsirkin, Matthew Rosato,
Jason Wang
Vlad,
the patch
commit 3e4f8b787370978733ca6cae452720a4f0c296b8
Author: Vlad Yasevich <vyasevic@redhat.com>
Date: Tue Jun 25 16:04:22 2013 -0400
macvtap: Perform GSO on forwarding path.
causes a severe performance regression for 2 Linux guests with virtio-net
connected via macvlan/vtap doing iperf workload. (2GBit vs. 20Gbit)
If I understand the patch correctly, we now check for gso depending on the
macvlan features. If the underlying hardware does not support the necessary
offloads then we will do segmentation, even if we keep the whole traffic internal
between two guests and even if both guests supports LRO,GSO etc.
---snip---
[...]
+ features = netif_skb_features(skb) & vlan->tap_features;
+ if (netif_needs_gso(skb, features)) {
+ struct sk_buff *segs = __skb_gso_segment(skb, features, false);
[...]
---snip---
Shouldnt we take the features of the target device or even better do the gsoing in the
target device driver?
Christian
FYI, the underlying HW has:
Features for eth0:
rx-checksumming: off [fixed]
tx-checksumming: off
tx-checksum-ipv4: off [fixed]
tx-checksum-ip-generic: off [fixed]
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: off
tx-scatter-gather: off [fixed]
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
tx-tcp-segmentation: off [fixed]
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: off [requested on]
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: off [fixed]
tx-vlan-offload: off [fixed]
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: off [fixed]
rx-vlan-filter: on [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-mpls-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Performance regression 3.11 with macvlan between 2 linux guests (bisected)
2013-08-21 12:38 Performance regression 3.11 with macvlan between 2 linux guests (bisected) Christian Borntraeger
@ 2013-08-21 18:04 ` Vlad Yasevich
2013-08-21 18:12 ` Vlad Yasevich
0 siblings, 1 reply; 5+ messages in thread
From: Vlad Yasevich @ 2013-08-21 18:04 UTC (permalink / raw)
To: Christian Borntraeger
Cc: David S. Miller, netdev, Michael S. Tsirkin, Matthew Rosato,
Jason Wang
On 08/21/2013 08:38 AM, Christian Borntraeger wrote:
> Vlad,
>
> the patch
>
> commit 3e4f8b787370978733ca6cae452720a4f0c296b8
> Author: Vlad Yasevich <vyasevic@redhat.com>
> Date: Tue Jun 25 16:04:22 2013 -0400
>
> macvtap: Perform GSO on forwarding path.
>
> causes a severe performance regression for 2 Linux guests with virtio-net
> connected via macvlan/vtap doing iperf workload. (2GBit vs. 20Gbit)
>
> If I understand the patch correctly, we now check for gso depending on the
> macvlan features. If the underlying hardware does not support the necessary
> offloads then we will do segmentation, even if we keep the whole traffic internal
> between two guests and even if both guests supports LRO,GSO etc.
> ---snip---
> [...]
> + features = netif_skb_features(skb) & vlan->tap_features;
> + if (netif_needs_gso(skb, features)) {
> + struct sk_buff *segs = __skb_gso_segment(skb, features, false);
> [...]
>
> ---snip---
> Shouldnt we take the features of the target device or even better do the gsoing in the
> target device driver?
A corrected patch has been sent upstream. We take into consideration
the features on the target device that the user/vm has specified.
If the VM has enabled the TSO flags, then nothing will happen to the
GSO packet. However, if the TSO flag is off, segmentation will be
performed.
-vlad
>
> Christian
>
> FYI, the underlying HW has:
>
> Features for eth0:
> rx-checksumming: off [fixed]
> tx-checksumming: off
> tx-checksum-ipv4: off [fixed]
> tx-checksum-ip-generic: off [fixed]
> tx-checksum-ipv6: off [fixed]
> tx-checksum-fcoe-crc: off [fixed]
> tx-checksum-sctp: off [fixed]
> scatter-gather: off
> tx-scatter-gather: off [fixed]
> tx-scatter-gather-fraglist: off [fixed]
> tcp-segmentation-offload: off
> tx-tcp-segmentation: off [fixed]
> tx-tcp-ecn-segmentation: off [fixed]
> tx-tcp6-segmentation: off [fixed]
> udp-fragmentation-offload: off [fixed]
> generic-segmentation-offload: off [requested on]
> generic-receive-offload: on
> large-receive-offload: off [fixed]
> rx-vlan-offload: off [fixed]
> tx-vlan-offload: off [fixed]
> ntuple-filters: off [fixed]
> receive-hashing: off [fixed]
> highdma: off [fixed]
> rx-vlan-filter: on [fixed]
> vlan-challenged: off [fixed]
> tx-lockless: off [fixed]
> netns-local: off [fixed]
> tx-gso-robust: off [fixed]
> tx-fcoe-segmentation: off [fixed]
> tx-gre-segmentation: off [fixed]
> tx-udp_tnl-segmentation: off [fixed]
> tx-mpls-segmentation: off [fixed]
> fcoe-mtu: off [fixed]
> tx-nocache-copy: off
> loopback: off [fixed]
> rx-fcs: off [fixed]
> rx-all: off [fixed]
> tx-vlan-stag-hw-insert: off [fixed]
> rx-vlan-stag-hw-parse: off [fixed]
> rx-vlan-stag-filter: off [fixed]
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Performance regression 3.11 with macvlan between 2 linux guests (bisected)
2013-08-21 18:04 ` Vlad Yasevich
@ 2013-08-21 18:12 ` Vlad Yasevich
2013-08-22 8:23 ` Christian Borntraeger
0 siblings, 1 reply; 5+ messages in thread
From: Vlad Yasevich @ 2013-08-21 18:12 UTC (permalink / raw)
To: Christian Borntraeger
Cc: David S. Miller, netdev, Michael S. Tsirkin, Matthew Rosato,
Jason Wang
On 08/21/2013 02:04 PM, Vlad Yasevich wrote:
> On 08/21/2013 08:38 AM, Christian Borntraeger wrote:
>> Vlad,
>>
>> the patch
>>
>> commit 3e4f8b787370978733ca6cae452720a4f0c296b8
>> Author: Vlad Yasevich <vyasevic@redhat.com>
>> Date: Tue Jun 25 16:04:22 2013 -0400
>>
>> macvtap: Perform GSO on forwarding path.
>>
>> causes a severe performance regression for 2 Linux guests with virtio-net
>> connected via macvlan/vtap doing iperf workload. (2GBit vs. 20Gbit)
>>
>> If I understand the patch correctly, we now check for gso depending on
>> the
>> macvlan features. If the underlying hardware does not support the
>> necessary
>> offloads then we will do segmentation, even if we keep the whole
>> traffic internal
>> between two guests and even if both guests supports LRO,GSO etc.
>> ---snip---
>> [...]
>> + features = netif_skb_features(skb) & vlan->tap_features;
>> + if (netif_needs_gso(skb, features)) {
>> + struct sk_buff *segs = __skb_gso_segment(skb,
>> features, false);
>> [...]
>>
>> ---snip---
>> Shouldnt we take the features of the target device or even better do
>> the gsoing in the
>> target device driver?
>
> A corrected patch has been sent upstream. We take into consideration
> the features on the target device that the user/vm has specified.
> If the VM has enabled the TSO flags, then nothing will happen to the
> GSO packet. However, if the TSO flag is off, segmentation will be
> performed.
Particularly. This commit should fix the issue:
commit a567dd6252263c8147b7269df5d03d9e31463e11
macvtap: simplify usage of tap_features
-vlad
>
> -vlad
>
>>
>> Christian
>>
>> FYI, the underlying HW has:
>>
>> Features for eth0:
>> rx-checksumming: off [fixed]
>> tx-checksumming: off
>> tx-checksum-ipv4: off [fixed]
>> tx-checksum-ip-generic: off [fixed]
>> tx-checksum-ipv6: off [fixed]
>> tx-checksum-fcoe-crc: off [fixed]
>> tx-checksum-sctp: off [fixed]
>> scatter-gather: off
>> tx-scatter-gather: off [fixed]
>> tx-scatter-gather-fraglist: off [fixed]
>> tcp-segmentation-offload: off
>> tx-tcp-segmentation: off [fixed]
>> tx-tcp-ecn-segmentation: off [fixed]
>> tx-tcp6-segmentation: off [fixed]
>> udp-fragmentation-offload: off [fixed]
>> generic-segmentation-offload: off [requested on]
>> generic-receive-offload: on
>> large-receive-offload: off [fixed]
>> rx-vlan-offload: off [fixed]
>> tx-vlan-offload: off [fixed]
>> ntuple-filters: off [fixed]
>> receive-hashing: off [fixed]
>> highdma: off [fixed]
>> rx-vlan-filter: on [fixed]
>> vlan-challenged: off [fixed]
>> tx-lockless: off [fixed]
>> netns-local: off [fixed]
>> tx-gso-robust: off [fixed]
>> tx-fcoe-segmentation: off [fixed]
>> tx-gre-segmentation: off [fixed]
>> tx-udp_tnl-segmentation: off [fixed]
>> tx-mpls-segmentation: off [fixed]
>> fcoe-mtu: off [fixed]
>> tx-nocache-copy: off
>> loopback: off [fixed]
>> rx-fcs: off [fixed]
>> rx-all: off [fixed]
>> tx-vlan-stag-hw-insert: off [fixed]
>> rx-vlan-stag-hw-parse: off [fixed]
>> rx-vlan-stag-filter: off [fixed]
>>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Performance regression 3.11 with macvlan between 2 linux guests (bisected)
2013-08-21 18:12 ` Vlad Yasevich
@ 2013-08-22 8:23 ` Christian Borntraeger
2013-08-22 8:29 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Christian Borntraeger @ 2013-08-22 8:23 UTC (permalink / raw)
To: vyasevic
Cc: David S. Miller, netdev, Michael S. Tsirkin, Matthew Rosato,
Jason Wang
On 21/08/13 20:12, Vlad Yasevich wrote:
>>
>> A corrected patch has been sent upstream. We take into consideration
>> the features on the target device that the user/vm has specified.
>> If the VM has enabled the TSO flags, then nothing will happen to the
>> GSO packet. However, if the TSO flag is off, segmentation will be
>> performed.
>
> Particularly. This commit should fix the issue:
> commit a567dd6252263c8147b7269df5d03d9e31463e11
> macvtap: simplify usage of tap_features
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
The patch is still in net.git, but not in Linus git. Are we going to push this
for 3.11?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Performance regression 3.11 with macvlan between 2 linux guests (bisected)
2013-08-22 8:23 ` Christian Borntraeger
@ 2013-08-22 8:29 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2013-08-22 8:29 UTC (permalink / raw)
To: borntraeger; +Cc: vyasevic, netdev, mst, mjrosato, jasowang
From: Christian Borntraeger <borntraeger@de.ibm.com>
Date: Thu, 22 Aug 2013 10:23:32 +0200
> On 21/08/13 20:12, Vlad Yasevich wrote:
>
>>>
>>> A corrected patch has been sent upstream. We take into consideration
>>> the features on the target device that the user/vm has specified.
>>> If the VM has enabled the TSO flags, then nothing will happen to the
>>> GSO packet. However, if the TSO flag is off, segmentation will be
>>> performed.
>>
>> Particularly. This commit should fix the issue:
>> commit a567dd6252263c8147b7269df5d03d9e31463e11
>> macvtap: simplify usage of tap_features
>
> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
>
> The patch is still in net.git, but not in Linus git. Are we going to push this
> for 3.11?
Of course. Anything in 'net' is intended to make it into Linus's tree.
I generally push things to Linus every week or two.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-22 8:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-21 12:38 Performance regression 3.11 with macvlan between 2 linux guests (bisected) Christian Borntraeger
2013-08-21 18:04 ` Vlad Yasevich
2013-08-21 18:12 ` Vlad Yasevich
2013-08-22 8:23 ` Christian Borntraeger
2013-08-22 8:29 ` 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).