Skip to contentSkip to conversation

bnxt: apply computed clamp value for coalece parameter

PATCH Applied Jonathan Lemon 3 participants 3 messages Dec 10, 2019 – Dec 13, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bnxt: apply computed clamp value for coalece parameter

After executing "ethtool -C eth0 rx-usecs-irq 0", the box becomes unresponsive, likely due to interrupt livelock. It appears that a minimum clamp value for the irq timer is computed, but is never applied.

Fix by applying the corrected clamp value.

Fixes 74706afa712d ("bnxt_en: Update interrupt coalescing logic.")
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +1 -1
index 85983f0e3134..38bf38342af9 100644
@@ -6186,7 +6186,7 @@ static void bnxt_hwrm_set_coal_params(struct bnxt *bp,
 		tmr = bnxt_usec_to_coal_tmr(bp, hw_coal->coal_ticks_irq);
 		val = clamp_t(u16, tmr, 1,
 			      coal_cap->cmpl_aggr_dma_tmr_during_int_max);
-		req->cmpl_aggr_dma_tmr_during_int = cpu_to_le16(tmr);
+		req->cmpl_aggr_dma_tmr_during_int = cpu_to_le16(val);
 		req->enables |=
 			cpu_to_le16(BNXT_COAL_CMPL_AGGR_TMR_DURING_INT_ENABLE);
 	}
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 10 lines · Jonathan Lemon

After executing "ethtool -C eth0 rx-usecs-irq 0", the box becomes unresponsive, likely due to interrupt livelock. It appears that a minimum clamp value for the irq timer is computed, but is never applied.

Fix by applying the corrected clamp value.

Fixes 74706afa712d ("bnxt_en: Update interrupt coalescing logic.")

Thanks.

#2 lore raw
In reply to Jonathan Lemon
Quoted 9 lines · Jonathan Lemon

After executing "ethtool -C eth0 rx-usecs-irq 0", the box becomes unresponsive, likely due to interrupt livelock. It appears that a minimum clamp value for the irq timer is computed, but is never applied.

Fix by applying the corrected clamp value.

Fixes 74706afa712d ("bnxt_en: Update interrupt coalescing logic.")

Applied, and queued for stable, thanks!