From: annie li <annie.li@oracle.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
"wei.liu2@citrix.com" <wei.liu2@citrix.com>,
"msw@amazon.com" <msw@amazon.com>,
"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>
Subject: Re: [Xen-devel] [PATCH v2 1/1] xen/netback: correctly calculate required slots of skb.
Date: Thu, 11 Jul 2013 21:35:40 +0800 [thread overview]
Message-ID: <51DEB4AC.8090409@oracle.com> (raw)
In-Reply-To: <1373541144.5453.165.camel@hastur.hellion.org.uk>
On 2013-7-11 19:12, Ian Campbell wrote:
>>>>> The code here only
>>>>> increase count for the first time. I thought to initialize the
>>>>> count in
>>>>> xen_netbk_count_skb_slots with 1 to avoid this. But thinking of
>>>>> the
>>>>> extreme case when the header size is zero(not sure whether this
>>>>> case
>>>>> could be true), I increase the count here to keep safe in case
>>>>> header
>>>>> size is zero.
>>>> netfront requires that the first slot always contains some data,
>>>> gop_frag_copy will BUG if that's not the case.
>>>>
>>
>> In gop_frag_copy, we can not go into the while if the size is 0. Which
>> BUG_ON do you mean here?
> in gop_frag_copy:
> if (start_new_rx_buffer(npo->copy_off, bytes, *head)) {
> /*
> * Netfront requires there to be some data in the head
> * buffer.
> */
> BUG_ON(*head);
>
But If there is SKB with zero header size and zero offset, the code will
not run into the while loop in gop_frag_copy and this if condition.
BUG_ON will not happen in such situation.
Thanks
Annie
next prev parent reply other threads:[~2013-07-11 13:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-10 9:15 [PATCH v2 1/1] xen/netback: correctly calculate required slots of skb Annie Li
2013-07-11 2:18 ` David Miller
2013-07-11 2:48 ` [Xen-devel] " annie li
2013-07-11 19:04 ` David Miller
2013-07-11 8:11 ` Ian Campbell
2013-07-11 8:11 ` Ian Campbell
2013-07-11 8:34 ` annie li
2013-07-11 9:47 ` Ian Campbell
2013-07-11 9:47 ` Ian Campbell
2013-07-11 10:46 ` Annie
2013-07-11 10:59 ` Annie
2013-07-11 11:12 ` [Xen-devel] " Ian Campbell
2013-07-11 13:35 ` annie li [this message]
2013-07-11 20:03 ` David Miller
2013-07-11 21:12 ` [Xen-devel] " Wei Liu
2013-07-16 9:00 ` Ian Campbell
2013-07-16 9:00 ` Ian Campbell
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=51DEB4AC.8090409@oracle.com \
--to=annie.li@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=msw@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xensource.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 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.