Expand tabs to spaces in dp_send_flow_stats.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 15 Apr 2008 16:53:37 +0000 (09:53 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 15 Apr 2008 16:56:49 +0000 (09:56 -0700)
Suggested by Justin.

switch/datapath.c

index 2055e094f1884e35d50dedb827402c911325c09a..0d4ffa77d647cb9c19ae371daf45c88f1bde5ca6 100644 (file)
@@ -654,49 +654,49 @@ int
 dp_send_flow_stats(struct datapath *dp, const struct sender *sender,
                    const struct ofp_match *match)
 {
-       struct buffer *buffer;
-       struct ofp_flow_stat_reply *fsr;
-       size_t header_size, fudge, flow_size;
-       struct sw_flow_key match_key;
-       int table_idx, n_flows, max_flows;
+    struct buffer *buffer;
+    struct ofp_flow_stat_reply *fsr;
+    size_t header_size, fudge, flow_size;
+    struct sw_flow_key match_key;
+    int table_idx, n_flows, max_flows;
     time_t now;
 
-       header_size = offsetof(struct ofp_flow_stat_reply, flows);
-       fudge = 128;
-       flow_size = sizeof fsr->flows[0];
-       max_flows = (65536 - header_size - fudge) / flow_size;
-       fsr = alloc_openflow_buffer(dp, header_size,
+    header_size = offsetof(struct ofp_flow_stat_reply, flows);
+    fudge = 128;
+    flow_size = sizeof fsr->flows[0];
+    max_flows = (65536 - header_size - fudge) / flow_size;
+    fsr = alloc_openflow_buffer(dp, header_size,
                                 OFPT_FLOW_STAT_REPLY, sender, &buffer);
 
-       n_flows = 0;
-       flow_extract_match(&match_key, match);
+    n_flows = 0;
+    flow_extract_match(&match_key, match);
     now = time(0);
-       for (table_idx = 0; table_idx < dp->chain->n_tables; table_idx++) {
-               struct sw_table *table = dp->chain->tables[table_idx];
-               struct swt_iterator iter;
+    for (table_idx = 0; table_idx < dp->chain->n_tables; table_idx++) {
+        struct sw_table *table = dp->chain->tables[table_idx];
+        struct swt_iterator iter;
 
-               if (n_flows >= max_flows) {
-                       break;
-               }
+        if (n_flows >= max_flows) {
+            break;
+        }
 
-               if (!table->iterator(table, &iter)) {
+        if (!table->iterator(table, &iter)) {
             printf("iterator failed for table %d\n", table_idx);
-                       continue;
-               }
+            continue;
+        }
 
-               for (; iter.flow; table->iterator_next(&iter)) {
-                       if (flow_matches(&match_key, &iter.flow->key)) {
+        for (; iter.flow; table->iterator_next(&iter)) {
+            if (flow_matches(&match_key, &iter.flow->key)) {
                 struct ofp_flow_stats *ofs = buffer_put_uninit(buffer,
                                                                sizeof *ofs);
-                               fill_flow_stats(ofs, iter.flow, table_idx, now);
-                               if (++n_flows >= max_flows) {
-                                       break;
-                               }
-                       }
-               }
-               table->iterator_destroy(&iter);
-       }
-       return send_openflow_buffer(dp, buffer, sender);
+                fill_flow_stats(ofs, iter.flow, table_idx, now);
+                if (++n_flows >= max_flows) {
+                    break;
+                }
+            }
+        }
+        table->iterator_destroy(&iter);
+    }
+    return send_openflow_buffer(dp, buffer, sender);
 }
 
 int