diff mbox series

[ovs-dev,v1] Load balancing not happening in case of select group action for MPLS tagged packets

Message ID 1537810174-4635-1-git-send-email-anju.thomas@ericsson.com
State Accepted
Headers show
Series [ovs-dev,v1] Load balancing not happening in case of select group action for MPLS tagged packets | expand

Commit Message

Anju Thomas Sept. 24, 2018, 5:29 p.m. UTC
OVS does not do load balancing for select group buckets in case of mpls tagged packets.
After an MPLS pop action, the expectation is to trigger recirculation .
This recirculation will ensure an RSS re-computation which will ensure load balancing in case of select group bucket.
Due to a missing return statement before bucket selection, the bucket selection in case of select group happens
before the  recirculation and hence no load balancing is achieved

Signed-off-by: Anju Thomas <anju.thomas@ericsson.com>
---
 ofproto/ofproto-dpif-xlate.c | 1 +
 tests/mpls-xlate.at          | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Ben Pfaff Sept. 26, 2018, 10:56 p.m. UTC | #1
On Mon, Sep 24, 2018 at 10:59:34PM +0530, Anju Thomas wrote:
> OVS does not do load balancing for select group buckets in case of mpls tagged packets.
> After an MPLS pop action, the expectation is to trigger recirculation .
> This recirculation will ensure an RSS re-computation which will ensure load balancing in case of select group bucket.
> Due to a missing return statement before bucket selection, the bucket selection in case of select group happens
> before the  recirculation and hence no load balancing is achieved
> 
> Signed-off-by: Anju Thomas <anju.thomas@ericsson.com>

Thanks, applied to master.
diff mbox series

Patch

diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index e26f6c8..fd9cac6 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -4463,6 +4463,7 @@  pick_select_group(struct xlate_ctx *ctx, struct group_dpif *group)
      */
     if (ctx->was_mpls) {
         ctx_trigger_freeze(ctx);
+        return NULL;
     }
 
     switch (group->selection_method) {
diff --git a/tests/mpls-xlate.at b/tests/mpls-xlate.at
index e335b7f..4392f7b 100644
--- a/tests/mpls-xlate.at
+++ b/tests/mpls-xlate.at
@@ -78,8 +78,8 @@  done
 
 AT_CHECK([ovs-appctl dpctl/dump-flows | sed 's/packets.*actions:1/actions:1/' | strip_used | strip_ufid | sort], [0], [dnl
 flow-dump from non-dpdk interfaces:
-recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x8847),mpls(label=22/0xfffff,tc=0/0,ttl=64/0x0,bos=1/1), packets:3, bytes:54, used:0.0s, actions:pop_mpls(eth_type=0x800),recirc(0x3)
-recirc_id(0x3),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), actions:100
+recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x8847),mpls(label=22/0xfffff,tc=0/0,ttl=64/0x0,bos=1/1), packets:3, bytes:54, used:0.0s, actions:pop_mpls(eth_type=0x800),recirc(0x3)
+recirc_id(0x3),in_port(1),packet_type(ns=0,id=0),eth(src=f8:bc:12:44:34:b6,dst=f8:bc:12:46:58:e0),eth_type(0x0800),ipv4(src=0.0.0.0,dst=0.0.0.0,proto=0,frag=no), actions:100
 ])
 
 dnl Test MPLS pop then all group output (bucket actions do not trigger recirculation)