From: Veaceslav Falico <vfalico@redhat.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, richardcochran@gmail.com,
tshimizu818@gmail.com, andy.cress@us.kontron.com,
erwan.velu@zodiacaerospace.com, agospoda@redhat.com
Subject: [PATCH 2/3] pch_gbe: don't re-set RX_FIFO_ERR flag in napi_poll
Date: Mon, 22 Oct 2012 16:43:24 +0200 [thread overview]
Message-ID: <1350917005-26350-3-git-send-email-vfalico@redhat.com> (raw)
In-Reply-To: <1350917005-26350-1-git-send-email-vfalico@redhat.com>
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>
---
.../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 d5190bf..4ffad78 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)
int work_done = 0;
bool poll_end_flag = false;
bool cleaned = false;
- u32 int_en;
pr_debug("budget : %d\n", budget);
@@ -2436,19 +2435,13 @@ 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);
- }
+ }
+
+ if (adapter->rx_stop_flag) {
+ adapter->rx_stop_flag = false;
+ pch_gbe_start_receive(&adapter->hw);
+ }
pr_debug("poll_end_flag : %d work_done : %d budget : %d\n",
poll_end_flag, work_done, budget);
--
1.7.1
next prev parent reply other threads:[~2012-10-22 14:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 14:43 [PATCH 0/3] pch_gbe: fix CRC errors and improve speed Veaceslav Falico
2012-10-22 14:43 ` [PATCH 1/3] pch_gbe: create functions for MAC_RX {en,dis}able Veaceslav Falico
2012-10-22 14:43 ` Veaceslav Falico [this message]
2012-10-22 14:43 ` [PATCH 3/3] pch_gbe: don't reset MAC_RX on FIFO overflow Veaceslav Falico
2012-10-23 6:31 ` [PATCH 0/3] pch_gbe: fix CRC errors and improve speed David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350917005-26350-3-git-send-email-vfalico@redhat.com \
--to=vfalico@redhat.com \
--cc=agospoda@redhat.com \
--cc=andy.cress@us.kontron.com \
--cc=davem@davemloft.net \
--cc=erwan.velu@zodiacaerospace.com \
--cc=netdev@vger.kernel.org \
--cc=richardcochran@gmail.com \
--cc=tshimizu818@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).