do {
struct rte_flow_item *dst = NULL;
- if ((unsigned int)item->type > RTE_DIM(flow_item) ||
+ if ((unsigned int)item->type >= RTE_DIM(flow_item) ||
!flow_item[item->type].name)
goto notsup;
if (pf)
do {
struct rte_flow_action *dst = NULL;
- if ((unsigned int)action->type > RTE_DIM(flow_action) ||
+ if ((unsigned int)action->type >= RTE_DIM(flow_action) ||
!flow_action[action->type].name)
goto notsup;
if (pf)
char buf[32];
int err = rte_errno;
- if ((unsigned int)error->type > RTE_DIM(errstrlist) ||
+ if ((unsigned int)error->type >= RTE_DIM(errstrlist) ||
!errstrlist[error->type])
errstr = "unknown type";
else
printf("Flow rule #%u not found\n", rule);
return -ENOENT;
}
- if ((unsigned int)action > RTE_DIM(flow_action) ||
+ if ((unsigned int)action >= RTE_DIM(flow_action) ||
!flow_action[action].name)
name = "unknown";
else