MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nfp_flow_setup

Function nfp_flow_setup

dpdk/drivers/net/nfp/nfp_flow.c:3857–3892  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3855}
3856
3857static struct rte_flow *
3858nfp_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
3894int
3895nfp_flow_teardown(struct nfp_flow_priv *priv,

Callers 2

nfp_flow_validateFunction · 0.85
nfp_flow_createFunction · 0.85

Calls 3

rte_randFunction · 0.85
nfp_ct_flow_setupFunction · 0.85
nfp_flow_processFunction · 0.85

Tested by

no test coverage detected