Commit a377ae54 authored by Xuan Zhuo's avatar Xuan Zhuo Committed by Jakub Kicinski

virtio_net: big mode skip the unmap check

The virtio-net big mode did not enable premapped mode,
so we did not need to check the unmap. And the subsequent
commit will remove the failover code for failing enable
premapped for merge and small mode. So we need to remove
the checking do_dma code in the big mode path.
Signed-off-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20240511031404.30903-3-xuanzhuo@linux.alibaba.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f9dac92b
...@@ -963,7 +963,7 @@ static void virtnet_rq_unmap_free_buf(struct virtqueue *vq, void *buf) ...@@ -963,7 +963,7 @@ static void virtnet_rq_unmap_free_buf(struct virtqueue *vq, void *buf)
rq = &vi->rq[i]; rq = &vi->rq[i];
if (rq->do_dma) if (!vi->big_packets || vi->mergeable_rx_bufs)
virtnet_rq_unmap(rq, buf, 0); virtnet_rq_unmap(rq, buf, 0);
virtnet_rq_free_buf(vi, rq, buf); virtnet_rq_free_buf(vi, rq, buf);
...@@ -2277,7 +2277,7 @@ static int virtnet_receive(struct receive_queue *rq, int budget, ...@@ -2277,7 +2277,7 @@ static int virtnet_receive(struct receive_queue *rq, int budget,
} }
} else { } else {
while (packets < budget && while (packets < budget &&
(buf = virtnet_rq_get_buf(rq, &len, NULL)) != NULL) { (buf = virtqueue_get_buf(rq->vq, &len)) != NULL) {
receive_buf(vi, rq, buf, len, NULL, xdp_xmit, &stats); receive_buf(vi, rq, buf, len, NULL, xdp_xmit, &stats);
packets++; packets++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment