search for: virtio_net_f_mrg_rxbuf

Displaying 20 results from an estimated 455 matches for "virtio_net_f_mrg_rxbuf".

2023 Mar 22
1
[PATCH v4 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
On Tue, Mar 21, 2023 at 01:28:08PM +0200, Eli Cohen wrote: > Following patch adds driver support for VIRTIO_NET_F_MRG_RXBUF. > > Current firmware versions show degradation in packet rate when using > MRG_RXBUF. Users who favor memory saving over packet rate could enable > this feature but we want to keep it off by default. > > One can still enable it when creating the vdpa device using vdpa tool by &...
2023 Mar 12
0
[PATCH 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
...lt? It's generally a > > performance win isn't it? > It has negative impact on packet rate so we want to keep it off by default. Interesting. I feel this would benefit from a bit more analysis. Packet rate with dpdk? With linux? Is there a chance this will regress some workloads? VIRTIO_NET_F_MRG_RXBUF was designed to save memory, which is good for small tcp buffers. > > > > > --- > > > drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/ml...
2023 Mar 13
1
[PATCH 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
...on is backward compatibility, more > > below. > > > > > > > Interesting. I feel this would benefit from a bit more analysis. > > > > Packet rate with dpdk? With linux? Is there a chance this will > > > > regress some workloads? > > > > VIRTIO_NET_F_MRG_RXBUF was designed to save memory, which is good > > > > for small tcp buffers. > > > > > > Eli, > > > Please update the commit message. > > > This change is to avoid regression in existing systems. > > > The device previously didn't report MRG...
2023 Mar 12
0
[PATCH 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
...; +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > @@ -3154,6 +3154,8 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name, > return -EINVAL; > } > device_features &= add_config->device_features; > + } else { > + device_features &= ~BIT_ULL(VIRTIO_NET_F_MRG_RXBUF); > } > if (!(device_features & BIT_ULL(VIRTIO_F_VERSION_1) && > device_features & BIT_ULL(VIRTIO_F_ACCESS_PLATFORM))) { > -- > 2.38.1
2023 Mar 12
0
[PATCH 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
...pecific. > It is less of interest given the primary reason is backward compatibility, more below. > > > Interesting. I feel this would benefit from a bit more analysis. > > Packet rate with dpdk? With linux? Is there a chance this will regress some > > workloads? > > VIRTIO_NET_F_MRG_RXBUF was designed to save memory, which is good for > > small tcp buffers. > > Eli, > Please update the commit message. > This change is to avoid regression in existing systems. > The device previously didn't report MRG_RXBUF cap and it was not in use. > Lately, certain devi...
2023 Mar 13
0
[PATCH 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
...ior not just only once: the backward compatibility guarantee is simply just not there and ever. -Siwei > >> Interesting. I feel this would benefit from a bit more analysis. >> Packet rate with dpdk? With linux? Is there a chance this will regress some >> workloads? >> VIRTIO_NET_F_MRG_RXBUF was designed to save memory, which is good for >> small tcp buffers. > Eli, > Please update the commit message. > This change is to avoid regression in existing systems. > The device previously didn't report MRG_RXBUF cap and it was not in use. > Lately, certain devices are...
2014 Oct 23
2
[PATCH RFC 3/4] virtio_net: stricter short buffer length checks
Our buffer length check is not strict enough for mergeable buffers: buffer can still be shorter that header + address by 2 bytes. Fix that up. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a795a23..9c6d50f 100644 ---
2014 Nov 27
1
[PATCH v6 26/46] virtio_net: bigger header when VERSION_1 is set
...ged, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 098f443..a0e64cf 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1805,7 +1805,8 @@ static int virtnet_probe(struct virtio_device *vdev) if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF)) vi->mergeable_rx_bufs = true; - if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF)) + if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF) || + virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) vi->hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); else vi->hdr_len = sizeo...
2014 Oct 23
2
[PATCH RFC 3/4] virtio_net: stricter short buffer length checks
Our buffer length check is not strict enough for mergeable buffers: buffer can still be shorter that header + address by 2 bytes. Fix that up. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a795a23..9c6d50f 100644 ---
2014 Nov 27
1
[PATCH v6 26/46] virtio_net: bigger header when VERSION_1 is set
...ged, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 098f443..a0e64cf 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1805,7 +1805,8 @@ static int virtnet_probe(struct virtio_device *vdev) if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF)) vi->mergeable_rx_bufs = true; - if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF)) + if (virtio_has_feature(vdev, VIRTIO_NET_F_MRG_RXBUF) || + virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) vi->hdr_len = sizeof(struct virtio_net_hdr_mrg_rxbuf); else vi->hdr_len = sizeo...
2023 Mar 13
0
[PATCH 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
On Mon, Mar 13, 2023 at 09:34:50PM +0000, Parav Pandit wrote: > > > > From: Michael S. Tsirkin <mst at redhat.com> > > Sent: Monday, March 13, 2023 5:24 PM > > I mean if this is claiming to fix a performance regression it should have a Fixes: > > tag with the commit that introduced the regression. > > The fixes tag should be, > > Fixes:
2023 Mar 14
0
[PATCH 1/2] vdpa/mlx5: Make VIRTIO_NET_F_MRG_RXBUF off by default
On 3/13/2023 8:47 PM, Parav Pandit wrote: >> From: Michael S. Tsirkin <mst at redhat.com> >> Sent: Monday, March 13, 2023 11:38 PM >> >> On Tue, Mar 14, 2023 at 02:05:50AM +0000, Parav Pandit wrote: >>>> From: Si-Wei Liu <si-wei.liu at oracle.com> >>>> Sent: Monday, March 13, 2023 6:19 PM >>>> Actually there's no such
2010 Mar 30
1
[PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers
...f (features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) + net->dev.acked_features |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY); + if (features & (1 << VIRTIO_RING_F_INDIRECT_DESC)) + net->dev.acked_features |= (1 << VIRTIO_RING_F_INDIRECT_DESC); + if (features & (1 << VIRTIO_NET_F_MRG_RXBUF)) { + net->dev.acked_features |= (1 << VIRTIO_NET_F_MRG_RXBUF); + vnet_hdr_sz = sizeof(struct virtio_net_hdr_mrg_rxbuf); + } +#ifdef TUNSETVNETHDRSZ + if (ioctl(vhost_net_get_fd(net->vc), TUNSETVNETHDRSZ, &vnet_hdr_sz) < 0) + perror("TUNSETVNETHDRSZ"); +#endif /* TUN...
2010 Mar 30
1
[PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers
...f (features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY)) + net->dev.acked_features |= (1 << VIRTIO_F_NOTIFY_ON_EMPTY); + if (features & (1 << VIRTIO_RING_F_INDIRECT_DESC)) + net->dev.acked_features |= (1 << VIRTIO_RING_F_INDIRECT_DESC); + if (features & (1 << VIRTIO_NET_F_MRG_RXBUF)) { + net->dev.acked_features |= (1 << VIRTIO_NET_F_MRG_RXBUF); + vnet_hdr_sz = sizeof(struct virtio_net_hdr_mrg_rxbuf); + } +#ifdef TUNSETVNETHDRSZ + if (ioctl(vhost_net_get_fd(net->vc), TUNSETVNETHDRSZ, &vnet_hdr_sz) < 0) + perror("TUNSETVNETHDRSZ"); +#endif /* TUN...
2014 Nov 27
1
[PATCH v6 33/46] vhost/net: larger header for virtio 1.0
.../vhost/net.c b/drivers/vhost/net.c index cae22f9..1ac58d0 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -1027,7 +1027,8 @@ static int vhost_net_set_features(struct vhost_net *n, u64 features) size_t vhost_hlen, sock_hlen, hdr_len; int i; - hdr_len = (features & (1 << VIRTIO_NET_F_MRG_RXBUF)) ? + hdr_len = (features & ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | + (1ULL << VIRTIO_F_VERSION_1))) ? sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr); if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) { -- MST
2014 Nov 27
1
[PATCH v6 33/46] vhost/net: larger header for virtio 1.0
.../vhost/net.c b/drivers/vhost/net.c index cae22f9..1ac58d0 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -1027,7 +1027,8 @@ static int vhost_net_set_features(struct vhost_net *n, u64 features) size_t vhost_hlen, sock_hlen, hdr_len; int i; - hdr_len = (features & (1 << VIRTIO_NET_F_MRG_RXBUF)) ? + hdr_len = (features & ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | + (1ULL << VIRTIO_F_VERSION_1))) ? sizeof(struct virtio_net_hdr_mrg_rxbuf) : sizeof(struct virtio_net_hdr); if (features & (1 << VHOST_NET_F_VIRTIO_NET_HDR)) { -- MST
2010 May 17
2
[PATCH] [resend] fix non-mergeable buffers packet too large error handling
.../drivers/vhost/net.c b/drivers/vhost/net.c index 309c570..c346304 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -361,13 +361,21 @@ static void handle_rx(struct vhost_net *net) break; } /* TODO: Should check and handle checksum. */ - if (vhost_has_feature(&net->dev, VIRTIO_NET_F_MRG_RXBUF) && - memcpy_toiovecend(vq->hdr, (unsigned char *)&headcount, - offsetof(typeof(hdr), num_buffers), - sizeof hdr.num_buffers)) { - vq_err(vq, "Failed num_buffers write"); + if (vhost_has_feature(&net->dev, VIRTIO_NET_F_MRG_RXBUF)) { + if (...
2010 May 17
2
[PATCH] [resend] fix non-mergeable buffers packet too large error handling
.../drivers/vhost/net.c b/drivers/vhost/net.c index 309c570..c346304 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -361,13 +361,21 @@ static void handle_rx(struct vhost_net *net) break; } /* TODO: Should check and handle checksum. */ - if (vhost_has_feature(&net->dev, VIRTIO_NET_F_MRG_RXBUF) && - memcpy_toiovecend(vq->hdr, (unsigned char *)&headcount, - offsetof(typeof(hdr), num_buffers), - sizeof hdr.num_buffers)) { - vq_err(vq, "Failed num_buffers write"); + if (vhost_has_feature(&net->dev, VIRTIO_NET_F_MRG_RXBUF)) { + if (...
2016 Nov 04
3
[PATCH] virtio-net: drop legacy features in virtio 1 mode
...fine VIRTNET_FEATURES \ + VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, \ + VIRTIO_NET_F_MAC, \ + VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, \ + VIRTIO_NET_F_HOST_ECN, VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, \ + VIRTIO_NET_F_GUEST_ECN, VIRTIO_NET_F_GUEST_UFO, \ + VIRTIO_NET_F_MRG_RXBUF, VIRTIO_NET_F_STATUS, VIRTIO_NET_F_CTRL_VQ, \ + VIRTIO_NET_F_CTRL_RX, VIRTIO_NET_F_CTRL_VLAN, \ + VIRTIO_NET_F_GUEST_ANNOUNCE, VIRTIO_NET_F_MQ, \ + VIRTIO_NET_F_CTRL_MAC_ADDR, \ + VIRTIO_NET_F_MTU + static unsigned int features[] = { - VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, - VIRTIO_NET_F_GSO...
2016 Nov 04
3
[PATCH] virtio-net: drop legacy features in virtio 1 mode
...fine VIRTNET_FEATURES \ + VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, \ + VIRTIO_NET_F_MAC, \ + VIRTIO_NET_F_HOST_TSO4, VIRTIO_NET_F_HOST_UFO, VIRTIO_NET_F_HOST_TSO6, \ + VIRTIO_NET_F_HOST_ECN, VIRTIO_NET_F_GUEST_TSO4, VIRTIO_NET_F_GUEST_TSO6, \ + VIRTIO_NET_F_GUEST_ECN, VIRTIO_NET_F_GUEST_UFO, \ + VIRTIO_NET_F_MRG_RXBUF, VIRTIO_NET_F_STATUS, VIRTIO_NET_F_CTRL_VQ, \ + VIRTIO_NET_F_CTRL_RX, VIRTIO_NET_F_CTRL_VLAN, \ + VIRTIO_NET_F_GUEST_ANNOUNCE, VIRTIO_NET_F_MQ, \ + VIRTIO_NET_F_CTRL_MAC_ADDR, \ + VIRTIO_NET_F_MTU + static unsigned int features[] = { - VIRTIO_NET_F_CSUM, VIRTIO_NET_F_GUEST_CSUM, - VIRTIO_NET_F_GSO...