igb: set max size RX buffer when store bad packet is enabled
Subsystems (2)
PATCH 1/1 igb: set max size RX buffer when store bad packet is enabled
Increase the RX buffer size to 3K when the SBP bit is on. The size of the RX buffer determines the number of pages allocated which may not be sufficient for receive frames larger than the set MTU size.
Fixes 89eaefb61dc9 ("igb: Support RX-ALL feature flag.")
Signed-off-by Radoslaw Tyl <[email protected]>
--- drivers/net/ethernet/intel/igb/igb_main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/igb/igb_main.c +5 -4
@@ -4814,6 +4814,8 @@ void igb_configure_rx_ring(struct igb_adapter *adapter,static void igb_set_rx_buffer_len (struct igb_adapter *adapter,struct igb_ring *rx_ring) { +struct e1000_hw *hw = &adapter->hw; +/* set build_skb and buffer size flags */ clear_ring_build_skb_enabled (rx_ring);clear_ring_uses_large_buffer (rx_ring);
@@ -4824,10 +4826,9 @@ static void igb_set_rx_buffer_len(struct igb_adapter *adapter,set_ring_build_skb_enabled (rx_ring);#if (PAGE_SIZE <8192 ) -if (adapter->max_frame_size <=IGB_MAX_FRAME_BUILD_SKB ) -return ; - -set_ring_uses_large_buffer (rx_ring); +if (adapter->max_frame_size >IGB_MAX_FRAME_BUILD_SKB || +rd32 (E1000_RCTL ) &E1000_RCTL_SBP ) +set_ring_uses_large_buffer (rx_ring);#endif }
Signature · 6 lines
2.31.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan