ofp-util: Clean up cookie handling.
authorJustin Pettit <jpettit@nicira.com>
Sat, 24 Mar 2012 08:02:26 +0000 (01:02 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 29 May 2012 08:41:21 +0000 (01:41 -0700)
commit623e1caf2f493bfcd96e3f9381d4e89257c92798
tree5feb57ca35cfb558b141179aee31934a0c0533c4
parent3b4d8ad3070ad30da9cf52d4f2abf792bc07f20d
ofp-util: Clean up cookie handling.

Commit e72e793 (Add ability to restrict flow mods and flow stats
requests to cookies.) modified cookie handling.  Some of its behavior
was unintuitive and there was at least one bug (described below).
Commit f66b87d (DESIGN: Document uses for flow cookies.) attempted to
document a clean design for cookie handling.  This commit updates the
DESIGN document and brings the implementation in line with it.

In commit e72e793, the code that handled processing OpenFlow flow
modification requests set the cookie mask to exact-match.  This seems
reasonable for adding flows, but is not correct for matching, since
OpenFlow 1.0 doesn't support matching based on the cookie.  This commit
changes to cookie mask to fully wildcarded, which is the correct
behavior for modifications and deletions.  It doesn't cause any problems
for flow additions, since the mask is ignored for that operation.

Bug #9742

Reported-by: Luca Giraudo <lgiraudo@nicira.com>
Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
12 files changed:
DESIGN
include/openflow/nicira-ext.h
lib/learn.c
lib/ofp-parse.c
lib/ofp-print.c
lib/ofp-util.c
lib/ofp-util.h
ofproto/ofproto-dpif.c
ofproto/ofproto.c
tests/ofproto.at
utilities/ovs-ofctl.8.in
utilities/ovs-ofctl.c