The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Xin Xie <xiexinet@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com,
	wsa+renesas@sang-engineering.com, jie.luo@oss.qualcomm.com,
	shuah@kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, fmancera@suse.de,
	bigeasy@linutronix.de, fmaurer@redhat.com, luka.gejak@linux.dev
Subject: Re: [PATCH net-next v4 1/4] net: hsr: add PRP interlink (RedBox) datapath and duplicate discard
Date: Mon, 27 Jul 2026 16:02:01 +0100	[thread overview]
Message-ID: <20260727150201.GP418547@horms.kernel.org> (raw)
In-Reply-To: <cc09e554-45fa-4b75-8937-7da15432a886@gmail.com>

On Fri, Jul 24, 2026 at 11:27:57PM +0200, Xin Xie wrote:
> On Fri, 24 Jul 2026 14:12:30 +0100 Simon Horman wrote:
> > [Severity: High]
> > ... does modifying the MAC header directly in hsr_xmit() corrupt
> > shared packet data? [...]
> > Should the skb be unshared before making these direct modifications?
> 
> I checked this against the v4 base and the series diff.
> 
> The shared-data write is real. hsr_xmit() writes
> eth_hdr(skb)->h_source in place - the slave-address substitution
> for master-originated frames, and the macaddress_redbox
> substitution for the interlink port - on skbs that can be clones.
> Multiple consumers can share the same packet data while needing
> different source addresses: a PRP LAN broadcast or multicast can be
> delivered to the master (source rewritten via
> hsr_addr_subst_source()) and forwarded to the interlink (rewritten
> to macaddress_redbox) from the same underlying buffer.
> 
> Two scope facts. This is pre-existing HSR RedBox code, present
> since v6.11: hsr_xmit() itself is untouched by the series (patch
> 1/4's hsr_forward.c changes sit below it and do not modify its
> body), and the series' only h_source-adjacent change moves an
> existing ether_addr_copy() a few lines earlier in
> hsr_dev_finalize(), where no skb is involved. But the series does
> make the existing interlink path reachable for PRP.
> 
> I will handle this as an independent fix for the existing HSR/PRP
> code, posted separately for net with its own Fixes: tag - not
> folded into this feature series.
> 
> Would you like the feature series to wait for that fix, or may v4
> proceed while it is reviewed separately?

TL;DR: Yes, I think this patchset can proceed and fixes for
       pre-existing issues can be addressed separately.

Thanks for the detailed feedback above, and likewise on patch 3/4.
It is much appreciated.

My view is that in the age of AI-generated review there is a risk that
making corrections pre-existing problems a pre-requisite risks perpetual
scope increase. So I think that that unless a pre-existing bug is made
materially worse, or fundamentally prevents a patch from reaching it's
goals, then fixing the pre-existing bug can be considered as follow-up.

Of course, drawing that line is a subjective matter.  But it seems to me
that the pre-existing issues flagged both here and in the review I
forwarded for 3/4 can be treated as follow-up.

> (The hsr_create_tagged_frame() side question overlaps the third
> finding in your 3/4 mail; it is answered there.)

  reply	other threads:[~2026-07-27 15:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 20:14 [PATCH net-next v4 0/4] net: hsr: PRP RedBox (PRP-SAN) support Xin Xie
2026-07-17 20:14 ` [PATCH net-next v4 1/4] net: hsr: add PRP interlink (RedBox) datapath and duplicate discard Xin Xie
2026-07-24 13:12   ` Simon Horman
2026-07-24 21:27     ` Xin Xie
2026-07-27 15:02       ` Simon Horman [this message]
2026-07-17 20:14 ` [PATCH net-next v4 2/4] net: hsr: emit RedBox-MAC TLV in PRP RedBox supervision frames Xin Xie
2026-07-17 20:14 ` [PATCH net-next v4 3/4] net: hsr: allow PRP RedBox (interlink) creation Xin Xie
2026-07-24 13:12   ` Simon Horman
2026-07-24 21:30     ` Xin Xie
2026-07-17 20:14 ` [PATCH net-next v4 4/4] selftests: net: hsr: add PRP RedBox test Xin Xie
2026-07-28  1:00 ` [PATCH net-next v4 0/4] net: hsr: PRP RedBox (PRP-SAN) support 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=20260727150201.GP418547@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fmancera@suse.de \
    --cc=fmaurer@redhat.com \
    --cc=jie.luo@oss.qualcomm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luka.gejak@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=xiexinet@gmail.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