mbox series

[ovs-dev,v6,0/2] ovn-controller: Multiple OVS interfaces bound to same lport

Message ID 20221121124046.3980712-1-xsimonar@redhat.com
Headers show
Series ovn-controller: Multiple OVS interfaces bound to same lport | expand

Message

Xavier Simonart Nov. 21, 2022, 12:40 p.m. UTC
In the following scenario:
- interface "old" is created and external_ids:iface-id is set (to lp)
- interface "new" is created and external_ids:iface-id is set (to same lp)
- interface "old" is deleted
flows related to lp were deleted.

Note that after "new" interface is created, flows use "new" ofport.
The state where old and new interfaces have both external_ids:iface-id set at
the same time is "invalid", and all flows are not installed for lpold.

Fixes: 3ae8470edc64 ("I-P: Handle runtime data changes for pflow_output engine.")
Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2129866

v2: - Use bool instead of int for binding count to better reflect only
      one additional binding is supported.
    - Fix use after free.
    - Remove debug logging from test case
v3: - Based on Dumitru's and Mark's feedback:
      - Support any number of interfaces bound to the same port
      - Use recomputes to make code simpler (this is corner case)
      - Added test case using three interfaces bound to te same port
v4: - Updated based on Ales' feedback
    - Also support scenario for port-types different than localport
    - Added test case for VIF port
    - Rebased on latest main
v5: - Updated test case based on Numan/Dumitru's feedback (hit ofport = 0)
      and added comments in code.
    - Rebased on latest main.
v6: - Split in 2 commits (1st one fixing unexpected interface release when
      receiving notification of ofport = 0 for different OVS interface).
     - Rebased on latest main

Xavier Simonart (2):
  ovn-controller: Fix releasing wrong vif
  ovn-controller: Fixed missing flows after interface deletion

 controller/binding.c |  36 ++++++++++
 controller/binding.h |   1 +
 tests/ovn.at         | 168 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 205 insertions(+)