> In order for auto load balance to be enabled, there are > minimum requirements of more than one PMD and more than > one Rxq on at least one PMD. > > If these conditions are not met a rebalance would be pointless, > so auto load balance is not enabled. > > Currently the state is logged but in the case where the criteria > for enabling is not met, there is no reason given. > > It would be useful for the user to see the reason, so they > can understand why auto load balance has not been enabled > when they have requested it. > > For example, if a user has one PMD and sets pmd-auto-lb=true, > previously: > |INFO|PMD auto load balance is disabled > > With patch: > |INFO|PMD auto load balance not enough PMDs or Rx Queues to enable > |INFO|PMD auto load balance is disabled
Thanks for the patch Kevin. In testing this worked as expected. One query I had was did you give thought towards more detailed in the log? i.e. if its 1 PMD should we flag that PMD <=1 is an issue. Similar with the number of RXQs. Maybe that's overkill as you could argue the minimum requirements could change over time but if its something that could be flagged easily would it be worth it? Thanks Ian > > Signed-off-by: Kevin Traynor <[email protected]> > --- > lib/dpif-netdev.c | 19 +++++++++++++++---- > 1 file changed, 15 insertions(+), 4 deletions(-) > > diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c > index 4381c618f..833f45616 100644 > --- a/lib/dpif-netdev.c > +++ b/lib/dpif-netdev.c > @@ -4213,4 +4213,5 @@ set_pmd_auto_lb(struct dp_netdev *dp, bool > always_log) > bool enable_alb = false; > bool multi_rxq = false; > + bool minreq = false; > bool pmd_rxq_assign_cyc = dp->pmd_rxq_assign_cyc; > > @@ -4226,6 +4227,6 @@ set_pmd_auto_lb(struct dp_netdev *dp, bool > always_log) > } > if (cnt && multi_rxq) { > - enable_alb = true; > - break; > + minreq = true; > + break; > } > cnt++; > @@ -4233,6 +4234,5 @@ set_pmd_auto_lb(struct dp_netdev *dp, bool > always_log) > > /* Enable auto LB if it is requested and cycle based assignment is true. > */ > - enable_alb = enable_alb && pmd_rxq_assign_cyc && > - pmd_alb->auto_lb_requested; > + enable_alb = minreq && pmd_rxq_assign_cyc && pmd_alb- > >auto_lb_requested; > > if (pmd_alb->is_enabled != enable_alb || always_log) { > @@ -4251,4 +4251,15 @@ set_pmd_auto_lb(struct dp_netdev *dp, bool > always_log) > } else { > pmd_alb->rebalance_poll_timer = 0; > + if (pmd_alb->auto_lb_requested) { > + if (!minreq) { > + VLOG_INFO("PMD auto load balance not enough " > + "PMDs or Rx Queues to enable"); > + } > + if (!pmd_rxq_assign_cyc) { > + VLOG_INFO("PMD auto load balance needs " > + "'other_config:pmd-rxq-assign=cycles' " > + "to enable"); > + } > + } > VLOG_INFO("PMD auto load balance is disabled"); > } > -- > 2.26.2 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
