Skip to content

Commit 111fc9f

Browse files
fengidrikuba-moo
authored andcommitted
virtio_net: disable premapped mode by default
Now, the premapped mode encounters some problem. http://lore.kernel.org/all/[email protected] So we disable the premapped mode by default. We can re-enable it in the future. Fixes: f9dac92 ("virtio_ring: enable premapped mode whatever use_dma_api") Reported-by: "Si-Wei Liu" <[email protected]> Closes: http://lore.kernel.org/all/[email protected] Signed-off-by: Xuan Zhuo <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Tested-by: Takero Funaki <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 38eef11 commit 111fc9f

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

drivers/net/virtio_net.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -977,22 +977,6 @@ static void *virtnet_rq_alloc(struct receive_queue *rq, u32 size, gfp_t gfp)
977977
return buf;
978978
}
979979

980-
static void virtnet_rq_set_premapped(struct virtnet_info *vi)
981-
{
982-
int i;
983-
984-
/* disable for big mode */
985-
if (!vi->mergeable_rx_bufs && vi->big_packets)
986-
return;
987-
988-
for (i = 0; i < vi->max_queue_pairs; i++) {
989-
if (virtqueue_set_dma_premapped(vi->rq[i].vq))
990-
continue;
991-
992-
vi->rq[i].do_dma = true;
993-
}
994-
}
995-
996980
static void virtnet_rq_unmap_free_buf(struct virtqueue *vq, void *buf)
997981
{
998982
struct virtnet_info *vi = vq->vdev->priv;
@@ -6105,8 +6089,6 @@ static int init_vqs(struct virtnet_info *vi)
61056089
if (ret)
61066090
goto err_free;
61076091

6108-
virtnet_rq_set_premapped(vi);
6109-
61106092
cpus_read_lock();
61116093
virtnet_set_affinity(vi);
61126094
cpus_read_unlock();

0 commit comments

Comments
 (0)