Lines Matching defs:flow

56 bool is_pre_ct_flow(struct flow_cls_offload *flow)
58 struct flow_rule *rule = flow_cls_offload_flow_rule(flow);
70 if (flow->common.chain_index)
73 flow_action_for_each(i, act, &flow->rule->action) {
88 bool is_post_ct_flow(struct flow_cls_offload *flow)
90 struct flow_rule *rule = flow_cls_offload_flow_rule(flow);
103 flow_action_for_each(i, act, &flow->rule->action) {
116 * the flow chain index is not zero and contains ct clear action.
118 if (flow->common.chain_index && exist_ct_clear)
232 * the former flow whose mangle action need be taken into account
233 * if existed, and entry2 should be the latter flow whose action
777 * nft entry flow rules are at odd array index.
1080 * an already merged flow. This works since address alignment means
1481 struct flow_cls_offload *flow,
1494 entry->rule = flow_rule_alloc(flow->rule->action.num_entries);
1509 memcpy(&nft_match->dissector, flow->rule->match.dissector,
1511 memcpy(&nft_match->mask, flow->rule->match.mask,
1513 memcpy(&nft_match->key, flow->rule->match.key,
1522 entry->rule->match.dissector = flow->rule->match.dissector;
1523 entry->rule->match.mask = flow->rule->match.mask;
1524 entry->rule->match.key = flow->rule->match.key;
1529 entry->cookie = flow->cookie > 0 ? flow->cookie : (unsigned long)entry;
1530 entry->chain_index = flow->common.chain_index;
1534 * original tcf_action data, and the flow objects gets destroyed, so we
1538 entry->rule->action.num_entries = flow->rule->action.num_entries;
1539 flow_action_for_each(i, act, &flow->rule->action) {
1569 if (flow->cookie == 0)
1573 map = get_hashentry(&zt->priv->ct_map_table, &flow->cookie,
1581 map->cookie = flow->cookie;
1740 /* More than one ct action may be present in a flow rule,
1807 struct flow_cls_offload *flow,
1816 ct_act = get_flow_act_ct(flow->rule);
1823 ct_goto = get_flow_act(flow->rule, FLOW_ACTION_GOTO);
1848 ct_entry = nfp_fl_ct_add_flow(zt, netdev, flow, false, extack);
1852 ct_entry->chain_index = flow->common.chain_index;
1882 struct flow_cls_offload *flow,
1885 struct flow_rule *rule = flow_cls_offload_flow_rule(flow);
1929 ct_entry = nfp_fl_ct_add_flow(zt, netdev, flow, false, extack);
1934 ct_entry->chain_index = flow->common.chain_index;
1935 ct_goto = get_flow_act(flow->rule, FLOW_ACTION_GOTO);
2006 * flow then update stats from tunnel merged flows first.
2033 /* Update previous pre_ct/post_ct/nft flow stats */
2063 int nfp_fl_ct_stats(struct flow_cls_offload *flow,
2076 /* Iterate tc_merge entries associated with this flow */
2082 /* Iterate nft_merge entries associated with this tc_merge flow */
2097 /* Iterate tc_merge entries associated with this flow */
2103 /* Iterate nft_merge entries associated with this tc_merge flow */
2118 /* Iterate nft_merge entries associated with this nft flow */
2131 /* Finally update the flow stats from the original stats request */
2132 flow_stats_update(&flow->stats, ct_entry->stats.bytes,
2136 /* Stats has been synced to original flow, can now clear
2147 nfp_fl_ct_offload_nft_supported(struct flow_cls_offload *flow)
2149 struct flow_rule *flow_rule = flow->rule;
2168 nfp_fl_ct_offload_nft_flow(struct nfp_fl_ct_zone_entry *zt, struct flow_cls_offload *flow)
2174 extack = flow->common.extack;
2175 switch (flow->command) {
2177 if (!nfp_fl_ct_offload_nft_supported(flow))
2181 * flow - protect against adding duplicates.
2183 ct_map_ent = rhashtable_lookup_fast(&zt->priv->ct_map_table, &flow->cookie,
2186 ct_entry = nfp_fl_ct_add_flow(zt, NULL, flow, true, extack);
2196 ct_map_ent = rhashtable_lookup_fast(&zt->priv->ct_map_table, &flow->cookie,
2200 ct_map_ent = rhashtable_lookup_fast(&zt->priv->ct_map_table, &flow->cookie,
2203 return nfp_fl_ct_stats(flow, ct_map_ent);
2213 struct flow_cls_offload *flow = type_data;
2224 err = nfp_fl_ct_offload_nft_flow(zt, flow);