With ecmp_nexthop_monitor_enable=true, ovn-controller flushes the
conntrack entries of an ecmp-symmetric-reply next-hop when the next-hop
goes away. We found two ways in which entries of a removed next-hop
survive the flush:
1/2: The flush message is built before ofctrl_put() checks
ofctrl_can_put(), and the next-hop is forgotten at once. If ofctrl
cannot send in that run, the message is deleted and never built
again. We hit this intermittently while removing members of an
ecmp-symmetric-reply route under load.
2/2: The flush is sent before the flow bundle that removes the next-hop,
so a packet handled in between can commit a new entry towards the
removed next-hop.
The test added in 1/2 stops ovs-vswitchd and fills the OpenFlow
connection before removing a next-hop; 2/2 adds an ordering check to
it. Each check fails without its change.
v2:
- 1/2: Drop a pending flush when the same next-hop comes back before
the flush was sent, and test that case (Jacob Tanenbaum). The new
test step fails on v1.
- 2/2: No change.
v1: https://patchwork.ozlabs.org/project/ovn/list/?series=531522
Tested on top of main 7d16edb88: checkpatch clean, build with
--enable-Werror, "make check" 1216 passed, 175 skipped, 0 failed. The
series also applies to current main 798325673, branch-26.09 and
branch-26.03. We run v1 on top of v26.03.3.
Bekei Park (2):
controller: Do not lose ECMP next-hop conntrack flushes.
controller: Flush ECMP next-hop conntrack after the flow bundle.
controller/ecmp-next-hop-monitor.c | 64 ++++++++++++---
controller/ecmp-next-hop-monitor.h | 9 ++-
controller/ofctrl.c | 26 +++---
tests/ovn.at | 122 +++++++++++++++++++++++++++++
4 files changed, 197 insertions(+), 24 deletions(-)
--
2.43.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev