* netpoll causes malformed protocol message
[not found] ` <Pine.LNX.4.64.0610181501490.3962@g5.osdl.org>
@ 2006-10-18 22:49 ` Stephen Hemminger
2006-10-19 3:04 ` [RFT] netpoll: fully initialize skb Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2006-10-18 22:49 UTC (permalink / raw)
To: Linus Torvalds, David S. Miller; +Cc: Jeff Garzik, netdev
Now that I know what this is, perhaps others should know.
> Linus Torvalds <torvalds@osdl.org> wrote:
>
> >
> > Since I've been re-testing the Apple Intel Mac Mini suspend/resume due to
> > a USB problem, I thought I might as well see if this rings any bells..
> >
> > On resume, networking does actually eventually work, but it takes a while
> > before it gets going. The dmesg for the resume shows:
> >
> > sky2 eth0: Link is up at 100 Mbps, full duplex, flow control both
> > protocol 0000 is buggy, dev eth0
> > protocol 0000 is buggy, dev eth0
>
>
The packets created by netpoll trigger the check for bogus protocol
in net/core/dev.c if it gets busy enough to actually use the netpoll
tx queue.
I'll whip a fix, the skb should be setup better and it shouldn't call
different xmit paths for the queued/non-queued case. Follow on patch
to replace the roll your own skb queue's with the already there sk_buff_head
routines. Given the normal case is lots of small writes, probably
better to just have a character queue to cause coalescing.
The netpoll code is a step child it looks like and ignores using
standard code when it should.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [RFT] netpoll: fully initialize skb
2006-10-18 22:49 ` netpoll causes malformed protocol message Stephen Hemminger
@ 2006-10-19 3:04 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2006-10-19 3:04 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Linus Torvalds, David S. Miller, Jeff Garzik, netdev
This stops the
protocol 0000 is buggy, dev eth0
messages from occurring when netpoll decides to queue packets.
It fully initializes the protocol fields.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
If you want to wait on including it, I intend to rollup all the netpoll
patches into a patchbomb tomorrow.
--- netpoll.orig/net/core/netpoll.c
+++ netpoll/net/core/netpoll.c
@@ -335,13 +335,13 @@ void netpoll_send_udp(struct netpoll *np
memcpy(skb->data, msg, len);
skb->len += len;
- udph = (struct udphdr *) skb_push(skb, sizeof(*udph));
+ skb->h.uh = udph = (struct udphdr *) skb_push(skb, sizeof(*udph));
udph->source = htons(np->local_port);
udph->dest = htons(np->remote_port);
udph->len = htons(udp_len);
udph->check = 0;
- iph = (struct iphdr *)skb_push(skb, sizeof(*iph));
+ skb->nh.iph = iph = (struct iphdr *)skb_push(skb, sizeof(*iph));
/* iph->version = 4; iph->ihl = 5; */
put_unaligned(0x45, (unsigned char *)iph);
@@ -357,8 +357,8 @@ void netpoll_send_udp(struct netpoll *np
iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl);
eth = (struct ethhdr *) skb_push(skb, ETH_HLEN);
-
- eth->h_proto = htons(ETH_P_IP);
+ skb->mac.raw = skb->data;
+ skb->protocol = eth->h_proto = htons(ETH_P_IP);
memcpy(eth->h_source, np->local_mac, 6);
memcpy(eth->h_dest, np->remote_mac, 6);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-19 3:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.64.0610152043060.3962@g5.osdl.org>
[not found] ` <20061017170147.08edc149@freekitty>
[not found] ` <Pine.LNX.4.64.0610171712050.3962@g5.osdl.org>
[not found] ` <20061017190321.0414fb38@dads-laptop>
[not found] ` <Pine.LNX.4.64.0610172129320.3962@g5.osdl.org>
[not found] ` <20061017214830.07cb89bb@dads-laptop>
[not found] ` <Pine.LNX.4.64.0610180932500.3962@g5.osdl.org>
[not found] ` <Pine.LNX.4.64.0610181002390.3962@g5.osdl.org>
[not found] ` <Pine.LNX.4.64.0610181014230.3962@g5.osdl.org>
[not found] ` <20061018125629.5f480ff7@dxpl.pdx.osdl.net>
[not found] ` <Pine.LNX.4.64.0610181310040.3962@g5.osdl.org>
[not found] ` <20061018144553.6a40e0a4@dxpl.pdx.osdl.net>
[not found] ` <Pine.LNX.4.64.0610181501490.3962@g5.osdl.org>
2006-10-18 22:49 ` netpoll causes malformed protocol message Stephen Hemminger
2006-10-19 3:04 ` [RFT] netpoll: fully initialize skb Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).