From nobody Mon Aug 05 19:13:23 2024 X-Original-To: dev-commits-src-all@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 4Wd5gm1fS5z5SXpT; Mon, 05 Aug 2024 19:13:24 +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 4Wd5gm0dmgz4yM8; Mon, 5 Aug 2024 19:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722885204; 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=harMMnHJCDqZ+YRrN+bGWfXq62ZnNrKV4+MjyxV5JO0=; b=NtHi1zc74Nmjp8sbB8O9RgAioVImtOqq0h7Uy6Jw25zToJqKRu2b8gMLkfkGwcmsAECT4l sBEj8vS/1wyuadaL4CMx9LBG/3TYjiJG+jmDGZreMNawMPm89DyGqmsb6Sdpw4BvxL9XNT Xui9KZj6hmWvEDRGjCslYaGyvuLw+Tlj8ec6HbIC4qEw5wwk6n5pnFjKnKNeBVxdA5JGdd RU27lKnaCohKYk3v0Ffm6ie1f6EXoozLTUE9gs8F08zG6O5wJ5VZwQMGALDbOZJl092mF+ oVRy8/qhYp3eI7IknwKQP/2GRb7BhMZjSRCr2TUQOhG/FO3rjDk5dFGUOXSC7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722885204; a=rsa-sha256; cv=none; b=jvlrWCCmMmoGRpBZscWuAvh77B5UIPz9aErszLOfsIu/Zy0TeY6NG/NoA5cr81WjcTEUuh OBdr5dmYOj+BBxNB9ZvZV3mKSn08tvHOV3yghqGNeBKL/NeHylOTSsy7JWn1EdsXydcOfJ HYQLwjD8Ol6whQlBkOhHbzWMu3zCCjlSfq/NkW7/d6pTMeAdmiZknljzdh591YjGqRN+Dv w8Hg6vtqY+x1yHDCPRXwCsmke1NkNDW1ct3hR9001+PWF7BOssl4ecIR8JrmdiFYTBUXgI COutMOfivGFumoN4Bt5/+7R60g2r9kdpK+rKdchOzuoWi4G5A/RgcWnOVjF/nA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722885204; 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=harMMnHJCDqZ+YRrN+bGWfXq62ZnNrKV4+MjyxV5JO0=; b=IvEZhaIUtkvn0rzFPOZaTIe3DaigX3oVgUzf2HBeaJO3NZoy+5pIFIQSLnDzCGbapopfYM huGauOxNvsGB8bokIO0Jt4yjXXVIfD3puUu53qKF/u22gtJSLU7Ptrhppij0celPcsK+my B08CKFevlQWfOxGpAnRS9jmvCKFT5HOXQacylk28ppfil+nIvNe+W7ykwSvZVJ3d2Bjjt1 CGK7APgERfNFvVW6WvNqOp5JSVQV5RlTQnNEP+nul4JP4EsjaL/KJtBCmEApL2/bArTw3c xPWEwke9TG2hT5WNfXLjCVwzVtNGP0o0dfnhYWors4QYGbHj1D64aefek4B22A== 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 4Wd5gm08VnzbLk; Mon, 5 Aug 2024 19:13:24 +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 475JDNmb004671; Mon, 5 Aug 2024 19:13:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 475JDNOU004668; Mon, 5 Aug 2024 19:13:23 GMT (envelope-from git) Date: Mon, 5 Aug 2024 19:13:23 GMT Message-Id: <202408051913.475JDNOU004668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 792226e53023 - main - qlnxe: Allow MAC address override List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 792226e53023cb09566cb78b2135b052e9b62e0e Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=792226e53023cb09566cb78b2135b052e9b62e0e commit 792226e53023cb09566cb78b2135b052e9b62e0e Author: Keith Reynolds AuthorDate: 2024-08-05 19:10:18 +0000 Commit: Kevin Bowling CommitDate: 2024-08-05 19:10:18 +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 MFC after: 1 week --- 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 6665894d058d..49d3f20aa0c2 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -7055,8 +7055,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;