diff options
author | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> | 2017-02-11 04:49:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-12 05:26:57 +0300 |
commit | 1bf960502e4c94425c3a3a985200834fb59839c6 (patch) | |
tree | 5ed30ec961fa8e1333a3818bacc5b0607c20a210 /drivers/net/ethernet/ti | |
parent | 98eb253cbde7e860fad83fa759058269ca69916d (diff) | |
download | linux-1bf960502e4c94425c3a3a985200834fb59839c6.tar.xz |
net: ethernet: ti: cpsw: return NET_XMIT_DROP if skb_padto failed
If skb_padto failed the skb has been dropped already, so it was
consumed, but it doesn't mean it was sent, thus no need to update
queue tx time, etc. So, return NET_XMIT_DROP as more appropriate.
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 4d1c0c3042c7..503fa8af37d7 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1604,7 +1604,7 @@ static netdev_tx_t cpsw_ndo_start_xmit(struct sk_buff *skb, if (skb_padto(skb, CPSW_MIN_PACKET_SIZE)) { cpsw_err(priv, tx_err, "packet pad failed\n"); ndev->stats.tx_dropped++; - return NETDEV_TX_OK; + return NET_XMIT_DROP; } if (skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP && |