Re: [PATCH] vsock/virtio: add support for MSG_PEEK

2019-09-27 Thread Matias Ezequiel Vara Larsen
On Fri, Sep 27, 2019 at 06:37:00AM -0700, Eric Dumazet wrote: > > > On 9/27/19 1:55 AM, Stefano Garzarella wrote: > > > Good catch! > > > > Maybe we can solve in this way: > > > > list_for_each_entry(pkt, >rx_queue, list) { > > size_t off = pkt->off; > > > > if

Re: [PATCH] vsock/virtio: add support for MSG_PEEK

2019-09-27 Thread Eric Dumazet
On 9/27/19 1:55 AM, Stefano Garzarella wrote: > Good catch! > > Maybe we can solve in this way: > > list_for_each_entry(pkt, >rx_queue, list) { > size_t off = pkt->off; > > if (total == len) > break; > > while (total <

Re: [PATCH] vsock/virtio: add support for MSG_PEEK

2019-09-27 Thread Stefano Garzarella
On Thu, Sep 26, 2019 at 12:33:36PM -0700, Eric Dumazet wrote: > > > On 9/26/19 11:23 AM, Matias Ezequiel Vara Larsen wrote: > > This patch adds support for MSG_PEEK. In such a case, packets are not > > removed from the rx_queue and credit updates are not sent. > > > > Signed-off-by: Matias

Re: [PATCH] vsock/virtio: add support for MSG_PEEK

2019-09-26 Thread Eric Dumazet
On 9/26/19 11:23 AM, Matias Ezequiel Vara Larsen wrote: > This patch adds support for MSG_PEEK. In such a case, packets are not > removed from the rx_queue and credit updates are not sent. > > Signed-off-by: Matias Ezequiel Vara Larsen > --- > net/vmw_vsock/virtio_transport_common.c | 50 >

[PATCH] vsock/virtio: add support for MSG_PEEK

2019-09-26 Thread Matias Ezequiel Vara Larsen
This patch adds support for MSG_PEEK. In such a case, packets are not removed from the rx_queue and credit updates are not sent. Signed-off-by: Matias Ezequiel Vara Larsen --- net/vmw_vsock/virtio_transport_common.c | 50 +++-- 1 file changed, 47 insertions(+), 3