Commit 1f0c776
northd: Skip UNSNAT for force-SNAT load balancer VIPs.
Northd adds a priority-120 UNSNAT bypass when a load balancer VIP
also appears as a NAT external IP. This prevents packets for the VIP
from repeatedly entering an SNAT zone lookup that never commits the
pre-DNAT tuple. Such packets remain ct.new and cannot be offloaded.
Gateway routers using lb_force_snat_ip=router_ip may use a router
port IP as the VIP while their NAT external IP is a different
masquerade address. Northd then omits the bypass even though it
creates an UNSNAT flow for the router port IP.
Generate the bypass when a port-specific VIP also matches a DNAT or
load balancer force-SNAT address, or a router port address selected
by lb_force_snat_ip=router_ip.
Do not extend the bypass to port-less VIPs in the new force-SNAT
cases. Such a flow would match replies sent to the force-SNAT
address and shadow the flow that reverses SNAT. Keep the existing
NAT external-IP behavior unchanged.
Add coverage using port-specific and port-less VIPs with a different
masquerade SNAT address. A single-stream OVN-Kubernetes DPU test with
the port-specific NodePort VIP improved from 8.8 Gbit/s to 19.8
Gbit/s.
Backport note: lib/ovn-util.c on this branch has no
lport_addresses_contains_ip(); upstream gained it in a feature commit
that is not stable material. northd.c therefore carries a local static
copy with identical semantics. The rest of the change is unmodified.
Reported-at: ovn-kubernetes/ovn-kubernetes#6422
Assisted-by: GPT-5, OpenAI Codex
Signed-off-by: Tim Rozet <trozet@nvidia.com>
Signed-off-by: Han Zhou <hzhou@ovn.org>
(cherry picked from commit 45831b7)1 parent f7a907d commit 1f0c776
2 files changed
Lines changed: 103 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12403 | 12403 | | |
12404 | 12404 | | |
12405 | 12405 | | |
| 12406 | + | |
| 12407 | + | |
| 12408 | + | |
| 12409 | + | |
| 12410 | + | |
| 12411 | + | |
| 12412 | + | |
| 12413 | + | |
| 12414 | + | |
| 12415 | + | |
| 12416 | + | |
| 12417 | + | |
| 12418 | + | |
| 12419 | + | |
| 12420 | + | |
| 12421 | + | |
| 12422 | + | |
| 12423 | + | |
| 12424 | + | |
| 12425 | + | |
| 12426 | + | |
| 12427 | + | |
| 12428 | + | |
| 12429 | + | |
| 12430 | + | |
| 12431 | + | |
| 12432 | + | |
| 12433 | + | |
| 12434 | + | |
| 12435 | + | |
| 12436 | + | |
| 12437 | + | |
| 12438 | + | |
| 12439 | + | |
| 12440 | + | |
| 12441 | + | |
| 12442 | + | |
| 12443 | + | |
| 12444 | + | |
| 12445 | + | |
| 12446 | + | |
| 12447 | + | |
| 12448 | + | |
| 12449 | + | |
| 12450 | + | |
| 12451 | + | |
| 12452 | + | |
| 12453 | + | |
| 12454 | + | |
| 12455 | + | |
| 12456 | + | |
| 12457 | + | |
| 12458 | + | |
| 12459 | + | |
12406 | 12460 | | |
12407 | 12461 | | |
12408 | 12462 | | |
| |||
12552 | 12606 | | |
12553 | 12607 | | |
12554 | 12608 | | |
12555 | | - | |
12556 | | - | |
12557 | | - | |
12558 | | - | |
12559 | | - | |
| 12609 | + | |
| 12610 | + | |
| 12611 | + | |
| 12612 | + | |
12560 | 12613 | | |
12561 | | - | |
12562 | | - | |
| 12614 | + | |
| 12615 | + | |
12563 | 12616 | | |
12564 | | - | |
| 12617 | + | |
12565 | 12618 | | |
12566 | 12619 | | |
12567 | 12620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1733 | 1733 | | |
1734 | 1734 | | |
1735 | 1735 | | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
1736 | 1778 | | |
1737 | 1779 | | |
1738 | 1780 | | |
| |||
0 commit comments