diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2017-11-08 14:15:11 +0000 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2017-11-08 14:45:54 +0000 |
commit | 055c52583a2794da8ba1e85a48cce3832372b12f (patch) | |
tree | 8ceb1cb78fbb46a0f341f8ee24feb3c6b5540013 /drivers/net/tap/tap_flow.c | |
parent | f239aed5e674965691846e8ce3f187dd47523689 (diff) |
New upstream version 17.11-rc3
Change-Id: I6a5baa40612fe0c20f30b5fa773a6cbbac63a685
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/tap/tap_flow.c')
-rw-r--r-- | drivers/net/tap/tap_flow.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c index 41f73452..ffc0b85b 100644 --- a/drivers/net/tap/tap_flow.c +++ b/drivers/net/tap/tap_flow.c @@ -1089,13 +1089,29 @@ priv_flow_process(struct pmd_internals *pmd, const struct rte_flow_action_queue *queue = (const struct rte_flow_action_queue *) actions->conf; + if (action) goto exit_action_not_supported; action = 1; - if (!queue || (queue->index >= pmd->nb_queues)) + if (!queue || + (queue->index > pmd->dev->data->nb_rx_queues - 1)) goto exit_action_not_supported; if (flow) err = add_action_skbedit(flow, queue->index); + } else if (actions->type == RTE_FLOW_ACTION_TYPE_RSS) { + /* Fake RSS support. */ + const struct rte_flow_action_rss *rss = + (const struct rte_flow_action_rss *) + actions->conf; + + if (action) + goto exit_action_not_supported; + action = 1; + if (!rss || rss->num < 1 || + (rss->queue[0] > pmd->dev->data->nb_rx_queues - 1)) + goto exit_action_not_supported; + if (flow) + err = add_action_skbedit(flow, rss->queue[0]); } else { goto exit_action_not_supported; } @@ -1446,7 +1462,7 @@ tap_flow_isolate(struct rte_eth_dev *dev, return 0; error: pmd->flow_isolate = 0; - return -rte_flow_error_set( + return rte_flow_error_set( error, ENOTSUP, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, "TC rule creation failed"); } |