summaryrefslogtreecommitdiff
path: root/include/openflow/nicira-ext.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-10-03 09:48:57 -0700
committerBen Pfaff <blp@nicira.com>2012-12-08 10:44:55 -0800
commite1cfc4e4612594746483dbe82607b1ba339b5b6c (patch)
treefa8531ca307d5807440861012f9ef36611021f03 /include/openflow/nicira-ext.h
parent373be31fa1c25f0ed52f18a2ec2536591467e1a9 (diff)
downloadopenvswitch-e1cfc4e4612594746483dbe82607b1ba339b5b6c.tar.gz
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>
Diffstat (limited to 'include/openflow/nicira-ext.h')
-rw-r--r--include/openflow/nicira-ext.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/openflow/nicira-ext.h b/include/openflow/nicira-ext.h
index 11b761d60..91c96b36a 100644
--- a/include/openflow/nicira-ext.h
+++ b/include/openflow/nicira-ext.h
@@ -1208,9 +1208,10 @@ OFP_ASSERT(sizeof(struct nx_action_output_reg) == 24);
* value, called "nxm_mask". For each 1-bit in position J in nxm_mask, the
* nx_match matches only packets for which bit J in the given field's value
* matches bit J in nxm_value. A 0-bit in nxm_mask causes the
- * corresponding bits in nxm_value and the field's value to be ignored.
- * (The sense of the nxm_mask bits is the opposite of that used by the
- * "wildcards" member of struct ofp10_match.)
+ * corresponding bit in nxm_value is ignored (it should be 0; Open vSwitch
+ * may enforce this someday), as is the corresponding bit in the field's
+ * value. (The sense of the nxm_mask bits is the opposite of that used by
+ * the "wildcards" member of struct ofp10_match.)
*
* When nxm_hasmask is 1, nxm_length is always even.
*