From: Eric Dumazet <dada1@cosmosbay.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Linux-kernel <linux-kernel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>
Subject: Re: [Security, resend] Instant crash with rtl8169 and large packets
Date: Mon, 08 Jun 2009 23:17:50 +0200 [thread overview]
Message-ID: <4A2D7FFE.9070701@cosmosbay.com> (raw)
In-Reply-To: <4A2D6D0C.6060206@msgid.tls.msk.ru>
Michael Tokarev a écrit :
> Eric Dumazet wrote:
> []
>> OK I suspect driver is buggy since 2.6.10 days :)
>>
>> Could you try this patch ?
>
> Tried it, and it appears to work. Tried various MTU combinations
> and packet sizes. Checked iperf too, with and without the patch
> and with different MTU too, to be sure the patch does not introduce
> any slowdowns - everything looks sane. In case the incoming packet
> is larger than the RX buffer size, `errors' and `frames' RX stats
> gets incremented.
>
> The only somewhat odd thing is that rx path accepts packets larger
> than MTU by 3 bytes. For example, if I set mtu to 2000, the
> largest packet I can send is 2003 bytes; with mtu=2002, largest
> actual packet size is 2005 bytes. This is complete frame - in
> terms of ping size (ping -s) it's 1975 and 1977 bytes. That to
> say, maybe we still have some corner case somewhere, for packets
> larger than mtu by 1, 2 or 3 bytes.
>
> Also I didn't try MTU < 1500.
>
> Other than that,
>
> Tested-By: Michael Tokarev <mjt@tls.msk.ru>
Could you confirm this last patch was ok without former two patches ?
>
> And by the way, your email client uses quoted-printable encoding.
> I had to use trivial perl one-liner to convert your patches to
> plaintext. JFYI.
Ah yes, this is when I reply to one of your mail, thank you for the hint.
When submitting a new mail, my thunderbird agent uses a regular "Content-Transfer-Encoding: 7bit"
BTW, this driver uses NAPI, but still calls dev_kfree_skb_irq() in rtl8169_tx_interrupt()
You probably can get better performance calling dev_kfree_skb(tx_skb->skb); instead
@@ -3372,7 +3372,7 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
rtl8169_unmap_tx_skb(tp->pci_dev, tx_skb, tp->TxDescArray + entry);
if (status & LastFrag) {
- dev_kfree_skb_irq(tx_skb->skb);
+ dev_kfree_skb(tx_skb->skb);
tx_skb->skb = NULL;
}
dirty_tx++;
next prev parent reply other threads:[~2009-06-08 21:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-08 13:25 [Security, resend] Instant crash with rtl8169 and large packets Michael Tokarev
2009-06-08 14:27 ` Eric Dumazet
2009-06-08 14:53 ` Michael Tokarev
2009-06-08 15:06 ` Eric Dumazet
2009-06-08 15:37 ` Michael Tokarev
2009-06-08 15:59 ` Eric Dumazet
2009-06-08 16:26 ` Michael Tokarev
2009-06-08 17:30 ` Eric Dumazet
2009-06-08 19:28 ` Michael Tokarev
2009-06-08 19:57 ` Michael Tokarev
2009-06-08 21:17 ` Eric Dumazet [this message]
2009-06-08 21:27 ` Michael Tokarev
2009-06-09 11:20 ` Krzysztof Halasa
2009-06-08 22:02 ` Francois Romieu
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=4A2D7FFE.9070701@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjt@tls.msk.ru \
--cc=netdev@vger.kernel.org \
/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).