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.

Tested on top of main 7d16edb88: checkpatch clean, build with
--enable-Werror, "make check" 1216 passed, 175 skipped, 0 failed.  Both
patches also apply to branch-26.09 and branch-26.03; we run them 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 | 53 ++++++++++++++----
 controller/ecmp-next-hop-monitor.h |  9 ++--
 controller/ofctrl.c                | 26 +++++----
 tests/ovn.at                       | 86 ++++++++++++++++++++++++++++++
 4 files changed, 150 insertions(+), 24 deletions(-)

-- 
2.43.0


_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to