git: kernel - Force manual hash calculation for IP fragments

Matthew Dillon dillon at
Fri Jun 27 10:28:17 PDT 2014

commit aecff6d16ba3e705aa6b0aaae2be1f9ef0e4e37c
Author: Matthew Dillon <dillon at>
Date:   Fri Jun 27 10:24:24 2014 -0700

    kernel - Force manual hash calculation for IP fragments
    * Hardware toeplitz hashes do not always distinguish IP fragments from
      full IP packets.  An IP fragment will typically have the
      (src,dst,srcport,dstport) in the first fragment, but will only have
      (src,dst) in the remaining fragments.  The HW might not understand this
      and generate hashes which prevent the fragments from being directed to
      the same cpu.
    * Force a manual recalculation of the hash (ignore the HW hash) for any
      IP fragment.  That is, any IP packet with the IP_MF bit set or with a
      non-zero offset (masked by IP_OFFMASK).
    * Direct all IP fragments to a target cpu based on the hash.  We previously
      directed all IP fragments to cpu 0.
    * NOTE: The IP fragment handling code in the kernel is still serialized with
    	a lock.  This will be addressed in a later commit.  However, fragments
    	which are piped into PF will now be properly distributed across
    	available cpus.
    Submitted-by: sephe

Summary of changes:
 sys/netinet/ip_demux.c |  6 ++----
 sys/netinet/ip_input.c | 43 ++++++++++++++++++-------------------------
 2 files changed, 20 insertions(+), 29 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list