Lines Matching defs:flow

22 static int nf_flow_state_check(struct flow_offload *flow, int proto,
32 flow_offload_teardown(flow);
76 static void nf_flow_snat_ip(const struct flow_offload *flow,
85 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_v4.s_addr;
90 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.src_v4.s_addr;
99 static void nf_flow_dnat_ip(const struct flow_offload *flow,
108 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.src_v4.s_addr;
113 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.dst_v4.s_addr;
122 static void nf_flow_nat_ip(const struct flow_offload *flow, struct sk_buff *skb,
126 if (test_bit(NF_FLOW_SNAT, &flow->flags)) {
127 nf_flow_snat_port(flow, skb, thoff, iph->protocol, dir);
128 nf_flow_snat_ip(flow, skb, iph, thoff, dir);
130 if (test_bit(NF_FLOW_DNAT, &flow->flags)) {
131 nf_flow_dnat_port(flow, skb, thoff, iph->protocol, dir);
132 nf_flow_dnat_ip(flow, skb, iph, thoff, dir);
369 struct flow_offload *flow;
374 flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]);
376 mtu = flow->tuplehash[dir].tuple.mtu + ctx->offset;
382 if (nf_flow_state_check(flow, iph->protocol, skb, thoff))
386 flow_offload_teardown(flow);
393 flow_offload_refresh(flow_table, flow, false);
399 nf_flow_nat_ip(flow, skb, thoff, dir, iph);
405 nf_ct_acct_update(flow->ct, tuplehash->tuple.dir, skb->len);
420 struct flow_offload *flow;
445 flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]);
452 nexthop = rt_nexthop(rt, flow->tuplehash[!dir].tuple.src_v4.s_addr);
460 flow_offload_teardown(flow);
513 static void nf_flow_snat_ipv6(const struct flow_offload *flow,
523 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_v6;
528 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.src_v6;
536 static void nf_flow_dnat_ipv6(const struct flow_offload *flow,
546 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.src_v6;
551 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.dst_v6;
559 static void nf_flow_nat_ipv6(const struct flow_offload *flow,
566 if (test_bit(NF_FLOW_SNAT, &flow->flags)) {
567 nf_flow_snat_port(flow, skb, thoff, ip6h->nexthdr, dir);
568 nf_flow_snat_ipv6(flow, skb, ip6h, thoff, dir);
570 if (test_bit(NF_FLOW_DNAT, &flow->flags)) {
571 nf_flow_dnat_port(flow, skb, thoff, ip6h->nexthdr, dir);
572 nf_flow_dnat_ipv6(flow, skb, ip6h, thoff, dir);
648 struct flow_offload *flow;
653 flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]);
655 mtu = flow->tuplehash[dir].tuple.mtu + ctx->offset;
661 if (nf_flow_state_check(flow, ip6h->nexthdr, skb, thoff))
665 flow_offload_teardown(flow);
672 flow_offload_refresh(flow_table, flow, false);
677 nf_flow_nat_ipv6(flow, skb, dir, ip6h);
683 nf_ct_acct_update(flow->ct, tuplehash->tuple.dir, skb->len);
716 struct flow_offload *flow;
740 flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]);
747 nexthop = rt6_nexthop(rt, &flow->tuplehash[!dir].tuple.src_v6);
755 flow_offload_teardown(flow);