2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00

ofproto: Add support for OF1.3 port description multipart message.

OpenFlow 1.0 is limited to displaying 1364 ports in the Features Reply
message, and there is no other way to get consolidated port information.
OpenFlow 1.3 adds a new port description multipart message
(OFPMP_PORT_DESC) that is not limited by size.  This commit adds support
through the OpenFlow 1.0 stats mechanism, since they have complimentary
enum values.

Bug #11040

Signed-off-by: Justin Pettit <jpettit@nicira.com>
This commit is contained in:
Justin Pettit
2012-05-04 14:42:04 -07:00
parent 3a51996b8a
commit 2be393edd3
11 changed files with 210 additions and 65 deletions

View File

@@ -278,12 +278,14 @@ lswitch_process_packet(struct lswitch *sw, struct rconn *rconn,
case OFPUTIL_OFPST_TABLE_REQUEST:
case OFPUTIL_OFPST_PORT_REQUEST:
case OFPUTIL_OFPST_QUEUE_REQUEST:
case OFPUTIL_OFPST_PORT_DESC_REQUEST:
case OFPUTIL_OFPST_DESC_REPLY:
case OFPUTIL_OFPST_FLOW_REPLY:
case OFPUTIL_OFPST_QUEUE_REPLY:
case OFPUTIL_OFPST_PORT_REPLY:
case OFPUTIL_OFPST_TABLE_REPLY:
case OFPUTIL_OFPST_AGGREGATE_REPLY:
case OFPUTIL_OFPST_PORT_DESC_REPLY:
case OFPUTIL_NXT_ROLE_REQUEST:
case OFPUTIL_NXT_ROLE_REPLY:
case OFPUTIL_NXT_FLOW_MOD_TABLE_ID:
@@ -363,7 +365,7 @@ process_switch_features(struct lswitch *sw, struct ofp_switch_features *osf)
sw->datapath_id = features.datapath_id;
while (!ofputil_pull_switch_features_port(&b, &port)) {
while (!ofputil_pull_phy_port(osf->header.version, &b, &port)) {
struct lswitch_port *lp = shash_find_data(&sw->queue_names, port.name);
if (lp && hmap_node_is_null(&lp->hmap_node)) {
lp->port_no = port.port_no;