search for: virtio_f_notify_on_empty

Displaying 20 results from an estimated 220 matches for "virtio_f_notify_on_empty".

2009 May 29
0
[PATCH 4/4] lguest: don't force VIRTIO_F_NOTIFY_ON_EMPTY
VIRTIO_F_NOTIFY_ON_EMPTY indicates to the Guest that we will hit them with an interrupt every time the xmit queue is emptied. Because it results in lots of tx interrupts, modern Guests probably don't want it, so let's only force it when they accept the option. Signed-off-by: Rusty Russell <rusty at rustcorp.co...
2009 Sep 21
0
[PATCH 5/5] lguest: don't force VIRTIO_F_NOTIFY_ON_EMPTY
VIRTIO_F_NOTIFY_ON_EMPTY indicates to the Guest that we will hit them with an interrupt every time the xmit queue is emptied. Because it results in lots of tx interrupts, modern Guests probably don't want it, so let's only force it when they accept the option. Signed-off-by: Rusty Russell <rusty at rustcorp.co...
2009 May 29
0
[PATCH 4/4] lguest: don't force VIRTIO_F_NOTIFY_ON_EMPTY
VIRTIO_F_NOTIFY_ON_EMPTY indicates to the Guest that we will hit them with an interrupt every time the xmit queue is emptied. Because it results in lots of tx interrupts, modern Guests probably don't want it, so let's only force it when they accept the option. Signed-off-by: Rusty Russell <rusty at rustcorp.co...
2009 Sep 21
0
[PATCH 5/5] lguest: don't force VIRTIO_F_NOTIFY_ON_EMPTY
VIRTIO_F_NOTIFY_ON_EMPTY indicates to the Guest that we will hit them with an interrupt every time the xmit queue is emptied. Because it results in lots of tx interrupts, modern Guests probably don't want it, so let's only force it when they accept the option. Signed-off-by: Rusty Russell <rusty at rustcorp.co...
2008 May 30
2
[PATCH 1/3] virtio: VIRTIO_F_NOTIFY_ON_EMPTY to force callback on empty
...linux/virtio_config.h Tue May 27 15:53:41 2008 +1000 @@ -14,6 +14,10 @@ #define VIRTIO_CONFIG_S_DRIVER_OK 4 /* We've given up on this device. */ #define VIRTIO_CONFIG_S_FAILED 0x80 + +/* Do we get callbacks when the ring is completely used, even if we've + * suppressed them? */ +#define VIRTIO_F_NOTIFY_ON_EMPTY 24 #ifdef __KERNEL__ #include <linux/virtio.h>
2008 May 30
2
[PATCH 1/3] virtio: VIRTIO_F_NOTIFY_ON_EMPTY to force callback on empty
...linux/virtio_config.h Tue May 27 15:53:41 2008 +1000 @@ -14,6 +14,10 @@ #define VIRTIO_CONFIG_S_DRIVER_OK 4 /* We've given up on this device. */ #define VIRTIO_CONFIG_S_FAILED 0x80 + +/* Do we get callbacks when the ring is completely used, even if we've + * suppressed them? */ +#define VIRTIO_F_NOTIFY_ON_EMPTY 24 #ifdef __KERNEL__ #include <linux/virtio.h>
2010 Mar 30
1
[PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers
...t;net/ethernet.h> #include <net/if.h> @@ -38,15 +39,6 @@ unsigned vhost_net_get_features(struct v return features; } -void vhost_net_ack_features(struct vhost_net *net, unsigned features) -{ - net->dev.acked_features = net->dev.backend_features; - if (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); -} - static int vhost_net_get_fd(VLANClientState *backend) { switch (backend->in...
2010 Mar 30
1
[PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers
...t;net/ethernet.h> #include <net/if.h> @@ -38,15 +39,6 @@ unsigned vhost_net_get_features(struct v return features; } -void vhost_net_ack_features(struct vhost_net *net, unsigned features) -{ - net->dev.acked_features = net->dev.backend_features; - if (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); -} - static int vhost_net_get_fd(VLANClientState *backend) { switch (backend->in...
2009 May 29
1
[PATCH 3/4] virtio_net: don't free buffers in xmit ring
...art of the xmit path). The original code used a 1/10 second timer attached to xmit_free(), reset on every xmit. Before we orphaned skbs on xmit, the transmitting userspace could block with a full socket until the timer fired, the skb destructor was called, and they were re-woken. So we added the VIRTIO_F_NOTIFY_ON_EMPTY feature: supporting devices send an interrupt (even if normally suppressed) on an empty xmit ring which makes us schedule xmit_tasklet(). This was a benchmark win. Unfortunately, VIRTIO_F_NOTIFY_ON_EMPTY makes quite a lot of work: a host which is faster than the guest will fire the interrupt ever...
2009 May 29
1
[PATCH 3/4] virtio_net: don't free buffers in xmit ring
...art of the xmit path). The original code used a 1/10 second timer attached to xmit_free(), reset on every xmit. Before we orphaned skbs on xmit, the transmitting userspace could block with a full socket until the timer fired, the skb destructor was called, and they were re-woken. So we added the VIRTIO_F_NOTIFY_ON_EMPTY feature: supporting devices send an interrupt (even if normally suppressed) on an empty xmit ring which makes us schedule xmit_tasklet(). This was a benchmark win. Unfortunately, VIRTIO_F_NOTIFY_ON_EMPTY makes quite a lot of work: a host which is faster than the guest will fire the interrupt ever...
2014 Dec 11
0
[PATCH RFC v6 03/20] virtio: feature bit manipulation helpers
...8 +743,8 @@ static int virtio_ccw_device_init(VirtioCcwDevice *dev, VirtIODevice *vdev) dev->host_features[0] = virtio_bus_get_vdev_features(&dev->bus, dev->host_features[0]); - dev->host_features[0] |= 0x1 << VIRTIO_F_NOTIFY_ON_EMPTY; - dev->host_features[0] |= 0x1 << VIRTIO_F_BAD_FEATURE; + virtio_add_feature(&dev->host_features[0], VIRTIO_F_NOTIFY_ON_EMPTY); + virtio_add_feature(&dev->host_features[0], VIRTIO_F_BAD_FEATURE); css_generate_sch_crws(sch->cssid, sch->ssid, sch->schi...
2014 Dec 11
0
[PATCH RFC v6 03/20] virtio: feature bit manipulation helpers
...8 +743,8 @@ static int virtio_ccw_device_init(VirtioCcwDevice *dev, VirtIODevice *vdev) dev->host_features[0] = virtio_bus_get_vdev_features(&dev->bus, dev->host_features[0]); - dev->host_features[0] |= 0x1 << VIRTIO_F_NOTIFY_ON_EMPTY; - dev->host_features[0] |= 0x1 << VIRTIO_F_BAD_FEATURE; + virtio_add_feature(&dev->host_features[0], VIRTIO_F_NOTIFY_ON_EMPTY); + virtio_add_feature(&dev->host_features[0], VIRTIO_F_BAD_FEATURE); css_generate_sch_crws(sch->cssid, sch->ssid, sch->schi...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...RX_EXTRA) | BIT(VIRTIO_NET_F_GUEST_ANNOUNCE) | \ - BIT(VIRTIO_NET_F_MQ) | BIT(VIRTIO_NET_F_CTRL_MAC_ADDR) | BIT(VIRTIO_NET_F_HASH_REPORT) | \ - BIT(VIRTIO_NET_F_RSS) | BIT(VIRTIO_NET_F_RSC_EXT) | BIT(VIRTIO_NET_F_STANDBY) | \ - BIT(VIRTIO_NET_F_SPEED_DUPLEX) | BIT(VIRTIO_F_NOTIFY_ON_EMPTY) | \ - BIT(VIRTIO_F_ANY_LAYOUT) | BIT(VIRTIO_F_VERSION_1) | BIT(VIRTIO_F_ACCESS_PLATFORM) | \ - BIT(VIRTIO_F_RING_PACKED) | BIT(VIRTIO_F_ORDER_PLATFORM) | BIT(VIRTIO_F_SR_IOV)) + (BIT_ULL(VIRTIO_NET_F_CSUM) | BIT_ULL(VIRTIO_NET_F_GUEST_CSUM) |...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
...RX_EXTRA) | BIT(VIRTIO_NET_F_GUEST_ANNOUNCE) | \ - BIT(VIRTIO_NET_F_MQ) | BIT(VIRTIO_NET_F_CTRL_MAC_ADDR) | BIT(VIRTIO_NET_F_HASH_REPORT) | \ - BIT(VIRTIO_NET_F_RSS) | BIT(VIRTIO_NET_F_RSC_EXT) | BIT(VIRTIO_NET_F_STANDBY) | \ - BIT(VIRTIO_NET_F_SPEED_DUPLEX) | BIT(VIRTIO_F_NOTIFY_ON_EMPTY) | \ - BIT(VIRTIO_F_ANY_LAYOUT) | BIT(VIRTIO_F_VERSION_1) | BIT(VIRTIO_F_ACCESS_PLATFORM) | \ - BIT(VIRTIO_F_RING_PACKED) | BIT(VIRTIO_F_ORDER_PLATFORM) | BIT(VIRTIO_F_SR_IOV)) + (BIT_ULL(VIRTIO_NET_F_CSUM) | BIT_ULL(VIRTIO_NET_F_GUEST_CSUM) |...
2014 Dec 11
0
[PATCH RFC v6 04/20] virtio: add feature checking helpers
..._event(&vring->vr) = vring->vr.avail->idx; } else { vring->vr.used->flags &= ~VRING_USED_F_NO_NOTIFY; @@ -133,12 +133,12 @@ bool vring_should_notify(VirtIODevice *vdev, Vring *vring) * interrupts. */ smp_mb(); - if ((vdev->guest_features & VIRTIO_F_NOTIFY_ON_EMPTY) && + if (virtio_has_feature(vdev, VIRTIO_F_NOTIFY_ON_EMPTY) && unlikely(vring->vr.avail->idx == vring->last_avail_idx)) { return true; } - if (!(vdev->guest_features & VIRTIO_RING_F_EVENT_IDX)) { + if (!virtio_has_feature(vdev, VIRT...
2014 Dec 11
0
[PATCH RFC v6 04/20] virtio: add feature checking helpers
..._event(&vring->vr) = vring->vr.avail->idx; } else { vring->vr.used->flags &= ~VRING_USED_F_NO_NOTIFY; @@ -133,12 +133,12 @@ bool vring_should_notify(VirtIODevice *vdev, Vring *vring) * interrupts. */ smp_mb(); - if ((vdev->guest_features & VIRTIO_F_NOTIFY_ON_EMPTY) && + if (virtio_has_feature(vdev, VIRTIO_F_NOTIFY_ON_EMPTY) && unlikely(vring->vr.avail->idx == vring->last_avail_idx)) { return true; } - if (!(vdev->guest_features & VIRTIO_RING_F_EVENT_IDX)) { + if (!virtio_has_feature(vdev, VIRT...
2013 Jul 08
2
[PATCH] virtio-spec: add field for scsi command size
...by: Rusty Russell <rusty at rustcorp.com.au> diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h index b7cda39..4b5da48 100644 --- a/include/uapi/linux/virtio_config.h +++ b/include/uapi/linux/virtio_config.h @@ -51,4 +51,7 @@ * suppressed them? */ #define VIRTIO_F_NOTIFY_ON_EMPTY 24 +/* Can the device handle any descriptor layout? */ +#define VIRTIO_F_ANY_LAYOUT 30 + #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */
2013 Jul 08
2
[PATCH] virtio-spec: add field for scsi command size
...by: Rusty Russell <rusty at rustcorp.com.au> diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virtio_config.h index b7cda39..4b5da48 100644 --- a/include/uapi/linux/virtio_config.h +++ b/include/uapi/linux/virtio_config.h @@ -51,4 +51,7 @@ * suppressed them? */ #define VIRTIO_F_NOTIFY_ON_EMPTY 24 +/* Can the device handle any descriptor layout? */ +#define VIRTIO_F_ANY_LAYOUT 30 + #endif /* _UAPI_LINUX_VIRTIO_CONFIG_H */
2014 Oct 07
1
[PATCH RFC 03/11] virtio: support more feature bits
...efault feature bits that are offered by the host. */ + for (i = 0; i < ARRAY_SIZE(dev->host_features); i++) { + dev->host_features[i] = + virtio_bus_get_vdev_features(&dev->bus, i, dev->host_features[i]); + } dev->host_features[0] |= 0x1 << VIRTIO_F_NOTIFY_ON_EMPTY; dev->host_features[0] |= 0x1 << VIRTIO_F_BAD_FEATURE; @@ -1059,12 +1062,12 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t vector) } } -static unsigned virtio_ccw_get_features(DeviceState *d) +static unsigned virtio_ccw_get_features(DeviceState *d, unsigned int inde...
2014 Oct 07
1
[PATCH RFC 03/11] virtio: support more feature bits
...efault feature bits that are offered by the host. */ + for (i = 0; i < ARRAY_SIZE(dev->host_features); i++) { + dev->host_features[i] = + virtio_bus_get_vdev_features(&dev->bus, i, dev->host_features[i]); + } dev->host_features[0] |= 0x1 << VIRTIO_F_NOTIFY_ON_EMPTY; dev->host_features[0] |= 0x1 << VIRTIO_F_BAD_FEATURE; @@ -1059,12 +1062,12 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t vector) } } -static unsigned virtio_ccw_get_features(DeviceState *d) +static unsigned virtio_ccw_get_features(DeviceState *d, unsigned int inde...