[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <51DEB4AC.8090409@oracle.com>
Date: Thu, 11 Jul 2013 21:35:40 +0800
From: annie li <annie.li@...cle.com>
To: Ian Campbell <ian.campbell@...rix.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
"wei.liu2@...rix.com" <wei.liu2@...rix.com>,
"msw@...zon.com" <msw@...zon.com>,
"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>
Subject: Re: [Xen-devel] [PATCH v2 1/1] xen/netback: correctly calculate required
slots of skb.
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists