summaryrefslogtreecommitdiff
path: root/drivers/net/softnic
diff options
context:
space:
mode:
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-10-10 15:24:36 +0100
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-10-12 19:33:40 +0200
commitabe92131c92ca672a87bec77c978ce996e8f1a0b (patch)
tree8eb36075500ac48b44abf5a9cf8147a6c5b7f96d /drivers/net/softnic
parentb9bcbeeccbf56c8deff19a32b07e4bc1b8fa0411 (diff)
downloaddpdk-abe92131c92ca672a87bec77c978ce996e8f1a0b.zip
dpdk-abe92131c92ca672a87bec77c978ce996e8f1a0b.tar.gz
dpdk-abe92131c92ca672a87bec77c978ce996e8f1a0b.tar.xz
net/softnic: support VXLAN flow decap action
Add support for ethdev flow API VXLAN decap action. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Diffstat (limited to 'drivers/net/softnic')
-rw-r--r--drivers/net/softnic/rte_eth_softnic_flow.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/net/softnic/rte_eth_softnic_flow.c b/drivers/net/softnic/rte_eth_softnic_flow.c
index 9bb0d56..23ef329 100644
--- a/drivers/net/softnic/rte_eth_softnic_flow.c
+++ b/drivers/net/softnic/rte_eth_softnic_flow.c
@@ -1169,6 +1169,7 @@ flow_rule_action_get(struct pmd_internals *softnic,
int n_jump_queue_rss_drop = 0;
int n_count = 0;
int n_mark = 0;
+ int n_vxlan_decap = 0;
profile = softnic_table_action_profile_find(softnic,
table->params.action_profile_name);
@@ -1510,6 +1511,40 @@ flow_rule_action_get(struct pmd_internals *softnic,
break;
} /* RTE_FLOW_ACTION_TYPE_MARK */
+ case RTE_FLOW_ACTION_TYPE_VXLAN_DECAP:
+ {
+ const struct rte_flow_action_mark *conf = action->conf;
+
+ if (conf)
+ return rte_flow_error_set(error,
+ EINVAL,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ action,
+ "VXLAN DECAP: Non-null configuration");
+
+ if (n_vxlan_decap)
+ return rte_flow_error_set(error,
+ ENOTSUP,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ action,
+ "Only one VXLAN DECAP action per flow");
+
+ if ((params->action_mask &
+ (1LLU << RTE_TABLE_ACTION_DECAP)) == 0)
+ return rte_flow_error_set(error,
+ ENOTSUP,
+ RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+ NULL,
+ "VXLAN DECAP action not supported by this table");
+
+ n_vxlan_decap = 1;
+
+ /* RTE_TABLE_ACTION_DECAP */
+ rule_action->decap.n = 50; /* Ether/IPv4/UDP/VXLAN */
+ rule_action->action_mask |= 1 << RTE_TABLE_ACTION_DECAP;
+ break;
+ } /* RTE_FLOW_ACTION_TYPE_VXLAN_DECAP */
+
case RTE_FLOW_ACTION_TYPE_METER:
{
const struct rte_flow_action_meter *conf = action->conf;