diff options
author | Veaceslav Falico <vfalico@redhat.com> | 2012-10-22 00:43:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-23 02:31:15 -0400 |
commit | 9c0314e111a540620441b27aeedb55f572f812f5 (patch) | |
tree | de3f5fd73ba858ad0b9ea090165f9873ccdf1057 | |
parent | e408a9ff3c7c371d0e2a47a9eb8fa3de48fea30d (diff) |
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: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index d5190bf94ba0..4ffad780c7ac 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | |||
@@ -2419,7 +2419,6 @@ static int pch_gbe_napi_poll(struct napi_struct *napi, int budget) | |||
2419 | int work_done = 0; | 2419 | int work_done = 0; |
2420 | bool poll_end_flag = false; | 2420 | bool poll_end_flag = false; |
2421 | bool cleaned = false; | 2421 | bool cleaned = false; |
2422 | u32 int_en; | ||
2423 | 2422 | ||
2424 | pr_debug("budget : %d\n", budget); | 2423 | pr_debug("budget : %d\n", budget); |
2425 | 2424 | ||
@@ -2436,19 +2435,13 @@ static int pch_gbe_napi_poll(struct napi_struct *napi, int budget) | |||
2436 | 2435 | ||
2437 | if (poll_end_flag) { | 2436 | if (poll_end_flag) { |
2438 | napi_complete(napi); | 2437 | napi_complete(napi); |
2439 | if (adapter->rx_stop_flag) { | ||
2440 | adapter->rx_stop_flag = false; | ||
2441 | pch_gbe_start_receive(&adapter->hw); | ||
2442 | } | ||
2443 | pch_gbe_irq_enable(adapter); | 2438 | pch_gbe_irq_enable(adapter); |
2444 | } else | 2439 | } |
2445 | if (adapter->rx_stop_flag) { | 2440 | |
2446 | adapter->rx_stop_flag = false; | 2441 | if (adapter->rx_stop_flag) { |
2447 | pch_gbe_start_receive(&adapter->hw); | 2442 | adapter->rx_stop_flag = false; |
2448 | int_en = ioread32(&adapter->hw.reg->INT_EN); | 2443 | pch_gbe_start_receive(&adapter->hw); |
2449 | iowrite32((int_en | PCH_GBE_INT_RX_FIFO_ERR), | 2444 | } |
2450 | &adapter->hw.reg->INT_EN); | ||
2451 | } | ||
2452 | 2445 | ||
2453 | pr_debug("poll_end_flag : %d work_done : %d budget : %d\n", | 2446 | pr_debug("poll_end_flag : %d work_done : %d budget : %d\n", |
2454 | poll_end_flag, work_done, budget); | 2447 | poll_end_flag, work_done, budget); |