Re: [PATCH net 3/4] virtio-net: reset num_buf to 1 after linearizing packet

2018-05-21 Thread Jason Wang
On 2018年05月21日 22:59, Michael S. Tsirkin wrote: On Mon, May 21, 2018 at 04:35:05PM +0800, Jason Wang wrote: If we successfully linearize the packets, num_buf were set to zero which was wrong since we now have only 1 buffer to be used for e.g in the error path of receive_mergeable(). Zero num_b

Re: [PATCH net 3/4] virtio-net: reset num_buf to 1 after linearizing packet

2018-05-21 Thread Michael S. Tsirkin
On Mon, May 21, 2018 at 04:35:05PM +0800, Jason Wang wrote: > If we successfully linearize the packets, num_buf were set to zero > which was wrong since we now have only 1 buffer to be used for e.g in > the error path of receive_mergeable(). Zero num_buf will lead the code > try to pop the buffers

[PATCH net 3/4] virtio-net: reset num_buf to 1 after linearizing packet

2018-05-21 Thread Jason Wang
If we successfully linearize the packets, num_buf were set to zero which was wrong since we now have only 1 buffer to be used for e.g in the error path of receive_mergeable(). Zero num_buf will lead the code try to pop the buffers of next packet and drop it. Fixing this by set num_buf to 1 if we su