Displaying 3 results from an estimated 3 matches for "virtnet_block_svring_unsupported".
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
...+ 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;
+}
+
+/* Function returns the number of features it blocked */
+static int virtnet_block_svring_unsupported(struct virtio_device *vdev)
+{
+ int cnt = 0;
+ /* Block Virtio guest GRO features.
+ * Asking Linux to allocate 64k of continuous memory is too much,
+ * specially when the system is stressed.
+ *
+ * If VIRTIO_NET_F_MRG_RXBUF is negotiated we can allcoate smaller
+ * buffers, but since the r...
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
...ly some rings are too small we force everything to use
small ones. Wouldn't it be better to just disable small ones in this
case? That would not need a reset.
> +
> +/* Function returns the number of features it blocked */
We don't need the # though. Make it bool?
> +static int virtnet_block_svring_unsupported(struct virtio_device *vdev)
> +{
> + int cnt = 0;
> + /* Block Virtio guest GRO features.
> + * Asking Linux to allocate 64k of continuous memory is too much,
> + * specially when the system is stressed.
> + *
> + * If VIRTIO_NET_F_MRG_RXBUF is negotiated we can allcoate sm...
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 -