ofproto-dpif-mirror: Fix insane waste of memory and time in checking VLANs.
authorBen Pfaff <blp@nicira.com>
Fri, 24 Jul 2015 22:30:58 +0000 (15:30 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 27 Jul 2015 22:17:45 +0000 (15:17 -0700)
commit7c7ae3b9eae10b0dcd99cb13a915647cc710fd6d
tree9cd425d90665856ba5f4a0cde26a1657a828d63a
parent5d1c81890c21a2a400da469750c0fb18c545387d
ofproto-dpif-mirror: Fix insane waste of memory and time in checking VLANs.

When a mirror was restricted to particular VLANs, this code was allocating,
copying, and freeing a 512-byte block of memory just to check the value of
a single bit in the block.  This fixes the problem.

Found by inspection.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
ofproto/ofproto-dpif-mirror.c
ofproto/ofproto-dpif-mirror.h
ofproto/ofproto-dpif-xlate.c