From: "Michael S. Tsirkin" <mst@redhat.com>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: "Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Jason Wang" <jasowang@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
virtualization@lists.linux.dev,
"Si-Wei Liu" <si-wei.liu@oracle.com>,
"Darren Kenny" <darren.kenny@oracle.com>,
"Boris Ostrovsky" <boris.ostrovsky@oracle.com>,
"Eugenio Pérez" <eperezma@redhat.com>
Subject: [RFC PATCH v2 6/7] Revert "virtio_net: big mode skip the unmap check"
Date: Fri, 6 Sep 2024 05:52:40 -0400 [thread overview]
Message-ID: <3db7fcc631c2f1dd6a62e5d90fecf3e5c32ca4e2.1725616135.git.mst@redhat.com> (raw)
In-Reply-To: <cover.1725616135.git.mst@redhat.com>
This reverts commit a377ae542d8d0a20a3173da3bbba72e045bea7a9.
leads to crashes with no ACCESS_PLATFORM when
sysctl net.core.high_order_alloc_disable=1
Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Reported-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/net/virtio_net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 0a2ec9570521..6f3c39dc6f76 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -983,7 +983,7 @@ static void virtnet_rq_unmap_free_buf(struct virtqueue *vq, void *buf)
rq = &vi->rq[i];
- if (!vi->big_packets || vi->mergeable_rx_bufs)
+ if (rq->do_dma)
virtnet_rq_unmap(rq, buf, 0);
virtnet_rq_free_buf(vi, rq, buf);
@@ -2367,7 +2367,7 @@ static int virtnet_receive(struct receive_queue *rq, int budget,
}
} else {
while (packets < budget &&
- (buf = virtqueue_get_buf(rq->vq, &len)) != NULL) {
+ (buf = virtnet_rq_get_buf(rq, &len, NULL)) != NULL) {
receive_buf(vi, rq, buf, len, NULL, xdp_xmit, &stats);
packets++;
}
--
MST
next prev parent reply other threads:[~2024-09-06 9:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 9:52 [RFC PATCH v2 0/7] Revert "virtio_net: rx enable premapped mode by default" Michael S. Tsirkin
2024-09-06 9:52 ` [RFC PATCH v2 1/7] Revert "virtio_net: xsk: rx: support recv merge mode" Michael S. Tsirkin
2024-09-06 9:52 ` [RFC PATCH v2 2/7] Revert "virtio_net: xsk: rx: support recv small mode" Michael S. Tsirkin
2024-09-06 9:52 ` [RFC PATCH v2 3/7] Revert "virtio_net: xsk: rx: support fill with xsk buffer" Michael S. Tsirkin
2024-09-06 9:52 ` [RFC PATCH v2 4/7] Revert "virtio_net: xsk: bind/unbind xsk for rx" Michael S. Tsirkin
2024-09-06 9:52 ` [RFC PATCH v2 5/7] Revert "virtio_net: rx remove premapped failover code" Michael S. Tsirkin
2024-09-06 10:02 ` Xuan Zhuo
2024-09-06 10:12 ` Michael S. Tsirkin
2024-09-06 9:52 ` Michael S. Tsirkin [this message]
2024-09-06 9:52 ` [RFC PATCH v2 7/7] Revert "virtio_ring: enable premapped mode whatever use_dma_api" Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3db7fcc631c2f1dd6a62e5d90fecf3e5c32ca4e2.1725616135.git.mst@redhat.com \
--to=mst@redhat.com \
--cc=boris.ostrovsky@oracle.com \
--cc=darren.kenny@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=si-wei.liu@oracle.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®