[ovs-dev] [bisected] every IP fragment now goes to userspace

Ben Pfaff blp at nicira.com
Wed Jun 8 17:51:45 UTC 2011


I accidentally discovered that on "master" every IP fragment ends up
being sent to userspace.  My test case is "netperf -H 192.168.0.2 -t
UDP_STREAM" (which generates 64 kB UDP packets), then observing that
the datapath "miss" counter goes up quickly while the "hit" counter
stays put, as well as noticing that the packet counter for the UDP
datapath flow stays stuck at 0.

This is a regression from branch-1.1 that I bisected to this commit:

commit 76abe283baa043bae84163873b0c7c498bfb260a
Author: Andrew Evans <aevans at nicira.com>
Date:   Wed May 18 11:30:07 2011 -0700

    datapath: Hash and compare only the part of sw_flow_key actually used.
    
    Currently the whole flow key struct is hashed on every packet received from the
    network or userspace. The whole struct is also compared byte-for-byte when
    doing flow table lookups. This consumes a fair percentage of CPU time, and most
    of the time part of the structure is unused (e.g. the IPv6 fields when handling
    IPv4 traffic; the IPv4 fields when handling Ethernet frames).
    
    This commit reorders the fields in the flow key struct to put the least
    commonly used elements at the end and changes the hash and comparison functions
    to look only at the part that contains data.
    
    Signed-off-by: Andrew Evans <aevans at nicira.com>
    Acked-by: Jesse Gross <jesse at nicira.com>

Thanks,

Ben.



More information about the dev mailing list