nx-match: Log a warning when a wildcarded bit is set to 1.
authorBen Pfaff <blp@nicira.com>
Wed, 3 Oct 2012 16:48:57 +0000 (09:48 -0700)
committerBen Pfaff <blp@nicira.com>
Sat, 8 Dec 2012 18:44:55 +0000 (10:44 -0800)
commite1cfc4e4612594746483dbe82607b1ba339b5b6c
treefa8531ca307d5807440861012f9ef36611021f03
parent373be31fa1c25f0ed52f18a2ec2536591467e1a9
nx-match: Log a warning when a wildcarded bit is set to 1.

This was prompted by a conversation on the openflow-discuss mailing list
where developers of some OpenFlow switches mentioned that they save an
entire copy of raw flows passed in by controllers because of the
possibility that there might be wildcarded 1-bits, e.g. something like
192.168.1.1/255.255.0.0 instead of 192.168.0.0/255.255.0.0.  I've always
intended that this not be necessary, but it was never explicitly written
down.  This commit starts the process of updating OVS to make this a
requirement, by logging a warning whenever such a NXM or OXM entry is seen,
and by updating the spec in nicira-ext.h to describe my intent.

This is related to issue EXT-238 (OXM should require that 0-bits in mask
be 0-bits in value) in the Open Networking Foundation's "extensibility"
bugtracker at https://www.opennetworking.org/bugs/browse/EXT-238.
(Unfortunately one must be an employee of an ONF member company to
access this bug tracker.  It's the network that's open, not the
foundation.)

Thanks to Zoltán Lajos Kis, Dan Talayco, Rob Sherwood, and HIDEyuki
Shimonishi for participating in the discussion on openflow-discuss.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
include/openflow/nicira-ext.h
lib/nx-match.c
tests/ovs-ofctl.at