cryptodev: modify return value for asym session create
[dpdk.git] / lib / ethdev / rte_flow.c
index bcf0513..7f93900 100644 (file)
@@ -54,11 +54,13 @@ rte_flow_conv_copy(void *buf, const void *data, const size_t size,
        /**
         * Allow PMD private flow item
         */
-       size_t sz = type >= 0 ? desc[type].size : sizeof(void *);
+       bool rte_type = type >= 0;
+
+       size_t sz = rte_type ? desc[type].size : sizeof(void *);
        if (buf == NULL || data == NULL)
                return 0;
        rte_memcpy(buf, data, (size > sz ? sz : size));
-       if (desc[type].desc_fn)
+       if (rte_type && desc[type].desc_fn)
                sz += desc[type].desc_fn(size > 0 ? buf : NULL, data);
        return sz;
 }
@@ -137,6 +139,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {
        MK_FLOW_ITEM(META, sizeof(struct rte_flow_item_meta)),
        MK_FLOW_ITEM(TAG, sizeof(struct rte_flow_item_tag)),
        MK_FLOW_ITEM(GRE_KEY, sizeof(rte_be32_t)),
+       MK_FLOW_ITEM(GRE_OPTION, sizeof(struct rte_flow_item_gre_opt)),
        MK_FLOW_ITEM(GTP_PSC, sizeof(struct rte_flow_item_gtp_psc)),
        MK_FLOW_ITEM(PPPOES, sizeof(struct rte_flow_item_pppoe)),
        MK_FLOW_ITEM(PPPOED, sizeof(struct rte_flow_item_pppoe)),
@@ -156,6 +159,8 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {
        MK_FLOW_ITEM(REPRESENTED_PORT, sizeof(struct rte_flow_item_ethdev)),
        MK_FLOW_ITEM_FN(FLEX, sizeof(struct rte_flow_item_flex),
                        rte_flow_item_flex_conv),
+       MK_FLOW_ITEM(L2TPV2, sizeof(struct rte_flow_item_l2tpv2)),
+       MK_FLOW_ITEM(PPP, sizeof(struct rte_flow_item_ppp)),
 };
 
 /** Generate flow_action[] entry. */