Skip to content

Commit

Permalink
Update destination structs
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin De Vierno committed Jul 21, 2020
1 parent a312d3f commit d88f412
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/test_flow_dir/test_flow_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ populate_ipv4_flow_table(void) {
};

struct test_add_key keys[] = {
{{IPv4(101, 0, 0, 0), IPv4(100, 10, 0, 1), 0, 1, IPPROTO_TCP}, {0,1,2,3}},
{{IPv4(102, 0, 0, 0), IPv4(101, 10, 0, 1), 0, 1, IPPROTO_TCP}, {3,2,1,0}},
{{IPv4(101, 0, 0, 0), IPv4(100, 10, 0, 1), 0, 1, IPPROTO_TCP}, {1,2,3,4}},
{{IPv4(102, 0, 0, 0), IPv4(101, 10, 0, 1), 0, 1, IPPROTO_TCP}, {4,3,2,1}},
{{IPv4(103, 0, 0, 0), IPv4(102, 10, 0, 1), 0, 1, IPPROTO_TCP}, {2,1}},
};

Expand All @@ -199,6 +199,9 @@ populate_ipv4_flow_table(void) {
flow_entry->sc = onvm_sc_create();
uint32_t num_dest = RTE_DIM(keys[i].destinations);
for (uint32_t j = 0; j < num_dest; j++) {
if (keys[i].destinations[j] == 0) {
continue;
}
printf("Appending Destination: %d \n", keys[i].destinations[j]);
onvm_sc_append_entry(flow_entry->sc, ONVM_NF_ACTION_TONF, keys[i].destinations[j]);
}
Expand Down

0 comments on commit d88f412

Please sign in to comment.