Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

r8169: remove multicast filter limit

Once upon a time, when r8169 was new, the multicast filter limit code
was copied from RTL8139 driver. There the filter limit is even
user-configurable.
The filtering is hash-based and we don't have perfect filtering.
Actually the mc filtering on RTL8125 still seems to be the same
as used on 8390/NE2000. So it's not clear to me which benefit it
should bring when switching to all-multi mode once a certain number
of filter bits is set. More the opposite: Filtering out at least
some unwanted mc traffic is better than no filtering.
Also the available chip documentation doesn't mention any restriction.
Therefore remove the filter limit.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/57076c05-3730-40d1-ab9a-5334b263e41a@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Heiner Kallweit and committed by
Jakub Kicinski
cd04b44b 1bc9d12e

+1 -6
+1 -6
drivers/net/ethernet/realtek/r8169_main.c
··· 56 56 #define FIRMWARE_8125A_3 "rtl_nic/rtl8125a-3.fw" 57 57 #define FIRMWARE_8125B_2 "rtl_nic/rtl8125b-2.fw" 58 58 59 - /* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). 60 - The RTL chips use a 64 element hash table based on the Ethernet CRC. */ 61 - #define MC_FILTER_LIMIT 32 62 - 63 59 #define TX_DMA_BURST 7 /* Maximum PCI burst, '7' is unlimited */ 64 60 #define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */ 65 61 ··· 2593 2597 rx_mode |= AcceptAllPhys; 2594 2598 } else if (!(dev->flags & IFF_MULTICAST)) { 2595 2599 rx_mode &= ~AcceptMulticast; 2596 - } else if (netdev_mc_count(dev) > MC_FILTER_LIMIT || 2597 - dev->flags & IFF_ALLMULTI || 2600 + } else if (dev->flags & IFF_ALLMULTI || 2598 2601 tp->mac_version == RTL_GIGA_MAC_VER_35) { 2599 2602 /* accept all multicasts */ 2600 2603 } else if (netdev_mc_empty(dev)) {