Skip to contentSkip to conversation

cpsw_ale clobbers learned addresses?

DISCUSSION Richard Cochran 2 participants 2 messages May 13, 2015 – May 18, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

It appears to me that cpsw_ale.c will possibly clobber addresses
learned by the switch. When adding a new entry, the code reads the
table until it finds an empty entry. Then, it writes the new value to that same index. However, nothing prevents the switch from using that same index between the read and the write.

Or am I missing something?

Thanks,
Richard

#1 lore raw
Quoted 9 lines · Richard Cochran

It appears to me that cpsw_ale.c will possibly clobber addresses
learned by the switch. When adding a new entry, the code reads the
table until it finds an empty entry. Then, it writes the new value to that same index. However, nothing prevents the switch from using that same index between the read and the write.

Or am I missing something?

There are chances that driver might overwrite address learnt by hardware which was learnt between the instance getting free index and writing table. Though the same software overwritten mac id will be updated on the next packet received with same mac id.

Once driver updates the ALE table with valid entry hardware wont be updating.

Regards
Mugunthan V N