HEADS UP on HEAD - PF ABI changes - Re: cvs commit: src/usr.sbin/pfctl parse.y pf.conf.5 pfctl_parser.c src/sys/net/pf pf.c pfvar.h

Matthew Dillon dillon at apollo.backplane.com
Sun Apr 6 16:43:51 PDT 2008


:Wait ... you might want to consider to store the hash in the state instead 
:of calculating it over and over again:
:
:i.e.
:		if (s) {
:			m->m_pkthdr.fw_flags |= ALTQ_MBUF_STATE_HASHED;
:-			m->m_pkthdr.altq_state_hash = pf_state_hash(s);
:+			m->m_pkthdr.altq_state_hash = s->hash;
:		}
:
:and calculate the hash on state creation.
:
:The hash operation is not exactly expensive, but still.  I think this 
:would be space well spent.  Unless there is some padding in your pf state 
:this will result in another ABI change.  OpenBSD recently separated the 
:in-kernel state entry from the information used for pfsync and userland 
:copys, this is a good idea.
:
:-- 
:/"\  Best regards,                      | mlaier at freebsd.org
:\ /  Max Laier                          | ICQ #67774661

    You are absolutely correct. I will make that change.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Commits mailing list