git: 6d138e958ffb - stable/15 - qlnxe: Fix setting the unicast MAC filter of RX path
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 11 Feb 2026 10:03:04 UTC
The branch stable/15 has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=6d138e958ffb318595eec29b910cada414e2f86d
commit 6d138e958ffb318595eec29b910cada414e2f86d
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2026-02-06 17:52:53 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2026-02-11 10:00:42 +0000
qlnxe: Fix setting the unicast MAC filter of RX path
When an Ethernet interface is added to lagg(4) as a child interface, its
type, aka if_type, is changed from IFT_ETHER to IFT_IEEE8023ADLAG. Well
changing the link-layer address of the lagg(4) interface will be
propagated to all child interfaces, hence the drivers of child interfaces
shall not presume the type of the interface will not be changed.
Meanwhile, on initializing, an ifnet has been fully attached and it is
guaranteed to have non-null link-layer address so stop NULL checking for
it.
Reviewed by: kbowling
Fixes: 792226e53023 qlnxe: Allow MAC address override
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D54885
(cherry picked from commit f250852c9a0c1021c3be4b498e27cfc7b42a81db)
---
sys/dev/qlnx/qlnxe/qlnx_os.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c
index 1c885133c3ec..ec2fd7cacfae 100644
--- a/sys/dev/qlnx/qlnxe/qlnx_os.c
+++ b/sys/dev/qlnx/qlnxe/qlnx_os.c
@@ -7057,20 +7057,10 @@ qlnx_set_rx_mode(qlnx_host_t *ha)
int rc = 0;
uint8_t filter;
const if_t ifp = ha->ifp;
- const struct ifaddr *ifa;
- struct sockaddr_dl *sdl;
- ifa = if_getifaddr(ifp);
- if (if_gettype(ifp) == IFT_ETHER && ifa != NULL &&
- ifa->ifa_addr != NULL) {
- sdl = (struct sockaddr_dl *) ifa->ifa_addr;
-
- rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, LLADDR(sdl));
- } else {
- rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, ha->primary_mac);
- }
- if (rc)
- return rc;
+ rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, if_getlladdr(ifp));
+ if (rc)
+ return rc;
rc = qlnx_remove_all_mcast_mac(ha);
if (rc)