daemon: Fix behavior in read_pidfile() when pid file is not locked.
[sliver-openvswitch.git] / datapath / chain.c
index 7d98056..8c2ddda 100644 (file)
@@ -111,22 +111,23 @@ int chain_insert(struct sw_chain *chain, struct sw_flow *flow)
 int
 chain_modify(struct sw_chain *chain, const struct sw_flow_key *key, 
                uint16_t priority, int strict,
-               const struct ofp_action *actions, int n_actions)
+               const struct ofp_action_header *actions, size_t actions_len)
 {
        int count = 0;
        int i;
 
        for (i = 0; i < chain->n_tables; i++) {
                struct sw_table *t = chain->tables[i];
-               count += t->modify(t, key, priority, strict, actions, n_actions);
+               count += t->modify(t, key, priority, strict, actions, actions_len);
        }
 
        return count;
 }
 
-/* Deletes from 'chain' any and all flows that match 'key'.  If 'strict' set, 
- * wildcards and priority must match.  Returns the number of flows that were 
- * deleted.
+/* Deletes from 'chain' any and all flows that match 'key'.  If 'out_port' 
+ * is not OFPP_NONE, then matching entries must have that port as an 
+ * argument for an output action.  If 'strict" is set, then wildcards and 
+ * priority must match.  Returns the number of flows that were deleted.
  *
  * Expensive in the general case as currently implemented, since it requires
  * iterating through the entire contents of each table for keys that contain
@@ -134,7 +135,7 @@ chain_modify(struct sw_chain *chain, const struct sw_flow_key *key,
  *
  * Caller must hold dp_mutex. */
 int chain_delete(struct sw_chain *chain, const struct sw_flow_key *key, 
-               uint16_t priority, int strict)
+               uint16_t out_port, uint16_t priority, int strict)
 {
        int count = 0;
        int i;
@@ -142,7 +143,7 @@ int chain_delete(struct sw_chain *chain, const struct sw_flow_key *key,
        might_sleep();
        for (i = 0; i < chain->n_tables; i++) {
                struct sw_table *t = chain->tables[i];
-               count += t->delete(t, key, priority, strict);
+               count += t->delete(chain->dp, t, key, out_port, priority, strict);
        }
 
        return count;