public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs()
@ 2026-02-23 12:51 Michal Swiatkowski
  2026-02-24  9:40 ` Simon Horman
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Michal Swiatkowski @ 2026-02-23 12:51 UTC (permalink / raw)
  To: intel-wired-lan; +Cc: netdev, Michal Swiatkowski, Przemek Kitszel

When allocating netdevice using alloc_etherdev_mqs() the maximum
supported queues number should be passed. The vsi->alloc_txq/rxq is
storing current number of queues, not the maximum ones.

Use the same function for getting max Tx and Rx queues which is used
during ethtool -l call to set maximum number of queues during netdev
allocation.

Reproduction steps:
$ethtool -l $pf # says current 16, max 64
$ethtool -S $pf # fine
$ethtool -L $pf combined 40 # crash

[491187.472594] Call Trace:
[491187.472829]  <TASK>
[491187.473067]  netif_set_xps_queue+0x26/0x40
[491187.473305]  ice_vsi_cfg_txq+0x265/0x3d0 [ice]
[491187.473619]  ice_vsi_cfg_lan_txqs+0x68/0xa0 [ice]
[491187.473918]  ice_vsi_cfg_lan+0x2b/0xa0 [ice]
[491187.474202]  ice_vsi_open+0x71/0x170 [ice]
[491187.474484]  ice_vsi_recfg_qs+0x17f/0x230 [ice]
[491187.474759]  ? dev_get_min_mp_channel_count+0xab/0xd0
[491187.474987]  ice_set_channels+0x185/0x3d0 [ice]
[491187.475278]  ethnl_set_channels+0x26f/0x340

Fixes: ee13aa1a2c5a ("ice: use netif_get_num_default_rss_queues()")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
 drivers/net/ethernet/intel/ice/ice.h         | 22 ++++++++++++++++++++
 drivers/net/ethernet/intel/ice/ice_ethtool.c | 18 ----------------
 drivers/net/ethernet/intel/ice/ice_main.c    |  4 ++--
 3 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index f6a56a864459..725b130dd3a2 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -839,6 +839,28 @@ static inline void ice_tx_xsk_pool(struct ice_vsi *vsi, u16 qid)
 	WRITE_ONCE(ring->xsk_pool, ice_get_xp_from_qid(vsi, qid));
 }
 
+/**
+ * ice_get_max_txq - return the maximum number of Tx queues for in a PF
+ * @pf: PF structure
+ *
+ * Return: maximum number of Tx queues
+ */
+static inline int ice_get_max_txq(struct ice_pf *pf)
+{
+	return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_txq);
+}
+
+/**
+ * ice_get_max_rxq - return the maximum number of Rx queues for in a PF
+ * @pf: PF structure
+ *
+ * Return: maximum number of Rx queues
+ */
+static inline int ice_get_max_rxq(struct ice_pf *pf)
+{
+	return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_rxq);
+}
+
 /**
  * ice_get_main_vsi - Get the PF VSI
  * @pf: PF instance
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index a897a6b22495..a0b0416f5aea 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -3780,24 +3780,6 @@ ice_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info)
 	return 0;
 }
 
-/**
- * ice_get_max_txq - return the maximum number of Tx queues for in a PF
- * @pf: PF structure
- */
-static int ice_get_max_txq(struct ice_pf *pf)
-{
-	return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_txq);
-}
-
-/**
- * ice_get_max_rxq - return the maximum number of Rx queues for in a PF
- * @pf: PF structure
- */
-static int ice_get_max_rxq(struct ice_pf *pf)
-{
-	return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_rxq);
-}
-
 /**
  * ice_get_combined_cnt - return the current number of combined channels
  * @vsi: PF VSI pointer
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index fa4095037be5..863ac81eebce 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -4699,8 +4699,8 @@ static int ice_cfg_netdev(struct ice_vsi *vsi)
 	struct net_device *netdev;
 	u8 mac_addr[ETH_ALEN];
 
-	netdev = alloc_etherdev_mqs(sizeof(*np), vsi->alloc_txq,
-				    vsi->alloc_rxq);
+	netdev = alloc_etherdev_mqs(sizeof(*np), ice_get_max_txq(vsi->back),
+				    ice_get_max_rxq(vsi->back));
 	if (!netdev)
 		return -ENOMEM;
 
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs()
  2026-02-23 12:51 [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs() Michal Swiatkowski
@ 2026-02-24  9:40 ` Simon Horman
  2026-02-24 10:03 ` [Intel-wired-lan] " Paul Menzel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Simon Horman @ 2026-02-24  9:40 UTC (permalink / raw)
  To: Michal Swiatkowski; +Cc: intel-wired-lan, netdev, Przemek Kitszel

On Mon, Feb 23, 2026 at 01:51:57PM +0100, Michal Swiatkowski wrote:
> When allocating netdevice using alloc_etherdev_mqs() the maximum
> supported queues number should be passed. The vsi->alloc_txq/rxq is
> storing current number of queues, not the maximum ones.
> 
> Use the same function for getting max Tx and Rx queues which is used
> during ethtool -l call to set maximum number of queues during netdev
> allocation.
> 
> Reproduction steps:
> $ethtool -l $pf # says current 16, max 64
> $ethtool -S $pf # fine
> $ethtool -L $pf combined 40 # crash
> 
> [491187.472594] Call Trace:
> [491187.472829]  <TASK>
> [491187.473067]  netif_set_xps_queue+0x26/0x40
> [491187.473305]  ice_vsi_cfg_txq+0x265/0x3d0 [ice]
> [491187.473619]  ice_vsi_cfg_lan_txqs+0x68/0xa0 [ice]
> [491187.473918]  ice_vsi_cfg_lan+0x2b/0xa0 [ice]
> [491187.474202]  ice_vsi_open+0x71/0x170 [ice]
> [491187.474484]  ice_vsi_recfg_qs+0x17f/0x230 [ice]
> [491187.474759]  ? dev_get_min_mp_channel_count+0xab/0xd0
> [491187.474987]  ice_set_channels+0x185/0x3d0 [ice]
> [491187.475278]  ethnl_set_channels+0x26f/0x340
> 
> Fixes: ee13aa1a2c5a ("ice: use netif_get_num_default_rss_queues()")
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs()
  2026-02-23 12:51 [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs() Michal Swiatkowski
  2026-02-24  9:40 ` Simon Horman
