From nobody Sun Sep 29 04:01:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XGVrl3Qgvz5YGfn; Sun, 29 Sep 2024 04:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XGVrl1qThz4cT2; Sun, 29 Sep 2024 04:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O5MIK8/VrzMebD2HuJ1KAiYxbnExHDv90SAFdT4y/eE=; b=qxbkjd0vVDuGIpcB6aJUiZC2P4WfUxTJzIiN9gxUN4XJnhNK65uJY5kz4EWGmPYHzy+U3v oAWmw7h38mZk+9xiVGp7m2aWiOoG1Kj7za5LC3nhwEQ/17rJo4pz16IOtfGEqkxL723noW NTYa4KU0lkLl5ANzfVi0PKMOkmSBfP2zOEHo8yiROhsgQm2KSoiDR3VuYiA6yprRra6plE SQZamSwH87ah+xAEOl8ApmeHAw7jQPxs0zo+t4jlDTHl0ayA1MCNdU5wnSWPP474c9kvlb ympm8hJ63sB+15/cMHoiTu5c3z8L4jzk9eux4z3fPuH783R45LzkuJm1DAwODg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582519; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O5MIK8/VrzMebD2HuJ1KAiYxbnExHDv90SAFdT4y/eE=; b=ANc3iXtYwY/6xx9sJZvbEBHi15jTAPmlUJPQ5ZZHA74BNQ0lf6854j1ZvVRctVrMx2FBxg QCHPfwNtA5gre21zjvEZwJG0EUCIGiTxx0otA5pesvwjGk+DKpPKa+i3g4CdXB9Ahu0WYo 7O/f1+oDztOMVb6dCuGXyTPSEp5Iqt8WLPSAAIQDPC2IyPiiNctlM3sJnz85T4PcdDd5RP CFkpWrBE4JjW/YSuEcYwDEFCctYJj5oREbTJCvCogYju4z8017D00rfnFEM4HkciDHRMiT wICIh69iAyfaS65v/DtuOcAHBvBP9HUj0jMU/R3QH5mzsnN1mXxHHS+Bc8x7PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582519; a=rsa-sha256; cv=none; b=WLAHDdZkjM3omGK40aWluW0TV0QGkd4myzDkf0nYZUDjtUHqkWdwgq6/apvGSQsxl78DWa FXHcLHse5D4gmRBAEErySUWvE1V8pf1G6jd8nrxSEeqMVQ4nlS/tuZFKvrIN26gNHVb+ee qvIEeGyRagDgGBGC+YwN/hF0JyZZ3WPdKZH9ZoV6DcsaxTJ/Z0VgsYsZy+KSai7M6KZZzF P+a3tF4h+KuU43rP1OU5RvlSd/Ne3Eg6bDKx5pm5lS7YnZ8On4/+XMJx/yhztFnBQs3URw 54kdOudXFqMPcV/gmdj/4xduJZ9m8Z3ZScIel9n/cqEGFwy4Qq3r9E5XUgd2gQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XGVrl0fLwzsh9; Sun, 29 Sep 2024 04:01:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 48T41w7e080532; Sun, 29 Sep 2024 04:01:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T41whm080529; Sun, 29 Sep 2024 04:01:58 GMT (envelope-from git) Date: Sun, 29 Sep 2024 04:01:58 GMT Message-Id: <202409290401.48T41whm080529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 03f291611464 - stable/13 - qlnxe: Allow MAC address override List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 03f2916114647def8b68f1a7f4aee65aec5632c7 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=03f2916114647def8b68f1a7f4aee65aec5632c7 commit 03f2916114647def8b68f1a7f4aee65aec5632c7 Author: Keith Reynolds AuthorDate: 2024-08-05 19:10:18 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 04:01:28 +0000 qlnxe: Allow MAC address override The qlnxe driver always sets the NIC's rx mac address to the card's default MAC, ignoring any MAC address set via ifconfig. PR: 278085 (cherry picked from commit 792226e53023cb09566cb78b2135b052e9b62e0e) --- sys/dev/qlnx/qlnxe/qlnx_os.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 8e97321e15dd..6887d84a0ce9 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -7179,8 +7179,17 @@ qlnx_set_rx_mode(qlnx_host_t *ha) { int rc = 0; uint8_t filter; + const struct ifnet *ifp = ha->ifp; + struct sockaddr_dl *sdl; - rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, ha->primary_mac); + if (ifp->if_type == IFT_ETHER && ifp->if_addr != NULL && + ifp->if_addr->ifa_addr != NULL) { + sdl = (struct sockaddr_dl *) ifp->if_addr->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;