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

Function parse_table_action_ttl

dpdk/examples/ip_pipeline/cli.c:3627–3645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3625}
3626
3627static uint32_t
3628parse_table_action_ttl(char **tokens,
3629 uint32_t n_tokens,
3630 struct table_rule_action *a)
3631{
3632 if ((n_tokens < 2) ||
3633 strcmp(tokens[0], "ttl"))
3634 return 0;
3635
3636 if (strcmp(tokens[1], "dec") == 0)
3637 a->ttl.decrement = 1;
3638 else if (strcmp(tokens[1], "keep") == 0)
3639 a->ttl.decrement = 0;
3640 else
3641 return 0;
3642
3643 a->action_mask |= 1 << RTE_TABLE_ACTION_TTL;
3644 return 2;
3645}
3646
3647static uint32_t
3648parse_table_action_stats(char **tokens,

Callers 1

parse_table_actionFunction · 0.85

Calls 1

strcmpFunction · 0.85

Tested by

no test coverage detected