@ 2026-02-24 10:03 ` Paul Menzel
  2026-02-24 10:51   ` Przemek Kitszel
  2026-03-23 16:17 ` Nowlin, Alexander
  2026-03-24 10:02 ` Rinitha, SX
  3 siblings, 1 reply; 6+ messages in thread
From: Paul Menzel @ 2026-02-24 10:03 UTC (permalink / raw)
  To: Michal Swiatkowski; +Cc: intel-wired-lan, netdev, Przemek Kitszel

Dear Michal,


Thank you for the patch.

Am 23.02.26 um 13:51 schrieb Michal Swiatkowski:
> When allocating netdevice using alloc_etherdev_mqs() the maximum
> supported queues number should be passed. The vsi->alloc_txq/rxq is
> storing current number of queues, not the maximum ones.
> 
> Use the same function for getting max Tx and Rx queues which is used
> during ethtool -l call to set maximum number of queues during netdev
> allocation.
> 
> Reproduction steps:
> $ethtool -l $pf # says current 16, max 64
> $ethtool -S $pf # fine
> $ethtool -L $pf combined 40 # crash
> 
> [491187.472594] Call Trace:
> [491187.472829]  <TASK>
> [491187.473067]  netif_set_xps_queue+0x26/0x40
> [491187.473305]  ice_vsi_cfg_txq+0x265/0x3d0 [ice]
> [491187.473619]  ice_vsi_cfg_lan_txqs+0x68/0xa0 [ice]
> [491187.473918]  ice_vsi_cfg_lan+0x2b/0xa0 [ice]
> [491187.474202]  ice_vsi_open+0x71/0x170 [ice]
> [491187.474484]  ice_vsi_recfg_qs+0x17f/0x230 [ice]
> [491187.474759]  ? dev_get_min_mp_channel_count+0xab/0xd0
> [491187.474987]  ice_set_channels+0x185/0x3d0 [ice]
> [491187.475278]  ethnl_set_channels+0x26f/0x340
> 
> Fixes: ee13aa1a2c5a ("ice: use netif_get_num_default_rss_queues()")
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
>   drivers/net/ethernet/intel/ice/ice.h         | 22 ++++++++++++++++++++
>   drivers/net/ethernet/intel/ice/ice_ethtool.c | 18 ----------------
>   drivers/net/ethernet/intel/ice/ice_main.c    |  4 ++--
>   3 files changed, 24 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
> index f6a56a864459..725b130dd3a2 100644
> --- a/drivers/net/ethernet/intel/ice/ice.h
> +++ b/drivers/net/ethernet/intel/ice/ice.h
> @@ -839,6 +839,28 @@ static inline void ice_tx_xsk_pool(struct ice_vsi *vsi, u16 qid)
>   	WRITE_ONCE(ring->xsk_pool, ice_get_xp_from_qid(vsi, qid));
>   }
>   
> +/**
> + * ice_get_max_txq - return the maximum number of Tx queues for in a PF
> + * @pf: PF structure
> + *
> + * Return: maximum number of Tx queues
> + */
> +static inline int ice_get_max_txq(struct ice_pf *pf)
> +{
> +	return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_txq);
> +}
> +
> +/**
> + * ice_get_max_rxq - return the maximum number of Rx queues for in a PF
> + * @pf: PF structure
> + *
> + * Return: maximum number of Rx queues
> + */
> +static inline int ice_get_max_rxq(struct ice_pf *pf)
> +{
> +	return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_rxq);
> +}
> +
>   /**
>    * ice_get_main_vsi - Get the PF VSI
>    * @pf: PF instance
> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> index a897a6b22495..a0b0416f5aea 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
> @@ -3780,24 +3780,6 @@ ice_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info)
>   	return 0;
>   }
>   
> -/**
> - * ice_get_max_txq - return the maximum number of Tx queues for in a PF
> - * @pf: PF structure
> - */
> -static int ice_get_max_txq(struct ice_pf *pf)
> -{
> -	return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_txq);
> -}
> -
> -/**
> - * ice_get_max_rxq - return the maximum number of Rx queues for in a PF
> - * @pf: PF structure
> - */
> -static int ice_get_max_rxq(struct ice_pf *pf)
> -{
> -	return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_rxq);
> -}
> -
>   /**
>    * ice_get_combined_cnt - return the current number of combined channels
>    * @vsi: PF VSI pointer
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index fa4095037be5..863ac81eebce 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -4699,8 +4699,8 @@ static int ice_cfg_netdev(struct ice_vsi *vsi)
>   	struct net_device *netdev;
>   	u8 mac_addr[ETH_ALEN];
>   
> -	netdev = alloc_etherdev_mqs(sizeof(*np), vsi->alloc_txq,
> -				    vsi->alloc_rxq);
> +	netdev = alloc_etherdev_mqs(sizeof(*np), ice_get_max_txq(vsi->back),
> +				    ice_get_max_rxq(vsi->back));
>   	if (!netdev)
>   		return -ENOMEM;
>   

Should also some checks be added to `ethnl_set_channels()` to avoid crashes?

The commit looks good:

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>

I am missing the mentioning of the crash in commit message 
title/summary, but I do not have a better suggestion right now.


Kind regards,

Paul

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-wired-lan] [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs()
  2026-02-24 10:03 ` [Intel-wired-lan] " Paul Menzel
@ 2026-02-24 10:51   ` Przemek Kitszel
  0 siblings, 0 replies; 6+ messages in thread
From: Przemek Kitszel @ 2026-02-24 10:51 UTC (permalink / raw)
  To: Paul Menzel, Michal Swiatkowski; +Cc: intel-wired-lan, netdev

On 2/24/26 11:03, Paul Menzel wrote:
> Dear Michal,
> 
> 
> Thank you for the patch.
> 
> Am 23.02.26 um 13:51 schrieb Michal Swiatkowski:
>> When allocating netdevice using alloc_etherdev_mqs() the maximum
>> supported queues number should be passed. The vsi->alloc_txq/rxq is
>> storing current number of queues, not the maximum ones.
>>
>> Use the same function for getting max Tx and Rx queues which is used
>> during ethtool -l call to set maximum number of queues during netdev
>> allocation.
>>
>> Reproduction steps:
>> $ethtool -l $pf # says current 16, max 64
>> $ethtool -S $pf # fine
>> $ethtool -L $pf combined 40 # crash
>>
>> [491187.472594] Call Trace:
>> [491187.472829]  <TASK>
>> [491187.473067]  netif_set_xps_queue+0x26/0x40
>> [491187.473305]  ice_vsi_cfg_txq+0x265/0x3d0 [ice]
>> [491187.473619]  ice_vsi_cfg_lan_txqs+0x68/0xa0 [ice]
>> [491187.473918]  ice_vsi_cfg_lan+0x2b/0xa0 [ice]
>> [491187.474202]  ice_vsi_open+0x71/0x170 [ice]
>> [491187.474484]  ice_vsi_recfg_qs+0x17f/0x230 [ice]
>> [491187.474759]  ? dev_get_min_mp_channel_count+0xab/0xd0
>> [491187.474987]  ice_set_channels+0x185/0x3d0 [ice]
>> [491187.475278]  ethnl_set_channels+0x26f/0x340
>>
>> Fixes: ee13aa1a2c5a ("ice: use netif_get_num_default_rss_queues()")
>> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
>> ---
>>   drivers/net/ethernet/intel/ice/ice.h         | 22 ++++++++++++++++++++
>>   drivers/net/ethernet/intel/ice/ice_ethtool.c | 18 ----------------
>>   drivers/net/ethernet/intel/ice/ice_main.c    |  4 ++--
>>   3 files changed, 24 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ 
>> ethernet/intel/ice/ice.h
>> index f6a56a864459..725b130dd3a2 100644
>> --- a/drivers/net/ethernet/intel/ice/ice.h
>> +++ b/drivers/net/ethernet/intel/ice/ice.h
>> @@ -839,6 +839,28 @@ static inline void ice_tx_xsk_pool(struct ice_vsi 
>> *vsi, u16 qid)
>>       WRITE_ONCE(ring->xsk_pool, ice_get_xp_from_qid(vsi, qid));
>>   }
>> +/**
>> + * ice_get_max_txq - return the maximum number of Tx queues for in a PF
>> + * @pf: PF structure
>> + *
>> + * Return: maximum number of Tx queues
>> + */
>> +static inline int ice_get_max_txq(struct ice_pf *pf)
>> +{
>> +    return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_txq);
>> +}
>> +
>> +/**
>> + * ice_get_max_rxq - return the maximum number of Rx queues for in a PF
>> + * @pf: PF structure
>> + *
>> + * Return: maximum number of Rx queues
>> + */
>> +static inline int ice_get_max_rxq(struct ice_pf *pf)
>> +{
>> +    return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_rxq);
>> +}
>> +
>>   /**
>>    * ice_get_main_vsi - Get the PF VSI
>>    * @pf: PF instance
>> diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/ 
>> net/ethernet/intel/ice/ice_ethtool.c
>> index a897a6b22495..a0b0416f5aea 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
>> @@ -3780,24 +3780,6 @@ ice_get_ts_info(struct net_device *dev, struct 
>> kernel_ethtool_ts_info *info)
>>       return 0;
>>   }
>> -/**
>> - * ice_get_max_txq - return the maximum number of Tx queues for in a PF
>> - * @pf: PF structure
>> - */
>> -static int ice_get_max_txq(struct ice_pf *pf)
>> -{
>> -    return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_txq);
>> -}
>> -
>> -/**
>> - * ice_get_max_rxq - return the maximum number of Rx queues for in a PF
>> - * @pf: PF structure
>> - */
>> -static int ice_get_max_rxq(struct ice_pf *pf)
>> -{
>> -    return min(num_online_cpus(), pf->hw.func_caps.common_cap.num_rxq);
>> -}
>> -
>>   /**
>>    * ice_get_combined_cnt - return the current number of combined 
>> channels
>>    * @vsi: PF VSI pointer
>> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ 
>> ethernet/intel/ice/ice_main.c
>> index fa4095037be5..863ac81eebce 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_main.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
>> @@ -4699,8 +4699,8 @@ static int ice_cfg_netdev(struct ice_vsi *vsi)
>>       struct net_device *netdev;
>>       u8 mac_addr[ETH_ALEN];
>> -    netdev = alloc_etherdev_mqs(sizeof(*np), vsi->alloc_txq,
>> -                    vsi->alloc_rxq);
>> +    netdev = alloc_etherdev_mqs(sizeof(*np), ice_get_max_txq(vsi->back),
>> +                    ice_get_max_rxq(vsi->back));
>>       if (!netdev)
>>           return -ENOMEM;
> 
> Should also some checks be added to `ethnl_set_channels()` to avoid 
> crashes?

alloc_etherdev_mqs() gets absolute max from the driver, it will not
even call driver .set_channels() if user tries to exceed that

with that said, we have too much "extra checks" in this handler ;)

> 
> The commit looks good:
> 
> Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
> 
> I am missing the mentioning of the crash in commit message title/ 
> summary, but I do not have a better suggestion right now.
> 
> 
> Kind regards,
> 
> Paul


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [Intel-wired-lan] [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs()
  2026-02-23 12:51 [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs() Michal Swiatkowski
  2026-02-24  9:40 ` Simon Horman
  2026-02-24 10:03 ` [Intel-wired-lan] " Paul Menzel
@ 2026-03-23 16:17 ` Nowlin, Alexander
  2026-03-24 10:02 ` Rinitha, SX
  3 siblings, 0 replies; 6+ messages in thread
From: Nowlin, Alexander @ 2026-03-23 16:17 UTC (permalink / raw)
  To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
  Cc: netdev@vger.kernel.org, Kitszel, Przemyslaw

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Michal Swiatkowski
> Sent: Monday, February 23, 2026 4:52 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Michal Swiatkowski <michal.swiatkowski@linux.intel.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs()
> 
> When allocating netdevice using alloc_etherdev_mqs() the maximum supported queues number should be passed. The vsi->alloc_txq/rxq is storing current number of queues, not the maximum ones.
> 
> Use the same function for getting max Tx and Rx queues which is used during ethtool -l call to set maximum number of queues during netdev allocation.
> 
> Reproduction steps:
> $ethtool -l $pf # says current 16, max 64 $ethtool -S $pf # fine $ethtool -L $pf combined 40 # crash
> 
> [491187.472594] Call Trace:
 [491187.472829]  <TASK>
> [491187.473067]  netif_set_xps_queue+0x26/0x40 [491187.473305]  ice_vsi_cfg_txq+0x265/0x3d0 [ice] [491187.473619]  ice_vsi_cfg_lan_txqs+0x68/0xa0 [ice] [491187.473918]  ice_vsi_cfg_lan+0x2b/0xa0 
> [ice] [491187.474202]  ice_vsi_open+0x71/0x170 [ice] [491187.474484]  ice_vsi_recfg_qs+0x17f/0x230 [ice] [491187.474759]  ? dev_get_min_mp_channel_count+0xab/0xd0
> [491187.474987]  ice_set_channels+0x185/0x3d0 [ice] [491187.475278]  ethnl_set_channels+0x26f/0x340
> 
> Fixes: ee13aa1a2c5a ("ice: use netif_get_num_default_rss_queues()")
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice.h         | 22 ++++++++++++++++++++
>  drivers/net/ethernet/intel/ice/ice_ethtool.c | 18 ----------------
>  drivers/net/ethernet/intel/ice/ice_main.c    |  4 ++--
>  3 files changed, 24 insertions(+), 20 deletions(-)

Tested-by: Alexander Nowlin <alexander.nowlin@intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [Intel-wired-lan] [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs()
  2026-02-23 12:51 [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs() Michal Swiatkowski
                   ` (2 preceding siblings ...)
  2026-03-23 16:17 ` Nowlin, Alexander
@ 2026-03-24 10:02 ` Rinitha, SX
  3 siblings, 0 replies; 6+ messages in thread
From: Rinitha, SX @ 2026-03-24 10:02 UTC (permalink / raw)
  To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
  Cc: netdev@vger.kernel.org, Kitszel, Przemyslaw

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Michal Swiatkowski
> Sent: 23 February 2026 18:22
> To: intel-wired-lan@lists.osuosl.org
> Cc: netdev@vger.kernel.org; Michal Swiatkowski <michal.swiatkowski@linux.intel.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs()
>
> When allocating netdevice using alloc_etherdev_mqs() the maximum supported queues number should be passed. The vsi->alloc_txq/rxq is storing current number of queues, not the maximum ones.
>
> Use the same function for getting max Tx and Rx queues which is used during ethtool -l call to set maximum number of queues during netdev allocation.
>
> Reproduction steps:
> $ethtool -l $pf # says current 16, max 64 $ethtool -S $pf # fine $ethtool -L $pf combined 40 # crash
>
> [491187.472594] Call Trace:
> [491187.472829]  <TASK>
> [491187.473067]  netif_set_xps_queue+0x26/0x40 [491187.473305]  ice_vsi_cfg_txq+0x265/0x3d0 [ice] [491187.473619]  ice_vsi_cfg_lan_txqs+0x68/0xa0 [ice] [491187.473918]  ice_vsi_cfg_lan+0x2b/0xa0 [ice] [491187.474202]  ice_vsi_open+0x71/0x170 [ice] [491187.474484]  ice_vsi_recfg_qs+0x17f/0x230 [ice] [491187.474759]  > ? dev_get_min_mp_channel_count+0xab/0xd0
> [491187.474987]  ice_set_channels+0x185/0x3d0 [ice] [491187.475278]  ethnl_set_channels+0x26f/0x340
>
> Fixes: ee13aa1a2c5a ("ice: use netif_get_num_default_rss_queues()")
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice.h         | 22 ++++++++++++++++++++
> drivers/net/ethernet/intel/ice/ice_ethtool.c | 18 ----------------
> drivers/net/ethernet/intel/ice/ice_main.c    |  4 ++--
> 3 files changed, 24 insertions(+), 20 deletions(-)
>

Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-24 10:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 12:51 [PATCH iwl-net v1] ice: set max queues in alloc_etherdev_mqs() Michal Swiatkowski
2026-02-24  9:40 ` Simon Horman
2026-02-24 10:03 ` [Intel-wired-lan] " Paul Menzel
2026-02-24 10:51   ` Przemek Kitszel
2026-03-23 16:17 ` Nowlin, Alexander
2026-03-24 10:02 ` Rinitha, SX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox