From: Robert Hodaszi <robert.hodaszi@digi.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: netdev@vger.kernel.org, claudiu.manoil@nxp.com,
alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com,
andrew@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] net: dsa: tag_ocelot_8021q: fix broken reception
Date: Wed, 11 Dec 2024 15:42:54 +0100 [thread overview]
Message-ID: <31d2a9eb-958f-43b6-84ef-d687e52cea08@digi.com> (raw)
In-Reply-To: <20241211143734.d3motemj7kwao4td@skbuf>
2024. 12. 11. 15:37 keltezéssel, Vladimir Oltean írta:
> [EXTERNAL E-MAIL] Warning! This email originated outside of the organization! Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
>
>
> On Wed, Dec 11, 2024 at 01:46:56PM +0100, Robert Hodaszi wrote:
>> Commit dcfe7673787b4bfea2c213df443d312aa754757b ("net: dsa: tag_sja1105:
>> absorb logic for not overwriting precise info into dsa_8021q_rcv()")
>> added support to let the DSA switch driver set source_port and
>> switch_id. tag_8021q's logic overrides the previously set source_port
>> and switch_id only if they are marked as "invalid" (-1). sja1105 and
>> vsc73xx drivers are doing that properly, but ocelot_8021q driver doesn't
>> initialize those variables. That causes dsa_8021q_rcv() doesn't set
>> them, and they remain unassigned.
>>
>> Initialize them as invalid to so dsa_8021q_rcv() can return with the
>> proper values.
>>
>> Signed-off-by: Robert Hodaszi <robert.hodaszi@digi.com>
>> Cc: stable@vger.kernel.org
>> ---
> Thank you for the patch, and sorry for the breakage. I suggest the
> following alternative commit message:
>
> The blamed commit changed the dsa_8021q_rcv() calling convention to
> accept pre-populated source_port and switch_id arguments. If those are
> not available, as in the case of tag_ocelot_8021q, the arguments must
> be preinitialized with -1.
>
> Due to the bug of passing uninitialized arguments, dsa_8021q_rcv()
> does not detect that it needs to populate the source_port and
> switch_id, and this makes dsa_conduit_find_user() fail, and leads to
> packet loss on reception.
>
> Fixes: dcfe7673787b ("net: dsa: tag_sja1105: absorb logic for not overwriting precise info into dsa_8021q_rcv()")
> Signed-off-by: Robert Hodaszi <robert.hodaszi@digi.com>
> Cc: stable@vger.kernel.org
Yes, that commit message makes much more sense than mine. Unfortunately, I already sent out the new patch. I rewrite it, and send out a v2 then.
Robert
next prev parent reply other threads:[~2024-12-11 14:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 12:46 [PATCH] net: dsa: tag_ocelot_8021q: fix broken reception Robert Hodaszi
2024-12-11 13:34 ` Andrew Lunn
2024-12-11 14:21 ` Robert Hodaszi
2024-12-11 14:37 ` Vladimir Oltean
2024-12-11 14:42 ` Robert Hodaszi [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-12-11 14:24 Robert Hodaszi
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=31d2a9eb-958f-43b6-84ef-d687e52cea08@digi.com \
--to=robert.hodaszi@digi.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).