virtio-net: add packet len average only when needed during XDP
authorJason Wang <jasowang@redhat.com>
Tue, 19 Sep 2017 09:42:42 +0000 (17:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Sep 2017 21:27:52 +0000 (14:27 -0700)
commit312403453532b209879aa7faeff296bd3dea78af
tree0041e117825534954af173c9906ee2760bb984fc
parent9457642a405fd68d5ce90f5c432e462277fb666e
virtio-net: add packet len average only when needed during XDP

There's no need to add packet len average in the case of XDP_PASS
since it will be done soon after skb is created.

Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c