Skip to content

Commit

Permalink
virtio-net: correctly xmit linearized page on XDP_TX
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
Acked-by: John Fastabend <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jasowang authored and davem330 committed Dec 23, 2016
1 parent 73b62bd commit 275be06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
if (unlikely(hdr->hdr.gso_type || hdr->hdr.flags))
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) {
case XDP_PASS:
if (unlikely(xdp_page != page))
Expand Down

0 comments on commit 275be06

Please sign in to comment.