net/bnxt: refactor init/uninit
[dpdk.git] / lib / librte_ethdev / rte_flow.c
index 380c5ca..241af6c 100644 (file)
@@ -97,6 +97,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {
        MK_FLOW_ITEM(L2TPV3OIP, sizeof(struct rte_flow_item_l2tpv3oip)),
        MK_FLOW_ITEM(PFCP, sizeof(struct rte_flow_item_pfcp)),
        MK_FLOW_ITEM(ECPRI, sizeof(struct rte_flow_item_ecpri)),
+       MK_FLOW_ITEM(GENEVE_OPT, sizeof(struct rte_flow_item_geneve_opt)),
 };
 
 /** Generate flow_action[] entry. */
@@ -176,6 +177,8 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
        MK_FLOW_ACTION(SET_IPV6_DSCP, sizeof(struct rte_flow_action_set_dscp)),
        MK_FLOW_ACTION(AGE, sizeof(struct rte_flow_action_age)),
        MK_FLOW_ACTION(SAMPLE, sizeof(struct rte_flow_action_sample)),
+       MK_FLOW_ACTION(MODIFY_FIELD,
+                      sizeof(struct rte_flow_action_modify_field)),
        /**
         * Shared action represented as handle of type
         * (struct rte_flow_shared action *) stored in conf field (see
@@ -577,7 +580,7 @@ rte_flow_conv_action_conf(void *buf, const size_t size,
                           }),
                           size > sizeof(*dst.rss) ? sizeof(*dst.rss) : size);
                off = sizeof(*dst.rss);
-               if (src.rss->key_len) {
+               if (src.rss->key_len && src.rss->key) {
                        off = RTE_ALIGN_CEIL(off, sizeof(*dst.rss->key));
                        tmp = sizeof(*src.rss->key) * src.rss->key_len;
                        if (size >= off + tmp)
@@ -1223,10 +1226,11 @@ rte_flow_tunnel_action_decap_release(uint16_t port_id,
 
        if (unlikely(!ops))
                return -rte_errno;
-       if (likely(!!ops->action_release)) {
+       if (likely(!!ops->tunnel_action_decap_release)) {
                return flow_err(port_id,
-                               ops->action_release(dev, actions,
-                                                   num_of_actions, error),
+                               ops->tunnel_action_decap_release(dev, actions,
+                                                                num_of_actions,
+                                                                error),
                                error);
        }
        return rte_flow_error_set(error, ENOTSUP,
@@ -1245,10 +1249,10 @@ rte_flow_tunnel_item_release(uint16_t port_id,
 
        if (unlikely(!ops))
                return -rte_errno;
-       if (likely(!!ops->item_release)) {
+       if (likely(!!ops->tunnel_item_release)) {
                return flow_err(port_id,
-                               ops->item_release(dev, items,
-                                                 num_of_items, error),
+                               ops->tunnel_item_release(dev, items,
+                                                        num_of_items, error),
                                error);
        }
        return rte_flow_error_set(error, ENOTSUP,