Re: [PATCH net-next 4/6] net: use netdev_queue_config() for mp restart
From: Dragos Tatulea <dtatulea@nvidia.com>
Date: 2026-01-22 15:06:51
On 22.01.26 01:51, Jakub Kicinski wrote: [...]
quoted hunk ↗ jump to hunk
@@ -154,8 +154,11 @@ int __net_mp_open_rxq(struct net_device *dev, unsigned int rxq_idx, } #endif + netdev_queue_config(dev, rxq_idx, &qcfg[0]); rxq->mp_params = *p; - ret = netdev_rx_queue_restart(dev, rxq_idx); + netdev_queue_config(dev, rxq_idx, &qcfg[1]); + + ret = netdev_rx_queue_reconfig(dev, rxq_idx, &qcfg[0], &qcfg[1]); if (ret) memset(&rxq->mp_params, 0, sizeof(rxq->mp_params));@@ -176,6 +179,7 @@ int net_mp_open_rxq(struct net_device *dev, unsigned int rxq_idx, void __net_mp_close_rxq(struct net_device *dev, unsigned int ifq_idx, const struct pp_memory_provider_params *old_p) { + struct netdev_queue_config qcfg[2]; struct netdev_rx_queue *rxq; int err;@@ -195,8 +199,11 @@ void __net_mp_close_rxq(struct net_device *dev, unsigned int ifq_idx, rxq->mp_params.mp_priv != old_p->mp_priv)) return; + netdev_queue_config(dev, ifq_idx, &qcfg[0]); memset(&rxq->mp_params, 0, sizeof(rxq->mp_params)); - err = netdev_rx_queue_restart(dev, ifq_idx); + netdev_queue_config(dev, ifq_idx, &qcfg[1]); +
Is it ok to assume that on close we always resume to the default? For now yes but maybe in the future we might want to save qcfg to the state before mp_open. With the very first rx-buf-len series it was possible to set a rx-buf-len via YNL for a normal queue, switch to a MP queue and then on MP queue close the configuration got switched to the default value of rx-buf-len instead of what the user had configured. This was not convenient. Thanks, Dragos