Re: [PATCH] net: dsa: tag_ocelot_8021q: fix broken reception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
>> Cc: stable@xxxxxxxxxxxxxxx
>> ---
> 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@xxxxxxxx>
>   Cc: stable@xxxxxxxxxxxxxxx

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





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux