diff options
author | Ben Pfaff <blp@ovn.org> | 2016-01-20 09:57:16 -0800 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2016-01-20 09:57:16 -0800 |
commit | 9bfe933472a784cd6b3f946afc3eed73d74f6a7d (patch) | |
tree | 0f9ade568c83b24cf3ec18c2932cb4950fdf4c6f /ofproto/connmgr.h | |
parent | 730b985b03f79b5bd9c46edb8f1dc77a7db92547 (diff) | |
download | openvswitch-9bfe933472a784cd6b3f946afc3eed73d74f6a7d.tar.gz |
openflow: Better abstract handling of packet-in messages.
Packet-in messages have been a bit of a mess. First, their abstraction
in the form of struct ofputil_packet_in has some fields that are used
in a clear way for incoming and outgoing packet-ins, and others
(packet_len, total_len, buffer_id) have have confusing meanings or
usage pattern depending on their direction.
Second, it's very confusing how a packet-in has both a reason (OFPR_*)
and a miss type (OFPROTO_PACKET_IN_*) and how those add up to the
actual reason that is used "on the wire" for each OpenFlow version (and
even whether the packet-in is sent at all!).
Finally, there's all kind of low-level detail randomly scattered between
connmgr, ofproto-dpif-xlate, and ofp-util.
This commit attempts to clear up some of the confusion. It simplifies
the struct ofputil_packet_in abstraction by removing the members that
didn't have a clear and consistent meaning between incoming and outgoing
packet-ins. It gets rid of OFPROTO_PACKET_IN_*, instead adding a couple
of nonstandard OFPR_* reasons that add up to what OFPROTO_PACKET_IN_*
was meant to say (in what I hope is a clearer way). And it consolidates
the tricky parts into ofp-util, where I hope it will be easier to
understand all in one place.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
Diffstat (limited to 'ofproto/connmgr.h')
-rw-r--r-- | ofproto/connmgr.h | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/ofproto/connmgr.h b/ofproto/connmgr.h index 98821bc7b..ced6a6890 100644 --- a/ofproto/connmgr.h +++ b/ofproto/connmgr.h @@ -54,32 +54,12 @@ enum ofconn_type { OFCONN_SERVICE /* A service connection, e.g. "ovs-ofctl". */ }; -enum ofproto_packet_in_miss_type { - /* Not generated by a flow miss or table-miss flow. */ - OFPROTO_PACKET_IN_NO_MISS, - - /* The packet_in was generated directly by a table-miss flow, that is, a - * flow with priority 0 that wildcards all fields. See OF1.3.3 section - * 5.4. - * - * (Our interpretation of "directly" is "not via groups". Packet_ins - * generated by table-miss flows via groups use - * OFPROTO_PACKET_IN_NO_MISS.) */ - OFPROTO_PACKET_IN_MISS_FLOW, - - /* The packet-in was generated directly by a table-miss, but not a - * table-miss flow. That is, it was generated by the OpenFlow 1.0, 1.1, or - * 1.2 table-miss behavior. */ - OFPROTO_PACKET_IN_MISS_WITHOUT_FLOW, -}; - /* A packet_in, with extra members to assist in queuing and routing it. */ struct ofproto_packet_in { struct ofputil_packet_in up; struct ovs_list list_node; /* For queuing. */ uint16_t controller_id; /* Controller ID to send to. */ - int send_len; /* Length that the action requested sending. */ - enum ofproto_packet_in_miss_type miss_type; + int max_len; /* From action, or -1 if none. */ }; /* Basics. */ |