Page MenuHomeFreeBSD

ixl: fix multicast filters handling
ClosedPublic

Authored by pkubaj on Jul 3 2023, 9:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 18 2024, 9:32 AM
Unknown Object (File)
Oct 3 2024, 1:17 PM
Unknown Object (File)
Oct 3 2024, 11:21 AM
Unknown Object (File)
Oct 1 2024, 6:43 AM
Unknown Object (File)
Sep 28 2024, 12:22 AM
Unknown Object (File)
Sep 13 2024, 3:18 AM
Unknown Object (File)
Sep 9 2024, 3:53 AM
Unknown Object (File)
Sep 8 2024, 6:58 AM

Details

Summary

Hardware supports up to 128 entries of multicast filters. If there is more,
filters should be removed and multicast promiscuous enabled. In case
user deletes the multicast address and overall count is less than 128,
multicast promiscuous mode should be disabled and all the filters
reapplied into the HW.

Currently driver only enables multicast promiscuous mode and deletes
the entries without any information to the user and it's not capable of
reapplying the filters once count is less than 128.

Address that by:

  1. Add logging
  2. Add logic in case multicast promiscuous is enabled and user lowers

the number of multicast entries to <128.

  1. Fix a bug where driver removes different MAC entries along with the one

that's being deleted by the user.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

pkubaj requested review of this revision.Jul 3 2023, 9:38 PM
This revision is now accepted and ready to land.Aug 16 2023, 11:50 PM

@pkubaj @erj we upgraded from FreeBSD 13.2 to 14.1 and ran into this driver related issue issue: https://github.com/opnsense/src/issues/212

This commit was reverted for triage and it stopped the following malfunction on the user's setup:

2024-08-05T12:02:27 Notice kernel <6>ixl1: Disabled multicast promiscuous mode
2024-08-05T12:02:27 Notice kernel <6>ixl1: Disabled multicast promiscuous mode
2024-08-05T12:02:27 Notice kernel <6>ixl1: Disabled multicast promiscuous mode
2024-08-05T12:02:27 Warning igmpproxy select() failure; Errno(4): Interrupted system call

Any idea what's happening? Something we can help with (e.g. further specific testing)?

@franco_opnsense.org Output from sysctl dev.ixl.<N>.debug.filter_list and ifmcstat may shed some light on the problem. IPv4/v6 addresses can be removed. I'd like to compare mcast-macaddr list and filters configured by driver. Could you please open also a PR on FreeBSD bugzilla?

@franco_opnsense.org Output from sysctl dev.ixl.<N>.debug.filter_list and ifmcstat may shed some light on the problem. IPv4/v6 addresses can be removed. I'd like to compare mcast-macaddr list and filters configured by driver.

I have the exact same bug on my Pfsense (based on Freebsd) firewall.
To describe my config : pfSense with an Intel X710 NIC. I have a LAGG of ixl0 and ixl1.
Before running those commands I lauched IGMP Proxy on my pfSense and joined a multicast group (233.136.0.202) on a PC on my LAN.

Here are the results :

[2.7.2-RELEASE][root@pfSense.home.arpa]/root: sysctl dev.ixl.0.debug.filter_list
dev.ixl.0.debug.filter_list: 
PF Filters:
01:80:c2:00:00:02, vlan   -1, flags 0x0002
00:25:90:XX:XX:XX, vlan    0, flags 000000
00:25:90:XX:XX:XX, vlan    3, flags 0x0001
00:25:90:XX:XX:XX, vlan   50, flags 0x0001
00:25:90:XX:XX:XX, vlan   99, flags 0x0001
00:25:90:XX:XX:XX, vlan    1, flags 0x0001
00:25:90:XX:XX:XX, vlan    2, flags 0x0001
33:33:ff:XX:XX:XX, vlan   -1, flags 0x0002
33:33:00:00:00:01, vlan   -1, flags 0x0002
33:33:ff:18:61:20, vlan   -1, flags 0x0002
33:33:18:61:20:ce, vlan   -1, flags 0x0002
01:00:5e:00:00:01, vlan   -1, flags 0x0002
33:33:ff:00:00:01, vlan   -1, flags 0x0002
33:33:00:00:00:02, vlan   -1, flags 0x0002
33:33:00:00:00:fb, vlan   -1, flags 0x0002
01:00:5e:00:00:fb, vlan   -1, flags 0x0002
01:00:5e:00:00:02, vlan   -1, flags 0x0002
01:00:5e:00:00:16, vlan   -1, flags 0x0002
[2.7.2-RELEASE][root@pfSense.home.arpa]/root: sysctl dev.ixl.1.debug.filter_list
dev.ixl.1.debug.filter_list: 
PF Filters:
01:80:c2:00:00:02, vlan   -1, flags 0x0002
00:25:90:XX:XX:XX, vlan    0, flags 000000
00:25:90:XX:XX:XX, vlan    3, flags 0x0001
00:25:90:XX:XX:XX, vlan   50, flags 0x0001
00:25:90:XX:XX:XX, vlan   99, flags 0x0001
00:25:90:XX:XX:XX, vlan    1, flags 0x0001
00:25:90:XX:XX:XX, vlan    2, flags 0x0001
33:33:ff:XX:XX:XX, vlan   -1, flags 0x0002
33:33:00:00:00:01, vlan   -1, flags 0x0002
33:33:ff:18:61:20, vlan   -1, flags 0x0002
33:33:18:61:20:ce, vlan   -1, flags 0x0002
01:00:5e:00:00:01, vlan   -1, flags 0x0002
33:33:ff:00:00:01, vlan   -1, flags 0x0002
33:33:00:00:00:02, vlan   -1, flags 0x0002
33:33:00:00:00:fb, vlan   -1, flags 0x0002
01:00:5e:00:00:fb, vlan   -1, flags 0x0002
01:00:5e:00:00:02, vlan   -1, flags 0x0002
01:00:5e:00:00:16, vlan   -1, flags 0x0002
[2.7.2-RELEASE][root@pfSense.home.arpa]/root: ifmcstat
ixl0:
ixl1:
lo0:
        inet 127.0.0.1
        igmpv3 rv 2 qi 125 qri 10 uri 3
                group 224.0.0.1 mode exclude
        inet6 fe80::1%lo0 scopeid 0x5
        mldv2 flags=2<USEALLOW> rv 2 qi 125 qri 10 uri 3
                group ff01::1%lo0 scopeid 0x5 mode exclude
                group ff02::2:1861:20ce%lo0 scopeid 0x5 mode exclude
                group ff02::2:ff18:6120%lo0 scopeid 0x5 mode exclude
                group ff02::1%lo0 scopeid 0x5 mode exclude
                group ff02::1:ff00:1%lo0 scopeid 0x5 mode exclude
