[ovs-dev] [PATCH v5 2/6] classifier: Pre-compute stage masks.
jrajahalme at nicira.com
Wed Aug 26 23:04:19 UTC 2015
> On Aug 26, 2015, at 9:06 AM, Ben Pfaff <blp at nicira.com> wrote:
> On Fri, Aug 21, 2015 at 03:25:19PM -0700, Jarno Rajahalme wrote:
>> This makes stage mask computation happen only when a subtable is
>> inserted and allows simplification of the main lookup function.
>> Classifier benchmark shows that this speeds up the classification
>> (with wildcards) about 5%.
>> Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
> In miniflow_equal_maps(), if we believe that tnl_map is usually 0, then
> it would be profitable to test pkt_map first to allow short-circuiting
> to bail out earlier, e.g.:
> static inline bool
> miniflow_equal_maps(const struct miniflow *a, const struct miniflow *b)
> return a->pkt_map == b->pkt_map && a->tnl_map == b->tnl_map;
> Of course that's a super-micro-optimization.
> Acked-by: Ben Pfaff <blp at nicira.com>
Thanks for the review. I decided not to take the change in, as this is changed in the following flowmap patch.
Applied to master,
More information about the dev