git: f250852c9a0c - main - qlnxe: Fix setting the unicast MAC filter of RX path
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 06 Feb 2026 17:59:28 UTC
The branch main has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=f250852c9a0c1021c3be4b498e27cfc7b42a81db
commit f250852c9a0c1021c3be4b498e27cfc7b42a81db
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2026-02-06 17:52:53 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2026-02-06 17:52:53 +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
---
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)