diff mbox series

[ovs-dev] bond/mirror: fix duplicate output when mix bond and mirror

Message ID SG2PR03MB396067B6740F08908F2BB1B9B6520@SG2PR03MB3960.apcprd03.prod.outlook.com
State Changes Requested
Headers show
Series [ovs-dev] bond/mirror: fix duplicate output when mix bond and mirror | expand

Commit Message

? ? April 6, 2019, 1:59 p.m. UTC
When we configured bond that use recirc and configure mirror, we
observed that mirror destination has duplicated outputs.  This is
because bond's frozen_state is not updated to reflect the mirror
already composed the output, and when the companion recirc flow
need to decide its action, the mirror again take effects, causing
duplicate outputs.

Signed-off-by: Shuang Huang <kevinhuangs@hotmail.com>
---
 ofproto/ofproto-dpif-xlate.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

0-day Robot April 6, 2019, 3:50 p.m. UTC | #1
Bleep bloop.  Greetings ? ?, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
ERROR: Author ? ? <kevinhuangs@hotmail.com> needs to sign off.
WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: Shuang Huang <kevinhuangs@hotmail.com>
Lines checked: 42, Warnings: 1, Errors: 1


Please check this out.  If you feel there has been an error, please email aconole@bytheb.org

Thanks,
0-day Robot
Simon Horman June 8, 2023, 2:42 p.m. UTC | #2
On Sat, Apr 06, 2019 at 01:59:13PM +0000, ? ? wrote:
> When we configured bond that use recirc and configure mirror, we
> observed that mirror destination has duplicated outputs.  This is
> because bond's frozen_state is not updated to reflect the mirror
> already composed the output, and when the companion recirc flow
> need to decide its action, the mirror again take effects, causing
> duplicate outputs.
> 
> Signed-off-by: Shuang Huang <kevinhuangs@hotmail.com>

Hi,

I noticed this patch while looking at patchwork.
It seems to be stale. Though, surprisingly, still applies.

It does, however, have a problem flagged by patch robot flagged regarding
the signed-off-by line.

If it is still relevant please consider rebasing and reposting.
I am marking this version as "Changes Requested" in patchwork.
diff mbox series

Patch

diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index c4014d7..d4f10b7 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -2453,6 +2453,16 @@  output_normal(struct xlate_ctx *ctx, const struct xbundle *out_xbundle,
     compose_output_action(ctx, xport->ofp_port, use_recirc ? &xr : NULL,
                           false, false);
     memcpy(&ctx->xin->flow.vlans, &old_vlans, sizeof(old_vlans));
+    /* Store mirrors for bond that use recirc to avoid duplicate output */
+    if (use_recirc) {
+        struct recirc_id_node *node = CONST_CAST(
+            struct recirc_id_node *, recirc_id_node_find(xr.recirc_id));
+        if (node) {
+            struct frozen_state *state =
+                CONST_CAST(struct frozen_state *, &node->state);
+            state->mirrors = ctx->mirrors;
+        }
+    }
 }
 
 /* A VM broadcasts a gratuitous ARP to indicate that it has resumed after