On Fri, 29 May 2026 07:26:48 -0700
Wei Hu <[email protected]> wrote:

> diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
> index 67396cda1f..89e45c53c1 100644
> --- a/drivers/net/mana/mana.c
> +++ b/drivers/net/mana/mana.c
> @@ -13,7 +13,10 @@
>  #include <ethdev_pci.h>
>  #include <rte_kvargs.h>
>  #include <rte_eal_paging.h>
> +#include <rte_alarm.h>
>  #include <rte_pci.h>
> +#include <rte_rcu_qsbr.h>
> +#include <rte_lock_annotations.h>
>  
>  #include <infiniband/verbs.h>
>  #include <infiniband/manadv.h>
> @@ -103,6 +106,23 @@ mana_dev_configure(struct rte_eth_dev *dev)
>                             RTE_ETH_RX_OFFLOAD_VLAN_STRIP);
>  
>       priv->num_queues = dev->data->nb_rx_queues;
> +     DRV_LOG(DEBUG, "priv %p, port %u, dev port %u, num_queues: %u",
> +             priv, priv->port_id, priv->dev_port, priv->num_queues);
> +
> +     /*
> +      * Register data path thread IDs (rx and tx) with the RCU
> +      * quiescent state variable for device state synchronization.
> +      */
> +     for (int i = 0; i < 2 * priv->num_queues; i++) {
> +             if (rte_rcu_qsbr_thread_register(priv->dev_state_qsv, i) != 0) {
> +                     DRV_LOG(ERR, "Failed to register rcu qsv thread %d of 
> total %d",
> +                             i, 2 * priv->num_queues - 1);
> +                     return -EINVAL;
> +             }
> +             DRV_LOG(DEBUG,
> +                     "Register thread 0x%x for priv %p, port %u",
> +                     i, priv, priv->port_id);
> +     }
>  

If device driver now has dependency on RCU you need to update meson.build
to show that. No other driver does this. Creating threads in driver is
discouraged because it can lead to other problems in applications.

If possible, I would figure out how to manage reset without creating a thread
per-queue. Or at least one control thread and use epoll() and eventfd's.

Reply via email to