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

Displaying 20 results from an estimated 4000 matches similar to: "[PATCH net] vhost: fix total length when packets are too short"

2014 Mar 27
1
[PATCHv2 net] vhost: fix total length when packets are too short
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 recvmsg - which means we use parts of iov not fully validated. Fix this up by detecting this overrun
2014 Mar 27
1
[PATCHv2 net] vhost: fix total length when packets are too short
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 recvmsg - which means we use parts of iov not fully validated. Fix this up by detecting this overrun
2020 Jun 03
1
[PATCH RFC 08/13] vhost/net: convert to new API: heads->bufs
On 2020/6/2 ??9:06, Michael S. Tsirkin wrote: > Convert vhost net to use the new format-agnostic API. > In particular, don't poke at vq internals such as the > heads array. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > --- > drivers/vhost/net.c | 153 +++++++++++++++++++++++--------------------- > 1 file changed, 81 insertions(+), 72 deletions(-)
2017 Nov 29
4
[PATCH net,stable v2] vhost: fix skb leak in handle_rx()
From: Wei Xu <wexu at redhat.com> Matthew found a roughly 40% tcp throughput regression with commit c67df11f(vhost_net: try batch dequing from skb array) as discussed in the following thread: https://www.mail-archive.com/netdev at vger.kernel.org/msg187936.html Eventually we figured out that it was a skb leak in handle_rx() when sending packets to the VM. This usually happens when a guest
2017 Nov 29
4
[PATCH net,stable v2] vhost: fix skb leak in handle_rx()
From: Wei Xu <wexu at redhat.com> Matthew found a roughly 40% tcp throughput regression with commit c67df11f(vhost_net: try batch dequing from skb array) as discussed in the following thread: https://www.mail-archive.com/netdev at vger.kernel.org/msg187936.html Eventually we figured out that it was a skb leak in handle_rx() when sending packets to the VM. This usually happens when a guest
2017 Nov 30
2
[PATCH net,stable v2] vhost: fix skb leak in handle_rx()
On 2017?11?29? 23:31, Michael S. Tsirkin wrote: > On Wed, Nov 29, 2017 at 09:23:24AM -0500,wexu at redhat.com wrote: >> From: Wei Xu<wexu at redhat.com> >> >> Matthew found a roughly 40% tcp throughput regression with commit >> c67df11f(vhost_net: try batch dequing from skb array) as discussed >> in the following thread: >>
2017 Nov 30
2
[PATCH net,stable v2] vhost: fix skb leak in handle_rx()
On 2017?11?29? 23:31, Michael S. Tsirkin wrote: > On Wed, Nov 29, 2017 at 09:23:24AM -0500,wexu at redhat.com wrote: >> From: Wei Xu<wexu at redhat.com> >> >> Matthew found a roughly 40% tcp throughput regression with commit >> c67df11f(vhost_net: try batch dequing from skb array) as discussed >> in the following thread: >>
2010 Apr 28
6
[PATCHv7] add mergeable buffers support to vhost_net
This patch adds mergeable receive buffer support to vhost_net. Signed-off-by: David L Stevens <dlstevens at us.ibm.com> diff -ruNp net-next-v0/drivers/vhost/net.c net-next-v7/drivers/vhost/net.c --- net-next-v0/drivers/vhost/net.c 2010-04-24 21:36:54.000000000 -0700 +++ net-next-v7/drivers/vhost/net.c 2010-04-28 12:26:18.000000000 -0700 @@ -74,6 +74,23 @@ static int move_iovec_hdr(struct
2010 Apr 28
6
[PATCHv7] add mergeable buffers support to vhost_net
This patch adds mergeable receive buffer support to vhost_net. Signed-off-by: David L Stevens <dlstevens at us.ibm.com> diff -ruNp net-next-v0/drivers/vhost/net.c net-next-v7/drivers/vhost/net.c --- net-next-v0/drivers/vhost/net.c 2010-04-24 21:36:54.000000000 -0700 +++ net-next-v7/drivers/vhost/net.c 2010-04-28 12:26:18.000000000 -0700 @@ -74,6 +74,23 @@ static int move_iovec_hdr(struct
2019 Apr 25
2
[PATCH net] vhost_net: fix possible infinite loop
When the rx buffer is too small for a packet, we will discard the vq descriptor and retry it for the next packet: while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk, &busyloop_intr))) { ... /* On overrun, truncate and discard */ if (unlikely(headcount > UIO_MAXIOV)) { iov_iter_init(&msg.msg_iter, READ, vq->iov, 1, 1); err = sock->ops->recvmsg(sock,
2019 Apr 25
2
[PATCH net] vhost_net: fix possible infinite loop
When the rx buffer is too small for a packet, we will discard the vq descriptor and retry it for the next packet: while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk, &busyloop_intr))) { ... /* On overrun, truncate and discard */ if (unlikely(headcount > UIO_MAXIOV)) { iov_iter_init(&msg.msg_iter, READ, vq->iov, 1, 1); err = sock->ops->recvmsg(sock,
2017 Dec 01
1
[PATCH 1/3] vhost: fix skb leak in handle_rx()
From: Wei Xu <wexu at redhat.com> Matthew found a roughly 40% tcp throughput regression with commit c67df11f(vhost_net: try batch dequing from skb array) as discussed in the following thread: https://www.mail-archive.com/netdev at vger.kernel.org/msg187936.html Eventually we figured out that it was a skb leak in handle_rx() when sending packets to the VM. This usually happens when a guest
2017 Dec 01
1
[PATCH 1/3] vhost: fix skb leak in handle_rx()
On Fri, Dec 01, 2017 at 03:11:05PM +0800, Jason Wang wrote: > > > On 2017?12?01? 13:54, wexu at redhat.com wrote: > > From: Wei Xu <wexu at redhat.com> > > > > Matthew found a roughly 40% tcp throughput regression with commit > > c67df11f(vhost_net: try batch dequing from skb array) as discussed > > in the following thread: > >
2017 Dec 01
1
[PATCH 1/3] vhost: fix skb leak in handle_rx()
On Fri, Dec 01, 2017 at 03:11:05PM +0800, Jason Wang wrote: > > > On 2017?12?01? 13:54, wexu at redhat.com wrote: > > From: Wei Xu <wexu at redhat.com> > > > > Matthew found a roughly 40% tcp throughput regression with commit > > c67df11f(vhost_net: try batch dequing from skb array) as discussed > > in the following thread: > >
2015 Feb 04
2
[PATCH v3 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()
From: Al Viro <viro at zeniv.linux.org.uk> Cc: Michael S. Tsirkin <mst at redhat.com> Cc: kvm at vger.kernel.org Cc: virtualization at lists.linux-foundation.org Signed-off-by: Al Viro <viro at zeniv.linux.org.uk> --- drivers/vhost/net.c | 82 +++++++++++++++-------------------------------------- include/linux/uio.h | 3 -- lib/iovec.c | 26 ----------------- 3 files
2015 Feb 04
2
[PATCH v3 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()
From: Al Viro <viro at zeniv.linux.org.uk> Cc: Michael S. Tsirkin <mst at redhat.com> Cc: kvm at vger.kernel.org Cc: virtualization at lists.linux-foundation.org Signed-off-by: Al Viro <viro at zeniv.linux.org.uk> --- drivers/vhost/net.c | 82 +++++++++++++++-------------------------------------- include/linux/uio.h | 3 -- lib/iovec.c | 26 ----------------- 3 files
2011 Jan 17
11
[PATCH 1/3] vhost-net: check the support of mergeable buffer outside the receive loop
No need to check the support of mergeable buffer inside the recevie loop as the whole handle_rx()_xx is in the read critical region. So this patch move it ahead of the receiving loop. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/vhost/net.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index
2011 Jan 17
11
[PATCH 1/3] vhost-net: check the support of mergeable buffer outside the receive loop
No need to check the support of mergeable buffer inside the recevie loop as the whole handle_rx()_xx is in the read critical region. So this patch move it ahead of the receiving loop. Signed-off-by: Jason Wang <jasowang at redhat.com> --- drivers/vhost/net.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index
2019 Apr 26
2
[PATCH net] vhost_net: fix possible infinite loop
On 2019/4/26 ??1:52, Michael S. Tsirkin wrote: > On Thu, Apr 25, 2019 at 03:33:19AM -0400, Jason Wang wrote: >> When the rx buffer is too small for a packet, we will discard the vq >> descriptor and retry it for the next packet: >> >> while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk, >> &busyloop_intr))) { >> ... >> /* On
2019 Apr 26
2
[PATCH net] vhost_net: fix possible infinite loop
On 2019/4/26 ??1:52, Michael S. Tsirkin wrote: > On Thu, Apr 25, 2019 at 03:33:19AM -0400, Jason Wang wrote: >> When the rx buffer is too small for a packet, we will discard the vq >> descriptor and retry it for the next packet: >> >> while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk, >> &busyloop_intr))) { >> ... >> /* On