diff mbox series

[net-next,v1,1/1] net: dsa: microchip: ksz9477: reduce polling interval for statistics

Message ID 20220221084129.3660124-1-o.rempel@pengutronix.de (mailing list archive)
State Accepted
Commit 12c740c8683fed9eee4ae9ddddc96a8abeeeda9e
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v1,1/1] net: dsa: microchip: ksz9477: reduce polling interval for statistics | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Oleksij Rempel Feb. 21, 2022, 8:41 a.m. UTC
30 seconds is too long interval especially if it used with ip -s l.
Reduce polling interval to 5 sec.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 drivers/net/dsa/microchip/ksz_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jakub Kicinski Feb. 23, 2022, 12:55 a.m. UTC | #1
On Mon, 21 Feb 2022 09:41:29 +0100 Oleksij Rempel wrote:
> 30 seconds is too long interval especially if it used with ip -s l.
> Reduce polling interval to 5 sec.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  drivers/net/dsa/microchip/ksz_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
> index 27cae9f04322..0531aa671574 100644
> --- a/drivers/net/dsa/microchip/ksz_common.c
> +++ b/drivers/net/dsa/microchip/ksz_common.c
> @@ -453,7 +453,7 @@ int ksz_switch_register(struct ksz_device *dev,
>  	}
>  
>  	/* Read MIB counters every 30 seconds to avoid overflow. */
> -	dev->mib_read_interval = msecs_to_jiffies(30000);
> +	dev->mib_read_interval = msecs_to_jiffies(5000);
>  
>  	/* Start the MIB timer. */
>  	schedule_delayed_work(&dev->mib_read, 0);

Seems reasonable, although who knows how slow the buses get.
In case we need to make it configurable in the future there's already
uAPI for it - stats_block_coalesce_usecs
patchwork-bot+netdevbpf@kernel.org Feb. 23, 2022, 1 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 21 Feb 2022 09:41:29 +0100 you wrote:
> 30 seconds is too long interval especially if it used with ip -s l.
> Reduce polling interval to 5 sec.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  drivers/net/dsa/microchip/ksz_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [net-next,v1,1/1] net: dsa: microchip: ksz9477: reduce polling interval for statistics
    https://git.kernel.org/netdev/net-next/c/12c740c8683f

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 27cae9f04322..0531aa671574 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -453,7 +453,7 @@  int ksz_switch_register(struct ksz_device *dev,
 	}
 
 	/* Read MIB counters every 30 seconds to avoid overflow. */
-	dev->mib_read_interval = msecs_to_jiffies(30000);
+	dev->mib_read_interval = msecs_to_jiffies(5000);
 
 	/* Start the MIB timer. */
 	schedule_delayed_work(&dev->mib_read, 0);