mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Yeounsu Moon <yyyynoom@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: dlink: count tx_dropped when dropping skb on link down
Date: Tue, 6 Jan 2026 14:44:49 +0100	[thread overview]
Message-ID: <b6ff2078-86d7-4416-a914-e07ae13e2128@lunn.ch> (raw)
In-Reply-To: <20260106122350.21532-2-yyyynoom@gmail.com>

On Tue, Jan 06, 2026 at 09:23:51PM +0900, Yeounsu Moon wrote:
> Increment tx_dropped when dropping the skb due to link down.
> 
> Tested-on: D-Link DGE-550T Rev-A3
> Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
> ---
>  drivers/net/ethernet/dlink/dl2k.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c
> index 846d58c769ea..edc6cd64ac56 100644
> --- a/drivers/net/ethernet/dlink/dl2k.c
> +++ b/drivers/net/ethernet/dlink/dl2k.c
> @@ -733,6 +733,7 @@ start_xmit (struct sk_buff *skb, struct net_device *dev)
>  	u64 tfc_vlan_tag = 0;
>  
>  	if (np->link_status == 0) {	/* Link Down */
> +		dev->stats.tx_dropped++;

Do you see this being hit very often? It should be that as soon as you
know the link is down, you tell the core, and it will stop calling
start_xmit. If you see this counter being incremented a lot, it
indicates there is a problem somewhere else.

You might want to consider converting this driver to phylink.

	  Andrew

  reply	other threads:[~2026-01-06 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06 12:23 Yeounsu Moon
2026-01-06 13:44 ` Andrew Lunn [this message]
2026-01-13 11:30   ` Yeounsu Moon
2026-01-13 22:01     ` Andrew Lunn
2026-01-13 11:46   ` Moon Yeounsu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b6ff2078-86d7-4416-a914-e07ae13e2128@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yyyynoom@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®