[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <IA3PR11MB8986EEE2D634224EB5D0E25FE5D6A@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Tue, 18 Nov 2025 12:01:21 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: Alok Tiwari <alok.a.tiwari@...cle.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>, "Lobakin, Aleksander"
<aleksander.lobakin@...el.com>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, "andrew+netdev@...n.ch"
<andrew+netdev@...n.ch>, "kuba@...nel.org" <kuba@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
<edumazet@...gle.com>, "pabeni@...hat.com" <pabeni@...hat.com>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "alok.a.tiwarilinux@...il.com" <alok.a.tiwarilinux@...il.com>
Subject: RE: [Intel-wired-lan] [PATCH v2 net-next] idpf: use desc_ring when
checking completion queue DMA allocation
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Alok Tiwari
> Sent: Tuesday, November 18, 2025 11:55 AM
> To: Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>; Lobakin,
> Aleksander <aleksander.lobakin@...el.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; andrew+netdev@...n.ch; kuba@...nel.org;
> davem@...emloft.net; edumazet@...gle.com; pabeni@...hat.com; intel-
> wired-lan@...ts.osuosl.org; netdev@...r.kernel.org
> Cc: alok.a.tiwarilinux@...il.com; alok.a.tiwari@...cle.com
> Subject: [Intel-wired-lan] [PATCH v2 net-next] idpf: use desc_ring
> when checking completion queue DMA allocation
>
> idpf_compl_queue uses a union for comp, comp_4b, and desc_ring. The
> release path should check complq->desc_ring to determine whether the
> DMA descriptor ring is allocated. The current check against comp is
> not incorrect, but it appears to be leftover code from a previous
> commit.
>
Double negation sounds not good.
The current check against comp is not incorrect, but it appears to be leftover code...
^^^^^^^^^^^^^
Suggestion: s/not incorrect/redundant/ (or "leftover"), to improve clarity.
> Switching the check to desc_ring improves readability and more
> directly reflects the intended meaning, since desc_ring is the field
> representing the allocated DMA-backed descriptor ring.
>
I'd recommend adding "No functional change." Line.
Everything else looks good.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
> Signed-off-by: Alok Tiwari <alok.a.tiwari@...cle.com>
> ---
> v1 -> v2
> modify commit message and target to net-next
> ---
> drivers/net/ethernet/intel/idpf/idpf_txrx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> index 828f7c444d30..1e7ae6f969ac 100644
> --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c
> @@ -134,7 +134,7 @@ static void idpf_compl_desc_rel(struct
> idpf_compl_queue *complq) {
> idpf_xsk_clear_queue(complq,
> VIRTCHNL2_QUEUE_TYPE_TX_COMPLETION);
>
> - if (!complq->comp)
> + if (!complq->desc_ring)
> return;
>
> dma_free_coherent(complq->netdev->dev.parent, complq->size,
> --
> 2.50.1
Powered by blists - more mailing lists