On Fri, Dec 17, 2021 at 4:10 PM Maxime Coquelin
<[email protected]> wrote:
>
> A boolean is currently used to differenciate between the
> static and XPS Tx queue modes.
>
> Since we are going to introduce a new steering mode, replace
> this boolean with an enum.
>
> This patch does not introduce functionnal changes.
>
> Signed-off-by: Maxime Coquelin <[email protected]>

Reviewed-by: David Marchand <[email protected]>


> @@ -5804,7 +5810,8 @@ reconfigure_datapath(struct dp_netdev *dp)
>              seq_change(dp->port_seq);
>              port_destroy(port);
>          } else {
> -            port->dynamic_txqs = netdev_n_txq(port->netdev) < wanted_txqs;
> +            port->txq_mode = (netdev_n_txq(port->netdev) < wanted_txqs) ?
> +                TXQ_MODE_XPS : TXQ_MODE_STATIC;

Nit: the coding style states that the ternary operator should be on
the next line. This part is "fixed" (removed) in the next patch.


>          }
>      }
>
> @@ -7812,7 +7819,7 @@ dpif_netdev_xps_revalidate_pmd(const struct 
> dp_netdev_pmd_thread *pmd,
>      long long interval;
>
>      HMAP_FOR_EACH (tx, node, &pmd->send_port_cache) {
> -        if (!tx->port->dynamic_txqs) {
> +        if (tx->port->txq_mode != TXQ_MODE_XPS) {
>              continue;
>          }
>          interval = pmd->ctx.now - tx->last_used;
> --
> 2.31.1
>


-- 
David Marchand

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

Reply via email to