@@ -6107,6 +6107,17 @@ static int virtnet_alloc_queues(struct virtnet_info *vi)
return -ENOMEM;
}
+static void virtnet_rq_set_premapped(struct virtnet_info *vi)
+{
+ int i;
+
+ for (i = 0; i < vi->max_queue_pairs; i++) {
+ /* error should never happen */
+ BUG_ON(virtqueue_set_dma_premapped(vi->rq[i].vq));
+ vi->rq[i].do_dma = true;
+ }
+}
+
static int init_vqs(struct virtnet_info *vi)
{
int ret;
@@ -6120,6 +6131,10 @@ static int init_vqs(struct virtnet_info *vi)
if (ret)
goto err_free;
+ /* disable for big mode */
+ if (!vi->big_packets || vi->mergeable_rx_bufs)
+ virtnet_rq_set_premapped(vi);
+
cpus_read_lock();
virtnet_set_affinity(vi);
cpus_read_unlock();