| To: | Stefan Rompf <srompf@xxxxxx> |
|---|---|
| Subject: | Re: Patch: Backport of link state notification to 2.4.20 |
| From: | Jeff Garzik <jgarzik@xxxxxxxxx> |
| Date: | Tue, 03 Dec 2002 19:43:32 -0500 |
| Cc: | davem@xxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <3DED302A.E3DEB585@isg.de> |
| References: | <3DD2D204.C9B7FA2D@isg.de> <3DED302A.E3DEB585@isg.de> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021126 |
Stefan Rompf wrote:
Hi David, It might be a backport, but I haven't seen a 2.5.x version posted in a while. If this is going into the stable series, it should already be merged in 2.5.x at the same time, if not first. I'd really like to have it in 2.4.21, and as your the one to decide before Marcelo gets it, can you have a look?
comments follow. note these are all minor objections: I think the patch needs revising, but I also think it is ok overall and support its eventual inclusion [after tidying]. Not that my opinion matters much here compared to DaveM's (and Jamal's and Alexey's and...)... overall, I have one question: how does netdev_state_change(dev) propagate link status to userspace? Via the IFF_RUNNING flag's presence/absence when IFF_UP is true? diff -uNr linux-2.4.20rc1/include/linux/netdevice.h linux/include/linux/netdevice.h remove the ifdef, not needed and ifdefs are discouraged in all Linux code.
diff -uNr linux-2.4.20rc1/net/core/Makefile linux/net/core/Makefile
diff -uNr linux-2.4.20rc1/net/core/dev.c linux/net/core/dev.c ug :) the ifdef can be killed, and the prototypes should be in netdevice.h (or any other header), not in mainline code. no need for an ifdef, make linkwatch_init() a no-op static inline for the !CONFIG_LINKWATCH case. +static unsigned long linkwatch_flags = 0; +static unsigned long linkwatch_nextevent = 0; statics are automatically initialized to zero, don't do it explicitly. you waste a couple bytes in the kernel image storing a zero value. + +static void linkwatch_event(void *dummy); +static void linkwatch_timer(unsigned long dummy); + +static struct tq_struct linkwatch_tq; +static struct timer_list linkwatch_ti; + +static LIST_HEAD(lweventlist); +static spinlock_t lweventlist_lock = SPIN_LOCK_UNLOCKED; why initialize some complex structs programmatically and some explicitly? IMO for consistency you should initialize lweventlist_lock in linkwatch_init(). (or vice versa)
+ the high availability folks would prefer a half-second (HZ >> 1). set the timer function after the initialize the timer :) +
Jeff |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Patch: Backport of link state notification to 2.4.20, Stefan Rompf |
|---|---|
| Next by Date: | Re: Patch: Backport of link state notification to 2.4.20, Jeff Garzik |
| Previous by Thread: | Re: Patch: Backport of link state notification to 2.4.20, Stefan Rompf |
| Next by Thread: | Re: Patch: Backport of link state notification to 2.4.20, Jeff Garzik |
| Indexes: | [Date] [Thread] [Top] [All Lists] |