Commit 681e9e86 authored by David S. Miller's avatar David S. Miller

Merge branch 'r8169-Be-drop-monitor-friendly'

Florian Fainelli says:

====================
r8169: Be drop monitor friendly

First patch may be questionable but no other driver appears to be
doing that and while it is defendable to account for left packets as
dropped during TX clean, this appears misleading. I picked Stanislaw
changes which brings us back to 2010, but this was present from
pre-git days as well.

Second patch fixes the two missing calls to dev_consume_skb_any().
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents ebfa00c5 7a4b813c
...@@ -6863,8 +6863,7 @@ static void rtl8169_tx_clear_range(struct rtl8169_private *tp, u32 start, ...@@ -6863,8 +6863,7 @@ static void rtl8169_tx_clear_range(struct rtl8169_private *tp, u32 start,
rtl8169_unmap_tx_skb(&tp->pci_dev->dev, tx_skb, rtl8169_unmap_tx_skb(&tp->pci_dev->dev, tx_skb,
tp->TxDescArray + entry); tp->TxDescArray + entry);
if (skb) { if (skb) {
tp->dev->stats.tx_dropped++; dev_consume_skb_any(skb);
dev_kfree_skb_any(skb);
tx_skb->skb = NULL; tx_skb->skb = NULL;
} }
} }
...@@ -7319,7 +7318,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp) ...@@ -7319,7 +7318,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
tp->tx_stats.packets++; tp->tx_stats.packets++;
tp->tx_stats.bytes += tx_skb->skb->len; tp->tx_stats.bytes += tx_skb->skb->len;
u64_stats_update_end(&tp->tx_stats.syncp); u64_stats_update_end(&tp->tx_stats.syncp);
dev_kfree_skb_any(tx_skb->skb); dev_consume_skb_any(tx_skb->skb);
tx_skb->skb = NULL; tx_skb->skb = NULL;
} }
dirty_tx++; dirty_tx++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment