X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-util.h;h=3aa1e0952df6b77f3d291f1c9364d1de0ae5bd5e;hb=623e1caf2f493bfcd96e3f9381d4e89257c92798;hp=e6716636a9150409e8347875a88c5a14999ca1b7;hpb=3b4d8ad3070ad30da9cf52d4f2abf792bc07f20d;p=sliver-openvswitch.git diff --git a/lib/ofp-util.h b/lib/ofp-util.h index e6716636a..3aa1e0952 100644 --- a/lib/ofp-util.h +++ b/lib/ofp-util.h @@ -197,11 +197,29 @@ struct ofpbuf *ofputil_make_set_packet_in_format(enum nx_packet_in_format); /* NXT_FLOW_MOD_TABLE_ID extension. */ struct ofpbuf *ofputil_make_flow_mod_table_id(bool flow_mod_table_id); -/* Protocol-independent flow_mod. */ +/* Protocol-independent flow_mod. + * + * The handling of cookies across multiple versions of OpenFlow is a bit + * confusing. A full description of Open vSwitch's cookie handling is + * in the DESIGN file. The following table shows the expected values of + * the cookie-related fields for the different flow_mod commands in + * OpenFlow 1.0 ("OF10") and NXM. "" and "-" indicate a value + * that may be populated and an ignored field, respectively. + * + * cookie cookie_mask new_cookie + * ====== =========== ========== + * OF10 Add - 0 + * OF10 Modify - 0 + * OF10 Delete - 0 - + * NXM Add - 0 + * NXM Modify + * NXM Delete - + */ struct ofputil_flow_mod { struct cls_rule cr; - ovs_be64 cookie; - ovs_be64 cookie_mask; + ovs_be64 cookie; /* Cookie bits to match. */ + ovs_be64 cookie_mask; /* 1-bit in each 'cookie' bit to match. */ + ovs_be64 new_cookie; /* New cookie to install or -1. */ uint8_t table_id; uint16_t command; uint16_t idle_timeout;