linux-um archives
 help / color / mirror / Atom feed
From: Lars Ellenberg <Lars.Ellenberg@linbit.com>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] uml "ip header error" for large (fragmented) udp packets
Date: Thu, 7 Oct 2004 22:24:54 +0200	[thread overview]
Message-ID: <RO4HJxErhAMlOpdbW1UCZm8=lge@web.de> (raw)
In-Reply-To: <200410072041.51890.blaisorblade_spam@yahoo.it>

/ 2004-10-07 20:41:51 +0200
\ BlaisorBlade:
> On Wednesday 06 October 2004 22:35, Andi Kleen wrote:
> > On Wed, Oct 06, 2004 at 08:48:23PM +0200, Lars Ellenberg wrote:

> > > FYI, full thread can be found for example at
> > > http://thread.gmane.org/gmane.linux.uml.devel/4607
> 
> > Paolo's analysis is basically correct. loopback sets this flag
> > for better performance.  Actually in 2.6 it probably doesn't help
> > very much anymore because TCP can do checksum copy RX now, and that
> > would get the checksum basically for free. But it's still there
> > and may still make things slightly faster.
> First thing: thanks a lot for your quick answer.
> 
> My discussion about "lo" was slightly unrelated to the exact problem, and a 
> bit confusing...
> 
> I was at first surprised from Ethereal complaining about the host kernel, so I 
> thought I could have a buggy Ethereal, and then went checking that it's a 
> Linux optimization, indeed.
> 
> > If UML taps the packets from lo it will see incorrect checksums.
> > Using a tun or ethertap device would avoid this.
> 
> > In the worst 
> > case you could also just delete the flag from the loopback
> > interface, it's only an optimization.
> 
> No, inside the Uml kernel they go through a virtual "ethN" interface, which 
> uses special code. That driver, in turn, will use either ethertap, or TAP (it 
> sends Ethernet frames), or even other mechanism.
> 
> You can find it (in 2.6.9-rc2 at least) in arch/um/drivers/net_*.c and 
> arch/um/os-Linux/drivers/*tap*.c. The code in *_kern.c files links against 
> the kernel API and includes, *_user.c against the host userspace includes.
> 
> And the problem is, probably, that the UML network drivers never declare their 
> checksumming status, as I said in the previous mail:
> 
> [quote]
> include/linux/skbuff.h describes the Checksum flags, and UML does not use 
> them: these two commands return no (relevant) output.
> 
> find arch/um/ -name '*.[ch]'|xargs grep NETIF
> find arch/um/ -name '*.[ch]'|xargs grep CHECKSUM
> [/quote]
> 
> And not even these ones:
> 
> find arch/um/ -name '*.[ch]'|xargs grep NETIF
> find arch/um/ -name '*.[ch]'|xargs grep CHECKSUM
> 
> Also, it's possible that there are even other bugs...

now, what I found:
arch/um/drivers/net_kern.c:
struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra)
{
	if((skb != NULL) && (skb_tailroom(skb) < extra)){
	  	struct sk_buff *skb2;

		skb2 = skb_copy_expand(skb, 0, extra, GFP_ATOMIC);
		dev_kfree_skb(skb);
		skb = skb2;
	}
	if(skb != NULL) skb_put(skb, extra);
	return(skb);
}

net/core/skbuff.c:
 *	BUG ALERT: ip_summed is not copied. Why does this work? Is it used
 *	only by netfilter in the cases when checksum is recalculated? --ANK
 */
struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
				int newheadroom, int newtailroom, int gfp_mask)
{


does that trigger something in someones brain maybe?
someone "sees" it?

otherwise I keep poking around...

	lge



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2004-10-07 20:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-03  2:36 [uml-devel] uml "ip header error" for large (fragmented) udp packets Lars Ellenberg
2004-10-03 15:11 ` BlaisorBlade
2004-10-03 19:29   ` Lars Ellenberg
2004-10-04 11:07   ` Gerd Knorr
2004-10-04 11:56     ` Henrik Nordstrom
2004-10-06 17:50 ` BlaisorBlade
2004-10-06 18:48   ` Lars Ellenberg
2004-10-06 20:35     ` Andi Kleen
2004-10-06 21:48       ` Lars Ellenberg
2004-10-07 18:41         ` BlaisorBlade
2004-10-07 18:41       ` BlaisorBlade
2004-10-07 20:24         ` Lars Ellenberg [this message]
2004-10-11 17:55           ` Lars Ellenberg
2004-10-12  0:03             ` [uml-devel] SOLVED: " Lars Ellenberg
2004-10-12  0:11               ` Andi Kleen
2004-10-12  1:10                 ` BlaisorBlade
2004-10-12  1:53                   ` Michael Richardson
2004-10-15 15:25                   ` [uml-devel] larger MTU _does_ work Lars Ellenberg
2004-10-12  0:27               ` [uml-devel] SOLVED: uml "ip header error" for large (fragmented) udp packets BlaisorBlade
2004-10-12 14:00                 ` Lars Ellenberg

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='RO4HJxErhAMlOpdbW1UCZm8=lge@web.de' \
    --to=lars.ellenberg@linbit.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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