Skip to content

Commit

Permalink
dpif-netdev: auto load balance log state on user request.
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: Ian Stokes <[email protected]>
  • Loading branch information
kevintraynor authored and istokes committed Feb 15, 2021
1 parent 81661d7 commit 4b67482
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/dpif-netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4346,8 +4346,12 @@ 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",
ALB_REBALANCE_INTERVAL);
Expand Down

0 comments on commit 4b67482

Please sign in to comment.