From: Vincent Pelletier <plr.vincent@gmail.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@vger.kernel.org
Subject: Re: r8169: IO_PAGE_FAULT & netdev watchdog
Date: Sat, 2 Jun 2012 11:08:52 +0200 [thread overview]
Message-ID: <201206021108.53551.plr.vincent@gmail.com> (raw)
In-Reply-To: <20120601125949.GA11973@electric-eye.fr.zoreil.com>
[-- Attachment #1: Type: Text/Plain, Size: 799 bytes --]
Le vendredi 01 juin 2012 14:59:49, Francois Romieu a écrit :
> You can apply the attached patch but it may not do much for your problem.
After failing to build the module alone in a way that it would accept loading
in debian-provided kernel, I fall back to building vanilla kernel + proposed
patches.
I first went for 3.4, but realised the patch you attached was already applied
there.
So I went with 3.3.7, and patch failed to apply, at least partly because 3.3.7
lacks "r8169: fix early queue wake-up."[1] . I solved the conflicts manually,
but I'm not sure of the result. Could you confirm attached patch might give
expected result ? Or should I stick to 3.4 and only test inlined patch ?
[1] ae1f23fb433ac0aaff8aeaa5a7b14348e9aa8277
Regards,
--
Vincent Pelletier
[-- Attachment #2: for_3.3.7.patch --]
[-- Type: text/x-patch, Size: 1564 bytes --]
--- drivers/net/ethernet/realtek/r8169.c.orig 2012-06-02 10:26:45.000000000 +0200
+++ drivers/net/ethernet/realtek/r8169.c 2012-06-02 10:58:37.000000000 +0200
@@ -62,8 +62,12 @@
#define R8169_MSG_DEFAULT \
(NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_IFUP | NETIF_MSG_IFDOWN)
-#define TX_BUFFS_AVAIL(tp) \
- (tp->dirty_tx + NUM_TX_DESC - tp->cur_tx - 1)
+#define TX_SLOTS_AVAIL(tp) \
+ (tp->dirty_tx + NUM_TX_DESC - tp->cur_tx)
+
+/* A skbuff with nr_frags needs nr_frags+1 entries in the tx queue */
+#define TX_FRAGS_READY_FOR(tp,nr_frags) \
+ (TX_SLOTS_AVAIL(tp) >= (nr_frags + 1))
/* Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
The RTL chips use a 64 element hash table based on the Ethernet CRC. */
@@ -5513,7 +5517,7 @@
u32 opts[2];
int frags;
- if (unlikely(TX_BUFFS_AVAIL(tp) < skb_shinfo(skb)->nr_frags)) {
+ if (unlikely(!TX_FRAGS_READY_FOR(tp, skb_shinfo(skb)->nr_frags))) {
netif_err(tp, drv, dev, "BUG! Tx Ring full when queue awake!\n");
goto err_stop_0;
}
@@ -5561,10 +5565,10 @@
RTL_W8(TxPoll, NPQ);
- if (TX_BUFFS_AVAIL(tp) < MAX_SKB_FRAGS) {
+ if (!TX_FRAGS_READY_FOR(tp, MAX_SKB_FRAGS)) {
netif_stop_queue(dev);
smp_rmb();
- if (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)
+ if (TX_FRAGS_READY_FOR(tp, MAX_SKB_FRAGS))
netif_wake_queue(dev);
}
@@ -5666,7 +5670,7 @@
tp->dirty_tx = dirty_tx;
smp_wmb();
if (netif_queue_stopped(dev) &&
- (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
+ TX_FRAGS_READY_FOR(tp, MAX_SKB_FRAGS)) {
netif_wake_queue(dev);
}
/*
next prev parent reply other threads:[~2012-06-02 9:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 21:31 r8169: IO_PAGE_FAULT & netdev watchdog Vincent Pelletier
2012-06-01 12:59 ` Francois Romieu
2012-06-01 19:20 ` Vincent Pelletier
2012-06-01 20:13 ` Francois Romieu
2012-06-02 9:08 ` Vincent Pelletier [this message]
2012-06-02 10:56 ` Francois Romieu
2012-06-02 13:42 ` Vincent Pelletier
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=201206021108.53551.plr.vincent@gmail.com \
--to=plr.vincent@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.