: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,                      | [EMAIL PROTECTED]
:\ /  Max Laier                          | ICQ #67774661

    You are absolutely correct. I will make that change.

                                        -Matt
                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>

Reply via email to