Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jul 2001 01:07:28 +0200 (CEST)
From:      Luigi Rizzo <luigi@info.iet.unipi.it>
To:        cjclark@alum.mit.edu
Cc:        freebsd-ipfw@FreeBSD.ORG
Subject:   Re: BRIDGE in ip_fw.c
Message-ID:  <200106302307.BAA27133@info.iet.unipi.it>
In-Reply-To: <20010630121500.F348@blossom.cjclark.org> from "Crist J. Clark" at "Jun 30, 2001 12:15:00 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> I am about to put some fixes/enhancements up for review before

i would be grateful if you could send me a summary 
(not the code, just a description) of the
changes you have planned to commit

> committing them to CURRENT. Before I do that, I need have a question
> about some of the code in ip_fw.c,
> 
> 	if (0 && BRIDGED) { /* not yet... */
> 	    offset = (ntohs(ip->ip_off) & IP_OFFMASK);
> 	    ip_len = ntohs(ip->ip_len);
> 	} else {
> 	    offset = (ip->ip_off & IP_OFFMASK);
> 	    ip_len = ip->ip_len;
> 	}
> 
> What's the deal with that zeroed out code? (And wouldn't it be better
> form to zero it out in the preprocessor?)

the compiler will remove the unused  code anyways.

The "not yet" comment refers to the fact that my
plan for bridged packets was to make the mbufs readonly
as much as possible, thus avoiding the NTOHS() calls
on ip_off and ip_len fields and in turn an m_pullup()
and the associated data copy when you need do duplicate
the buffer.

	cheers
	luigi

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




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