From nobody Sun Nov 10 23:22:41 2024 X-Original-To: dev-commits-ports-main@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 4Xmpcd2vkYz5cQjC; Sun, 10 Nov 2024 23:22:41 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xmpcd2Lwnz4rvK; Sun, 10 Nov 2024 23:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731280961; 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=EyeHu6Hu/xeIoabsWTOThtrhb3a5OiZRhbrEMYJ2Gm0=; b=bC8ywzyAG6iLxOiRDQ41Ld6Pq/g171Pi0yZeMxn19vKCLPBsYwT9NcpRw6TRpgXpnkxvFG TIPiYO3fNJW42Pc1mSnQ6p8LoD/cRcqxf69wzznGa62e16BQaMWpJLLOU2GxaP2RfYCRjQ J2IQttUbGuHQ8Qi2wRInUSPzKYfzmLLO9AkhH2m0MYR86MhDEoPC3ZoJdk0zHKupgSYpla K4lEhOnpKbMkDTBKD6NgDrY9F4oi9kGbZqmkSNYcY5whFwgPxIp+PJBIBMM8pfr4rfL9PD AGttwjxLF4LtD3XpVExT4PyCLBVPrUTWgr3KtrLiyfytc+iEI5nlwXK1/quTTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731280961; 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=EyeHu6Hu/xeIoabsWTOThtrhb3a5OiZRhbrEMYJ2Gm0=; b=eUv+xCBK3fzP/iOn4xCCXXi4jfmTPUmpnZH+CL6D/ZQ2oFcnOP/83H/KERYzMfdUPP7Ce1 czpItRNNnfZAlfGPodkOBPuGY4+cXrV6g+lqcICq16HD+ohK4TeTMkdVdny5xwycI9BgJ1 +Uo+969dKZH3MXy/YnPGBkjo2KSRsh7RMfpcEbScTGklWxlTyySJpKVwK8j5WZZyqz0Jge uPMumAzVbwYPrM7+PAIL2liMSTEFvTA0MmsRmlJrz9vb/cFWElOx6JnHp/2F3XRtKleb6R gg3qt29rxjHwmU4RaM7jRmCxVCORe1F+eyJ9r3+/hXmarSecmQsxJTwhRwlAMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731280961; a=rsa-sha256; cv=none; b=NhonjjsgRvXwhN89u6vnVfqo5eqstdjXKG8OeHG4RYEqsuF7basHeTEfZtj5mHWcLpqfAK 0A+QcUfrNOA1enGcAO7NLhL4CG2lkJtVkqSVSREoJEgNofVyCRNV8iOksX7S2bc/vE2ZKb Oqes/+AYI2jLb0hrRWYjtVdlALqWAih9H/BeBhxckAeFoxAqkpOhQ+UmJCtqRU7FiwOe9E Hr8wF6bpyauryMAK35y3X3JpKnu/ilkvQzZe9+a2cSXLZLVQBxa5w4K2IXt7fzN60poc3G dj5nKs2d8lnYuh/L1WyxMG2s1E7OwlZIJvn7VtIt4O6//IgTWSM2c6eroG/5kw== 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 4Xmpcd1zC8z12V7; Sun, 10 Nov 2024 23:22:41 +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 4AANMfmh053532; Sun, 10 Nov 2024 23:22:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AANMf0d053529; Sun, 10 Nov 2024 23:22:41 GMT (envelope-from git) Date: Sun, 10 Nov 2024 23:22:41 GMT Message-Id: <202411102322.4AANMf0d053529@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: be7bdd6616c0 - main - net/wifi-firmware-*: add support to set loader tunable List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be7bdd6616c0980dfa2f8e91bd52d7f3b5f969e1 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/ports/commit/?id=be7bdd6616c0980dfa2f8e91bd52d7f3b5f969e1 commit be7bdd6616c0980dfa2f8e91bd52d7f3b5f969e1 Author: Bjoern A. Zeeb AuthorDate: 2024-11-07 22:37:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-10 23:20:15 +0000 net/wifi-firmware-*: add support to set loader tunable For drivers which currently need to set the compat.linuxkpi.skb.mem_limit tunable add an option to the build to create it automatically for each FLAVOR. There is no harm if it is there multiple times setting it to the same value (apart from file including and parsing overhead in loader -- however that works). Add the option to the rtw88 and rtw89 wifi-firmware Makefile. Having it with the firmware package has multiple advantages: - the user does not have to do any manual configuration anymore - we do not have to configure setting it into the release builds - bsdinstall does not need to know about it to set for the installed system (depending on driver). Bump PORTREVISION. Sponsored by: The FreeBSD Foundation MFC after: 1 minute X-MFC for: releng 14.2 Differential Revision: https://reviews.freebsd.org/D47481 --- net/wifi-firmware-kmod/Makefile.inc | 18 +++++++++++++++++- net/wifi-firmware-rtw88-kmod/Makefile | 2 ++ net/wifi-firmware-rtw89-kmod/Makefile | 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/net/wifi-firmware-kmod/Makefile.inc b/net/wifi-firmware-kmod/Makefile.inc index f592ac252d75..c8de13d05776 100644 --- a/net/wifi-firmware-kmod/Makefile.inc +++ b/net/wifi-firmware-kmod/Makefile.inc @@ -1,5 +1,6 @@ PORTNAME= wifi-firmware-${FWDRV}-kmod PORTVERSION= ${FWDRV_VERSION} +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/ \ https://ams.source.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/ \ @@ -84,6 +85,8 @@ USES= uidfix # OSVERSION seems to not add the _USES_install bits from kmod.mk. USES+= kmod +BOOT_LOADERCONFD= /boot/loader.conf.d + .include .if (${OSVERSION} >= 1500014) || (${OSVERSION} < 1500000 && ${OSVERSION} >= 1402000) @@ -106,6 +109,12 @@ post-extract: @${CP} ${DISTDIR}/${DIST_SUBDIR}/WHENCE${DISTURL_SUFFIX} ${WRKSRC}/WHENCE.in @${SED} -e "s@%%XXX%%@${WHENCE_REGEX:Q}@g" ${FILESDIR}/WHENCE.awk.in > ${WRKSRC}/WHENCE.awk @${AWK} -f ${WRKSRC}/WHENCE.awk ${WRKSRC}/WHENCE.in > ${WRKSRC}/WHENCE + # Do we need to set a tunable? +.if defined(COMPAT_LINUXKPI_SKB_MEM_LIMIT) && ${COMPAT_LINUXKPI_SKB_MEM_LIMIT} > 0 + @${MKDIR} ${WRKSRC}/${BOOT_LOADERCONFD} + @${ECHO_CMD} "compat.linuxkpi.skb.mem_limit=${COMPAT_LINUXKPI_SKB_MEM_LIMIT}" > ${WRKSRC}/${BOOT_LOADERCONFD}/${FLAVOR}.conf + @${ECHO_CMD} "${BOOT_LOADERCONFD}/${FLAVOR}.conf" >> ${PLIST} +.endif ################################################################################ .if (${OSVERSION} >= 1500014) || (${OSVERSION} < 1500000 && ${OSVERSION} >= 1402000) .for _f in ${DISTFILES_${FLAVOR}} @@ -117,7 +126,7 @@ post-extract: (cd ${WRKSRC}/fw/ && ${FIND} . -type d -mindepth 1 | \ ${AWK} -vB="${BOOTFWDIR}/" '{ sub("^./", "@dir "B); print; }') >> ${PLIST}.tmp # Remove possibly duplicate @dir entries - @${SORT} -u ${PLIST}.tmp > ${PLIST} + @${SORT} -u ${PLIST}.tmp >> ${PLIST} .else ################################################################################ # Build kernel modules. @@ -157,4 +166,11 @@ do-install: (cd ${WRKSRC}/fw/ && ${COPYTREE_SHARE} . ${STAGEDIR}/${BOOTFWDIR}) .endif +.if defined(COMPAT_LINUXKPI_SKB_MEM_LIMIT) && ${COMPAT_LINUXKPI_SKB_MEM_LIMIT} > 0 +post-install: + @${MKDIR} ${STAGEDIR}/${BOOT_LOADERCONFD} + @${INSTALL_DATA} ${WRKSRC}/${BOOT_LOADERCONFD}/${FLAVOR}.conf ${STAGEDIR}/${BOOT_LOADERCONFD}/${FLAVOR}.conf +.endif + + .include diff --git a/net/wifi-firmware-rtw88-kmod/Makefile b/net/wifi-firmware-rtw88-kmod/Makefile index 5c855868ae36..dfd374718937 100644 --- a/net/wifi-firmware-rtw88-kmod/Makefile +++ b/net/wifi-firmware-rtw88-kmod/Makefile @@ -13,6 +13,8 @@ LICENSE_NAME= Realtek firmware license (${FWDRV}) WHENCE_REGEX= rtw88 -.* +COMPAT_LINUXKPI_SKB_MEM_LIMIT= 1 + # The flavor/firmware lists below are generated by a script # also helping to generate the fwget(8) definitions. # { sys/contrib/dev/rtw88/zzz_fw_ports_fwget.sh } diff --git a/net/wifi-firmware-rtw89-kmod/Makefile b/net/wifi-firmware-rtw89-kmod/Makefile index 83e77567b43b..abe723dfd687 100644 --- a/net/wifi-firmware-rtw89-kmod/Makefile +++ b/net/wifi-firmware-rtw89-kmod/Makefile @@ -10,6 +10,8 @@ LICENSE_NAME= Realtek firmware license (${FWDRV}) WHENCE_REGEX= rtw89 -.* +COMPAT_LINUXKPI_SKB_MEM_LIMIT= 1 + # The flavor/firmware lists below are generated by a script # also helping to generate the fwget(8) definitions. # { sys/contrib/dev/rtw89/zzz_fw_ports_fwget.sh }