From nobody Tue Aug 13 19:34:31 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 4Wk1mS1sD7z5THdn; Tue, 13 Aug 2024 19:34:32 +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 4Wk1mS1KzTz4sCS; Tue, 13 Aug 2024 19:34:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723577672; 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=rtbKu6HER3rZYq1EXNQ7HZv5Q1QFPhqciB/NYrf9ypg=; b=H/XJOgMoAhF/hS/c5Js70HN0pv7Qj6OKa6jSjpbdL+UdSnaawGDC7SPEpNs0G4EEtyZ7ot uHcmX31ZctPBMCAGzaasDDYLBKUCCRQ+luQ7BSVatk9aFTiJSe24k1uqkqOSEth+mjVE+j oVRSgoTFhPQq59pEXStmQoTbP0L76h2LB2vY0d+A0rhPXbQRl7mQoFYOlpmyyWjbmZL208 ihrqc7MQX9xxTK8l+u08jukkh6T/TLx/m7wzlNuPTt99q7pOn8cV6zRe6I6s5N3kx8S1T8 z56PXSkzrcKHCe6fqL9gppccPq6M5DXvXGaFdXPMfnBIb5Vk2152VCzixC1TUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723577672; a=rsa-sha256; cv=none; b=VVcc1fUk6Dd8rSQFafjHtgs42/ZAPqwq9KDC4vWOMDqDp2dJ4+SgtBkXgQiF6q6UTcP09i QY/ED5PZh65der3BvKDQgBhR7QnvbTn3rPqX/z9yTJC5VHUToNHpjSFcDFtCoHmEGuTsa9 RqwT08V8VGCjcNMHYrakfXTEIAmNVJR01M0KkJ9Bou+Ed7TVePXTVr7K1Q/x9TD4i+H1T8 MCvmErxAwMGrVX6d2Nqo/qXpCuEu4texK3eo6ph+mfWaOEWaIv9dEtBQEvhH6T/3+fORiA p/sD6d8DjmYXMAy5OZVYSrIDnMvM7R6K5+5hSL59DVNN+jrgqAWMWkVEajNTzw== 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=1723577672; 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=rtbKu6HER3rZYq1EXNQ7HZv5Q1QFPhqciB/NYrf9ypg=; b=DoMMl4NBRhVxSsY0HwYQFXxoTb0m3w6rzPqdaR9OP2nq1uDj6A37rfcL6NDldFwzpIW9qX LXli++GNHhrefH7EPAq+vNu8NrPRPA3AXILHG/7lNdjhTC/DggKA+OnGAR43yrHYhJ7NG/ k4M0kInLFZ/9qXHAsyDmjaCvrCn9GeNSFOgoJs6PlQVrGglLVNmCLHIuZQ/73NHx4KNFkU /aPMYdUXaro1icymN7GIqaErmm6nv34+ZEmbrouvQ/+ZGAA4AMQL34DyvIaypLkaEz5r36 4d8BWEGi6afL7q901dz0F7RSGZWrbTBNideodFg/v69vpWOYpY2yVPOCJGLySw== 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 4Wk1mS0dwGzNnJ; Tue, 13 Aug 2024 19:34:32 +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 47DJYVjZ056426; Tue, 13 Aug 2024 19:34:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47DJYVRa056423; Tue, 13 Aug 2024 19:34:31 GMT (envelope-from git) Date: Tue, 13 Aug 2024 19:34:31 GMT Message-Id: <202408131934.47DJYVRa056423@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: a9376f5caf1c - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: a9376f5caf1cdcee074601dbd838a1c5450e283c Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a9376f5caf1cdcee074601dbd838a1c5450e283c commit a9376f5caf1cdcee074601dbd838a1c5450e283c Author: Keith Reynolds AuthorDate: 2024-08-05 19:10:18 +0000 Commit: Kevin Bowling CommitDate: 2024-08-13 19:34:10 +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 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;