Skip to content

Commit

Permalink
Remove multiple defn for var flow_entry
Browse files Browse the repository at this point in the history
  • Loading branch information
bdevierno1 committed Jan 14, 2021
1 parent 61bff85 commit 965329a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions examples/test_flow_dir/test_flow_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,6 @@ do_stats_display(struct rte_mbuf *pkt) {

static void
populate_sample_ipv4(void) {
struct onvm_flow_entry *flow_entry = (struct onvm_flow_entry *)
rte_calloc(NULL, 1, sizeof(struct onvm_flow_entry), 0);
if (flow_entry == NULL) {
rte_exit(EXIT_FAILURE, "Unable to populate flow.\n");
}
struct test_add_key {
struct onvm_ft_ipv4_5tuple key;
uint8_t destinations[ONVM_MAX_CHAIN_LENGTH];
Expand Down Expand Up @@ -216,8 +211,6 @@ populate_sample_ipv4(void) {
}
}
}
flow_entry = NULL;
rte_free(flow_entry);
}

static void
Expand Down Expand Up @@ -306,8 +299,8 @@ main(int argc, char *argv[]) {
onvm_nflib_run(nf_local_ctx);

onvm_nflib_stop(nf_local_ctx);
flow_entry = NULL;
rte_free(flow_entry);
flow_entry = NULL;
printf("If we reach here, program is ending\n");
return 0;
}

0 comments on commit 965329a

Please sign in to comment.