Commit 275be061 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller

virtio-net: correctly xmit linearized page on XDP_TX

After we linearize page, we should xmit this page instead of the page
of first buffer which may lead unexpected result. With this patch, we
can see correct packet during XDP_TX.

Cc: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Acked-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 73b62bd0
...@@ -572,7 +572,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, ...@@ -572,7 +572,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
if (unlikely(hdr->hdr.gso_type || hdr->hdr.flags)) if (unlikely(hdr->hdr.gso_type || hdr->hdr.flags))
goto err_xdp; goto err_xdp;
act = do_xdp_prog(vi, rq, xdp_prog, page, offset, len); act = do_xdp_prog(vi, rq, xdp_prog, xdp_page, offset, len);
switch (act) { switch (act) {
case XDP_PASS: case XDP_PASS:
if (unlikely(xdp_page != page)) if (unlikely(xdp_page != page))
......
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