| 3855 | } |
| 3856 | |
| 3857 | static struct rte_flow * |
| 3858 | nfp_flow_setup(struct nfp_flower_representor *representor, |
| 3859 | const struct rte_flow_attr *attr, |
| 3860 | const struct rte_flow_item items[], |
| 3861 | const struct rte_flow_action actions[], |
| 3862 | __rte_unused struct rte_flow_error *error, |
| 3863 | bool validate_flag) |
| 3864 | { |
| 3865 | uint64_t cookie; |
| 3866 | const struct rte_flow_item *item; |
| 3867 | const struct rte_flow_item *ct_item = NULL; |
| 3868 | |
| 3869 | if (attr->group != 0) |
| 3870 | PMD_DRV_LOG(INFO, "Pretend we support group attribute."); |
| 3871 | |
| 3872 | if (attr->priority != 0) |
| 3873 | PMD_DRV_LOG(INFO, "Pretend we support priority attribute."); |
| 3874 | |
| 3875 | if (attr->transfer != 0) |
| 3876 | PMD_DRV_LOG(INFO, "Pretend we support transfer attribute."); |
| 3877 | |
| 3878 | for (item = items; item->type != RTE_FLOW_ITEM_TYPE_END; ++item) { |
| 3879 | if (item->type == RTE_FLOW_ITEM_TYPE_CONNTRACK) { |
| 3880 | ct_item = item; |
| 3881 | break; |
| 3882 | } |
| 3883 | } |
| 3884 | |
| 3885 | cookie = rte_rand(); |
| 3886 | |
| 3887 | if (ct_item != NULL) |
| 3888 | return nfp_ct_flow_setup(representor, items, actions, |
| 3889 | ct_item, validate_flag, cookie); |
| 3890 | |
| 3891 | return nfp_flow_process(representor, items, actions, validate_flag, cookie, true, false); |
| 3892 | } |
| 3893 | |
| 3894 | int |
| 3895 | nfp_flow_teardown(struct nfp_flow_priv *priv, |
no test coverage detected