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

Function flow_parse

dpdk/app/test-pmd/cmdline_flow.c:12299–12321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12297}
12298
12299int
12300flow_parse(const char *src, void *result, unsigned int size,
12301 struct rte_flow_attr **attr,
12302 struct rte_flow_item **pattern, struct rte_flow_action **actions)
12303{
12304 int ret;
12305 struct context saved_flow_ctx = cmd_flow_context;
12306
12307 cmd_flow_context_init(&cmd_flow_context);
12308 do {
12309 ret = cmd_flow_parse(NULL, src, result, size);
12310 if (ret > 0) {
12311 src += ret;
12312 while (isspace(*src))
12313 src++;
12314 }
12315 } while (ret > 0 && strlen(src));
12316 cmd_flow_context = saved_flow_ctx;
12317 *attr = &((struct buffer *)result)->args.vc.attr;
12318 *pattern = ((struct buffer *)result)->args.vc.pattern;
12319 *actions = ((struct buffer *)result)->args.vc.actions;
12320 return (ret >= 0 && !strlen(src)) ? 0 : -1;
12321}
12322
12323/** Return number of completion entries (cmdline API). */
12324static int

Callers 1

flex_link_item_parseFunction · 0.85

Calls 3

cmd_flow_context_initFunction · 0.85
cmd_flow_parseFunction · 0.85
isspaceFunction · 0.85

Tested by

no test coverage detected