Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1578918 > unrolled thread
| Started by | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> |
|---|---|
| First post | 2017-02-11 03:00 +0100 |
| Last post | 2017-02-12 03:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] net: ethernet: ti: cpsw: return NET_XMIT_DROP if skb_padto failed Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2017-02-11 03:00 +0100
Re: [PATCH] net: ethernet: ti: cpsw: return NET_XMIT_DROP if skb_padto failed David Miller <davem@davemloft.net> - 2017-02-12 03:30 +0100
| From | Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> |
|---|---|
| Date | 2017-02-11 03:00 +0100 |
| Subject | [PATCH] net: ethernet: ti: cpsw: return NET_XMIT_DROP if skb_padto failed |
| Message-ID | <t9v8J-2Px-5@gated-at.bofh.it> |
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>
---
Based on net-next/master
drivers/net/ethernet/ti/cpsw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 4d1c0c3..503fa8a 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 &&
--
2.7.4
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2017-02-12 03:30 +0100 |
| Subject | Re: [PATCH] net: ethernet: ti: cpsw: return NET_XMIT_DROP if skb_padto failed |
| Message-ID | <t9S5j-iN-5@gated-at.bofh.it> |
| In reply to | #1578918 |
From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Date: Sat, 11 Feb 2017 03:49:57 +0200 > 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> Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web