]> git.baikalelectronics.ru Git - kernel.git/commit
tun: return NET_XMIT_DROP for dropped packets
authorJason Wang <jasowang@redhat.com>
Tue, 18 Nov 2014 05:20:41 +0000 (13:20 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Nov 2014 19:43:47 +0000 (14:43 -0500)
commitbbb5f214d6b5ec922a1fbff044b699c9aa2587d7
treed6d49a06b241812b5f1955bc4ef417d6aba3bb8a
parent3e40e2853bb082b0dcf68c8a907bcff5d83d4c1f
tun: return NET_XMIT_DROP for dropped packets

After commit 384a0d2ce20589410d3d84f4d46b3175cb7e7091
("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>
drivers/net/tun.c