{
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);
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)");
}
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;
}
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();
*/
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;
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");
*/
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;
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;
}
*/
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;
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;
}
*/
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;
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;
}
*/
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;
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;