lagg0:
        inet6 fe80::225:90ff:fe9c:5644%lagg0 scopeid 0xa
        mldv2 flags=2<USEALLOW> rv 2 qi 125 qri 10 uri 3
                group ff01::1%lagg0 scopeid 0xa mode exclude
                        mcast-macaddr 33:33:00:00:00:01
                group ff02::2:1861:20ce%lagg0 scopeid 0xa mode exclude
                        mcast-macaddr 33:33:18:61:20:ce
                group ff02::2:ff18:6120%lagg0 scopeid 0xa mode exclude
                        mcast-macaddr 33:33:ff:18:61:20
                group ff02::1%lagg0 scopeid 0xa mode exclude
                        mcast-macaddr 33:33:00:00:00:01
                group ff02::1:ff9c:5644%lagg0 scopeid 0xa mode exclude
                        mcast-macaddr 33:33:ff:XX:XX:XX
lagg0.3:
        inet 192.168.3.1
        igmpv2
                group 224.0.0.22 mode exclude
                        mcast-macaddr 01:00:5e:00:00:16
                group 224.0.0.2 mode exclude
                        mcast-macaddr 01:00:5e:00:00:02
                group 224.0.0.251 mode exclude
                        mcast-macaddr 01:00:5e:00:00:fb
        inet6 fe80::225:90ff:fe9c:5644%lagg0.3 scopeid 0xb
        mldv2 flags=2<USEALLOW> rv 2 qi 125 qri 10 uri 3
                group ff02::fb%lagg0.3 scopeid 0xb mode exclude
                        mcast-macaddr 33:33:00:00:00:fb
                group ff02::2%lagg0.3 scopeid 0xb mode exclude
                        mcast-macaddr 33:33:00:00:00:02
        inet 192.168.3.1
        igmpv2
                group 224.0.0.1 mode exclude
                        mcast-macaddr 01:00:5e:00:00:01
        inet6 fe80::225:90ff:fe9c:5644%lagg0.3 scopeid 0xb
        mldv2 flags=2<USEALLOW> rv 2 qi 125 qri 10 uri 3
                group ff02::1:ff00:1%lagg0.3 scopeid 0xb mode exclude
                        mcast-macaddr 33:33:ff:00:00:01
                group ff01::1%lagg0.3 scopeid 0xb mode exclude
                        mcast-macaddr 33:33:00:00:00:01
                group ff02::2:1861:20ce%lagg0.3 scopeid 0xb mode exclude
                        mcast-macaddr 33:33:18:61:20:ce
                group ff02::2:ff18:6120%lagg0.3 scopeid 0xb mode exclude
                        mcast-macaddr 33:33:ff:18:61:20
                group ff02::1%lagg0.3 scopeid 0xb mode exclude
                        mcast-macaddr 33:33:00:00:00:01
                group ff02::1:ff9c:5644%lagg0.3 scopeid 0xb mode exclude
                        mcast-macaddr 33:33:ff:XX:XX:XX

Hope it could help resolv this bug.

As it looks as if no one is working on this bug, would it be possible to revert this commit ? Thanks