All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ranganath V N <vnranganath.20@gmail.com>
To: vadim.fedorenko@linux.dev
Cc: andrew+netdev@lunn.ch, anthony.l.nguyen@intel.com,
	davem@davemloft.net, edumazet@google.com,
	intel-wired-lan@lists.osuosl.org, kuba@kernel.org,
	linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	pabeni@redhat.com, przemyslaw.kitszel@intel.com,
	skhan@linuxfoundation.org, vnranganath.20@gmail.com,
	aleksandr.loktionov@intel.com
Subject: Re: [Intel-wired-lan] [PATCH] net: igb: expose rx_dropped via ethtool -S
Date: Fri, 29 Aug 2025 00:55:51 +0530	[thread overview]
Message-ID: <20250828192551.13216-1-vnranganath.20@gmail.com> (raw)
In-Reply-To: <29cbde11-b7bc-4eba-a0ea-b20e4a9ecb79@linux.dev>

>> On 28/08/2025 12:42, Ranganath V N wrote:
>> Currently the igb driver does not reports RX dropped
>> packets in the ethtool -S statistics output, even though
>> this information is already available in struct
>> rtnl_link_stats64.
>> 
>> This patch adds rx_dropped, so users can monitor dropped
>> packet counts directly with ethtool.
>> 
>> Signed-off-by: Ranganath V N <vnranganath.20@gmail.com>
>> ---
>>   drivers/net/ethernet/intel/igb/igb_ethtool.c | 1 +
>>   1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> index 92ef33459aec..3c6289e80ba0 100644
>> --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> @@ -81,6 +81,7 @@ static const struct igb_stats igb_gstrings_stats[] = {
>>   }
>>   static const struct igb_stats igb_gstrings_net_stats[] = {
>>   	IGB_NETDEV_STAT(rx_errors),
>> +	IGB_NETDEV_STAT(rx_dropped),
>>   	IGB_NETDEV_STAT(tx_errors),
>>   	IGB_NETDEV_STAT(tx_dropped),
>>   	IGB_NETDEV_STAT(rx_length_errors),

> This stat is never used in the igb driver, what's the benefit of
> constant 0 value in the output?

Hi,
I initially proposed exposing it, but after reviewing 
the driver, I realized that stats.rx_dropped is never 
updated in igb. Exposing it would always show 0.

Ixgbe behaves the same: the counter is present 
but never incremented.But this patch wouldn't provide meaningful data.

Thanks again for your guidance.

Ranganath

WARNING: multiple messages have this Message-ID (diff)
From: Ranganath V N <vnranganath.20@gmail.com>
To: vadim.fedorenko@linux.dev
Cc: andrew+netdev@lunn.ch, anthony.l.nguyen@intel.com,
	davem@davemloft.net, edumazet@google.com,
	intel-wired-lan@lists.osuosl.org, kuba@kernel.org,
	linux-kernel-mentees@lists.linuxfoundation.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	pabeni@redhat.com, przemyslaw.kitszel@intel.com,
	skhan@linuxfoundation.org, vnranganath.20@gmail.com,
	aleksandr.loktionov@intel.com
Subject: Re: [PATCH] net: igb: expose rx_dropped via ethtool -S
Date: Fri, 29 Aug 2025 00:55:51 +0530	[thread overview]
Message-ID: <20250828192551.13216-1-vnranganath.20@gmail.com> (raw)
In-Reply-To: <29cbde11-b7bc-4eba-a0ea-b20e4a9ecb79@linux.dev>

>> On 28/08/2025 12:42, Ranganath V N wrote:
>> Currently the igb driver does not reports RX dropped
>> packets in the ethtool -S statistics output, even though
>> this information is already available in struct
>> rtnl_link_stats64.
>> 
>> This patch adds rx_dropped, so users can monitor dropped
>> packet counts directly with ethtool.
>> 
>> Signed-off-by: Ranganath V N <vnranganath.20@gmail.com>
>> ---
>>   drivers/net/ethernet/intel/igb/igb_ethtool.c | 1 +
>>   1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> index 92ef33459aec..3c6289e80ba0 100644
>> --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
>> @@ -81,6 +81,7 @@ static const struct igb_stats igb_gstrings_stats[] = {
>>   }
>>   static const struct igb_stats igb_gstrings_net_stats[] = {
>>   	IGB_NETDEV_STAT(rx_errors),
>> +	IGB_NETDEV_STAT(rx_dropped),
>>   	IGB_NETDEV_STAT(tx_errors),
>>   	IGB_NETDEV_STAT(tx_dropped),
>>   	IGB_NETDEV_STAT(rx_length_errors),

> This stat is never used in the igb driver, what's the benefit of
> constant 0 value in the output?

Hi,
I initially proposed exposing it, but after reviewing 
the driver, I realized that stats.rx_dropped is never 
updated in igb. Exposing it would always show 0.

Ixgbe behaves the same: the counter is present 
but never incremented.But this patch wouldn't provide meaningful data.

Thanks again for your guidance.

Ranganath

  reply	other threads:[~2025-08-28 19:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28 11:42 [Intel-wired-lan] [PATCH] net: igb: expose rx_dropped via ethtool -S Ranganath V N
2025-08-28 11:42 ` Ranganath V N
2025-08-28 13:18 ` [Intel-wired-lan] " Vadim Fedorenko
2025-08-28 13:18   ` Vadim Fedorenko
2025-08-28 19:25   ` Ranganath V N [this message]
2025-08-28 19:25     ` Ranganath V N
2025-08-28 15:48 ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-08-28 15:48   ` Loktionov, Aleksandr

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=20250828192551.13216-1-vnranganath.20@gmail.com \
    --to=vnranganath.20@gmail.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=skhan@linuxfoundation.org \
    --cc=vadim.fedorenko@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.