Skip to content
Commit 40a1578d authored by Claudiu Manoil's avatar Claudiu Manoil Committed by David S. Miller
Browse files

ocelot: Dont allocate another multicast list, use __dev_mc_sync



Doing kmalloc in atomic context is always an issue,
more so for a list that can grow significantly.
Turns out that the driver only uses the duplicated
list of multicast mac addresses to keep track of
what addresses to delete from h/w before committing
the new list from kernel to h/w back again via set_rx_mode,
every time this list gets updated by the kernel.
Given that the h/w knows how to add and delete mac addresses
based on the mac address value alone, __dev_mc_sync should be
the much better choice of kernel API for these operations
avoiding the considerable overhead of maintaining a duplicated
list in the driver.

Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@nxp.com>
Tested-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7dc2bcca
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment