* [PATCH net 0/2] r8169: Be drop monitor friendly
@ 2017-08-25 1:33 Florian Fainelli
2017-08-26 2:13 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2017-08-25 1:33 UTC (permalink / raw)
To: netdev
Cc: davem, nic_swsd, romieu, edumazet, alexander.h.duyck, sgruszka,
Florian Fainelli
Hi all,
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 misleadning. 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().
Florian Fainelli (2):
r8169: Do not increment tx_dropped in TX ring cleaning
r8169: Be drop monitor friendly
drivers/net/ethernet/realtek/r8169.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net 0/2] r8169: Be drop monitor friendly
@ 2017-08-25 1:34 Florian Fainelli
2017-08-25 1:34 ` [PATCH net 1/2] r8169: Do not increment tx_dropped in TX ring cleaning Florian Fainelli
2017-08-25 1:34 ` [PATCH net 2/2] r8169: Be drop monitor friendly Florian Fainelli
0 siblings, 2 replies; 5+ messages in thread
From: Florian Fainelli @ 2017-08-25 1:34 UTC (permalink / raw)
To: netdev
Cc: davem, nic_swsd, romieu, edumazet, alexander.h.duyck, sgruszka,
Florian Fainelli
Hi all,
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 misleadning. 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().
Florian Fainelli (2):
r8169: Do not increment tx_dropped in TX ring cleaning
r8169: Be drop monitor friendly
drivers/net/ethernet/realtek/r8169.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net 1/2] r8169: Do not increment tx_dropped in TX ring cleaning
2017-08-25 1:34 [PATCH net 0/2] r8169: Be drop monitor friendly Florian Fainelli
@ 2017-08-25 1:34 ` Florian Fainelli
2017-08-25 1:34 ` [PATCH net 2/2] r8169: Be drop monitor friendly Florian Fainelli
1 sibling, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2017-08-25 1:34 UTC (permalink / raw)
To: netdev
Cc: davem, nic_swsd, romieu, edumazet, alexander.h.duyck, sgruszka,
Florian Fainelli
rtl8169_tx_clear_range() is responsible for cleaning up the TX ring
during interface shutdown, incrementing tx_dropped for every SKB that we
left at the time in the ring is misleading.
Fixes: cac4b22f3d6a ("r8169: do not account fragments as packets")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index bd07a15d3b7c..8a1bbd2a6a20 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6863,7 +6863,6 @@ static void rtl8169_tx_clear_range(struct rtl8169_private *tp, u32 start,
rtl8169_unmap_tx_skb(&tp->pci_dev->dev, tx_skb,
tp->TxDescArray + entry);
if (skb) {
- tp->dev->stats.tx_dropped++;
dev_kfree_skb_any(skb);
tx_skb->skb = NULL;
}
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net 2/2] r8169: Be drop monitor friendly
2017-08-25 1:34 [PATCH net 0/2] r8169: Be drop monitor friendly Florian Fainelli
2017-08-25 1:34 ` [PATCH net 1/2] r8169: Do not increment tx_dropped in TX ring cleaning Florian Fainelli
@ 2017-08-25 1:34 ` Florian Fainelli
1 sibling, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2017-08-25 1:34 UTC (permalink / raw)
To: netdev
Cc: davem, nic_swsd, romieu, edumazet, alexander.h.duyck, sgruszka,
Florian Fainelli
rtl_tx() is the TX reclamation process whereas rtl8169_tx_clear_range() does
the TX ring cleaning during shutdown, both of these functions should call
dev_consume_skb_any() to be drop monitor friendly.
Fixes: cac4b22f3d6a ("r8169: do not account fragments as packets")
Fixes: eb781397904e ("r8169: Do not use dev_kfree_skb in xmit path")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/realtek/r8169.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 8a1bbd2a6a20..e03fcf914690 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -6863,7 +6863,7 @@ static void rtl8169_tx_clear_range(struct rtl8169_private *tp, u32 start,
rtl8169_unmap_tx_skb(&tp->pci_dev->dev, tx_skb,
tp->TxDescArray + entry);
if (skb) {
- dev_kfree_skb_any(skb);
+ dev_consume_skb_any(skb);
tx_skb->skb = NULL;
}
}
@@ -7318,7 +7318,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
tp->tx_stats.packets++;
tp->tx_stats.bytes += tx_skb->skb->len;
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;
}
dirty_tx++;
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net 0/2] r8169: Be drop monitor friendly
2017-08-25 1:33 [PATCH net 0/2] " Florian Fainelli
@ 2017-08-26 2:13 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2017-08-26 2:13 UTC (permalink / raw)
To: f.fainelli
Cc: netdev, nic_swsd, romieu, edumazet, alexander.h.duyck, sgruszka
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu, 24 Aug 2017 18:33:57 -0700
> 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 misleadning. I picked Stanislaw changes which brings us
> back to 2010, but this was present from pre-git days as well.
Right, drivers should not do this.
> Second patch fixes the two missing calls to dev_consume_skb_any().
Series applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-08-26 2:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25 1:34 [PATCH net 0/2] r8169: Be drop monitor friendly Florian Fainelli
2017-08-25 1:34 ` [PATCH net 1/2] r8169: Do not increment tx_dropped in TX ring cleaning Florian Fainelli
2017-08-25 1:34 ` [PATCH net 2/2] r8169: Be drop monitor friendly Florian Fainelli
-- strict thread matches above, loose matches on Subject: below --
2017-08-25 1:33 [PATCH net 0/2] " Florian Fainelli
2017-08-26 2:13 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).