secchan: Remove unused parameter from ofproto_add_flow().
authorBen Pfaff <blp@nicira.com>
Mon, 27 Apr 2009 23:56:44 +0000 (16:56 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 1 May 2009 17:55:28 +0000 (10:55 -0700)
The 'packet != NULL' case was effectively dead, since every caller passed
a constant NULL here, so delete the parameter and the code to handle the
non-NULL case.

secchan/fail-open.c
secchan/in-band.c
secchan/ofproto.c
secchan/ofproto.h
vswitchd/bridge.c

index 9a8a3d49c3978c1d5b676e081f1357f47c39321a..04d53689e0133662691d14b01b54eff89084e80a 100644 (file)
@@ -109,7 +109,7 @@ fail_open_flushed(struct fail_open *fo)
         action.output.port = htons(OFPP_NORMAL);
         memset(&flow, 0, sizeof flow);
         ofproto_add_flow(fo->ofproto, &flow, OFPFW_ALL, 70000,
-                         &action, 1, NULL, 0);
+                         &action, 1, 0);
     }
 }
 
index 2315c44b977f7d1e8c2de0613439a2b368c840a1..aac39aaa8830abe4cddcd80e27f93f809513ae5b 100644 (file)
@@ -228,7 +228,7 @@ setup_flow(struct in_band *in_band, int rule_idx, const flow_t *flow,
         action.output.port = htons(out_port);
         action.output.max_len = htons(0);
         ofproto_add_flow(in_band->ofproto, &rule->flow, rule->wildcards,
-                         rule->priority, &action, 1, NULL, 0);
+                         rule->priority, &action, 1, 0);
     }
 }
 
index 50b126aa2474d1b11ac043e59fdab3b49f9fedc4..b21acbb1742a017b6525bf9e7dd715f065912842 100644 (file)
@@ -954,7 +954,7 @@ void
 ofproto_add_flow(struct ofproto *p,
                  const flow_t *flow, uint32_t wildcards, unsigned int priority,
                  const union ofp_action *actions, size_t n_actions,
-                 const struct ofpbuf *packet, int idle_timeout)
+                 int idle_timeout)
 {
     struct rule *rule, *displaced_rule;
 
@@ -968,17 +968,9 @@ ofproto_add_flow(struct ofproto *p,
     }
 
     if (!wildcards) {
-        rule_make_actions(p, rule, packet);
-        if (packet
-            && !dpif_execute(&p->dpif, flow->in_port,
-                             rule->odp_actions, rule->n_odp_actions, packet)) {
-            rule->byte_count = packet->size;
-            rule->packet_count++;
-        }
+        rule_make_actions(p, rule, NULL);
         rule_install(p, rule, NULL);
     } else {
-        assert(!packet);
-
         /* We might need to change the rules for arbitrary subrules. */
         p->need_revalidate = true;
     }
index b0a546394d78340831de9a1f39aae02cac6ff545..91c51c410674324586a7c341f7c930e16937ddf1 100644 (file)
@@ -103,7 +103,7 @@ int ofproto_send_packet(struct ofproto *, const flow_t *,
 void ofproto_add_flow(struct ofproto *, const flow_t *, uint32_t wildcards,
                       unsigned int priority,
                       const union ofp_action *, size_t n_actions,
-                      const struct ofpbuf *, int idle_timeout);
+                      int idle_timeout);
 void ofproto_delete_flow(struct ofproto *, const flow_t *, uint32_t wildcards,
                          unsigned int priority);
 void ofproto_flush_flows(struct ofproto *);
index 69e1a5816429977dd8da190d5f6acdbac5147d32..e0706a858de0501033270648048cb86094afa209 100644 (file)
@@ -1089,7 +1089,7 @@ bridge_reconfigure_one(struct bridge *br)
         action.output.port = htons(OFPP_NORMAL);
         memset(&flow, 0, sizeof flow);
         ofproto_add_flow(br->ofproto, &flow, OFPFW_ALL, 0,
-                         &action, 1, NULL, 0);
+                         &action, 1, 0);
 
         ofproto_set_in_band(br->ofproto, false);
         ofproto_set_max_backoff(br->ofproto, 1);