Hi Folks, This patchset is a v2 on previous patches as in this bundle: https://patchwork.ozlabs.org/bundle/hvanhaar/dpcls_func_ptr_opt/
The work contained in this patchset achieves the following; Patch 1: Refactor dpcls_lookup and the subtable for flexibility. In particular, add a function pointer to the subtable structure, which enables "plugging-in" a lookup function at runtime. This enables a number of optimizations in future. Patch 2 & 3: With the function pointer in place, we refactor the existing dpcls_lookup matching code into its own function, and later its own file. To split it to its own file requires making various dpcls data-structures available in the dpif-netdev.h header. Patch 4: Re-implement and optimize dpcls_rule_matches_key() by removing the "loopy-branch-ness" of the FOR_EACH() macros used. Instead a popcount() approach is used, which is much more CPU performance friendly, due to reduced branches/loads-stores and total work done. Performance: Patches 1, 2 and 3 are performance neutral in testing here. The fourth patch provides a significant performance improvement when dpcls or SMC are processing packets. Feedback, reviews, performance numbers weclomed! -Harry Harry van Haaren (4): dpif-netdev: implement function pointers/subtable dpif-netdev: move dpcls lookup structures to .h dpif-netdev: split out generic lookup function dpif-netdev: optimized dpcls_rule_matches_key() lib/automake.mk | 1 + lib/dpif-netdev-lookup-generic.c | 95 +++++++++++++++++++++++ lib/dpif-netdev.c | 124 +++---------------------------- lib/dpif-netdev.h | 118 +++++++++++++++++++++++++++++ 4 files changed, 226 insertions(+), 112 deletions(-) create mode 100644 lib/dpif-netdev-lookup-generic.c -- 2.17.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
