Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Apr 2002 11:39:54 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        net@freebsd.org
Subject:   ip_flow and ipf_tos
Message-ID:  <3CCC41FA.D2BA610E@mindspring.com>

next in thread | raw e-mail | index | archive | help
It seems to me that it would be useful to break out the ip_tos
field in the ipflow_lookup() function, just like in the ipflow_hash()
function, and make it an unsigned long (the packing of the structure
makes it a 32 bit value (or 64 bit, on Alpha) anyway.

This also means calling the mtod() (which is a macro) before the call
to ipflow_create() and adding a u_long parameter there (or u_int32_t,
if you prefer).

The net upshot of this is that it would be possible to use any
unsigned (32 bit, in most cases) value to do the flow identification,
so that, other than ipflow_fastforward() itself, the ip_tos is not
necessarily used for the flow identification.

This is useful for local hash preterbation: the common case for any
application other than a generic router is going to have identical
ip_tos values on almost all traffic, which makes it not very useful
for uniquifying the hash.

Rather than dictate what I personally think would be useful, I'd
like to have implementation-not-policy; also, the break out of the
value would make the code more generally useful.

Right now, ip_tos (and ipf_tos) is an 8 bit value, of which only
the first 6 bits are used in the hash, while the hash value pass
itself is a 32 bit value (in most cases: it's "unsigned").  I'd
like to push the value into the same space as the src.s_addr
feedback, which would have the net effect of making 2 more bits
of the standard implementation useful.

What do people think about this?  The changes themselves are really
trivial, and it only puts an extra push/pop into the common code
path in order to get the functionality, and doesn't bloat the data
structure size at all...


-- Terry

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?3CCC41FA.D2BA610E>