FreeBSD Bugzilla – Attachment 109487 Details for
Bug 150516
[em] e1000 receive queue handling problem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-if_em-handle-RX-overrun.patch
0001-if_em-handle-RX-overrun.patch (text/x-patch; charset=US-ASCII), 2.24 KB, created by
Arnaud
on 2011-02-25 23:52:52 UTC
(
hide
)
Description:
0001-if_em-handle-RX-overrun.patch
Filename:
MIME Type:
Creator:
Arnaud
Created:
2011-02-25 23:52:52 UTC
Size:
2.24 KB
patch
obsolete
>From 265747561a2060469fe0c21094e77d44b2c0a39a Mon Sep 17 00:00:00 2001 >From: Arnaud Lacombe <lacombar@gmail.com> >Date: Fri, 25 Feb 2011 18:47:48 -0500 >Subject: [PATCH] if_em: handle RX overrun > >--- > sys/dev/e1000/e1000_defines.h | 1 + > sys/dev/e1000/if_em.c | 21 ++++++++++++++++++++- > 2 files changed, 21 insertions(+), 1 deletions(-) > >diff --git a/sys/dev/e1000/e1000_defines.h b/sys/dev/e1000/e1000_defines.h >index 5d09ad9..e0f51c4 100644 >--- a/sys/dev/e1000/e1000_defines.h >+++ b/sys/dev/e1000/e1000_defines.h >@@ -865,6 +865,7 @@ > #define IMS_ENABLE_MASK ( \ > E1000_IMS_RXT0 | \ > E1000_IMS_TXDW | \ >+ E1000_IMS_RXO | \ > E1000_IMS_RXDMT0 | \ > E1000_IMS_RXSEQ | \ > E1000_IMS_LSC) >diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c >index e004cc7..d5e118a 100644 >--- a/sys/dev/e1000/if_em.c >+++ b/sys/dev/e1000/if_em.c >@@ -283,6 +283,7 @@ static void em_msix_link(void *); > static void em_handle_tx(void *context, int pending); > static void em_handle_rx(void *context, int pending); > static void em_handle_link(void *context, int pending); >+static void em_handle_rx_overrun(void *context); > > static void em_add_rx_process_limit(struct adapter *, const char *, > const char *, int *, int); >@@ -1567,9 +1568,12 @@ em_msix_link(void *arg) > if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) { > adapter->hw.mac.get_link_status = 1; > em_handle_link(adapter, 0); >+ } else if (reg_icr & E1000_ICR_RXO) { >+ adapter->rx_overruns++; >+ em_handle_rx_overrun(adapter); > } else > E1000_WRITE_REG(&adapter->hw, E1000_IMS, >- EM_MSIX_LINK | E1000_IMS_LSC); >+ EM_MSIX_LINK | E1000_IMS_LSC | E1000_IMS_RXO); > return; > } > >@@ -1627,6 +1631,21 @@ em_handle_link(void *context, int pending) > EM_CORE_UNLOCK(adapter); > } > >+static void >+em_handle_rx_overrun(void *context) >+{ >+ struct adapter *adapter = context; >+ struct ifnet *ifp = adapter->ifp; >+ struct rx_ring *rxr = adapter->rx_rings; >+ >+ if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) >+ return; >+ >+ EM_CORE_LOCK(adapter); >+ em_refresh_mbufs(rxr, rxr->next_to_check); >+ E1000_WRITE_REG(&adapter->hw, E1000_IMS, E1000_IMS_RXO); >+ EM_CORE_UNLOCK(adapter); >+} > > /********************************************************************* > * >-- >1.7.3.3.418.g704f6.dirty >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 150516
:
109485
|
109486
| 109487