OFPST_FLOW,
/* Aggregate flow statistics.
- * The request body is struct ofp_aggregate_stats_request.
+ * The request body is struct ofp_flow_stats_request.
* The reply body is struct ofp_aggregate_stats_reply. */
OFPST_AGGREGATE,
};
OFP_ASSERT(sizeof(struct ofp_desc_stats) == 1056);
-/* Body for stats request of type OFPST_FLOW. */
+/* Body for stats request of type OFPST_FLOW or OFPST_AGGREGATE. */
struct ofp_flow_stats_request {
struct ofp_match match; /* Fields to match. */
uint8_t table_id; /* ID of table to read (from ofp_table_stats)
};
OFP_ASSERT(sizeof(struct ofp_flow_stats) == 88);
-/* Body for stats request of type OFPST_AGGREGATE. */
-struct ofp_aggregate_stats_request {
- struct ofp_match match; /* Fields to match. */
- uint8_t table_id; /* ID of table to read (from ofp_table_stats)
- or 0xff for all tables. */
- uint8_t pad; /* Align to 32 bits. */
- ovs_be16 out_port; /* Require matching entries to include this
- as an output port. A value of OFPP_NONE
- indicates no restriction. */
-};
-OFP_ASSERT(sizeof(struct ofp_aggregate_stats_request) == 44);
-
/* Body of reply to OFPST_AGGREGATE request. */
struct ofp_aggregate_stats_reply {
ovs_32aligned_be64 packet_count; /* Number of packets in flows. */
{ OFPUTIL_OFPST_AGGREGATE_REQUEST,
OFPST_AGGREGATE, "OFPST_AGGREGATE request",
- OSM_SIZE + sizeof(struct ofp_aggregate_stats_request), 0 },
+ OSM_SIZE + sizeof(struct ofp_flow_stats_request), 0 },
{ OFPUTIL_OFPST_TABLE_REQUEST,
OFPST_TABLE, "OFPST_TABLE request",
struct ofp_flow_stats_request *ofsr;
int type;
- BUILD_ASSERT_DECL(sizeof(struct ofp_flow_stats_request)
- == sizeof(struct ofp_aggregate_stats_request));
-
type = fsr->aggregate ? OFPST_AGGREGATE : OFPST_FLOW;
ofsr = ofputil_make_stats_request(sizeof *ofsr, type, &msg);
ofputil_cls_rule_to_match(&fsr->match, &ofsr->match);
handle_aggregate_stats_request(struct ofconn *ofconn,
const struct ofp_header *oh)
{
- const struct ofp_aggregate_stats_request *request = ofputil_stats_body(oh);
+ const struct ofp_flow_stats_request *request = ofputil_stats_body(oh);
struct ofproto *ofproto = ofconn_get_ofproto(ofconn);
struct ofp_aggregate_stats_reply *reply;
struct cls_rule target;