Re: [PATCH net 2/2] macvtap: correctly linearize skb when zerocopy is used

2013-07-09 Thread Jason Wang
On 07/09/2013 06:35 PM, Michael S. Tsirkin wrote: > On Tue, Jul 09, 2013 at 06:10:51PM +0800, Jason Wang wrote: >> Userspace may produce vectors greater than MAX_SKB_FRAGS. When we try to >> linearize parts of the skb to let the rest of iov to be fit in >> the frags, we need count copylen into

Re: [PATCH net 2/2] macvtap: correctly linearize skb when zerocopy is used

2013-07-09 Thread Michael S. Tsirkin
On Tue, Jul 09, 2013 at 06:10:51PM +0800, Jason Wang wrote: > Userspace may produce vectors greater than MAX_SKB_FRAGS. When we try to > linearize parts of the skb to let the rest of iov to be fit in > the frags, we need count copylen into linear when calling macvtap_alloc_skb() > instead of

[PATCH net 2/2] macvtap: correctly linearize skb when zerocopy is used

2013-07-09 Thread Jason Wang
Userspace may produce vectors greater than MAX_SKB_FRAGS. When we try to linearize parts of the skb to let the rest of iov to be fit in the frags, we need count copylen into linear when calling macvtap_alloc_skb() instead of partly counting it into data_len. Since this breaks

Re: [PATCH net 2/2] macvtap: correctly linearize skb when zerocopy is used

2013-07-09 Thread Jason Wang
On 07/09/2013 06:35 PM, Michael S. Tsirkin wrote: On Tue, Jul 09, 2013 at 06:10:51PM +0800, Jason Wang wrote: Userspace may produce vectors greater than MAX_SKB_FRAGS. When we try to linearize parts of the skb to let the rest of iov to be fit in the frags, we need count copylen into linear

[PATCH net 2/2] macvtap: correctly linearize skb when zerocopy is used

2013-07-09 Thread Jason Wang
Userspace may produce vectors greater than MAX_SKB_FRAGS. When we try to linearize parts of the skb to let the rest of iov to be fit in the frags, we need count copylen into linear when calling macvtap_alloc_skb() instead of partly counting it into data_len. Since this breaks

Re: [PATCH net 2/2] macvtap: correctly linearize skb when zerocopy is used

2013-07-09 Thread Michael S. Tsirkin
On Tue, Jul 09, 2013 at 06:10:51PM +0800, Jason Wang wrote: Userspace may produce vectors greater than MAX_SKB_FRAGS. When we try to linearize parts of the skb to let the rest of iov to be fit in the frags, we need count copylen into linear when calling macvtap_alloc_skb() instead of partly