MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cpfl_parser_destroy

Function cpfl_parser_destroy

dpdk/drivers/net/cpfl/cpfl_flow_parser.c:989–1023  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

987}
988
989int
990cpfl_parser_destroy(struct cpfl_flow_js_parser *parser)
991{
992 int i, j;
993
994 if (!parser)
995 return 0;
996
997 for (i = 0; i < parser->pr_size; i++) {
998 struct cpfl_flow_js_pr *pattern = &parser->patterns[i];
999
1000 for (j = 0; j < pattern->key.proto_size; j++)
1001 rte_free(pattern->key.protocols[j].fields);
1002 rte_free(pattern->key.protocols);
1003 rte_free(pattern->key.attributes);
1004
1005 for (j = 0; j < pattern->actions_size; j++) {
1006 struct cpfl_flow_js_pr_action *pr_act;
1007
1008 pr_act = &pattern->actions[j];
1009 cpfl_parser_free_pr_action(pr_act);
1010 }
1011 rte_free(pattern->actions);
1012 }
1013 rte_free(parser->patterns);
1014 for (i = 0; i < parser->mr_size; i++) {
1015 struct cpfl_flow_js_mr *mr = &parser->modifications[i];
1016
1017 rte_free(mr->key.actions);
1018 }
1019 rte_free(parser->modifications);
1020 rte_free(parser);
1021
1022 return 0;
1023}
1024
1025static int
1026cpfl_get_items_length(const struct rte_flow_item *items)

Callers 1

cpfl_flow_uninitFunction · 0.85

Calls 2

rte_freeFunction · 0.85

Tested by

no test coverage detected