[lkml]   [2021]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH net 1/2] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext

On 1/15/2021 6:39 PM, Rasmus Villemoes wrote:
> mv88e6xxx_port_vlan_join checks whether the VTU already contains an
> entry for the given vid (via mv88e6xxx_vtu_getnext), and if so, merely
> changes the relevant .member[] element and loads the updated entry
> into the VTU.
> However, at least for the mv88e6250, the on-stack struct
> mv88e6xxx_vtu_entry vlan never has its .state[] array explicitly
> initialized, neither in mv88e6xxx_port_vlan_join() nor inside the
> getnext implementation. So the new entry has random garbage for the
> STU bits, breaking VLAN filtering.
> When the VTU entry is initially created, those bits are all zero, and
> we should make sure to keep them that way when the entry is updated.
> Fixes: 92307069a96c (net: dsa: mv88e6xxx: Avoid VTU corruption on 6097)
> Signed-off-by: Rasmus Villemoes <>

Reviewed-by: Florian Fainelli <>

 \ /
  Last update: 2021-01-16 06:04    [W:0.758 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site