Added missing header file.
[openvswitch] / datapath / table_t.c
index cb017b8e23ccc9e2f9785ce73d656b73c49b0863..a824804b448a2d8e9d7414dab814465b725bc159 100644 (file)
@@ -35,15 +35,15 @@ static struct sw_flow *flow_zalloc(int n_actions, gfp_t flags)
 {
        struct sw_flow *flow = flow_alloc(n_actions, flags);
        if (flow) {
-               struct ofp_action *actions = flow->actions;
+               struct sw_flow_actions *sfa = flow->sf_acts;
                memset(flow, 0, sizeof *flow);
-               flow->actions = actions;
+               flow->sf_acts = sfa;
        }
        return flow;
 }
 
 static void
-simple_insert_delete(struct sw_table *swt, uint16_t wildcards)
+simple_insert_delete(struct sw_table *swt, uint32_t wildcards)
 {
        struct sw_flow *a_flow = flow_zalloc(0, GFP_KERNEL);
        struct sw_flow *b_flow = flow_zalloc(0, GFP_KERNEL);
@@ -72,7 +72,7 @@ simple_insert_delete(struct sw_table *swt, uint16_t wildcards)
        if (swt->lookup(swt, &b_flow->key))
                unit_fail("lookup should not succeed (1)");
 
-       swt->delete(swt, &a_flow->key, 0);
+       swt->delete(swt, &a_flow->key, 0, 0);
        if (swt->lookup(swt, &a_flow->key))
                unit_fail("lookup should not succeed (3)");
 
@@ -81,7 +81,7 @@ simple_insert_delete(struct sw_table *swt, uint16_t wildcards)
 }
 
 static void
-multiple_insert_destroy(struct sw_table *swt, int inserts, uint16_t wildcards,
+multiple_insert_destroy(struct sw_table *swt, int inserts, uint32_t wildcards,
                        int min_collisions, int max_collisions)
 {
        int i;
@@ -124,7 +124,7 @@ multiple_insert_destroy(struct sw_table *swt, int inserts, uint16_t wildcards,
 }
 
 static void
-set_random_key(struct sw_flow_key *key, uint16_t wildcards)
+set_random_key(struct sw_flow_key *key, uint32_t wildcards)
 {
        key->nw_src = random32();
        key->nw_dst = random32();
@@ -156,7 +156,7 @@ struct flow_key_entry {
  */
 
 static struct flow_key_entry *
-allocate_random_keys(int n_keys, uint16_t wildcards)
+allocate_random_keys(int n_keys, uint32_t wildcards)
 {
        struct flow_key_entry *entries, *pos;
        struct list_head *keys;
@@ -358,7 +358,7 @@ delete_flows(struct sw_table *swt, struct list_head *keys,
 
        list_for_each_entry_safe (pos, next, keys, node) {
                if (del_all == 1 || i % 3 == 0) {
-                       n_del = swt->delete(swt, &pos->key, 0);
+                       n_del = swt->delete(swt, &pos->key, 0, 0);
                        if (n_del > 1) {
                                unit_fail("%d flows deleted for one entry", n_del);
                                unit_fail("\tfuture 'errors' could just be product duplicate flow_key_entries");
@@ -423,7 +423,7 @@ check_lookup_and_iter(struct sw_table *swt, struct list_head *deleted,
  */
 
 static int
-iterator_test(struct sw_table *swt, int n_flows, uint16_t wildcards)
+iterator_test(struct sw_table *swt, int n_flows, uint32_t wildcards)
 {
        struct flow_key_entry *allocated, h1, h2;
        struct list_head *added, *deleted, *tmp;
@@ -494,7 +494,7 @@ iterator_test(struct sw_table *swt, int n_flows, uint16_t wildcards)
 
 iterator_test_destr:
        allocated->key.wildcards = OFPFW_ALL;
-       swt->delete(swt, &allocated->key, 0);
+       swt->delete(swt, &allocated->key, 0, 0);
        vfree(allocated);
        return success;
 }
@@ -506,7 +506,7 @@ iterator_test_destr:
  */
 
 static int
-add_test(struct sw_table *swt, uint16_t wildcards)
+add_test(struct sw_table *swt, uint32_t wildcards)
 {
        struct flow_key_entry *allocated, h1, h2;
        struct list_head *added, *deleted, *tmp, *tmp2;
@@ -587,7 +587,7 @@ add_test(struct sw_table *swt, uint16_t wildcards)
 
 add_test_destr:
        allocated->key.wildcards = OFPFW_ALL;
-       swt->delete(swt, &allocated->key, 0);
+       swt->delete(swt, &allocated->key, 0, 0);
        vfree(allocated);
        return success;
 }
@@ -599,7 +599,7 @@ add_test_destr:
  */
 
 static int
-delete_test(struct sw_table *swt, uint16_t wildcards)
+delete_test(struct sw_table *swt, uint32_t wildcards)
 {
        struct flow_key_entry *allocated, h1, h2;
        struct list_head *added, *deleted, *tmp, *tmp2;
@@ -689,7 +689,7 @@ delete_test(struct sw_table *swt, uint16_t wildcards)
 
 delete_test_destr:
        allocated->key.wildcards = OFPFW_ALL;
-       swt->delete(swt, &allocated->key, 0);
+       swt->delete(swt, &allocated->key, 0, 0);
        vfree(allocated);
        return success;
 }
@@ -700,7 +700,7 @@ delete_test_destr:
  */
 
 static int
-complex_add_delete_test(struct sw_table *swt, int n_flows, int i, uint16_t wildcards)
+complex_add_delete_test(struct sw_table *swt, int n_flows, int i, uint32_t wildcards)
 {
        struct flow_key_entry *allocated, h1, h2;
        struct list_head *added, *deleted, *tmp;
@@ -760,7 +760,7 @@ complex_add_delete_test(struct sw_table *swt, int n_flows, int i, uint16_t wildc
 
 complex_test_destr:
        allocated->key.wildcards = OFPFW_ALL;
-       swt->delete(swt, &allocated->key, 0);
+       swt->delete(swt, &allocated->key, 0, 0);
        vfree(allocated);
        return success;