mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brett Creeley <bcreeley@amd.com>
To: Simon Horman <horms@kernel.org>
Cc: Thomas Fourier <fourier.thomas@gmail.com>,
	Shannon Nelson <shannon.nelson@amd.com>,
	Brett Creeley <brett.creeley@amd.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Caleb Sander Mateos <csander@purestorage.com>,
	Taehee Yoo <ap420073@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org
Subject: Re: [PATCH net v3] ethernet: ionic: Fix DMA mapping tests
Date: Mon, 23 Jun 2025 08:44:39 -0700	[thread overview]
Message-ID: <8f54ae13-7943-4e45-9881-a01108a1b58f@amd.com> (raw)
In-Reply-To: <20250620105114.GH194429@horms.kernel.org>



On 6/20/2025 3:51 AM, Simon Horman wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
> 
> 
> On Thu, Jun 19, 2025 at 03:28:06PM -0700, Brett Creeley wrote:
>>
>>
>> On 6/19/2025 2:45 AM, Thomas Fourier wrote:
>>> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>>>
>>>
>>> Change error values of `ionic_tx_map_single()` and `ionic_tx_map_frag()`
>>> from 0 to `DMA_MAPPING_ERROR` to prevent collision with 0 as a valid
>>> address.
>>>
>>> This also fixes the use of `dma_mapping_error()` to test against 0 in
>>> `ionic_xdp_post_frame()`
>>>
>>> Fixes: 0f3154e6bcb3 ("ionic: Add Tx and Rx handling")
>>
>> I'm not sure the Fixes commit above should be in the list. Functionally it's
>> correct, except there being multiple calls to dma_mapping_error() on the
>> same dma_addr.
>>
>> Other than the minor nit above the commit looks good. Thanks again for
>> fixing this.
>>
>> Reviewed-by: Brett Creeley <brett.creeley@amd.com>
> 
> Hi Brett and Thomas,
> 
> Maybe I misunderstand things, if so I apologise.
> 
> If this patch fixes a bug - e.g. the may observe a system crash -
> then it should be targeted at net and have a Fixes tag. Where the
> Fixes tag generally cites the first commit in which the user may
> experience the bug.
> 
> If, on the other hand, this does not fix a bug then the patch
> should be targeted at net-next and should not have a Fixes tag.
> 
> In that case, commits may be cited using following form in
> the commit message (before the Signed-off-by and other tags).
> And, unlike tags, it may be line wrapped.
> 
> commit 0f3154e6bcb3 ("ionic: Add Tx and Rx handling")
> 
> E.g.: This was introduce by commit 0f3154e6bcb3 ("ionic: Add Tx and Rx
> handling").
> 
> I hope this helps. If not, sorry for the noise.

Simon,

I suspect you are right and this probably shouldn't be categorized as a 
bug fix since the change only addresses a corner case that would happen 
if the DMA mapping API(s) return 0 as a valid adddress, which wouldn't 
cause a crash with/without this patch.

Thanks for the feedback.

Brett

> 
> ...


  reply	other threads:[~2025-06-23 15:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19  9:45 Thomas Fourier
2025-06-19 22:28 ` Brett Creeley
2025-06-20 10:51   ` Simon Horman
2025-06-23 15:44     ` Brett Creeley [this message]
2025-06-23 23:44       ` Jakub Kicinski
2025-06-23 23:50 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f54ae13-7943-4e45-9881-a01108a1b58f@amd.com \
    --to=bcreeley@amd.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ap420073@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brett.creeley@amd.com \
    --cc=csander@purestorage.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fourier.thomas@gmail.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=shannon.nelson@amd.com \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®