From: Jason Wang <jasowang@redhat.com>
To: "Zhangjie (HZ)" <zhangjie14@huawei.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mst@redhat.com" <mst@redhat.com>
Cc: Qinchuanyu <qinchuanyu@huawei.com>, Yewudi <yewudi@huawei.com>,
liuyongan 00175866 <l00175866@notesmail.huawei.com.cn>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [Question]Why a skb with frag_list causes BUG_ON in function skb_segment
Date: Thu, 30 Jul 2015 12:26:18 +0800 [thread overview]
Message-ID: <55B9A76A.3030908@redhat.com> (raw)
In-Reply-To: <60A73B7A161A82449A7DB7B382BFD1553712AF1C@SZXEMA504-MBS.china.huawei.com>
cc netdev for more experts
On 07/28/2015 04:53 PM, Zhangjie (HZ) wrote:
>
> Hi,
>
> I generate a skb as follows:
>
> It has a linear data region, 17 frags and the last fragment is in
> skb_shinfo(skb)->frag_list.
>
> Before this skb is sent to driver, dev_hard_start_xmit() will segment
> it first(skb has frag_list,
>
> so we get true from netif_needs_gso()), then the skb is passed to
> function skb_segment().
>
> Then, BUG_ON() happened.
>
> while (pos < offset + len) {
>
> if (i >= nfrags) {
>
> BUG_ON(skb_headlen(list_skb)); (skbuff.c:3120)
>
> …
>
> }
>
> …
>
> }
>
> A skb that has no frags but frag_list also causes BUG_ON().
>
> I wonder if skb like follows is legal? Could skb in frag_list have
> linear data region?
>
>
>
>
>
> Thanks
>
> Zhangjie
>
next parent reply other threads:[~2015-07-30 4:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <60A73B7A161A82449A7DB7B382BFD1553712AF1C@SZXEMA504-MBS.china.huawei.com>
2015-07-30 4:26 ` Jason Wang [this message]
2015-07-30 5:01 ` Eric Dumazet
2015-07-30 5:56 ` Zhangjie (HZ)
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=55B9A76A.3030908@redhat.com \
--to=jasowang@redhat.com \
--cc=l00175866@notesmail.huawei.com.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=qinchuanyu@huawei.com \
--cc=yewudi@huawei.com \
--cc=zhangjie14@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®