OSDN Git Service

virtio_net: use dev_kfree_skb for small buffer XDP receive
authorJohn Fastabend <john.fastabend@gmail.com>
Thu, 26 Jan 2017 02:22:48 +0000 (18:22 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Jan 2017 03:48:17 +0000 (22:48 -0500)
commitb68df015609eac67f045c155cb3195e5a1061d66
tree6591853f9de1cc61b8ebdd0cd705da4a3fa440f9
parent7480888f27e080ad5addb51456b2e03514721c3a
virtio_net: use dev_kfree_skb for small buffer XDP receive

In the small buffer case during driver unload we currently use
put_page instead of dev_kfree_skb. Resolve this by adding a check
for virtnet mode when checking XDP queue type. Also name the
function so that the code reads correctly to match the additional
check.

Fixes: bb91accf2733 ("virtio-net: XDP support for small buffers")
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c