[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f977f68b-cec5-4ab7-b4bd-2cf6aca46267@intel.com>
Date: Tue, 17 Jun 2025 17:01:14 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Thomas Fourier <fourier.thomas@...il.com>
CC: Shannon Nelson <shannon.nelson@....com>, Brett Creeley
<brett.creeley@....com>, Andrew Lunn <andrew+netdev@...n.ch>, "David S.
Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub
Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Alexei
Starovoitov" <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
"Jesper Dangaard Brouer" <hawk@...nel.org>, John Fastabend
<john.fastabend@...il.com>, Stanislav Fomichev <sdf@...ichev.me>, Vladimir
Oltean <vladimir.oltean@....com>, Caleb Sander Mateos
<csander@...estorage.com>, Taehee Yoo <ap420073@...il.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<bpf@...r.kernel.org>
Subject: Re: [PATCH net] ethernet: ionic: Fix DMA mapping test in
`ionic_xdp_post_frame()`
From: Thomas Fourier <fourier.thomas@...il.com>
Date: Tue, 17 Jun 2025 11:18:36 +0200
> The `ionic_tx_map_frag()` wrapper function is used which returns 0 or a
> valid DMA address. Testing that pointer with `dma_mapping_error()`could
> be eroneous since the error value exptected by `dma_mapping_error()` is
> not 0 but `DMA_MAPPING_ERROR` which is often ~0.
BTW I remember clearly that Chris wrote that dma_addr == 0 is a
perfectly valid DMA address, that's why ~0 was picked for error checking.
So maybe it's better to fix the driver. I realize that in the real
world, it's almost impossible to get dma_addr == 0 from dma_map_*(), but
still.
>
> Fixes: ac8813c0ab7d ("ionic: convert Rx queue buffers to use page_pool")
> Signed-off-by: Thomas Fourier <fourier.thomas@...il.com>
Thanks,
Olek
Powered by blists - more mailing lists