Hi Wei, > -----Original Message----- > From: Zhao1, Wei > Sent: Friday, June 2, 2017 2:36 PM > To: dev@dpdk.org > Cc: Lu, Wenzhuo; Zhao1, Wei > Subject: [PATCH v2 08/11] net/e1000: parse flex filter > > check if the rule is a flex byte rule, and get the flex info. > > Signed-off-by: Wei Zhao <wei.zh...@intel.com> > --- > drivers/net/e1000/e1000_ethdev.h | 6 + > drivers/net/e1000/igb_ethdev.c | 6 - > drivers/net/e1000/igb_flow.c | 276 > +++++++++++++++++++++++++++++++++++++++ > 3 files changed, 282 insertions(+), 6 deletions(-)
> + > + /* check if the next not void item is END */ > + if (item->type != RTE_FLOW_ITEM_TYPE_END) { > + memset(filter, 0, sizeof(struct rte_eth_flex_filter)); > + rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ITEM, > + item, "Not supported by flex filter"); > + return -rte_errno; > + } Seems this check is not necessary. I think the item must be END here. > + > + /* parse action */ > + index = 0; > + > + /* check if the first not void action is QUEUE. */ > + NEXT_ITEM_OF_ACTION(act, actions, index); > + if (act->type != RTE_FLOW_ACTION_TYPE_QUEUE) { > + memset(filter, 0, sizeof(struct rte_eth_flex_filter)); > + rte_flow_error_set(error, EINVAL, > + RTE_FLOW_ERROR_TYPE_ACTION, > + act, "Not supported action."); > + return -rte_errno; > + }