search for: is_small_vring

Displaying 5 results from an estimated 5 matches for "is_small_vring".

2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
...virtio_net.c index 8d8038538fc..b4441d63890 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -103,6 +103,8 @@ struct virtnet_rq_stats { #define VIRTNET_SQ_STAT(m) offsetof(struct virtnet_sq_stats, m) #define VIRTNET_RQ_STAT(m) offsetof(struct virtnet_rq_stats, m) +#define IS_SMALL_VRING(size) ((size) < MAX_SKB_FRAGS + 2) + static const struct virtnet_stat_desc virtnet_sq_stats_desc[] = { { "packets", VIRTNET_SQ_STAT(packets) }, { "bytes", VIRTNET_SQ_STAT(bytes) }, @@ -268,6 +270,12 @@ struct virtnet_info { /* Does the affinity hint is set for virtqu...
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
...41d63890 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -103,6 +103,8 @@ struct virtnet_rq_stats { > #define VIRTNET_SQ_STAT(m) offsetof(struct virtnet_sq_stats, m) > #define VIRTNET_RQ_STAT(m) offsetof(struct virtnet_rq_stats, m) > > +#define IS_SMALL_VRING(size) ((size) < MAX_SKB_FRAGS + 2) > + > static const struct virtnet_stat_desc virtnet_sq_stats_desc[] = { > { "packets", VIRTNET_SQ_STAT(packets) }, > { "bytes", VIRTNET_SQ_STAT(bytes) }, > @@ -268,6 +270,12 @@ struct virtnet_info { > /* Does the a...
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
...ct virtnet_info *vi) > > +{ > > + u32 i; > > + > > + /* If a transmit/receive virtqueue is small, > > + * we cannot handle fragmented packets. > > + */ > > + for (i = 0; i < vi->max_queue_pairs; i++) { > > + if (IS_SMALL_VRING(virtqueue_get_vring_size(vi->sq[i].vq)) || > > + IS_SMALL_VRING(virtqueue_get_vring_size(vi->rq[i].vq))) > > + return true; > > + } > > + > > + return false; > > +} > > I see even if only some rings are too...
2023 Apr 30
5
[RFC PATCH net 0/3] virtio-net: allow usage of small vrings
At the moment, if a virtio network device uses vrings with less than MAX_SKB_FRAGS + 2 entries, the device won't be functional. The following condition vq->num_free >= 2 + MAX_SKB_FRAGS will always evaluate to false, leading to TX timeouts. This patchset attempts this fix this bug, and to allow small rings down to 4 entries. The first patch introduces a new mechanism in virtio core -
2023 May 01
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
...gt; > > + u32 i; > > > + > > > + /* If a transmit/receive virtqueue is small, > > > + * we cannot handle fragmented packets. > > > + */ > > > + for (i = 0; i < vi->max_queue_pairs; i++) { > > > + if (IS_SMALL_VRING(virtqueue_get_vring_size(vi->sq[i].vq)) || > > > + IS_SMALL_VRING(virtqueue_get_vring_size(vi->rq[i].vq))) > > > + return true; > > > + } > > > + > > > + return false; > > > +} > > > &g...