Displaying 3 results from an estimated 3 matches for "virtnet_fixup_svring".
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
...t++;
+ }
+ if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_USO4)) {
+ virtio_block_feature(vdev, VIRTIO_NET_F_GUEST_USO4);
+ cnt++;
+ }
+ if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_USO6)) {
+ virtio_block_feature(vdev, VIRTIO_NET_F_GUEST_USO6);
+ cnt++;
+ }
+
+ return cnt;
+}
+
+static int virtnet_fixup_svring(struct virtnet_info *vi)
+{
+ int i;
+ /* Do we use small vrings?
+ * If not, nothing we need to do.
+ */
+ vi->svring = virtnet_uses_svring(vi);
+ if (!vi->svring)
+ return 0;
+
+ /* Some features can't be used with small vrings.
+ * Block those and return an error.
+ * This will tr...
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
...SO4)) {
> + virtio_block_feature(vdev, VIRTIO_NET_F_GUEST_USO4);
> + cnt++;
> + }
> + if (virtio_has_feature(vdev, VIRTIO_NET_F_GUEST_USO6)) {
> + virtio_block_feature(vdev, VIRTIO_NET_F_GUEST_USO6);
> + cnt++;
> + }
> +
> + return cnt;
> +}
> +
> +static int virtnet_fixup_svring(struct virtnet_info *vi)
> +{
> + int i;
> + /* Do we use small vrings?
> + * If not, nothing we need to do.
> + */
> + vi->svring = virtnet_uses_svring(vi);
> + if (!vi->svring)
> + return 0;
> +
> + /* Some features can't be used with small vrings.
>...
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 -