Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adcc331e authored by Michael Chan's avatar Michael Chan Committed by David S. Miller
Browse files

bnxt_en: Allow the user to set ethtool stats-block-usecs to 0.



For debugging purpose, it is sometimes useful to disable periodic
port statistics updates, so that the firmware logs will not be
filled with statistics update messages.

Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5c8227d0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -6843,7 +6843,8 @@ static void bnxt_timer(unsigned long data)
	if (atomic_read(&bp->intr_sem) != 0)
		goto bnxt_restart_timer;

	if (bp->link_info.link_up && (bp->flags & BNXT_FLAG_PORT_STATS)) {
	if (bp->link_info.link_up && (bp->flags & BNXT_FLAG_PORT_STATS) &&
	    bp->stats_coal_ticks) {
		set_bit(BNXT_PERIODIC_STATS_SP_EVENT, &bp->sp_event);
		schedule_work(&bp->sp_task);
	}
+5 −3
Original line number Diff line number Diff line
@@ -86,6 +86,8 @@ static int bnxt_set_coalesce(struct net_device *dev,
	if (bp->stats_coal_ticks != coal->stats_block_coalesce_usecs) {
		u32 stats_ticks = coal->stats_block_coalesce_usecs;

		/* Allow 0, which means disable. */
		if (stats_ticks)
			stats_ticks = clamp_t(u32, stats_ticks,
					      BNXT_MIN_STATS_COAL_TICKS,
					      BNXT_MAX_STATS_COAL_TICKS);