Add the corresponding logics to support the offload of QUEUE action. Signed-off-by: Chaoyong He <chaoyong...@corigine.com> Reviewed-by: Long Wu <long...@corigine.com> Reviewed-by: Peng Zhang <peng.zh...@corigine.com> --- doc/guides/nics/features/nfp.ini | 1 + drivers/net/nfp/nfp_net_flow.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+)
diff --git a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini index 248fd34a39..df1d403c6e 100644 --- a/doc/guides/nics/features/nfp.ini +++ b/doc/guides/nics/features/nfp.ini @@ -54,6 +54,7 @@ of_pop_vlan = Y of_push_vlan = Y of_set_vlan_pcp = Y of_set_vlan_vid = Y +queue = Y raw_decap = Y raw_encap = Y represented_port = Y diff --git a/drivers/net/nfp/nfp_net_flow.c b/drivers/net/nfp/nfp_net_flow.c index 71f126156e..98e8499756 100644 --- a/drivers/net/nfp/nfp_net_flow.c +++ b/drivers/net/nfp/nfp_net_flow.c @@ -562,6 +562,20 @@ nfp_net_flow_action_mark(struct rte_flow *nfp_flow, action_data->mark_id = mark->id; } +static void +nfp_net_flow_action_queue(struct rte_flow *nfp_flow, + const struct rte_flow_action *action) +{ + struct nfp_net_cmsg_action *action_data; + const struct rte_flow_action_queue *queue; + + action_data = (struct nfp_net_cmsg_action *)nfp_flow->payload.action_data; + queue = action->conf; + + action_data->action |= NFP_NET_CMSG_ACTION_QUEUE; + action_data->queue = queue->index; +} + static int nfp_net_flow_compile_actions(const struct rte_flow_action actions[], struct rte_flow *nfp_flow) @@ -578,6 +592,10 @@ nfp_net_flow_compile_actions(const struct rte_flow_action actions[], PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_MARK"); nfp_net_flow_action_mark(nfp_flow, action); break; + case RTE_FLOW_ACTION_TYPE_QUEUE: + PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_QUEUE"); + nfp_net_flow_action_queue(nfp_flow, action); + break; default: PMD_DRV_LOG(ERR, "Unsupported action type: %d", action->type); return -ENOTSUP; -- 2.39.1