| To: | Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] [2.4] forcedeth network driver |
| From: | Jeff Garzik <jgarzik@xxxxxxxxx> |
| Date: | Sat, 24 Jan 2004 15:21:26 -0500 |
| Cc: | Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2004@xxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Netdev <netdev@xxxxxxxxxxx> |
| In-reply-to: | <4012BF44.9@colorfullife.com> |
| References: | <4012BF44.9@colorfullife.com> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703 |
Manfred Spraul wrote:
Jeff wrote: Any amount of load at all will lead to multiple interations of the master loop in the interrupt handler. Right now: enum for the nic registers, #define for the rest. If you don't like it I can change it.+#define NV_MIIPHY_DELAY 10 +#define NV_MIIPHY_DELAYMAX 10000 enums are definitely preferred... communicates more type/symbol information to the compiler and more symbol info to the debugger. I think I copied it from another driver - which value would you recommend?+/* General driver defaults */ +#define NV_WATCHDOG_TIMEO (2*HZ) 5 seconds is the norm, but it also depends on whether your link interrupt is 100% reliable. If you don't have to synchronize the link watchdog timeout with other driver-private timers, the task is easier. Tangent -- you may wish to check for link in ->tx_timeout(), before resetting the NIC. Again, this depends on link interrupt/timer setup as well. The basic point is that TX timeout -may- occur because link went away. One way to handle this is to ensure that link-down events are always noticed before the watchdog timer kicks. Another way to handle this is to simply check for link when ->tx_timeout() is called. I usually try to write code that compiles as cpp - is that a forbidden in kernel modules? It's pointless in C, and so I've been stripping such casts out of all net drivers when I find them.
hmmmm, is nForce ever found on non-x86 boxes? I would think that skb_reserve might be -required- for some platforms. I wonder about calling dev_kfree_skb() from dev->tx_timeout() with dev->xmit_lock held...Is that bug in the networking core still not fixed?
What is the xxx_kfree_skb_xxx function that just works?+ /* 2) check that the packets were not sent already: */ + tx_done(dev);
Just guessing - it shouldn't hurt. CPU usage won't be important until nForce supports GigE. Should I remove it for now?+ /* I would rather remove it. "premature optimization" and all that. Otherwise this guess will be cut-n-pasted into other drivers, I guarantee, all without any verification of the guess... :) What should the nic do? I'll continue to allocate 1.8 kB buffers because I don't know how to reconfigure the nic hardware to reject large packets. Fair enough. You may wish to (after testing!) increase DEFAULT_MTU by 4 bytes, to support VLAN. bug #2: need a minimum bound for the MTU as wellWhat is the minimum MTU? I remember a flamewar lkml about 200 byte MTU for noisy radio links.
What causes 0xfffffff? Hotplug? I think the irq handler could leave immediately if a reserved bit is set. I'll add that.
MII id 0 a valid mii address? Or is that broadcast to all?+ if (i == 32) { It's usually something akin to an alias of one of the other phy id's, but if you found -no- phys at all, it wouldn't hurt to try zero. Thanks, Jeff |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: FW: Submission for S2io 10GbE driver, Leonid Grossman |
|---|---|
| Next by Date: | Compile Error with r8179.c, Christoph Lameter |
| Previous by Thread: | Re: [PATCH] [2.4] forcedeth network driver, Jeff Garzik |
| Next by Thread: | Re: [PATCH] [2.4] forcedeth network driver, Carl-Daniel Hailfinger |
| Indexes: | [Date] [Thread] [Top] [All Lists] |