public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Jeff Garzik <jeff@garzik.org>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>
Subject: Re: [PATCH v2] Re: WAN: new PPP code for generic HDLC
Date: Sat, 12 Apr 2008 22:19:28 +0200	[thread overview]
Message-ID: <m33apqomgf.fsf@maximus.localdomain> (raw)
In-Reply-To: <20080412115950.1cbb9cfa@core> (Alan Cox's message of "Sat\, 12 Apr 2008 11\:59\:50 +0100")

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

>> PPP support in generic HDLC in Linux 2.6.25 is broken and will cause
>> a kernel panic when a device configured in PPP mode is activated.
>> 
>> It will be replaced by new PPP implementation after Linux 2.6.25 is
>> released.
>
> Thats a pretty bad regression. Surely the correct fix is to revert the
> change series that caused the breakage then re-merge that and fixes for
> HDLC PPP for 2.6.26, not just leave it broken ?

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

  reply	other threads:[~2008-04-12 20:19 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12 18:21 WAN: new PPP code for generic HDLC Krzysztof Halasa
2008-03-12 18:30 ` [PATCH] " Krzysztof Halasa
2008-03-12 18:52   ` Stephen Hemminger
2008-03-12 19:25     ` Krzysztof Halasa
2008-03-12 19:38   ` Jan Engelhardt
2008-03-12 20:10     ` Krzysztof Halasa
2008-03-12 22:12       ` Jan Engelhardt
2008-03-14 14:16       ` Krzysztof Halasa
2008-03-14 14:20 ` [PATCH v2] " Krzysztof Halasa
2008-03-25 14:39   ` Krzysztof Halasa
2008-03-25 14:55     ` Jeff Garzik
2008-03-25 15:50       ` Krzysztof Halasa
2008-03-26 23:05       ` Krzysztof Halasa
2008-03-25 23:14     ` David Miller
2008-03-26 15:01       ` Krzysztof Halasa
2008-04-11 21:35     ` Krzysztof Halasa
2008-04-12  5:14       ` Andrew Morton
2008-04-12  8:10         ` Krzysztof Halasa
2008-04-12  8:50           ` Jeff Garzik
2008-04-12 19:25             ` Krzysztof Halasa
2008-04-12 10:59           ` Alan Cox
2008-04-12 20:19             ` Krzysztof Halasa [this message]
2008-04-14 19:16               ` Waskiewicz Jr, Peter P
2008-04-14 21:09                 ` David Miller
2008-04-18 15:58               ` Krzysztof Halasa
2008-04-18 22:32                 ` David Miller
2008-04-21 15:30                   ` Krzysztof Halasa
2008-04-21 19:31                     ` James Chapman
2008-04-22 19:06                       ` Krzysztof Halasa
2008-04-22 21:46                         ` Paul Fulghum
2008-04-22 20:50                           ` Jeff Garzik
2008-04-22 22:05                             ` David Miller
2008-04-23 17:02                               ` Krzysztof Halasa
2008-04-23 22:49                                 ` David Miller
2008-04-24  0:48                                   ` Krzysztof Halasa
2008-04-24  1:08                                     ` David Miller
2008-04-24 13:12                                       ` Krzysztof Halasa
2008-04-24 13:30                                         ` David Miller
2008-04-24 13:39                                           ` Krzysztof Halasa
2008-04-24 13:55                                             ` David Miller
2008-04-24 20:46                                               ` Krzysztof Halasa
2008-04-24 20:44                                                 ` Alan Cox
2008-04-25 11:10                                                   ` Krzysztof Halasa
2008-05-12 10:32                                                   ` David Miller
2008-05-14 12:45                                                     ` Krzysztof Halasa
2008-05-19 17:00                                                       ` [PATCH] WAN: protect HDLC proto list while insmod/rmmod Krzysztof Halasa
2008-05-19 21:06                                                         ` David Miller
2008-05-22 10:27                                                         ` Jeff Garzik
2008-05-14 16:17                                                     ` [PATCH v2] Re: WAN: new PPP code for generic HDLC Krzysztof Halasa
2008-04-24 20:50                                                 ` Krzysztof Halasa
2008-04-22 22:23                             ` James Chapman
2008-04-22 22:51                               ` David Miller
2008-04-22 22:02                           ` David Miller
2008-04-22 23:52                             ` Paul Fulghum
2008-04-12  9:12   ` 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=m33apqomgf.fsf@maximus.localdomain \
    --to=khc@pm.waw.pl \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --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