Lines Matching full:nat
211 actions->nat.l3_is_ipv4 = true; in bnxt_tc_parse_pedit()
213 actions->nat.src_xlate = true; in bnxt_tc_parse_pedit()
214 actions->nat.l3.ipv4.saddr.s_addr = htonl(val); in bnxt_tc_parse_pedit()
216 actions->nat.src_xlate = false; in bnxt_tc_parse_pedit()
217 actions->nat.l3.ipv4.daddr.s_addr = htonl(val); in bnxt_tc_parse_pedit()
225 netdev_dbg(bp->dev, "nat.src_xlate = %d src IP: %pI4 dst ip : %pI4\n", in bnxt_tc_parse_pedit()
226 actions->nat.src_xlate, &actions->nat.l3.ipv4.saddr, in bnxt_tc_parse_pedit()
227 &actions->nat.l3.ipv4.daddr); in bnxt_tc_parse_pedit()
232 actions->nat.l3_is_ipv4 = false; in bnxt_tc_parse_pedit()
238 actions->nat.src_xlate = true; in bnxt_tc_parse_pedit()
241 actions->nat.l3.ipv6.saddr.s6_addr32[idx] = htonl(val); in bnxt_tc_parse_pedit()
244 actions->nat.src_xlate = false; in bnxt_tc_parse_pedit()
246 actions->nat.l3.ipv6.saddr.s6_addr32[idx] = htonl(val); in bnxt_tc_parse_pedit()
264 if (actions->nat.src_xlate) in bnxt_tc_parse_pedit()
265 actions->nat.l4.ports.sport = htons(val); in bnxt_tc_parse_pedit()
267 actions->nat.l4.ports.dport = htons(val); in bnxt_tc_parse_pedit()
268 netdev_dbg(bp->dev, "actions->nat.sport = %d dport = %d\n", in bnxt_tc_parse_pedit()
269 actions->nat.l4.ports.sport, in bnxt_tc_parse_pedit()
270 actions->nat.l4.ports.dport); in bnxt_tc_parse_pedit()
331 /* Packet edit: L2 rewrite, NAT, NAPT */ in bnxt_tc_parse_actions()
610 if (actions->nat.l3_is_ipv4) { in bnxt_hwrm_cfa_flow_alloc()
614 if (actions->nat.src_xlate) { in bnxt_hwrm_cfa_flow_alloc()
619 actions->nat.l3.ipv4.saddr.s_addr; in bnxt_hwrm_cfa_flow_alloc()
621 if (actions->nat.l4.ports.sport) in bnxt_hwrm_cfa_flow_alloc()
623 actions->nat.l4.ports.sport; in bnxt_hwrm_cfa_flow_alloc()
629 actions->nat.l3.ipv4.daddr.s_addr; in bnxt_hwrm_cfa_flow_alloc()
631 if (actions->nat.l4.ports.dport) in bnxt_hwrm_cfa_flow_alloc()
633 actions->nat.l4.ports.dport; in bnxt_hwrm_cfa_flow_alloc()
637 req.nat_ip_address, actions->nat.src_xlate, in bnxt_hwrm_cfa_flow_alloc()
640 if (actions->nat.src_xlate) { in bnxt_hwrm_cfa_flow_alloc()
645 actions->nat.l3.ipv6.saddr.s6_addr32, in bnxt_hwrm_cfa_flow_alloc()
648 if (actions->nat.l4.ports.sport) in bnxt_hwrm_cfa_flow_alloc()
650 actions->nat.l4.ports.sport; in bnxt_hwrm_cfa_flow_alloc()
656 actions->nat.l3.ipv6.daddr.s6_addr32, in bnxt_hwrm_cfa_flow_alloc()
659 if (actions->nat.l4.ports.dport) in bnxt_hwrm_cfa_flow_alloc()
661 actions->nat.l4.ports.dport; in bnxt_hwrm_cfa_flow_alloc()
665 req.nat_ip_address, actions->nat.src_xlate, in bnxt_hwrm_cfa_flow_alloc()