Unverified Commit 65c1f15a authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!2454 igb: set max size RX buffer when store bad packet is enabled

parents 56ee05a5 728c5f5e
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -4733,6 +4733,10 @@ 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)
{
#if (PAGE_SIZE < 8192)
	struct e1000_hw *hw = &adapter->hw;
#endif

	/* set build_skb and buffer size flags */
	clear_ring_build_skb_enabled(rx_ring);
	clear_ring_uses_large_buffer(rx_ring);
@@ -4743,9 +4747,8 @@ 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;

	if (adapter->max_frame_size > IGB_MAX_FRAME_BUILD_SKB ||
	    rd32(E1000_RCTL) & E1000_RCTL_SBP)
		set_ring_uses_large_buffer(rx_ring);
#endif
}