| 1683 | } |
| 1684 | |
| 1685 | struct rte_flow * |
| 1686 | nfp_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 | |
| 1731 | static inline void |
| 1732 | nfp_ct_flow_stats_update(struct nfp_flow_priv *priv, |
no test coverage detected