lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bdee4945-b299-4557-b83e-b62d9c387a94@intel.com>
Date: Thu, 23 Oct 2025 17:35:43 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Alok Tiwari <alok.a.tiwari@...cle.com>
CC: <anthony.l.nguyen@...el.com>, <przemyslaw.kitszel@...el.com>,
	<andrew+netdev@...n.ch>, <kuba@...nel.org>, <davem@...emloft.net>,
	<edumazet@...gle.com>, <pabeni@...hat.com>, <horms@...nel.org>,
	<intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>,
	<alok.a.tiwarilinux@...il.com>
Subject: Re: [Intel-wired-lan] [PATCH net-next v2 1/2] idpf: correct queue
 index in Rx allocation error messages

From: Alok Tiwari <alok.a.tiwari@...cle.com>
Date: Thu, 23 Oct 2025 06:25:02 -0700

> The error messages in idpf_rx_desc_alloc_all() used the group index i
> when reporting memory allocation failures for individual Rx and Rx buffer
> queues. The correct index to report is j, which represents the specific
> queue within the group.
> 
> Signed-off-by: Alok Tiwari <alok.a.tiwari@...cle.com>
> Reviewed-by: Simon Horman <horms@...nel.org>
> ---
> v1 -> v2
> no change only added Reviewed-by:
> ---
>  drivers/net/ethernet/intel/idpf/idpf_txrx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> index 828f7c444d30..e29fc5f4012f 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> @@ -923,7 +923,7 @@ static int idpf_rx_desc_alloc_all(struct idpf_vport *vport)
>  			if (err) {
>  				pci_err(vport->adapter->pdev,
>  					"Memory allocation for Rx Queue %u failed\n",
> -					i);
> +					j);
>  				goto err_out;
>  			}
>  		}
> @@ -940,7 +940,7 @@ static int idpf_rx_desc_alloc_all(struct idpf_vport *vport)
>  			if (err) {
>  				pci_err(vport->adapter->pdev,
>  					"Memory allocation for Rx Buffer Queue %u failed\n",
> -					i);
> +					j);
>  				goto err_out;

Both are not valid.

@i is the index of the queue group. @j is the index of the queue
*inside* this queue group.
Since one queue group can contain only one Rx queue and 2 buffer queues,
these pci_err() would only print "Rx queue 0" and "Rx Buffer Queue 0/1",
which is even less useful than before.

If you want to "fix" this, you can print rxq->idx for Rx queues and
`(i * vport->num_bufqs_per_qgrp) + j` for buffer queues. This would
at least print unique index for each queue.

Alternatively, expand the message to something like:

"Memory allocation for Rx queue %u from queue group %u failed\n", j, i);

(same for buffer queues)

>  			}
>  		}

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