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

Commit 9c0314e1 authored by Veaceslav Falico's avatar Veaceslav Falico Committed by David S. Miller
Browse files

pch_gbe: don't re-set RX_FIFO_ERR flag in napi_poll



If we were in RX_FIFO_ERR state and entered pch_gbe_napi_poll(), we'll
anyway clean some rx space and thus can continue to receive more packets.
Currently, we re-set the RX_FIFO_ERR in situations when we've exhausted our
budget for RX cleaning or cleaned some TX packets. Removing it gives us
+20%-40% speed increase and a lot less of RX_FIFO_ERRors reported.

Signed-off-by: default avatarVeaceslav Falico <vfalico@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e408a9ff
Loading
Loading
Loading
Loading
+6 −13
Original line number Diff line number Diff line
@@ -2419,7 +2419,6 @@ static int pch_gbe_napi_poll(struct napi_struct *napi, int budget)
	int work_done = 0;
	bool poll_end_flag = false;
	bool cleaned = false;
	u32 int_en;

	pr_debug("budget : %d\n", budget);

@@ -2436,18 +2435,12 @@ static int pch_gbe_napi_poll(struct napi_struct *napi, int budget)

	if (poll_end_flag) {
		napi_complete(napi);
		if (adapter->rx_stop_flag) {
			adapter->rx_stop_flag = false;
			pch_gbe_start_receive(&adapter->hw);
		}
		pch_gbe_irq_enable(adapter);
	} else
	}

	if (adapter->rx_stop_flag) {
		adapter->rx_stop_flag = false;
		pch_gbe_start_receive(&adapter->hw);
			int_en = ioread32(&adapter->hw.reg->INT_EN);
			iowrite32((int_en | PCH_GBE_INT_RX_FIFO_ERR),
				&adapter->hw.reg->INT_EN);
	}

	pr_debug("poll_end_flag : %d  work_done : %d  budget : %d\n",