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

Function nfp_ct_flow_setup

dpdk/drivers/net/nfp/flower/nfp_conntrack.c:1685–1729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1683}
1684
1685struct rte_flow *
1686nfp_ct_flow_setup(struct nfp_flower_representor *representor,
1687 const struct rte_flow_item items[],
1688 const struct rte_flow_action actions[],
1689 const struct rte_flow_item *ct_item,
1690 bool validate_flag,
1691 uint64_t cookie)
1692{
1693 const struct ct_data *ct;
1694
1695 if (ct_item == NULL)
1696 return NULL;
1697
1698 ct = ct_item->spec;
1699
1700 if (is_ct_commit_flow(ct)) {
1701 return nfp_flow_process(representor, &items[1], actions,
1702 validate_flag, cookie, false, false);
1703 }
1704
1705 if (is_post_ct_flow(ct)) {
1706 if (nfp_flow_handle_post_ct(ct_item, representor, &items[1],
1707 actions, cookie)) {
1708 return nfp_flow_process(representor, &items[1], actions,
1709 validate_flag, cookie, false, false);
1710 }
1711
1712 PMD_DRV_LOG(ERR, "Handle nfp post ct flow failed.");
1713 return NULL;
1714 }
1715
1716 if (is_pre_ct_flow(ct, actions)) {
1717 if (nfp_flow_handle_pre_ct(ct_item, representor, &items[1],
1718 actions, cookie)) {
1719 return nfp_flow_process(representor, &items[1], actions,
1720 validate_flag, cookie, false, false);
1721 }
1722
1723 PMD_DRV_LOG(ERR, "Handle nfp pre ct flow failed.");
1724 return NULL;
1725 }
1726
1727 PMD_DRV_LOG(ERR, "Unsupported ct flow type.");
1728 return NULL;
1729}
1730
1731static inline void
1732nfp_ct_flow_stats_update(struct nfp_flow_priv *priv,

Callers 1

nfp_flow_setupFunction · 0.85

Calls 6

is_ct_commit_flowFunction · 0.85
nfp_flow_processFunction · 0.85
is_post_ct_flowFunction · 0.85
nfp_flow_handle_post_ctFunction · 0.85
is_pre_ct_flowFunction · 0.85
nfp_flow_handle_pre_ctFunction · 0.85

Tested by

no test coverage detected