diff options
author | Claudiu Manoil <claudiu.manoil@nxp.com> | 2019-05-21 19:52:55 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-22 12:08:43 -0700 |
commit | 40a1578d631a8ac1cf0ef797c435114107747859 (patch) | |
tree | 9d53e1ae9ea1efb170babf1d107f9246ac53cdff /drivers/net/ethernet/mscc/ocelot.h | |
parent | 7dc2bccab0ee37ac28096b8fcdc390a679a15841 (diff) |
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: Claudiu Manoil <claudiu.manoil@nxp.com>
Tested-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot.h')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot.h b/drivers/net/ethernet/mscc/ocelot.h index ba3b3380b4d0..541fe41e60b0 100644 --- a/drivers/net/ethernet/mscc/ocelot.h +++ b/drivers/net/ethernet/mscc/ocelot.h @@ -441,10 +441,6 @@ struct ocelot_port { struct phy_device *phy; void __iomem *regs; u8 chip_port; - /* Keep a track of the mc addresses added to the mac table, so that they - * can be removed when needed. - */ - struct list_head mc; /* Ingress default VLAN (pvid) */ u16 pvid; |