diff mbox series

[net-next,3/6] sfc: add n_rx_overlength to ethtool stats

Message ID e3cdc60663b414d24120cfd2c65b4df500a4037c.1724852597.git.ecree.xilinx@gmail.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series sfc: per-queue stats | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 16 this patch: 16
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 1 maintainers not CCed: habetsm.xilinx@gmail.com
netdev/build_clang success Errors and warnings before: 16 this patch: 16
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 17 this patch: 17
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 2 this patch: 2
netdev/source_inline success Was 0 now: 0
netdev/contest fail net-next-2024-08-29--00-00 (tests: 713)

Commit Message

edward.cree@amd.com Aug. 28, 2024, 1:45 p.m. UTC
From: Edward Cree <ecree.xilinx@gmail.com>

This counter is the main difference between the old and new locations
 of the rx_packets increment (the other is scatter errors which
 produce a WARN_ON).  It previously was not reported anywhere; add it
 to ethtool -S output to ensure users still have this information.

Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
---
 drivers/net/ethernet/sfc/ethtool_common.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jacob Keller Aug. 28, 2024, 10:22 p.m. UTC | #1
On 8/28/2024 6:45 AM, edward.cree@amd.com wrote:
> From: Edward Cree <ecree.xilinx@gmail.com>
> 
> This counter is the main difference between the old and new locations
>  of the rx_packets increment (the other is scatter errors which
>  produce a WARN_ON).  It previously was not reported anywhere; add it
>  to ethtool -S output to ensure users still have this information.
> 

The description makes sense in context with the whole series but doesn't
quite work for me if I think about viewing it without context. Perhaps a
little more clarification about the rx_packets behavioral change?

> Signed-off-by: Edward Cree <ecree.xilinx@gmail.com>
> ---

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

>  drivers/net/ethernet/sfc/ethtool_common.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/sfc/ethtool_common.c b/drivers/net/ethernet/sfc/ethtool_common.c
> index a8baeacd83c0..ae32e08540fa 100644
> --- a/drivers/net/ethernet/sfc/ethtool_common.c
> +++ b/drivers/net/ethernet/sfc/ethtool_common.c
> @@ -83,6 +83,7 @@ static const struct efx_sw_stat_desc efx_sw_stat_desc[] = {
>  	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_outer_tcp_udp_chksum_err),
>  	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_eth_crc_err),
>  	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_frm_trunc),
> +	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_overlength),
>  	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_merge_events),
>  	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_merge_packets),
>  	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_xdp_drops),
>
Jakub Kicinski Aug. 29, 2024, 12:47 a.m. UTC | #2
On Wed, 28 Aug 2024 14:45:12 +0100 edward.cree@amd.com wrote:
> This counter is the main difference between the old and new locations
>  of the rx_packets increment (the other is scatter errors which
>  produce a WARN_ON).  It previously was not reported anywhere; add it
>  to ethtool -S output to ensure users still have this information.

What is it tho? Not IEEE 802.3 30.3.1.1.25 aFrameTooLongErrors ?
Edward Cree Sept. 5, 2024, 10:50 a.m. UTC | #3
On 29/08/2024 01:47, Jakub Kicinski wrote:
> On Wed, 28 Aug 2024 14:45:12 +0100 edward.cree@amd.com wrote:
>> This counter is the main difference between the old and new locations
>>  of the rx_packets increment (the other is scatter errors which
>>  produce a WARN_ON).  It previously was not reported anywhere; add it
>>  to ethtool -S output to ensure users still have this information.
> 
> What is it tho? Not IEEE 802.3 30.3.1.1.25 aFrameTooLongErrors ?

No, it doesn't appear to be.
If I'm understanding the code correctly, it counts "RX packets which
 SG placed in a single RX buffer but whose length (from the RX event)
 is too big to fit in that RX buffer".  Which doesn't sound like a
 thing that should ever happen (and when it does we netif_err() under
 ratelimit, see efx_rx_packet__check_len()).
I'll put this into the commit message.

On 28/08/2024 23:22, Jacob Keller wrote:
> The description makes sense in context with the whole series but doesn't
> quite work for me if I think about viewing it without context. Perhaps a
> little more clarification about the rx_packets behavioral change?

Sure, will do.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/sfc/ethtool_common.c b/drivers/net/ethernet/sfc/ethtool_common.c
index a8baeacd83c0..ae32e08540fa 100644
--- a/drivers/net/ethernet/sfc/ethtool_common.c
+++ b/drivers/net/ethernet/sfc/ethtool_common.c
@@ -83,6 +83,7 @@  static const struct efx_sw_stat_desc efx_sw_stat_desc[] = {
 	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_outer_tcp_udp_chksum_err),
 	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_eth_crc_err),
 	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_frm_trunc),
+	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_overlength),
 	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_merge_events),
 	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_merge_packets),
 	EFX_ETHTOOL_UINT_CHANNEL_STAT(rx_xdp_drops),