net: r8169: Disable multicast filter for RTL_GIGA_MAC_VER_46
PATCH v2 1/1 net: r8169: Disable multicast filter for RTL_GIGA_MAC_VER_46
MAC_VER_46 ethernet adapters fail to detect eapol packets unless allmulti is enabled. Add exception for VER_46 in the same way VER_35 has an exception.
---
Changes in v2:
- add Fixes tag
- add net annotation
- update description
drivers/net/ethernet/realtek/r8169_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169_main.c +2 -1
@@ -2584,7 +2584,8 @@ static void rtl_set_rx_mode(struct net_device *dev) rx_mode |= AcceptAllPhys; }else if (netdev_mc_count (dev) >MC_FILTER_LIMIT || dev->flags &IFF_ALLMULTI || - tp->mac_version ==RTL_GIGA_MAC_VER_35 ) { + tp->mac_version ==RTL_GIGA_MAC_VER_35 || + tp->mac_version ==RTL_GIGA_MAC_VER_46 ) {/* accept all multicasts */ }else if (netdev_mc_empty (dev)) { rx_mode &= ~AcceptMulticast;
Signature · 1 line
2.42.0.820.g83a721a137-goog
Hello Heiner,
I haven't heard back from realtek about the possibility that this affects other MAC_VERs. Do you think it's acceptable to merge this patch for now and if/when we hear back from realtek I can adjust the function again?
Thank you,
Patrick
Quoted 34 lines · Patrick Thompson
MAC_VER_46ethernet adapters fail to detect eapol packets unless allmulti is enabled. Add exception forVER_46in the same wayVER_35has an exception.Fixes 6e1d0b898818 ("r8169:add support for RTL8168H and RTL8107E")Signed-off-by Patrick Thompson <[email protected]>---
Changes in v2:
- add Fixes tag
- add net annotation
- update descriptiondrivers/net/ethernet/realtek/r8169_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/realtek/r8169_main.c +2
-2@@ -2584,7 +2584,8 @@ static void rtl_set_rx_mode(struct net_device *dev) rx_mode |= AcceptAllPhys; }else if (netdev_mc_count (dev) >MC_FILTER_LIMIT || dev->flags &IFF_ALLMULTI || - tp->mac_version ==RTL_GIGA_MAC_VER_35 ) { + tp->mac_version ==RTL_GIGA_MAC_VER_35 || + tp->mac_version ==RTL_GIGA_MAC_VER_46 ) {/* accept all multicasts */ }else if (netdev_mc_empty (dev)) { rx_mode &= ~AcceptMulticast; --2.42.0.820.g83a721a137-goog
Heiner Kallweit
maintainerQuoted 7 lines · Patrick Thompson
Hello Heiner,
I haven't heard back from realtek about the possibility that this affects other
MAC_VERs. Do you think it's acceptable to merge this patch for now and if/when we hear back from realtek I can adjust the function again?
Fine with me.
Would be nice if mc filtering could be switched on/off via ethtool, because now we have to disable mc filtering for all the unaffected users too.
Quoted 3 lines
Thank you,
Patrick
Heiner
Quoted 35 lines · Patrick Thompson
Quoted 34 lines
MAC_VER_46ethernet adapters fail to detect eapol packets unless allmulti is enabled. Add exception forVER_46in the same wayVER_35has an exception.Fixes 6e1d0b898818 ("r8169:add support for RTL8168H and RTL8107E")Signed-off-by Patrick Thompson <[email protected]>---
Changes in v2:
- add Fixes tag
- add net annotation
- update descriptiondrivers/net/ethernet/realtek/r8169_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/realtek/r8169_main.c +2
-2@@ -2584,7 +2584,8 @@ static void rtl_set_rx_mode(struct net_device *dev) rx_mode |= AcceptAllPhys; }else if (netdev_mc_count (dev) >MC_FILTER_LIMIT || dev->flags &IFF_ALLMULTI || - tp->mac_version ==RTL_GIGA_MAC_VER_35 ) { + tp->mac_version ==RTL_GIGA_MAC_VER_35 || + tp->mac_version ==RTL_GIGA_MAC_VER_46 ) {/* accept all multicasts */ }else if (netdev_mc_empty (dev)) { rx_mode &= ~AcceptMulticast; --2.42.0.820.g83a721a137-goog
Heiner Kallweit
maintainerQuoted 4 lines · Patrick Thompson
MAC_VER_46ethernet adapters fail to detect eapol packets unless allmulti is enabled. Add exception forVER_46in the same wayVER_35has an exception.
MAC_VER_48 (RTL8107E) has the same MAC, just a different PHY. So I would expect that the same quirk is needed for MAC_VER_48.
MAC_VER_xx is a little misleading, actually it should be NIC_VER_xx
Quoted 26 lines
Fixes 6e1d0b898818 ("r8169:add support for RTL8168H and RTL8107E")Signed-off-by Patrick Thompson <[email protected]>---
Changes in v2:
- add Fixes tag
- add net annotation
- update descriptiondrivers/net/ethernet/realtek/r8169_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/realtek/r8169_main.c +2
-1@@ -2584,7 +2584,8 @@ static void rtl_set_rx_mode(struct net_device *dev) rx_mode |= AcceptAllPhys; }else if (netdev_mc_count (dev) >MC_FILTER_LIMIT || dev->flags &IFF_ALLMULTI || - tp->mac_version ==RTL_GIGA_MAC_VER_35 ) { + tp->mac_version ==RTL_GIGA_MAC_VER_35 || + tp->mac_version ==RTL_GIGA_MAC_VER_46 ) {/* accept all multicasts */ }else if (netdev_mc_empty (dev)) { rx_mode &= ~AcceptMulticast;
I wouldn't trust the mc filter, the eap packet being filtered is not a multicast packet so I wonder what else could be erroneously filtered. I do agree that it would be nice to be able to override it for testing purposes.
Would you like me to add MAC_VER_48 to the patch? I would not be able to test and confirm that it affects it in the same way I have for VER_46.
It is unfortunate that the naming doesn't quite line up.
Quoted 38 lines · Heiner Kallweit
Quoted 4 lines · Patrick Thompson
MAC_VER_46ethernet adapters fail to detect eapol packets unless allmulti is enabled. Add exception forVER_46in the same wayVER_35has an exception.
MAC_VER_48(RTL8107E) has the same MAC, just a different PHY. So I would expect that the same quirk is needed forMAC_VER_48.
MAC_VER_xxis a little misleading, actually it should beNIC_VER_xxQuoted 26 lines
Fixes 6e1d0b898818 ("r8169:add support for RTL8168H and RTL8107E")Signed-off-by Patrick Thompson <[email protected]>---
Changes in v2:
- add Fixes tag
- add net annotation
- update descriptiondrivers/net/ethernet/realtek/r8169_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/realtek/r8169_main.c +2
-1@@ -2584,7 +2584,8 @@ static void rtl_set_rx_mode(struct net_device *dev) rx_mode |= AcceptAllPhys; }else if (netdev_mc_count (dev) >MC_FILTER_LIMIT || dev->flags &IFF_ALLMULTI || - tp->mac_version ==RTL_GIGA_MAC_VER_35 ) { + tp->mac_version ==RTL_GIGA_MAC_VER_35 || + tp->mac_version ==RTL_GIGA_MAC_VER_46 ) {/* accept all multicasts */ }else if (netdev_mc_empty (dev)) { rx_mode &= ~AcceptMulticast;
Heiner Kallweit
maintainerQuoted 5 lines · Patrick Thompson
I wouldn't trust the mc filter, the eap packet being filtered is not a multicast packet so I wonder what else could be erroneously filtered. I do agree that it would be nice to be able to override it for testing purposes.
I'm not an EAP(OL) expert, just read that EAPOL can use unicast, broadcast , and ethernet multicast (01:80:C2:00:00:03). What's that target MAC and IP4 address of the packet being filtered out in your case?
Quoted 4 lines
Would you like me to add
MAC_VER_48to the patch? I would not be able to test and confirm that it affects it in the same way I have forVER_46.
Yes, VER_48 should be included because it has the same MAC as VER_46.
Quoted 41 lines
It is unfortunate that the naming doesn't quite line up.
Quoted 38 lines · Heiner Kallweit
Quoted 4 lines · Patrick Thompson
MAC_VER_46ethernet adapters fail to detect eapol packets unless allmulti is enabled. Add exception forVER_46in the same wayVER_35has an exception.
MAC_VER_48(RTL8107E) has the same MAC, just a different PHY. So I would expect that the same quirk is needed forMAC_VER_48.
MAC_VER_xxis a little misleading, actually it should beNIC_VER_xxQuoted 26 lines
Fixes 6e1d0b898818 ("r8169:add support for RTL8168H and RTL8107E")Signed-off-by Patrick Thompson <[email protected]>---
Changes in v2:
- add Fixes tag
- add net annotation
- update descriptiondrivers/net/ethernet/realtek/r8169_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/realtek/r8169_main.c +2
-1@@ -2584,7 +2584,8 @@ static void rtl_set_rx_mode(struct net_device *dev) rx_mode |= AcceptAllPhys; }else if (netdev_mc_count (dev) >MC_FILTER_LIMIT || dev->flags &IFF_ALLMULTI || - tp->mac_version ==RTL_GIGA_MAC_VER_35 ) { + tp->mac_version ==RTL_GIGA_MAC_VER_35 || + tp->mac_version ==RTL_GIGA_MAC_VER_46 ) {/* accept all multicasts */ }else if (netdev_mc_empty (dev)) { rx_mode &= ~AcceptMulticast;
The packet being filtered out by the multicast filter has a unicast destination address matching the device, the frame only contains the eapol protocol and does not have an IPv4 address associated with it.
I will send out a v3 patch with VER_48 included.
Sorry, I sent a non-plaintext email previously so I am resending it.
Quoted 61 lines · Heiner Kallweit
Quoted 5 lines · Patrick Thompson
I wouldn't trust the mc filter, the eap packet being filtered is not a multicast packet so I wonder what else could be erroneously filtered. I do agree that it would be nice to be able to override it for testing purposes.
I'm not an EAP(OL) expert, just read that EAPOL can use unicast, broadcast , and ethernet multicast (01:80:C2:00:00:03). What's that target MAC and IP4 address of the packet being filtered out in your case?
Quoted 4 lines
Would you like me to add
MAC_VER_48to the patch? I would not be able to test and confirm that it affects it in the same way I have forVER_46.Yes,
VER_48should be included because it has the same MAC asVER_46.Quoted 41 lines
It is unfortunate that the naming doesn't quite line up.
Quoted 38 lines · Heiner Kallweit
Quoted 4 lines · Patrick Thompson
MAC_VER_46ethernet adapters fail to detect eapol packets unless allmulti is enabled. Add exception forVER_46in the same wayVER_35has an exception.
MAC_VER_48(RTL8107E) has the same MAC, just a different PHY. So I would expect that the same quirk is needed forMAC_VER_48.
MAC_VER_xxis a little misleading, actually it should beNIC_VER_xxQuoted 26 lines
Fixes 6e1d0b898818 ("r8169:add support for RTL8168H and RTL8107E")Signed-off-by Patrick Thompson <[email protected]>---
Changes in v2:
- add Fixes tag
- add net annotation
- update descriptiondrivers/net/ethernet/realtek/r8169_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/realtek/r8169_main.c +2
-1@@ -2584,7 +2584,8 @@ static void rtl_set_rx_mode(struct net_device *dev) rx_mode |= AcceptAllPhys; }else if (netdev_mc_count (dev) >MC_FILTER_LIMIT || dev->flags &IFF_ALLMULTI || - tp->mac_version ==RTL_GIGA_MAC_VER_35 ) { + tp->mac_version ==RTL_GIGA_MAC_VER_35 || + tp->mac_version ==RTL_GIGA_MAC_VER_46 ) {/* accept all multicasts */ }else if (netdev_mc_empty (dev)) { rx_mode &= ~AcceptMulticast;