public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Kernel 2.2.18: Protocol 0008 is buggy
@ 2001-01-31  2:58 Ivan Passos
  2001-01-31 13:37 ` Alan Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Ivan Passos @ 2001-01-31  2:58 UTC (permalink / raw)
  To: Linux Kernel List


Hello,

I have a customer who's getting tons of these msgs in his LOGs:

kernel: protocol 0008 is buggy, dev hdlc0
kernel: protocol 0608 is buggy, dev hdlc0

The msg comes from net/core/dev.c, and this device is using the Cisco HDLC 
protocol in drivers/net/hdlc.c . However, AFAIK, 0008 and 0608 represent
IP and ARP (respectively), not Cisco HDLC. So ...

What I'd like to know is: what exactly causes this msg?? It seems that
it's printed when someone sends a packet without properly setting 
skb->nh.raw first, but who's supposed to set skb->nh.raw?? The HW driver??
The data link (HDLC) driver?? The kernel protocol drivers? How should I go
about fixing this problem, where should I start??

I'm at a total loss here. Any help would be really appreciated.

Later,
Ivan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Kernel 2.2.18: Protocol 0008 is buggy
  2001-01-31  2:58 Kernel 2.2.18: Protocol 0008 is buggy Ivan Passos
@ 2001-01-31 13:37 ` Alan Cox
  2001-01-31 15:43   ` Ivan Passos
  2001-01-31 15:46   ` Ivan Passos
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Cox @ 2001-01-31 13:37 UTC (permalink / raw)
  To: Ivan Passos; +Cc: Linux Kernel List

> The msg comes from net/core/dev.c, and this device is using the Cisco HDLC 
> protocol in drivers/net/hdlc.c . However, AFAIK, 0008 and 0608 represent
> IP and ARP (respectively), not Cisco HDLC. So ...
> 
> What I'd like to know is: what exactly causes this msg?? It seems that
> it's printed when someone sends a packet without properly setting 
> skb->nh.raw first, but who's supposed to set skb->nh.raw?? The HW driver??
> The data link (HDLC) driver?? The kernel protocol drivers? How should I go
> about fixing this problem, where should I start??

It should be set before netif_rx() is called on the packet. Typically that
means the driver or its support code sets protocol and nh.raw and if a
second header is pulled up then they are set again by whichever code does that
and calls netif_rx again

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Kernel 2.2.18: Protocol 0008 is buggy
  2001-01-31 13:37 ` Alan Cox
@ 2001-01-31 15:43   ` Ivan Passos
  2001-01-31 19:12     ` Alan Cox
  2001-01-31 15:46   ` Ivan Passos
  1 sibling, 1 reply; 5+ messages in thread
From: Ivan Passos @ 2001-01-31 15:43 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linux Kernel List


On Wed, 31 Jan 2001, Alan Cox wrote:

> > What I'd like to know is: what exactly causes this msg?? It seems that
> > it's printed when someone sends a packet without properly setting 
> > skb->nh.raw first, but who's supposed to set skb->nh.raw?? The HW driver??
> > The data link (HDLC) driver?? The kernel protocol drivers? How should I go
> > about fixing this problem, where should I start??
> 
> It should be set before netif_rx() is called on the packet. Typically that
> means the driver or its support code sets protocol and nh.raw and if a
> second header is pulled up then they are set again by whichever code does that
> and calls netif_rx again

Alan,

Could you please tell me where I can find an example of this?? I searched
the whole drivers/net directory, and couldn't find any occurrence.

Is this really supposed to be done in the HW driver / support code level,
or is it supposed to be done in the protocol (IP / ARP) level??

Thanks for the reply!!

Later,
Ivan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Kernel 2.2.18: Protocol 0008 is buggy
  2001-01-31 13:37 ` Alan Cox
  2001-01-31 15:43   ` Ivan Passos
@ 2001-01-31 15:46   ` Ivan Passos
  1 sibling, 0 replies; 5+ messages in thread
From: Ivan Passos @ 2001-01-31 15:46 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linux Kernel List


On Wed, 31 Jan 2001, Alan Cox wrote:
> 
> It should be set before netif_rx() is called on the packet. Typically that
> means the driver or its support code sets protocol and nh.raw and if a
> second header is pulled up then they are set again by whichever code does that
> and calls netif_rx again

Another question. The function that prints the "buggy protocol" msg is
dev_queue_xmit_nit(), which is called by dev_queue_xmit(). Isn't that a Tx
function?? What would it have to do with netif_rx() (which from what I
understand is called to send Rx packets upstream, not used in the Tx
datapath)??

Thanks again!

Later,
Ivan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Kernel 2.2.18: Protocol 0008 is buggy
  2001-01-31 15:43   ` Ivan Passos
@ 2001-01-31 19:12     ` Alan Cox
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Cox @ 2001-01-31 19:12 UTC (permalink / raw)
  To: Ivan Passos; +Cc: Alan Cox, Linux Kernel List

> Is this really supposed to be done in the HW driver / support code level,
> or is it supposed to be done in the protocol (IP / ARP) level??

oops I was half asleep

Driver sets

	skb->mac.raw
	skb->pkt_type
	skb->protocol
(see net/ethernet/eth.c)

	skb->h.raw and skb->nh.raw are set by the receive action code

On transmit

	nh.raw is set by the protocol
	

Note that non -ac kernels have a bug where a packet consisting of pure mac
header causes bogus warnings

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-01-31 19:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-31  2:58 Kernel 2.2.18: Protocol 0008 is buggy Ivan Passos
2001-01-31 13:37 ` Alan Cox
2001-01-31 15:43   ` Ivan Passos
2001-01-31 19:12     ` Alan Cox
2001-01-31 15:46   ` Ivan Passos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox