Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Oct 2000 07:29:28 +0200 (CEST)
From:      Luigi Rizzo <luigi@info.iet.unipi.it>
To:        Archie Cobbs <archie@whistle.com>
Cc:        bmilekic@FreeBSD.ORG, freebsd-net@FreeBSD.ORG
Subject:   Re: ip_input.c patch
Message-ID:  <200010110529.HAA85814@info.iet.unipi.it>
In-Reply-To: <200010110136.e9B1aJo40890@bubba.whistle.com> from Archie Cobbs at "Oct 10, 2000 06:36:19 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> Luigi Rizzo writes:
> > > Does this patch look appropriate to you?
> > 
> > wouldn't it be better to just avoid the problem in the first place
> > by removing the conversion to host format and fixing the rest
> > of the code to handle things in net format ?
> 
> Sounds OK to me.. maybe some asm() guru can come up with some
> fast functions for adding and subtracting byte-swapped values.

don't think there is much need for that... ip_len and ip_off are
mostly or probably only used in ip_input() and there you just need
to fetch&swap a copy of the value into a local variable on entry
and use the local variable afterwards. Even better for ip_id which
is only used for equality comparisons...

	cheers
	luigi

> -Archie
> 
> ___________________________________________________________________________
> Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010110529.HAA85814>