From: Jon Mason <jdmason@us.ibm.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@oss.sgi.com, jgarzik@pobox.com
Subject: Re: [PATCH 2/3] r8169: Large Send enablement
Date: Wed, 3 Nov 2004 18:16:11 -0600 [thread overview]
Message-ID: <200411031816.11675.jdmason@us.ibm.com> (raw)
In-Reply-To: <20041102191103.GA24860@electric-eye.fr.zoreil.com>
On Tuesday 02 November 2004 01:11 pm, Francois Romieu wrote:
[...]
> - If rtl8169_open() fails [*] when the device was previously up, the driver
> could/should try to recover.
I disagree. It should fail, complain loudly, and let the user try and fix it
(or return it to the previous state). The code provided below will act like
it is successful in changing the MTU, even if it hits an error and is in the
process of recovering. This will cause more difficult to diagnose problems.
> Untested example below to clarify.
>
> [*] page allocation failure, bigger mtu/rx buffers -> I feel moderately
> confortable.
>
>
> diff -puN drivers/net/r8169.c~r8169-240 drivers/net/r8169.c
> --- linux-2.6.9/drivers/net/r8169.c~r8169-240 2004-10-21 21:55:45.000000000
> +0200 +++ linux-2.6.9-fr/drivers/net/r8169.c 2004-11-01 23:10:25.000000000
> +0100 @@ -120,6 +120,8 @@ static int multicast_filter_limit = 32;
> #define RX_BUF_SIZE 1536 /* Rx Buffer size */
> #define R8169_TX_RING_BYTES (NUM_TX_DESC * sizeof(struct TxDesc))
> #define R8169_RX_RING_BYTES (NUM_RX_DESC * sizeof(struct RxDesc))
> +#define R8169_MIN_MTU 8
> +#define R8169_MAX_MTU ((2 << 14) - 1)
[...]
> @@ -2223,6 +2247,72 @@ out:
> return IRQ_RETVAL(handled);
> }
>
> +static int rtl8169_set_rxbufsize(struct rtl8169_private *tp, int mtu)
> +{
> + if (mtu < R8169_MIN_MTU || mtu > R8169_MAX_MTU)
Is 8 really a valid MTU?
--
Jon Mason
jdmason@us.ibm.com
next prev parent reply other threads:[~2004-11-04 0:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-02 18:03 [PATCH 2/3] r8169: Large Send enablement Jon Mason
2004-11-02 19:11 ` Francois Romieu
2004-11-04 0:16 ` Jon Mason [this message]
2004-11-04 18:45 ` Francois Romieu
2004-11-05 5:50 ` Jon Mason
2004-11-04 0:17 ` [PATCH] r8169: Large Send enablement, part 2 Jon Mason
2004-11-02 19:50 ` [PATCH 2/3] r8169: Large Send enablement Jeff Garzik
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=200411031816.11675.jdmason@us.ibm.com \
--to=jdmason@us.ibm.com \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
--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 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).