At present the log displays the auto load balance state
everytime it is changed.

There are some cases where the user will try to enable
auto load balance, but it cannot be enabled because not
enough PMDs or RxQs. As the state does not change, there
is no new log of the state.

While the the last log report of state is still correct,
it is better to log the state again at this point so the
user can explicitly confirm the outcome of their request.

Signed-off-by: Kevin Traynor <[email protected]>
---
 lib/dpif-netdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index e3fd0a07f..4381c618f 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -4347,6 +4347,10 @@ dpif_netdev_set_config(struct dpif *dpif, const struct 
smap *other_config)
 
     struct pmd_auto_lb *pmd_alb = &dp->pmd_alb;
+    bool cur_rebalance_requested = pmd_alb->auto_lb_requested;
     pmd_alb->auto_lb_requested = smap_get_bool(other_config, "pmd-auto-lb",
                               false);
+    if (cur_rebalance_requested != pmd_alb->auto_lb_requested) {
+        log_autolb = true;
+    }
 
     rebalance_intvl = smap_get_int(other_config, "pmd-auto-lb-rebal-interval",
-- 
2.26.2

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

Reply via email to