All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zoltan Kiss <zoltan.kiss@citrix.com>
To: Sander Eikelenboom <linux@eikelenboom.it>
Cc: Eric Dumazet <eric.dumazet@gmail.com>, <netdev@vger.kernel.org>,
	<xen-devel@lists.xen.org>, Ian Campbell <Ian.Campbell@citrix.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [Xen-devel] [3.15-rc3] Bisected: xen-netback mangles packets between two guests on a bridge since merge of "TX grant mapping with SKBTX_DEV_ZEROCOPY instead of copy" series.
Date: Fri, 2 May 2014 17:45:36 +0100	[thread overview]
Message-ID: <5363CBB0.6050804@citrix.com> (raw)
In-Reply-To: <35970097.20140502182818@eikelenboom.it>

It would be also interesting to know why we have anything on the 
frag_list at first place? An upstream guest shouldn't be able to send 18 
slots. Can you print out some debug information about the slots the 
packet have? (xenvif_tx_build_gops/xenvif_get_requests would be the 
place for that)
Also, binary comparison of the sent and received packets could show some 
interesting things, e.g. the last X bytes are always missing with GSO 
packets etc..
I ran into some problems with my repro, I'll continue next week.

Zoli

On 02/05/14 17:28, Sander Eikelenboom wrote:
>
> Friday, May 2, 2014, 5:26:33 PM, you wrote:
>
>> On 02/05/14 16:21, Eric Dumazet wrote:
>>> On Fri, 2014-05-02 at 15:47 +0100, Zoltan Kiss wrote:
>>>
>>>> Sorry, I was misleading and wrong. Can you try out this scenario with
>>>> the attached patch?
>>>
>>> Guys, I already told you skb->truesize 'mismatch' could not explain
>>> packet corruptions. This comes from an expert in this matter, you can
>>> trust me.
>>>
>>> What could happens here is that TCP stack merges skbs (TCP coalescing)
>> These packets shouldn't reach Dom0's TCP stack at all,
>> bridge/openvswitch grabs them before. And in the sending/receiving guest
>> these skbs don't have this flag.
>> However generally it is possible that a guest talks directly to Dom0, in
>> which case your proposed fix could be valid.
>
> I just tested Eric's patch alone .. and:
>
> - It lasts longer .. the first upload goes OK (previously it would already bail out on
>    the first one)
> - We still hit the "xenvif_handle_frag_list" path while uploading, but no "tx_frag_overflow"
>    occurred.
>
> - But it bails out on the second upload .. with the message
>    "_ssl.c:1415: error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record mac"
> - We also hit the "xenvif_handle_frag_list" path while uploading and this time we
>    also hit the "tx_frag_overflow" case.
>
> --
> Sander
>
>>>
>>> Problem is that SKBTX_DEV_ZEROCOPY addition did not take care of this.
>>>
>>> We have to forbid these merges from happening, because one skb has a
>>> single destructor_arg.
>>>
>>> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
>>> index 1b62343f5837..85995a14aafc 100644
>>> --- a/net/core/skbuff.c
>>> +++ b/net/core/skbuff.c
>>> @@ -3838,7 +3839,10 @@ bool skb_try_coalesce(struct sk_buff *to, struct sk_buff *from,
>>>                return true;
>>>        }
>>>
>>> -     if (skb_has_frag_list(to) || skb_has_frag_list(from))
>>> +     if (skb_has_frag_list(to) ||
>>> +         skb_has_frag_list(from) ||
>>> +         (skb_shinfo(to)->tx_flags & SKBTX_DEV_ZEROCOPY) ||
>>> +         (skb_shinfo(from)->tx_flags & SKBTX_DEV_ZEROCOPY))
>>>                return false;
>>>
>>>        if (skb_headlen(from) != 0) {
>>>
>>>
>>>
>>>
>>>
>>>
>
>
>

  reply	other threads:[~2014-05-02 16:45 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30 10:45 [3.15-rc3] Bisected: xen-netback mangles packets between two guests on a bridge since merge of "TX grant mapping with SKBTX_DEV_ZEROCOPY instead of copy" series Sander Eikelenboom
2014-04-30 15:24 ` Eric Dumazet
2014-04-30 20:40   ` Zoltan Kiss
2014-04-30 20:40   ` Zoltan Kiss
2014-04-30 15:24 ` Eric Dumazet
2014-04-30 20:53 ` Zoltan Kiss
2014-04-30 20:53 ` Zoltan Kiss
2014-04-30 22:25   ` Sander Eikelenboom
2014-04-30 22:25   ` Sander Eikelenboom
2014-05-01 13:37     ` Zoltan Kiss
2014-05-01 13:37     ` Zoltan Kiss
2014-05-01 13:59       ` Sander Eikelenboom
2014-05-01 15:46         ` Zoltan Kiss
2014-05-01 17:39           ` Sander Eikelenboom
2014-05-01 17:46             ` Eric Dumazet
2014-05-01 17:46             ` Eric Dumazet
2014-05-01 19:39             ` Sander Eikelenboom
2014-05-01 19:39             ` [Xen-devel] " Sander Eikelenboom
2014-05-02 14:00               ` Zoltan Kiss
2014-05-02 14:00               ` [Xen-devel] " Zoltan Kiss
2014-05-02 14:06                 ` Sander Eikelenboom
2014-05-02 14:47                   ` Zoltan Kiss
2014-05-02 15:21                     ` Eric Dumazet
2014-05-02 15:26                       ` Zoltan Kiss
2014-05-02 16:28                         ` Sander Eikelenboom
2014-05-02 16:45                           ` Zoltan Kiss [this message]
2014-05-05 10:19                             ` Sander Eikelenboom
2014-05-05 10:19                             ` [Xen-devel] " Sander Eikelenboom
2014-05-06 17:07                               ` Steven Haigh
2014-05-06 17:13                                 ` Zoltan Kiss
2014-05-06 17:37                                   ` Sander Eikelenboom
2014-05-06 18:07                                     ` Steven Haigh
2014-05-07  8:16                                       ` [Xen-devel] " David Vrabel
2014-05-16  2:13                                         ` Steven Haigh
2014-05-16  2:13                                         ` Steven Haigh
2014-05-07  8:16                                       ` David Vrabel
2014-05-06 18:07                                     ` Steven Haigh
2014-05-06 17:13                                 ` Zoltan Kiss
2014-05-06 17:07                               ` Steven Haigh
2014-05-06 17:08                               ` Zoltan Kiss
2014-05-06 17:08                               ` [Xen-devel] " Zoltan Kiss
2014-05-06 17:10                               ` Zoltan Kiss
2014-05-06 17:33                                 ` Sander Eikelenboom
2014-05-06 17:10                               ` Zoltan Kiss
2014-05-02 16:45                           ` Zoltan Kiss
2014-05-02 16:28                         ` Sander Eikelenboom
2014-05-02 15:26                       ` Zoltan Kiss
2014-05-02 15:21                     ` Eric Dumazet
2014-05-02 14:47                   ` Zoltan Kiss
2014-05-02 14:06                 ` Sander Eikelenboom
2014-05-01 17:39           ` Sander Eikelenboom
2014-05-01 15:46         ` Zoltan Kiss
2014-05-01 13:59       ` Sander Eikelenboom
2014-05-01 13:49 ` Zoltan Kiss
2014-05-01 13:49 ` Zoltan Kiss
2014-05-01 14:05   ` Sander Eikelenboom
2014-05-01 15:16     ` Zoltan Kiss
2014-05-01 15:16     ` Zoltan Kiss
2014-05-01 15:40       ` Sander Eikelenboom
2014-05-01 15:40       ` Sander Eikelenboom
2014-05-02 15:35         ` Eric Dumazet
2014-05-02 22:18           ` Sander Eikelenboom
2014-05-02 22:18           ` Sander Eikelenboom
2014-05-09 22:19           ` Neal Cardwell
2014-05-09 22:19           ` Neal Cardwell
2014-05-02 15:35         ` Eric Dumazet
2014-05-01 14:05   ` Sander Eikelenboom
2014-05-09 21:02 ` Zoltan Kiss
2014-05-09 21:02 ` Zoltan Kiss
2014-05-13 13:40   ` Zoltan Kiss
2014-05-13 13:40   ` Zoltan Kiss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5363CBB0.6050804@citrix.com \
    --to=zoltan.kiss@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=linux@eikelenboom.it \
    --cc=netdev@vger.kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.