tun: return NET_XMIT_DROP for dropped packets

After commit 5d09710925
("tun: only queue packets on device"), NETDEV_TX_OK was returned for
dropped packets. This will confuse pktgen since dropped packets were
counted as sent ones.

Fixing this by returning NET_XMIT_DROP to let pktgen count it as error
packet.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jason Wang 2014-11-18 13:20:41 +08:00 committed by David S. Miller
parent e3e3217029
commit baeababb5b
1 changed files with 1 additions and 1 deletions

View File

@ -819,7 +819,7 @@ drop:
skb_tx_error(skb);
kfree_skb(skb);
rcu_read_unlock();
return NETDEV_TX_OK;
return NET_XMIT_DROP;
}
static void tun_net_mclist(struct net_device *dev)