On 2/6/26 4:35 AM, Jun Gu wrote: > The current implementation triggers mirroring even when a packet is > being recirculated (e.g., for bond member selection). This leads to > incorrect mirroring behavior in the following ways: > > 1. Redundant Mirrors: If a packet is mirrored during the recirculation > phase and then mirrored again when it finally hits an actual output > action, the mirror destination receives duplicate traffic. > > 2. False Mirroring: If for some reason the post-recurculation rules are > not available, we should not be mirroring the packet. For example, > if a bond is removed while we have the first datapath flow installed, > but the packet after recirculation goes to userspace via MISS upcall > and gets dropped, then we should not mirror that packet. > > This patch refactors compose_output_action__() to ensure mirror_packet() > is not invoked during recirculation and avoid mirroring on recirculation. > > Signed-off-by: Jun Gu <[email protected]> > --- > ofproto/ofproto-dpif-xlate.c | 9 ++++++++- > tests/ofproto-dpif.at | 37 ++++++++++++++++++++++++++++++++++++ > 2 files changed, 45 insertions(+), 1 deletion(-)
Thanks for the update! > > diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c > index 32ee49e7e..6f94c007d 100644 > --- a/ofproto/ofproto-dpif-xlate.c > +++ b/ofproto/ofproto-dpif-xlate.c > @@ -4556,6 +4556,8 @@ compose_output_action__(struct xlate_ctx *ctx, > ofp_port_t ofp_port, > out_port = odp_port; > } > > + bool skip_mirrors = false; I moved this line to the top of the function, as it seems more in line with the rest of the code this way, and applied the patch. Also backported down to 3.3. Best regards, Ilya Maximets. _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
