From: Krzysztof Halasa <khc@pm.waw.pl>
To: David Miller <davem@davemloft.net>
Cc: kuznet@ms2.inr.ac.ru, netdev@vger.kernel.org
Subject: Re: [PATCH] NET: fix kernel panic from no dev->hard_header_len space
Date: Tue, 01 Aug 2006 03:56:22 +0200 [thread overview]
Message-ID: <m3bqr5z0ah.fsf@defiant.localdomain> (raw)
In-Reply-To: <20060731.181314.27783697.davem@davemloft.net> (David Miller's message of "Mon, 31 Jul 2006 18:13:14 -0700 (PDT)")
David Miller <davem@davemloft.net> writes:
>> hdlc_fr: logical PVC devices have no headers (plain IPv4 etc. as seen
>> by tcpdump), but they append FR headers (4 or 10 bytes long) just
>> before passing the skb to physical device.
>
> If you hooked up fr_hard_header into dev->hard_header instead of
> invoking it via pvc_xmit(), everything would be fine.
That would have to be master_device->hard_header(), but the network
stack (IP and friends) has to send packets to pvc_device.
I can't make the headers show up on pvc device - that would break
packet interface and Ethernet framing. The headers have to be
visible only on master (physical) device.
> The complexity of this function arises from the fact that it prepends
> headers of differing lengths depending upon the protocol type
> being encapsulated, and this is the problem you should aim to
> solve.
Actually I don't think there is a problem with different header
lengths. The driver indicates it wants 10 bytes and that's enough
for all cases (except Ethernet framing where it indicates and uses
14 bytes and reallocs before prepending another 10 bytes).
> Alexey, any suggestions on how to handle this kind of thing?
What's wrong with my patch?
If it can's be accepted I can just add an empty pvc->hard_header().
That won't make other drivers work reliably, though, and it's IMHO
hardly their author's fault. I don't think we've ever advertised
"hard_header_len is valid only with non-NULL hard_header".
--
Krzysztof Halasa
next prev parent reply other threads:[~2006-08-01 1:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-27 13:56 [PATCH] NET: fix kernel panic from no dev->hard_header_len space Krzysztof Halasa
2006-07-27 16:43 ` Alexey Kuznetsov
2006-07-27 17:28 ` Krzysztof Halasa
2006-07-28 14:11 ` Krzysztof Halasa
2006-07-30 16:40 ` Krzysztof Halasa
2006-07-30 22:30 ` David Miller
2006-07-31 15:39 ` Alexey Kuznetsov
[not found] ` <m3r701zgku.fsf@defiant.localdomain>
2006-07-31 20:23 ` David Miller
2006-08-01 1:04 ` Krzysztof Halasa
2006-08-01 1:13 ` David Miller
2006-08-01 1:56 ` Krzysztof Halasa [this message]
2006-08-01 19:54 ` Alexey Kuznetsov
2006-08-02 0:24 ` Krzysztof Halasa
2006-08-02 0:38 ` David Miller
2006-08-02 21:11 ` Krzysztof Halasa
2006-07-31 20:24 ` David Miller
2006-08-01 20:25 ` Alexey Kuznetsov
2006-08-02 0:42 ` Krzysztof Halasa
2006-08-02 0:48 ` David Miller
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=m3bqr5z0ah.fsf@defiant.localdomain \
--to=khc@pm.waw.pl \
--cc=davem@davemloft.net \
--cc=kuznet@ms2.inr.ac.ru \
--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