From e016fb630d66ba29c37fe4246f0acf80f11c1b3f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 18 Jan 2016 16:00:05 -0800 Subject: openflow: Implement OF1.4+ OFPMP_QUEUE_DESC multipart message. OpenFlow 1.0 through 1.3 have a message OFPT_QUEUE_GET_CONFIG_REQUEST and its corresponding reply, for fetching a description of the queues configured on a given port. OpenFlow 1.4 changes this message to a multipart message OFPMP_QUEUE_DESC, which Open vSwitch has not until now implemented. This commit adds an implemntation of that message. Because the message is a replacement for the former one, this commit implements it using the same ofp-util functions as the former message, so that the client code doesn't have to distinguish a difference between versions. The ovs-ofctl command queue-get-config was previously undocumented (due only to an oversight). This commit corrects that and documents the new feature available with OpenFlow 1.4. Signed-off-by: Ben Pfaff Acked-by: Jarno Rajahalme --- include/openflow/openflow-1.4.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'include/openflow') diff --git a/include/openflow/openflow-1.4.h b/include/openflow/openflow-1.4.h index 73062ec58..ac5748b48 100644 --- a/include/openflow/openflow-1.4.h +++ b/include/openflow/openflow-1.4.h @@ -219,6 +219,31 @@ struct ofp14_queue_stats { OFP_ASSERT(sizeof(struct ofp14_queue_stats) == 48); +/* ## ---------------- ## */ +/* ## ofp14_queue_desc ## */ +/* ## ---------------- ## */ + +struct ofp14_queue_desc_request { + ovs_be32 port; /* All ports if OFPP_ANY. */ + ovs_be32 queue; /* All queues if OFPQ_ALL. */ +}; +OFP_ASSERT(sizeof(struct ofp14_queue_desc_request) == 8); + +/* Body of reply to OFPMP_QUEUE_DESC request. */ +struct ofp14_queue_desc { + ovs_be32 port_no; /* Port this queue is attached to. */ + ovs_be32 queue_id; /* ID for the specific queue. */ + ovs_be16 len; /* Length in bytes of this queue desc. */ + uint8_t pad[6]; /* 64-bit alignment. */ +}; +OFP_ASSERT(sizeof(struct ofp14_queue_desc) == 16); + +enum ofp14_queue_desc_prop_type { + OFPQDPT14_MIN_RATE = 1, + OFPQDPT14_MAX_RATE = 2, + OFPQDPT14_EXPERIMENTER = 0xffff +}; + /* ## -------------- ## */ /* ## Miscellaneous. ## */ /* ## -------------- ## */ -- cgit v1.2.1