History

bnxt_en: Only restore LRO if the device supports TPA

With a P5+ device with firmware that reports max_aggs_supported == 0, it is possible to make LRO settable by attaching and detaching an XDP program even though the device does not support TPA. Fix this by testing BNXT_SUPPORTS_TPA before restoring the feature bit.

Joe Damato committed 2 months ago

Commit 4e17b501 parent 8d6cd181 file · +2 −1Browse files

Unified · Split

drivers/net/ethernet/broadcom/bnxt/bnxt.c+2−1
@@ -5026,7 +5026,8 @@ void bnxt_set_rx_skb_mode(struct bnxt *bp, bool page_mode) · 5025 unmodified lines
50265026 bnxt_get_max_rings(bp, &rx, &tx, true);
50275027 if (rx > 1) {
50285028 bp->flags &= ~BNXT_FLAG_NO_AGG_RINGS;
5029− bp->dev->hw_features |= NETIF_F_LRO;
5029+ if (BNXT_SUPPORTS_TPA(bp))
5030+ bp->dev->hw_features |= NETIF_F_LRO;
50305031 }
50315032 }
50325033