odp-util: Update ODPUTIL_FLOW_KEY_BYTES for current kernel flow format.
authorBen Pfaff <blp@nicira.com>
Tue, 15 May 2012 19:50:57 +0000 (12:50 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 16 May 2012 19:24:11 +0000 (12:24 -0700)
commit37cbc793a61c32926784f1dbe39b37f6bbdf9901
tree320bfb89e0e7c757527304272a8c278a1a15c0c0
parent4682afa0312f23b597f8c4e984b42b1f1780917e
odp-util: Update ODPUTIL_FLOW_KEY_BYTES for current kernel flow format.

Before we submitted the kernel module upstream, we updated the flow format
by adding two fields to the description of packets with VLAN headers, but
we forgot to update ODPUTIL_FLOW_KEY_BYTES to reflect these changes.  The
result was that a maximum-length flow did not fit in the given space.

This fixes a crash processing IPv6 neighbor discovery packets with VLAN
headers received in a tunnel configured with key=flow or in_key=flow.

This updates some comments to better describe the implications of
ODPUTIL_FLOW_KEY_BYTES (suggested by Justin).

This also updates test-odp.c so that it would have caught this problem, and
updates odp.at to demonstrate that a full 156 bytes are necessary.  (To see
that, revert the change to ODPUTIL_FLOW_KEY_BYTES and run the test.)

Reported-by: Dan Wendlandt <dan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/odp-util.c
lib/odp-util.h
tests/odp.at
tests/test-odp.c