[ovs-dev] [ofp-print 02/15] ofp-util: Fix encoding of NXST_AGGREGATE requests.

Ben Pfaff blp at nicira.com
Tue Dec 14 20:23:16 UTC 2010


They were being sent out as NXST_FLOW requests.
---
 lib/ofp-util.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/ofp-util.c b/lib/ofp-util.c
index b4b7ecd..ad9d194 100644
--- a/lib/ofp-util.c
+++ b/lib/ofp-util.c
@@ -1140,8 +1140,10 @@ ofputil_encode_flow_stats_request(const struct flow_stats_request *fsr,
     } else if (flow_format == NXFF_NXM) {
         struct nx_flow_stats_request *nfsr;
         int match_len;
+        int subtype;
 
-        ofputil_make_nxstats_request(sizeof *nfsr, NXST_FLOW, &msg);
+        subtype = fsr->aggregate ? NXST_AGGREGATE : NXST_FLOW;
+        ofputil_make_nxstats_request(sizeof *nfsr, subtype, &msg);
         match_len = nx_put_match(msg, &fsr->match);
 
         nfsr = msg->data;
-- 
1.7.1





More information about the dev mailing list