Re: [PATCH net] vhost: fix total length when packets are too short

2014-03-27 Thread Michael S. Tsirkin
On Thu, Mar 27, 2014 at 11:38:41AM +0200, Michael S. Tsirkin wrote: > When mergeable buffers are disabled, and the > incoming packet is too large for the rx buffer, > get_rx_bufs returns success. > > This was intentional in order for make recvmsg > truncate the packet and then handle_rx would > de

[PATCH net] vhost: fix total length when packets are too short

2014-03-27 Thread Michael S. Tsirkin
When mergeable buffers are disabled, and the incoming packet is too large for the rx buffer, get_rx_bufs returns success. This was intentional in order for make recvmsg truncate the packet and then handle_rx would detect err != sock_len and drop it. Unfortunately we pass the original sock_len to