Re: [PATCH net-next] net: Check frag_lists first to prevent data out of order

2015-08-27 Thread Weilong Chen
From: Weilong Chen Date: Fri, 28 Aug 2015 11:35:40 +0800 In my test, @to has a fraglist, but skb_tailroom(to) is not 0! The test is about tipc, the function tipc_buf_append will merge 3 skbs to one: packet 1: len = 1420 skb_tailroom = 190 packet 2: len = 1420 packet 2 will be add to 1'

Re: [PATCH net-next] net: Check frag_lists first to prevent data out of order

2015-08-27 Thread Weilong Chen
在 2015/8/28 12:37, Eric Dumazet 写道: On Fri, 2015-08-28 at 11:35 +0800, Weilong Chen wrote: Thanks for reply. On Wed, 2015-08-26 at 19:12 -0700, Eric Dumazet wrote: On Thu, 2015-08-27 at 08:56 +0800, chenweil...@huawei.com wrote: From: Weilong Chen When try to merge several skbs to prior

Re: [PATCH net-next] net: Check frag_lists first to prevent data out of order

2015-08-27 Thread Eric Dumazet
On Fri, 2015-08-28 at 11:35 +0800, Weilong Chen wrote: > Thanks for reply. > > > On Wed, 2015-08-26 at 19:12 -0700, Eric Dumazet wrote: > >> On Thu, 2015-08-27 at 08:56 +0800, chenweil...@huawei.com wrote: > >>> From: Weilong Chen > >>> > >>> When try to merge several skbs to prior one, if the fr

Re: [PATCH net-next] net: Check frag_lists first to prevent data out of order

2015-08-27 Thread David Miller
From: Weilong Chen Date: Fri, 28 Aug 2015 11:35:40 +0800 > In my test, @to has a fraglist, but skb_tailroom(to) is not 0! > The test is about tipc, the function tipc_buf_append will merge 3 skbs > to one: > packet 1: len = 1420 skb_tailroom = 190 > packet 2: len = 1420 > packet 2 will be ad

Re: [PATCH net-next] net: Check frag_lists first to prevent data out of order

2015-08-27 Thread Weilong Chen
Thanks for reply. On Wed, 2015-08-26 at 19:12 -0700, Eric Dumazet wrote: On Thu, 2015-08-27 at 08:56 +0800, chenweil...@huawei.com wrote: From: Weilong Chen When try to merge several skbs to prior one, if the frag_list is used and the the last one is a small packet, once the condition "len <

Re: [PATCH net-next] net: Check frag_lists first to prevent data out of order

2015-08-26 Thread Eric Dumazet
On Wed, 2015-08-26 at 19:12 -0700, Eric Dumazet wrote: > On Thu, 2015-08-27 at 08:56 +0800, chenweil...@huawei.com wrote: > > From: Weilong Chen > > > > When try to merge several skbs to prior one, if the frag_list is > > used and the the last one is a small packet, once the condition > > "len <=

Re: [PATCH net-next] net: Check frag_lists first to prevent data out of order

2015-08-26 Thread Eric Dumazet
On Thu, 2015-08-27 at 08:56 +0800, chenweil...@huawei.com wrote: > From: Weilong Chen > > When try to merge several skbs to prior one, if the frag_list is > used and the the last one is a small packet, once the condition > "len <= skb_tailroom(to)" is satisfied, we will get a wrong > packet! > Th

[PATCH net-next] net: Check frag_lists first to prevent data out of order

2015-08-26 Thread chenweilong
From: Weilong Chen When try to merge several skbs to prior one, if the frag_list is used and the the last one is a small packet, once the condition "len <= skb_tailroom(to)" is satisfied, we will get a wrong packet! This patch just check frag_lists before the condtion to prevent this from happeni