Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Alan Cox <alan@...>
Cc: Andrew Morton <akpm@...>, Jeff Garzik <jeff@...>, <linux-kernel@...>, <netdev@...>
Date: Saturday, April 12, 2008 - 4:19 pm

Alan Cox <alan@lxorguk.ukuu.org.uk> writes:


It's not that simple - it was broken between 2.6.22 and 2.6.23 (2.6.23
was already broken), I just haven't noticed (I don't use PPP myself,
except for tests).

author	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
	 Fri, 6 Jul 2007 20:36:20 +0000 (13:36 -0700)
commit	f25f4e44808f0f6c9875d94ef1c41ef86c288eb2

[CORE] Stack changes to add multiqueue hardware support API
Add the multiqueue hardware device support API to the core network
stack.  Allow drivers to allocate multiple queues and manage them at
the netdev level if they choose to do so.

Added a new field to sk_buff, namely queue_mapping, for drivers to
know which tx_ring to select based on OS classification of the flow.

And it included:
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -565,9 +578,7 @@ struct net_device
 
 static inline void *netdev_priv(const struct net_device *dev)
 {
-       return (char *)dev + ((sizeof(struct net_device)
-                                       + NETDEV_ALIGN_CONST)
-                               & ~NETDEV_ALIGN_CONST);
+       return dev->priv;
 }
 
 #define SET_MODULE_OWNER(dev) do { } while (0)


HDLC PPP sits between hardware drivers and (in this case) syncppp.c,
and it (hdlc_ppp module) was using netdev_priv() as a pointer to the
memory allocated with (after) the netdev structure. dev->priv was used
by syncppp.c.

HDLC FR was also broken by this change but the fix was easy because
there is no external protocol module to interface to.

I didn't want to add to the HDLC PPP mess anymore and have rewritten
it instead (in process, it turned out syncppp alone, and syncppp +
HDLC have much more problems than I thought). Obviously I was way too
late for 2.6.25 (past 2.6.25-rc5 and the new code wasn't much tested).


Yes, I could add another dirty "interface fix" to the HDLC + syncppp
combo (hdlc_ppp), but I don't really see a sense, especially that I
have the new implementation ready and working (my time resources are
currently quite limited and if I have to choose between adding another
glue fix and writing a better PPP replacement I pick the latter).


My original post: http://lkml.org/lkml/2008/3/12/277
-- 
Krzysztof Halasa
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Wed Mar 12, 2:21 pm)
[PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Fri Mar 14, 10:20 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Tue Mar 25, 10:39 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Fri Apr 11, 5:35 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Andrew Morton, (Sat Apr 12, 1:14 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Sat Apr 12, 4:10 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Jeff Garzik, (Sat Apr 12, 4:50 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Sat Apr 12, 3:25 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Sat Apr 12, 4:19 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Fri Apr 18, 11:58 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, David Miller, (Fri Apr 18, 6:32 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Mon Apr 21, 11:30 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, James Chapman, (Mon Apr 21, 3:31 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Tue Apr 22, 3:06 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Paul Fulghum, (Tue Apr 22, 5:46 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, David Miller, (Tue Apr 22, 6:02 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Paul Fulghum, (Tue Apr 22, 7:52 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Jeff Garzik, (Tue Apr 22, 4:50 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, James Chapman, (Tue Apr 22, 6:23 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, David Miller, (Tue Apr 22, 6:51 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, David Miller, (Tue Apr 22, 6:05 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Wed Apr 23, 1:02 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, David Miller, (Wed Apr 23, 6:49 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Wed Apr 23, 8:48 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, David Miller, (Wed Apr 23, 9:08 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Thu Apr 24, 9:12 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, David Miller, (Thu Apr 24, 9:30 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Thu Apr 24, 9:39 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, David Miller, (Thu Apr 24, 9:55 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Thu Apr 24, 4:46 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, David Miller, (Mon May 12, 6:32 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Wed May 14, 12:17 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Wed May 14, 8:45 am)
[PATCH] WAN: protect HDLC proto list while insmod/rmmod, Krzysztof Halasa, (Mon May 19, 1:00 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Fri Apr 25, 7:10 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Thu Apr 24, 4:50 pm)
RE: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Waskiewicz Jr, Peter P, (Mon Apr 14, 3:16 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, David Miller, (Mon Apr 14, 5:09 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Jeff Garzik, (Tue Mar 25, 10:55 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Tue Mar 25, 11:50 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Wed Mar 26, 7:05 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, David Miller, (Tue Mar 25, 7:14 pm)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Wed Mar 26, 11:01 am)
Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC, Jeff Garzik, (Sat Apr 12, 5:12 am)
[PATCH] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Wed Mar 12, 2:30 pm)
Re: [PATCH] Re: WAN: new PPP code for generic HDLC, Jan Engelhardt, (Wed Mar 12, 3:38 pm)
Re: [PATCH] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Wed Mar 12, 4:10 pm)
Re: [PATCH] Re: WAN: new PPP code for generic HDLC, Jan Engelhardt, (Wed Mar 12, 6:12 pm)
Re: [PATCH] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Fri Mar 14, 10:16 am)
Re: [PATCH] Re: WAN: new PPP code for generic HDLC, Stephen Hemminger, (Wed Mar 12, 2:52 pm)
Re: [PATCH] Re: WAN: new PPP code for generic HDLC, Krzysztof Halasa, (Wed Mar 12, 3:25 pm)