From nobody Mon Sep 23 04:51:10 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 4XBrDG69zYz5WYY3; Mon, 23 Sep 2024 04:51:10 +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 4XBrDG4lnpz4hRT; Mon, 23 Sep 2024 04:51:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727067070; 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=GxKE9qbVld103G0ymvtYXgNxnHPrx1cbDYi2mXYD57I=; b=iPnOODKgieHHSb8e7+mMy7H1UvPjDYhYiPuVzdavckbicsB1QKIoNtAqrkKksmBeBb6HrY gbavmyhDzrghfajKxX0luuAcSzhHEK/YmtvuqIRm3fV33aDZXkblWd9yq1nAkHBupp6ipC iWtLcbO0uS4X1UDYWyqsvevSU+c8Gei6mA2Na0/Uoxl6d84NGDFMJpxC3IaOqoB7lGHfEF DVZ7ekqEyTzAShBiKLgJK6pWjzebeQp90kqmZbkeaej0lmFISLCGDJ9MUdF6Ss4j7x6wSN u4iFA64FlDUoeCmbyyOomQhPjLeY7Ec58J+LL7pSW3Z7bYz89WBBlCBjC06nHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727067070; a=rsa-sha256; cv=none; b=uEa0UypUEIyjIYftDzYrmOjtaroWAC0r7Nnpfz4zvR1lzdN000Dl93jmIYUyrxWqh5Jsii MbQ47TO2DbiVjNVmXRE/YueqIYaxQeQNE+TZi9ogAP95x4gyq8imm9zBjH6NiiZQ//dTFX 2oROqaVEJaiJEKvdRfuYDqqgmxQU95nBEWfKR6U65nX9qPFbzUbXk/cIHGM5rjtRItOpe6 trEu/SW+GWywYNdUcnQOHwdkeHHUIadABqc1tCmJ49gEYkk1NZ3EG39z4taA+bfBEn7pM3 h5ybyJpPJSefy2RYTleDt/UyAWNTNjUM7nMa6L2ZdV56YntBBHoHYYXy/ohyOg== 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=1727067070; 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=GxKE9qbVld103G0ymvtYXgNxnHPrx1cbDYi2mXYD57I=; b=qfVrP9cYjC9R9Xa9hKTmD6pYztlh7MEdFb20zsSXdpOKVXnEBBGPKZVfWgG6aBBIIp5VEt e6bQlKmjrpFATfCaT6xFsyvU3+U8mW6mclaY6OD8DiDT7Bkyw9MaGH1aBeqanjICSOnwWT ZFiExF1beJbX4t9bw5RrE5pjoMWTAX9qyIgk2LvCDjdC5fBNdzLG3ir9+NeMmm9s7syRBG Gbp9iXCqxpjN5e1n13V6dTWq0Fxc0g0uzJnbz5Yx5IqY2DFrOPo/sWIJ4J/M5933C4fzVi frajdrleoHWEmMEckq93bqwh1r6U4Pm+CG+fi4P7QZct2CF36oRp7KTTdPufuQ== 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 4XBrDG4MM6zXcs; Mon, 23 Sep 2024 04:51:10 +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 48N4pAlg069191; Mon, 23 Sep 2024 04:51:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48N4pAn5069188; Mon, 23 Sep 2024 04:51:10 GMT (envelope-from git) Date: Mon, 23 Sep 2024 04:51:10 GMT Message-Id: <202409230451.48N4pAn5069188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 82db15028e43 - stable/14 - bluetooth(3): Fix two typos in source code comments 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 82db15028e434076e30db683958792741306c8c7 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=82db15028e434076e30db683958792741306c8c7 commit 82db15028e434076e30db683958792741306c8c7 Author: Gordon Bergling AuthorDate: 2024-09-20 18:00:04 +0000 Commit: Gordon Bergling CommitDate: 2024-09-23 04:50:34 +0000 bluetooth(3): Fix two typos in source code comments - s/conficts/conflicts/ (cherry picked from commit 9046ecff409c45205aad34ef8d959d79dd20cf8f) --- sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c index 8fc64bb70929..f232b3d390bc 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c @@ -789,7 +789,7 @@ ng_btsocket_l2cap_process_l2ca_cfg_req_rsp(struct ng_mesg *msg, if (op->result == NG_L2CAP_SUCCESS) { /* * XXX FIXME Actually set flush and link timeout. - * Set QoS here if required. Resolve conficts (flush_timo). + * Set QoS here if required. Resolve conflicts (flush_timo). * Save incoming MTU (peer's outgoing MTU) and outgoing flow * spec. */ @@ -991,7 +991,7 @@ ng_btsocket_l2cap_process_l2ca_cfg_ind(struct ng_mesg *msg, /* * XXX FIXME Actually set flush and link timeout. Set QoS here if - * required. Resolve conficts (flush_timo). Note outgoing MTU (peer's + * required. Resolve conflicts (flush_timo). Note outgoing MTU (peer's * incoming MTU) and incoming flow spec. */ From nobody Mon Sep 23 04:51:11 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 4XBrDJ0Gjsz5WYkn; Mon, 23 Sep 2024 04:51:12 +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 4XBrDH5NRXz4hDT; Mon, 23 Sep 2024 04:51:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727067071; 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=KLREmnhfeVbMxjLWcGjUkNZO726TeBUXF/9fjr8tppU=; b=vQIs0eYRnSnZ+32kxEC+KzF/TbPCFZTw6jL47KUmLcjh6/Q5Cuxt1BNLy7D+A5brUpPVD0 De10WYMK7lHEAPRkmY4nGnxGHKYwCUxfyA6lEBcw8h28HtlCvpiIVLzlL/ktf57CSLp1BS SQ3eNALH3FOEcXb4DzpGGZNGrWAJAfQlWg1krYcCY5ClpcWyBllvfU5FTkPrHdptI7BCKO PPe3qpxDdLhH7nZyF11BWHgceX3uHyBAA29azToPgpLKmj9nxb/A9I0OApDB9RedONhoRg iRW6cS+Vt7ZGvapovGGYw51fhnl+benAb2zQtYpqXVFOpqqLPWJ2ocSgMdOpXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727067071; a=rsa-sha256; cv=none; b=YKXw5Ni99f3SVQ1jG4qglQcfIPv4ua16qT9mPwGBt+RM7Rkf3sfqyp05SeXgF53NlgfEig 1nrpMydMKpDLU71G+wmow+dz14mdfgvW6+4UubAJuM0qkl4EzhvxGWpIPIEdU2Q45fzz/T UEl+bTm8pH/LA4AstdWsYpoKU22g/4PxD4v4O5xj0go11rjkwKPk08UxjCyI0lXBR1G08I qiRaKo5z/nMIkr9mPdPtyceqyEp+3eC1wTy6lSWcRvmInrAXeDgkdd2XRAyDWyzyfKMwyY 0s+lpD0EcjBeOhp4wkRgYqKgDvasWJ/kzaAPtUSmeSPCjo9EaJBGowvihDGZgA== 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=1727067071; 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=KLREmnhfeVbMxjLWcGjUkNZO726TeBUXF/9fjr8tppU=; b=Be2QA9NUb7Jw0FvrcgudfcCj/+yz2lp1dXIDMz74TlnxhcjA/XutxoEOpzAkhRx7u+O6II Y1PoDhyoAjzRYX3Pf1xg1FVhKBt0hZfLvPFObeQJl+hsEGNfviFY8i5zU2MXKEnoI9VuTB nycZiwG9Q41hZ5nFOIEnmHPJCuVZd4fqgiabDyaTE3S3SOBM1YRIvYXhG+QZ7DKdPtUzrQ GHcsdbbNAvJQO8s2uDsC2bstyjMxYLE558n/xGNr2FzH7EBqlAgxUnhkB0JWjrfGgU6lFA Ndob+KWmGCmMFPgSnfE0HQMg49O74B2rov2LtlC9wyAEe1in3un+aFZ0gONmag== 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 4XBrDH501lzXct; Mon, 23 Sep 2024 04:51:11 +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 48N4pBur069245; Mon, 23 Sep 2024 04:51:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48N4pBkP069242; Mon, 23 Sep 2024 04:51:11 GMT (envelope-from git) Date: Mon, 23 Sep 2024 04:51:11 GMT Message-Id: <202409230451.48N4pBkP069242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: c22bc90d4e32 - stable/14 - arm64: Fix a typo in a source code comment 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c22bc90d4e329471d800580530a61e62bfbdda13 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=c22bc90d4e329471d800580530a61e62bfbdda13 commit c22bc90d4e329471d800580530a61e62bfbdda13 Author: Gordon Bergling AuthorDate: 2024-09-20 16:53:42 +0000 Commit: Gordon Bergling CommitDate: 2024-09-23 04:50:56 +0000 arm64: Fix a typo in a source code comment - s/parametes/parameters/ (cherry picked from commit cc4997907714ec22498a454736974abfbc123beb) --- sys/arm64/arm64/machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index ea2b7e9da2ee..cdc812269542 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -889,7 +889,7 @@ initarm(struct arm64_bootparams *abp) boot_el = abp->boot_el; hcr_el2 = abp->hcr_el2; - /* Parse loader or FDT boot parametes. Determine last used address. */ + /* Parse loader or FDT boot parameters. Determine last used address. */ lastaddr = parse_boot_param(abp); /* Find the kernel address */ From nobody Mon Sep 23 04:51:34 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 4XBrDk5lK5z5WYvm; Mon, 23 Sep 2024 04:51:34 +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 4XBrDk3J7qz4hgJ; Mon, 23 Sep 2024 04:51:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727067094; 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=tgZbaBARPwj+PNvSyeFqwVyQEmgG/GDgp3p22Su6p50=; b=Ds7L1RAOcyiES5ALT2DkrLsa5N++w4+SAhCkKsFySZzKDH4XMJwtbpS+osTMlkg1nhQisE g+X1Kjw+NMw/q4QJQaIZunRTDbucHrgFhwHQOF0YAbaJZPDtmv/d0MKcpGbPcXQRJhTjd4 xLIZ8PNcrlf5426fcTRPvFoI4yG3rQRxk0yJnZSM7iBqySiQ4u+QGUsLq7vokZQkOBWL8R zWOscPSiZbSBRgRTPv6Lfv8JFE0NPL51efE5yDKwvdi32dDSyQ5fQtp1PLsU9+HYa+PWNV unxWEJuYKhoVepZY95cwbQRw3TFEFtDSOGV3OtMTIZLhfgyAKCQL1yJdwXMyFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727067094; a=rsa-sha256; cv=none; b=idGAJi7A/eZqnrOSgITXmvcbzEBd0PKYym5mzZ1W9fzlX01ugJwHk8ByIk7bB2aT/Zigg4 7iCNrL5U8/qi0XWt2DPuxVwffW8ORAAEehib9bHWkfMTlbwY7HRBoAPkAKi4PvBKRaaLhm SvNO70iiIstLy2HNA5zSbCD2ow480DST6F/1W75LHQ043v23bmVIsdJaaogG4xXBzOxYGN Swubm9PsbQ1fhJ+wT01wYpO7gEVqyCk1G2vgoVdg5FQxbj59VGgYCd9Kz9RQbXwW2QeFbT BzNjk6RBr+cspbdWT1RzhpcBUWlfTsLuvKF2S27+YeSXdW33Zm/KsEUs8o604w== 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=1727067094; 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=tgZbaBARPwj+PNvSyeFqwVyQEmgG/GDgp3p22Su6p50=; b=VdqQZvywJdYJVz12loTOu7r3IyfwTeBZnePqWvMPgTlHbKO2I7XFmpk/uzUcLNH+UmNj47 Q9KWDJIXSHFGledwjAx6mFGZSwp0Tf/2z94YlD4IkVHWiynwvjUOB18oFQg2JX24VXT6u3 V6oG199O5tdh3CAnA+W9VqdaZ1JZkUK2K7f3l9Pm/Zs6K7bALWBO4GL8FNZ8F2ssKoDYYI pmEfVXLvqwAUE5ihmvL/tlC+WmvEW8wmIeSjFFdWAyydEifebpIpQ+iFU9TeGBJvCAWvo6 2gFZrM+R3B/6eDqmaDd9kjmQiSMhiHlhW7jtgCjcXcWmvO2+pRBGephYUWSQoQ== 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 4XBrDk2vwjzXM8; Mon, 23 Sep 2024 04:51:34 +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 48N4pYD8069462; Mon, 23 Sep 2024 04:51:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48N4pYup069459; Mon, 23 Sep 2024 04:51:34 GMT (envelope-from git) Date: Mon, 23 Sep 2024 04:51:34 GMT Message-Id: <202409230451.48N4pYup069459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 590a0f0d67a2 - stable/13 - arm64: Fix a typo in a source code comment 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 590a0f0d67a287f085a679fa2a32f5aaf44b4680 Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=590a0f0d67a287f085a679fa2a32f5aaf44b4680 commit 590a0f0d67a287f085a679fa2a32f5aaf44b4680 Author: Gordon Bergling AuthorDate: 2024-09-20 16:53:42 +0000 Commit: Gordon Bergling CommitDate: 2024-09-23 04:51:19 +0000 arm64: Fix a typo in a source code comment - s/parametes/parameters/ (cherry picked from commit cc4997907714ec22498a454736974abfbc123beb) --- sys/arm64/arm64/machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 5c786a58f046..52471a7c1fa4 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -759,7 +759,7 @@ initarm(struct arm64_bootparams *abp) boot_el = abp->boot_el; - /* Parse loader or FDT boot parametes. Determine last used address. */ + /* Parse loader or FDT boot parameters. Determine last used address. */ lastaddr = parse_boot_param(abp); /* Find the kernel address */ From nobody Mon Sep 23 04:51:35 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 4XBrDm0bn7z5WYsc; Mon, 23 Sep 2024 04:51:36 +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 4XBrDl4KVSz4hlx; Mon, 23 Sep 2024 04:51:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727067095; 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=SY7id2u8UzSu1WZ8u8byVhQFPJpYUgHdv51Q0QuMhGw=; b=d0LoSzrpsRZykkv7bMnlHHP+OpGy0/0NinUY8jn4QhRyVbrEVOr/uVgNNqZi9G2Pbj4GKC EwnMXqsyt4NC6v2fJnOW564CnkEC8gklwEfAM640nzF+Jzl5rZnx/hfKzEEdx6XNWtpxYn y6GvN4Han5ahwNPvC02arBGnbKn/vSMlcytsVcZyQfX70ev1KZij1XXKFvYLGi4nvBaAA+ tE6dhR4itrhy9m7W/aNxR4cxAuTvddsceI/D8rdexIXN+K0fHBen2vY3MPGBE5R8Wt/Ji5 MlLjRnFZPOG4tsGmwBd4VHKyBPGSSzeIKoOGF71QAck0lTRFOFhgeWQoSbLQJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727067095; a=rsa-sha256; cv=none; b=OhjnALJ0mrYAXmbCRcwRRTNw7ahf01Vwv+cum0w2xFThRU1yE1Lt8nXdkyZK1dCjuudZa4 PC3dOHoaB381SL4+MTocFsGG2Qwcjnqz7bfFBGFQOqw4pDkrAOd3GMSlJb1YiB9j7COYYv vH6pn+pBvFbHhNm7UC+oED/Xyk40zXSsyUeiYHtC3H56/31bpv1LXOqf6TtkyzdmT5IAKU iRP30eIYCJJAAT3MhAhxWyIZS21gXm3jF3yHMBvZhGuByXqFdBdO1NAijZPfiXF2B22M3C j8hrFJpAmnGfxF4twBF91iFrFILfjIwy/+1B2fQUl208YsPBtJVGUXC57EItgQ== 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=1727067095; 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=SY7id2u8UzSu1WZ8u8byVhQFPJpYUgHdv51Q0QuMhGw=; b=HS9ae7amluy7SCD/mIJlytueB4QCTh5XHchbSnVXrqABmKLSodD2qtrkXdjB6nkksUCP+E PNw47jtkYR/VYvMJ+sXFJBL+lp54WWcIl+Dp7dhzw1v1nTdbRawJPEQYrrlt8crIiflQL5 zgkKUtPNDL/YM7aR7bxzzJKOMkJc88FYcU0LA/rgr9E5goctnbLbfaMIxE1D8ZCsw9hTRF 5IsgEEbuQ2Zwa+kz6cW3jLihM7XxMhiUn3fvW7SSTqy3XGOzxywuC8tBqE+pdUAtvR4rEc Gn7tHPPJ5zpp9hKGDnsLg9wbLT+fSCZhrCmV0i1pJv78HedvIEmflVZrh3xOUQ== 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 4XBrDl3ln5zXQx; Mon, 23 Sep 2024 04:51:35 +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 48N4pZio069520; Mon, 23 Sep 2024 04:51:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48N4pZ1D069517; Mon, 23 Sep 2024 04:51:35 GMT (envelope-from git) Date: Mon, 23 Sep 2024 04:51:35 GMT Message-Id: <202409230451.48N4pZ1D069517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 0a389bc09bda - stable/13 - bluetooth(3): Fix two typos in source code comments 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0a389bc09bdab3a8174876e971f88eefe3a693ab Auto-Submitted: auto-generated The branch stable/13 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=0a389bc09bdab3a8174876e971f88eefe3a693ab commit 0a389bc09bdab3a8174876e971f88eefe3a693ab Author: Gordon Bergling AuthorDate: 2024-09-20 18:00:04 +0000 Commit: Gordon Bergling CommitDate: 2024-09-23 04:51:26 +0000 bluetooth(3): Fix two typos in source code comments - s/conficts/conflicts/ (cherry picked from commit 9046ecff409c45205aad34ef8d959d79dd20cf8f) --- sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c index 9814d9e0bceb..f5fd0605faee 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c @@ -789,7 +789,7 @@ ng_btsocket_l2cap_process_l2ca_cfg_req_rsp(struct ng_mesg *msg, if (op->result == NG_L2CAP_SUCCESS) { /* * XXX FIXME Actually set flush and link timeout. - * Set QoS here if required. Resolve conficts (flush_timo). + * Set QoS here if required. Resolve conflicts (flush_timo). * Save incoming MTU (peer's outgoing MTU) and outgoing flow * spec. */ @@ -991,7 +991,7 @@ ng_btsocket_l2cap_process_l2ca_cfg_ind(struct ng_mesg *msg, /* * XXX FIXME Actually set flush and link timeout. Set QoS here if - * required. Resolve conficts (flush_timo). Note outgoing MTU (peer's + * required. Resolve conflicts (flush_timo). Note outgoing MTU (peer's * incoming MTU) and incoming flow spec. */ From nobody Mon Sep 23 09:50:44 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 4XBysx2K1yz5128M for ; Mon, 23 Sep 2024 09:50:45 +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 4XBysx1jYvz4fQY; Mon, 23 Sep 2024 09:50:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727085045; 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=XaT5eTqR8N7hJEX1lFR0W3exj7byXIlp0durTU5/pRI=; b=SWCIFx94X5jsJnNFQprJ9zHBwmC1EcHXPhKoohYXrITf8KHUsrcUIkb9evVWKB3sKVOc2H AQe6Mgnrd52irhlIYC10dFJP21iKt9pi/OSI/i+PWdUbmRd/dzkih9cu+/OwD9HFZ3Any7 25ays8Sx0e6E69+/61SujlUTMuM/hjk385HitKMSzWWG6SkmBRXmnubriUtPK2zH0IlZDH 3L2Z2E3ZFLP7RJsiZi+0GeaRmg31J6wGHu4SRu+8cTJeDL/wN7c4j+8RQpbmlskLMIduCC olqqz7Fiy3xUP286ZoyigvLAO/q/7fc5txPN/b8vy40khQJpjh/IlgJQspNn5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727085045; a=rsa-sha256; cv=none; b=OqsdFibFBTYqGj4aXipkKBT6gFKYzJrU5b39cunwNgRgkqRiLob7bcctru/E3eDqLWCvK+ 6AazAOmJwghwXj/gfG3GKARB1lWImi/NPRmig7J3jOdRUbWyJ5QoG/1dcqnVAwjGmw/4ZW yrxR1uY4O7Tvc+U8vxZfWlcha1q5JcdRnktja52vVYmFj5qKY8NHM8qG7YbLQzMiekiZDi mfts5fX09Y11bG7z0uSGj2/C4LEudzCX7LbRbiBe8Xz9qtXfQGnHE0ZE2IlTts/7O3hpBC Y0vPNpH/0MZ5vpNreS6XovFaeTroQbqNJC4qq8xSjXB2JF/tB3L8VKZ5LrrNyw== 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=1727085045; 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=XaT5eTqR8N7hJEX1lFR0W3exj7byXIlp0durTU5/pRI=; b=tFlUezquksk0ZmOFF0P8NYHDzJV+zpAho/aRGjOblvfDs+2u8ewStgKWAfW0r0ktRQskHp r5vc9I0oKXzIVCL5adR7ua+s2hKwyReFa/8qp05AiHyWfgZj/hpLdbFC07qmorgqbTGqCK K3ZpZP3hvj1XuCw6IDuoOcrMa1KLkq0TWAVaQjkODoTZrEVKgJbx1Ml+ntWMN0uWg/kdzZ PozGf3micKm1sSWWPgm8UG+yBhjC9vfk1EcCqcxHBE7uRWP0R+ikc5E0vTaETxWCxPjPqf TZ6NLPufrwzif0NzLPZoHASfy+up2+3XYPBE6YefyPQqYEmWLo8FZaXyCCxUsw== 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 4XBysx0sYQzgZq; Mon, 23 Sep 2024 09:50:45 +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 48N9oi9w077217; Mon, 23 Sep 2024 09:50:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48N9oiMo077216; Mon, 23 Sep 2024 09:50:44 GMT (envelope-from git) Date: Mon, 23 Sep 2024 09:50:44 GMT Message-Id: <202409230950.48N9oiMo077216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 2022efa03048..e6330bf497b7 - vendor/libarchive - vendor branch updated 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: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/libarchive X-Git-Reftype: branch X-Git-Commit: e6330bf497b7caf680f9fff993a7b363522ca90e X-Git-Oldrev: 2022efa03048f4b6b5cef39bdd900d61dd484734 X-Git-Newrev: e6330bf497b7caf680f9fff993a7b363522ca90e Auto-Submitted: auto-generated The branch vendor/libarchive has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=2022efa03048..e6330bf497b7 e6330bf497b7 Update vendor/libarchive to 3.7.6 From nobody Mon Sep 23 13:03:38 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 4XC38V6y0Fz52Fxh; Mon, 23 Sep 2024 13:03:38 +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 4XC38V5K5Vz400j; Mon, 23 Sep 2024 13:03:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096618; 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=a3eAH1B2ASk6I+6TSyOaG8pZ4oRyXBsQOGlmdM67fzo=; b=fphdJLlBm5an2wjN37aROF3NIJjGZH0bTNQTvZzU4Q0yafqOFr61EsJtmuo89ZPTeg1vKD 6ENQIF2JBOnKX3ITNr7bQewEiv+m3UCTg5mIXajHK0SmxTQ9n76fOipR7PxkfvBGWXkjIb HXf0MNhwdb5m3Mhpr+cO05oG+RXh29p5xBAfgfOXgH+mExd4wdSfnYO9Ot7MEnC3Gk5tB8 RhXhgaAN7rsCzIxWST4MLZJwf11S1UvEUHNGT8BdrUA5wn5pJrAp5x3mdGmvmvNTtb0eYa 8DLmsTsaboFep952JaIHyNXcUiPUaYkZ/chvQiyrdeob+EWETQiHDmrjQeYW4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096618; a=rsa-sha256; cv=none; b=I+FHBfBwddogWwH384CPAfv36Rh4ttzTscRdXEuwTECdoXSbyLtBGPoxVBea48/i//P/xs cOVusEr0YZInVlt+aAPSxkoIrSI0C2ykJPYq3Eg/rsyc1LeMdxNVhan1wLr9vVeaxvSiZe AVwvyNmUKz03atHxbuz1FvdZK0Jo03uv0F+4zkCFwyQGX5MMrBT37Y2xa7ZWo7PIGIEH2u Y5HDN5YyQVwWF/YgPKe/MvWevTM/BAB82iy9dAiZFfFsjamGMmRxMY5miT95n4XgyaEmUg UF6EWggRkMjUARlV9ALAqTrjcPIiCwIIxBdAEdUZl4yLq5obgO8kCBH1qGCMlA== 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=1727096618; 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=a3eAH1B2ASk6I+6TSyOaG8pZ4oRyXBsQOGlmdM67fzo=; b=lgojKuOv4K6gpgeOEU99RDA+5ruTSyy9i0NzwuEpDRh1uOW5glXptd80jh7IyfBp9JhrEc T4DTvGK0kDMWRnxWkX3ogXxm5VUkD3vdHxW+kK6iEEWdsxk871r/KrhUkwFWvIriveQem4 bGjATohATrjhU/mEtMRiVYhsnUMUbJIJDqDwvKOmhvHqJG25knrQelBXD7Y6voGfPKpZFE MuCwQGM0J2ibyYHXPbQXtbbzDfomKV+6N81df2oTV67O9VI+1jry0KGA6QuFnQPZ8NlINA VG8q3ClKexJco2SkDZar0OIf/8VYV3Dl5TciI8VMf5yTWT1+uYrJAKhtPASx0A== 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 4XC38V4wqMzmf1; Mon, 23 Sep 2024 13:03:38 +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 48ND3cRh006778; Mon, 23 Sep 2024 13:03:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3cmU006775; Mon, 23 Sep 2024 13:03:38 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:38 GMT Message-Id: <202409231303.48ND3cmU006775@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6f357a211afe - stable/14 - VOP_ATTRIB.9: switch to Fa/Fc 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6f357a211afe937503f6cc289126a3a0cb3deda7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6f357a211afe937503f6cc289126a3a0cb3deda7 commit 6f357a211afe937503f6cc289126a3a0cb3deda7 Author: Konstantin Belousov AuthorDate: 2024-09-20 07:24:26 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:06 +0000 VOP_ATTRIB.9: switch to Fa/Fc (cherry picked from commit 66fcbd9556b0053253a945638ae360ffc9040c82) --- share/man/man9/VOP_ATTRIB.9 | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/share/man/man9/VOP_ATTRIB.9 b/share/man/man9/VOP_ATTRIB.9 index a3bf2c0f8898..d7c55bd683d8 100644 --- a/share/man/man9/VOP_ATTRIB.9 +++ b/share/man/man9/VOP_ATTRIB.9 @@ -37,12 +37,26 @@ .In sys/param.h .In sys/vnode.h .Ft int -.Fn VOP_GETATTR "struct vnode *vp" "struct vattr *vap" "struct ucred *cred" +.Fo VOP_GETATTR +.Fa struct vnode *vp +.Fa flags +.Fa struct vattr *vap +.Fa struct ucred *cred +.Fc .Ft int -.Fn VOP_SETATTR "struct vnode *vp" "struct vattr *vap" "struct ucred *cred" +.Fo VOP_SETATTR +.Fa struct vnode *vp +.Fa struct vattr *vap +.Fa struct ucred *cred +.Fc .Ft int -.Fn VOP_STAT "struct vnode *vp" "struct stat *sb" "struct ucred *active_cred" \ -"struct ucred *file_cred" +.Fo VOP_STAT +.Fa struct vnode *vp +.Fa struct stat *sb +.Fa flags +.Fa struct ucred *active_cred +.Fa struct ucred *file_cred +.Fc .Sh DESCRIPTION These entry points manipulate various attributes of a file or directory, including file permissions, owner, group, size, From nobody Mon Sep 23 13:03:39 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 4XC38X1kTxz52Fxj; Mon, 23 Sep 2024 13:03:40 +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 4XC38W6QVQz40QN; Mon, 23 Sep 2024 13:03:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096619; 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=JXlCOQaTLEklqGUAGAyFaXWdCuLh3uM737eFzzzdi0U=; b=btyO06dfRvYvMQ2I/XsCalg3nXLoC1rAgb0PkepB04KDaTKLKwb7A+63tG4qdkA03cEjfW p/RVI/0D1sHLQHEoEt61F2fcJHp9CnvSE75ZFfyLSEXeCGSsP/VDjUT0whZTV1UhJ3N6tC c80c+76+w07sFjPpiQuyLhY9kAlrPT+Qz8pox8Hkrlv1Jyc2V2Df+E8PYqVRICV2w1eJV4 KHsiS+rg/Bz81A04eo4Rxef268TiBeld4dsx0L/IyRVDj7HJuLajY3ztswk5HaQPNp8sey LSNoreEtnrhDCzi1jGveEOphlhFCRzpe0mH11wbz5p1u8ITfLOYL0NVb3bDpSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096619; a=rsa-sha256; cv=none; b=cxMtrObMfUi+7Nih/Pb8NYnJizkOa8Cy3rdLp6FQy0Hb0cfSrhbUHNmSxfX96YrzUV8Y7U z6NeEsLgcfFsZzkGZMI2Sy/MveawHbSzz8MDQ3NNQC+AKqMbBNOkn45qkFh9IY/r2e+5fp w9EdB6CRXFFS+AsldewVyH1m8R23rbiD8zd1i7pgFoEe6wxzBop56EPznz+3DTIN8gUAuf RlEv7MqqQNKh5yw+ur4u7wRp/b5/vub3IIbokR8rDrV5iuq0/UH9xhY1moRRGiLNWVN6cs QNOjTpI3Lta2qyVJheF7fd2wDxJcMkM9eGNc9KdVLTsKRr9CUP+ZmFvpJDIDuA== 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=1727096619; 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=JXlCOQaTLEklqGUAGAyFaXWdCuLh3uM737eFzzzdi0U=; b=NxHy4Q3bmeeztz9mkyQ/VbJxED1F0R8LFrrTXCQ94ouS5LvcgKHZxIjeqN/IzgXmFCtROt vSl3BuOEzNk9TkULKjK2kpDKJbD8a1iQYjLBrkHKn4q7oF8g/77Z2hWLsBjWdD4Y0e7U2k 4pBEvCGpdDeek4hMGVhmigh0e0u6F1LoZjfULltrS3MWM+yWHoQTh/+xdsrNLVWXRkGydK NYHjQJwP3S2Qu3KsX9gg1O98Sp6I3uXYteshzt0gFhNyv1omUAWjOG0rXjwPCPV2u/nx/k Z8ZURZLF8qlY0Qov4PeRcXCN/xLTgqxcH7na4KBcGGwZMBq8xulQEwA+/eWiYQ== 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 4XC38W61v0zmgs; Mon, 23 Sep 2024 13:03:39 +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 48ND3dMO006838; Mon, 23 Sep 2024 13:03:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3dta006835; Mon, 23 Sep 2024 13:03:39 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:39 GMT Message-Id: <202409231303.48ND3dta006835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0eec03f113a4 - stable/14 - amd64 pmap: be more verbose around entering and leaving LA57 trampoline 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0eec03f113a4de0f9bd2aca2d4620e9d1b4c8d1f Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0eec03f113a4de0f9bd2aca2d4620e9d1b4c8d1f commit 0eec03f113a4de0f9bd2aca2d4620e9d1b4c8d1f Author: Konstantin Belousov AuthorDate: 2021-11-06 06:10:16 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:06 +0000 amd64 pmap: be more verbose around entering and leaving LA57 trampoline (cherry picked from commit 2912c2fbd44072b7372c24dd34392c01f5104497) --- sys/amd64/amd64/pmap.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index f23488a2174d..bd8be74d3022 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2247,6 +2247,10 @@ pmap_bootstrap_la57(void *arg __unused) la57_trampoline_gdt - la57_trampoline + VM_PAGE_TO_PHYS(m_code); la57_tramp = (void (*)(uint64_t))VM_PAGE_TO_PHYS(m_code); invlpg((vm_offset_t)la57_tramp); + if (bootverbose) { + printf("entering LA57 trampoline at %#lx\n", + (vm_offset_t)la57_tramp); + } la57_tramp(KPML5phys); /* @@ -2261,6 +2265,9 @@ pmap_bootstrap_la57(void *arg __unused) (struct system_segment_descriptor *)&__pcpu[0].pc_gdt[GPROC0_SEL]); ltr(GSEL(GPROC0_SEL, SEL_KPL)); + if (bootverbose) + printf("LA57 trampoline returned, CR4 %#lx\n", rcr4()); + /* * Now unmap the trampoline, and free the pages. * Clear pml5 entry used for 1:1 trampoline mapping. From nobody Mon Sep 23 13:03:40 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 4XC38Y1Bfyz52Ftx; Mon, 23 Sep 2024 13:03: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XC38Y05jlz40BY; Mon, 23 Sep 2024 13:03:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096621; 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=XzZUBwhyWgMZouywcPAcf1Vo8WvOBmngtEH4bvaMnqI=; b=wDGtWdax1fGM0QLgeHzPyKoVXhcG0PbkRxytK6uKdo2hy7Gurrrq5lpvGZkSzn7BOhYsPb ZULqek8a9GV8xONVmU8dZh+5YK2tYaCtF9S+3ion8Tz76ex6t2dRxFczoDwtK+1/8x/R9A rn5f82AKdWWJfoMqUzy8jCo8hH8e1BZ+ytv9Ur0F5/YnkdX+OwVPszlcjkX9vvFz4topWE zADRbJIR1MAq+70h1Wi8xUuC5N0GCPeEvYA3CYSpwx3yUKfyM0hzkikzGeEdkzRGTHHCpP Iv2kmiCntrjCKrq8+HR6YxErYW9NsctMyMNJcKwu0xWHsN/HkXaT/m9OlBvu4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096621; a=rsa-sha256; cv=none; b=kcfHjkJJzAynUrfqgKTtSuAXiy5zB/NAOIm6Veb19KN9HQAVubFTmQRPQEl0RN8ZgkRNt1 NEIQ8QuAtmhvTd7YqXU11LimLLcbtKH2zaISSdTwnSG7XwMSc9O4lcat3YuNcZKhgW4nsx TeLPuvylDqqNJe6M8vjPLww68Sor+IltKgsk/HN15fFExhRKjam1yJvsxETbk2DwexQGmr KDEgXXDbM/94eaDCrWEoQd+CFeRQ63X3nnALW1gTTC8oJhdrRrnQcJUkJRgr7TPFoo31A1 nUjWDorxDnT06qzHPk+OzZmHc+qDlG2P1uh4wyC9Xde+ZQv0qWk4TD340wW7aw== 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=1727096621; 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=XzZUBwhyWgMZouywcPAcf1Vo8WvOBmngtEH4bvaMnqI=; b=Npc+UMLBfqSFIlIXU9vEW92GEhRw8ZdaHLuQyI3P++kHhmEHXfxcLYpTk539B9/gHqCqIV LJ8SOgBfTHWZpCbb2fhHE0ZTe1/hHSPStnE1Q5nL+IoXzueLAISciZGA+J1aGvh4tjmBeW ZEvI+z2NgOBUhIm/MWlv9Zh16BTKlyJIG7L+5AEYskPcK2iXEDxdwDWPLuNP+du2tV0LBW NWm3iEq7/Ewmt8gMRlYAQZl8uc5hHfntKlbkDpytVhZ/t/Fr8aoV0tMmbwCItCZ6l2vh5J osC64BL8xksbx3pGpyE5H1VDnXC0/BWek1rsM56bwA0bwkeYYeQCPMF50bi8dQ== 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 4XC38X6qV4zmgt; Mon, 23 Sep 2024 13:03:40 +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 48ND3epu006895; Mon, 23 Sep 2024 13:03:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3eU3006892; Mon, 23 Sep 2024 13:03:40 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:40 GMT Message-Id: <202409231303.48ND3eU3006892@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1c341830359f - stable/14 - amd64 pmap: flush whole TLB after LA57 trampoline is installed 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1c341830359fa25f49bfaadd55328a43e86cb476 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1c341830359fa25f49bfaadd55328a43e86cb476 commit 1c341830359fa25f49bfaadd55328a43e86cb476 Author: Konstantin Belousov AuthorDate: 2021-11-06 06:11:57 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:06 +0000 amd64 pmap: flush whole TLB after LA57 trampoline is installed (cherry picked from commit 787259bfe56478b9aa0699f2516d00722b9cc309) --- sys/amd64/amd64/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index bd8be74d3022..9058fa405771 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2246,7 +2246,7 @@ pmap_bootstrap_la57(void *arg __unused) *(u_long *)(v_code + 2 + (la57_trampoline_gdt_desc - la57_trampoline)) = la57_trampoline_gdt - la57_trampoline + VM_PAGE_TO_PHYS(m_code); la57_tramp = (void (*)(uint64_t))VM_PAGE_TO_PHYS(m_code); - invlpg((vm_offset_t)la57_tramp); + pmap_invalidate_all(kernel_pmap); if (bootverbose) { printf("entering LA57 trampoline at %#lx\n", (vm_offset_t)la57_tramp); From nobody Mon Sep 23 13:03:43 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 4XC38b3h8Rz52FKW; Mon, 23 Sep 2024 13:03:43 +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 4XC38b1lQlz40NV; Mon, 23 Sep 2024 13:03:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096623; 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=9Ll8Es/HOa/sZ2qRF8WCnWeC3r5X6EHkDg/TmtoVB/I=; b=fwKCgVCBaR8IL19IL+EIebP3OA/LAY+oju6+5cAMllxk730liKySm+M5idBDBBbbt45fQr TNbcAu/MvyL+MONSdhX+6tkoT7PQdiRwy3/Rt9IGPAJ7FxCA+QfZsI4lhJswVDujWp0lkF FLx94ApN1rAWd1LWzO3VTWyFiRV+iIyJs6ua3M6hnBwftt1zjDBhQhiZYSLxUdhx3SlR+5 TMPHwVugRIzaXXSUWBdQePgJFhNlWwtUkIJ+0pd5ysMimJXBtwM3/RGYPpxbNCjcMxJGvW Lyx7YLZodgodnaEb/ko99tjNR46FAMUUKyIax4+IVGQQe5/ld+HcEzGJ+Mt9BQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096623; a=rsa-sha256; cv=none; b=hIOfQ9oboCgEwQaUnhrOd2/YkYX91cB6SoFBdqT2JaezB5PV0mgSnG8aUS+oXgOHoaiSb3 pKfagAwvq0rU1/QIg1tuuGiHc76dCwh716CavVQvVhw+OxOxTRcljtJabwrL/DJ+Vb9U6C T2u8L45QwP2LZw/oytD1OXEDXDoBjU/OoSLtiFTIwPiKsvE8TKLflkBXY9lJIBtLcSrdoh /1FyCoHar6gTATmIpdIFz7Cu6wrc/qyCNcV3ekq6dE+DCiW90idnWGkuhV6l3rMVRLe74N bcOzavdbIQUQ/Mnh2KgQa379X6Zs9vDcyaTpr1BKcyvXRee/fb0jFhqW95hQUg== 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=1727096623; 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=9Ll8Es/HOa/sZ2qRF8WCnWeC3r5X6EHkDg/TmtoVB/I=; b=ZVY48Si2j8ifEEjcq7ONLw2Yu/aqxCwTaeUFdadnB5zoNH4HrXuPoTOB9TewdMY4v+Twzf CYWYo4BkSsX1l/+NeCYfF2pB/iDYg/GyGZIh3hc60Fm+RCu5Wu1UjdesXN59vMWApPm/xk qbKf4m75zOzrAXascGbiPQHAKBBY0MJqpSn8Y05sH0I+4/3lUxm6wT5PTIOaPlRxb4l07f 8elK+Ww0Yuri6S3NZToencrdf7+AI2S4BQzbOfE9cVfSRxdyzggWXvKlj3pPJuqVEap3uB kZIIFAuWxBRIHg0Bt7KYwDWHFB009VAV78VAUjdfMNFuKap3FTCSaFXm0jLI2g== 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 4XC38b1M1jzmkM; Mon, 23 Sep 2024 13:03:43 +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 48ND3hTp007005; Mon, 23 Sep 2024 13:03:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3htw007002; Mon, 23 Sep 2024 13:03:43 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:43 GMT Message-Id: <202409231303.48ND3htw007002@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7a1723912e4f - stable/14 - amd64 la57_trampoline: stop using %rdx to remember original %cr0 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7a1723912e4fd97726c6fa55a9f86b7b4772af64 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7a1723912e4fd97726c6fa55a9f86b7b4772af64 commit 7a1723912e4fd97726c6fa55a9f86b7b4772af64 Author: Konstantin Belousov AuthorDate: 2024-09-11 00:35:43 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:06 +0000 amd64 la57_trampoline: stop using %rdx to remember original %cr0 (cherry picked from commit 9a49c98bafbea2a896f72defe7d9f2b65a474c41) --- sys/amd64/amd64/locore.S | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index a51e5047fe54..86db0f76b22b 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -93,9 +93,10 @@ ENTRY(btext) ENTRY(la57_trampoline) movq %rsp,%r11 movq %rbx,%r10 + movq %rbp,%r9 leaq la57_trampoline_end(%rip),%rsp - movq %cr0,%rdx + movq %cr0,%rbp lgdtq la57_trampoline_gdt_desc(%rip) pushq $(2<<3) @@ -109,7 +110,7 @@ ENTRY(la57_trampoline) l1: movl $(3<<3),%eax movl %eax,%ss - movl %edx,%eax + movl %ebp,%eax andl $~CR0_PG,%eax movl %eax,%cr0 @@ -118,7 +119,7 @@ l1: movl $(3<<3),%eax movl %eax,%cr4 movl %edi,%cr3 - movl %edx,%cr0 + movl %ebp,%cr0 jmp 1f 1: pushl $(1<<3) @@ -128,6 +129,7 @@ l1: movl $(3<<3),%eax l2: movq %r11,%rsp movq %r10,%rbx + movq %r9,%rbp retq .p2align 4,0 ENTRY(la57_trampoline_gdt_desc) From nobody Mon Sep 23 13:03:41 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 4XC38Z2khQz52FTy; Mon, 23 Sep 2024 13:03:42 +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 4XC38Z14bcz40SV; Mon, 23 Sep 2024 13:03:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096622; 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=7Ahnsxgnc2CMh2z/zTa6u0Oe3tveStCGdZRnJUCt3t0=; b=U60IxjlH41DGlIDkOIlnrn4vBaXbZwrwFosc70Cwhb+1CSCl4NuNxMz3df9o99/4dPVgBp zJj6qgL3mPa3JIdGahCNLEXoU+fJHaeEf9i62EhTs+f7SH5w9zy9M5/a1wEfTShZ1lLQkA KfHUGpmTB0pVz9keCUog0lJD3M9hFyLA5zQfLtlUqlU3ssYzzff9NyNk47bYVMfo51bYk4 dtFeLVa5b0wffSjg4XTnfQr+GNsPqhrVODK3nNVoSB+kHx+JwzhRzafsCtYYF0tMuHhNoe tTgKbdGh17qcJgFU6EyF5SiVhnK9fW5Qc0r/wKGxQb2V3QqC7J8xqUUvtSRdYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096622; a=rsa-sha256; cv=none; b=uzbMe+9kCIqcyA7Ue2lU0TFCRqdqvWgUMEG5xhttWFIJ2wGRzBiiyDdzmvbjMGl9RTdami 40gwjYCDfSfTDlB46KQsqaEIfbEdZlZPrnLcyKP1KowDmXbVcnPnrK9uUxeghqOkvDSrDg 6nBWRCrvBRbFtjnrgPpLc28zzTUNmI+oEIyonLg+OWmYJpqt4uUePiz5uDB9+im41q8RU8 DthT9ah/Ad0YPXGDxmrwkjeQttvGsMaZLSMvnujWEF5PfcUn0a8b1FMfmLnvv/JRH/wIt0 8vVfWPOoEFFIKj4iMaEM66E7fzYA5hIqogv2iWEY8m21UGqjhtNhGKDktUr23A== 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=1727096622; 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=7Ahnsxgnc2CMh2z/zTa6u0Oe3tveStCGdZRnJUCt3t0=; b=RdLQclhOh0g9PnOLkIHRcFRIyUVR6kDB9IkvbXycKxIua4xGW+iIp6E/Fm/yMKBEqlUG6i 5ynEjoH23ENYKPrwfWDrAFvkSmeVD/34amCr2zI9RQuPnVKTRdSjpJrQZUKd/BKP9/biJv OEDt5mjPaOtxv/yonEc1fcpbYLwHOBeKOUdaHsarQ1sEMrIfM29HJK2Krn8NsKwaoePzMK Zk9HcFwTxkc1YKwoKdHtt5AO7n4PP6xYc/zyGPjxdqy2UM4xeRHOjesvZrqMLChwPRQBTw zWjPmSDZZuxQp62VYO5vdpuGSeQmrtftoq87xVvvT05+xZRza/SDM8v+1FTSQg== 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 4XC38Z0h6TzldK; Mon, 23 Sep 2024 13:03:42 +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 48ND3ffk006949; Mon, 23 Sep 2024 13:03:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3fIG006946; Mon, 23 Sep 2024 13:03:41 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:41 GMT Message-Id: <202409231303.48ND3fIG006946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8179f2a7753d - stable/14 - amd64 la57_trampoline: jump immediately after re-enabling paging 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8179f2a7753d51767d7dcaae53f8ba0d1dcdf8db Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8179f2a7753d51767d7dcaae53f8ba0d1dcdf8db commit 8179f2a7753d51767d7dcaae53f8ba0d1dcdf8db Author: Konstantin Belousov AuthorDate: 2022-09-17 01:35:20 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:06 +0000 amd64 la57_trampoline: jump immediately after re-enabling paging (cherry picked from commit 180c8ab079950acb15c6629ce293055ea0117b39) --- sys/amd64/amd64/locore.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index e52d36125afd..a51e5047fe54 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -119,8 +119,9 @@ l1: movl $(3<<3),%eax movl %edi,%cr3 movl %edx,%cr0 + jmp 1f - pushl $(1<<3) +1: pushl $(1<<3) pushl %ebx lretl .code64 From nobody Mon Sep 23 13:03:44 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 4XC38c5Kc8z52Fv1; Mon, 23 Sep 2024 13:03:44 +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 4XC38c2kxgz40CK; Mon, 23 Sep 2024 13:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096624; 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=lcjBsMcpiKbHcUYi+lLtj+DTz6w0FMv5gokel8hrdCM=; b=DUdsaslcUAJxkq+q8YXK/+cd374k2KyC0ypY3CFRPjTmVpzxlcvDdkBlhF4O7kOHG+javv bLSeqxBN8v1FT8ke/ZHnjCPLqagdfWvm3LA4cHPhOeV24C6wXvXNg3eQzrsMwduZJycBTO 5Ze6dTpCBZVKE+ifqFzfgFEWH2FytS31bylXC48n9RH/jKODVOCran9JkazXeunq/XoncZ oo6lwVOGkkDpAyZXEfQVIJZsG4mLFjE4pJY5U4E6UTsq4vlOa4pb13yMTDncMFHM9p4zlD G/ib6dIzTk8UNgTMEhVwKr9uOOGq7ihXwG2IzeWDU4rVQ2tLjDpph+zcbawcfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096624; a=rsa-sha256; cv=none; b=u2yERjNYxkxoG0ujyKHqzeHKlMNVnN9zJvDLplZE3MP78OkhqqEzBNbtOqMQq7XIop4tNH m2jDonJmQ1lfkLLfNZCnfuqfkM5Bcl9I9Pb07QQUFmIktNU2MGwTvx4aRJLzZtOHTcxbok poLE8w9NxiWwVyeZ+gavXOwB9441VTbfYMmdrbfBMxWjTksXSHG1uLI+Lhf66M4mEiAshp 7Ko+mITYRbYwb7qkOhwaNt8luNJyniCN49mhDWnzbUoBgWlNOMoC7oRrc0AR787amyf8Cd 8COtMkOzZZKNeg07X+E7dHnew4sGJBChY30PTAXMSkFCdjPb/ypmiqaRIA2ujg== 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=1727096624; 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=lcjBsMcpiKbHcUYi+lLtj+DTz6w0FMv5gokel8hrdCM=; b=PGpnSJQs+4UokXWcX6o4+K/KkvKOEXu7PlcLby4YMpLgCuuaYKOMOwKwYxXsWrST1tCakU 7pqrzycUx7IlTqgRbcb6kme2ul/4MBFdj36Z7gZeF+lunpAze6erIFlCHwwe7aOgrvW4Su d7sAe2mBY1wf+XsO91XsFL+3yrlkW9Zhxjh69GSpqzvp1N4YQksN8qMPVdCEs58CeiKLaj VWuSnbdJtfaull2kQdLEPLY4bBC98c/hLxJY51XBwWrsLPKuJwHbx5Uwea3gVrsMqV9j/w 4EqGlusHZSAHsL9fKTb/xS3RR3ZOD7sIOloUdOQucvljp+dzoIX4QrgHZs9AIg== 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 4XC38c2MSGzmJv; Mon, 23 Sep 2024 13:03:44 +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 48ND3i5b007053; Mon, 23 Sep 2024 13:03:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3iPG007050; Mon, 23 Sep 2024 13:03:44 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:44 GMT Message-Id: <202409231303.48ND3iPG007050@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3f79c8c46f24 - stable/14 - amd64 la57_trampoline: disable EFER.LME around setting CR4.LA57 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3f79c8c46f24f2b87569444a034e1aa08ead2dbd Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3f79c8c46f24f2b87569444a034e1aa08ead2dbd commit 3f79c8c46f24f2b87569444a034e1aa08ead2dbd Author: Konstantin Belousov AuthorDate: 2024-09-11 00:39:30 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:06 +0000 amd64 la57_trampoline: disable EFER.LME around setting CR4.LA57 (cherry picked from commit b7ea2b69ef666ee8cdc6dcc814d610df0a7f0999) --- sys/amd64/amd64/locore.S | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index 86db0f76b22b..9a991402cdc2 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -114,11 +114,21 @@ l1: movl $(3<<3),%eax andl $~CR0_PG,%eax movl %eax,%cr0 + movl $MSR_EFER,%ecx + rdmsr + andl $~EFER_LME,%eax + wrmsr + movl %cr4,%eax orl $CR4_LA57,%eax movl %eax,%cr4 movl %edi,%cr3 + + rdmsr + orl $EFER_LME,%eax + wrmsr + movl %ebp,%cr0 jmp 1f From nobody Mon Sep 23 13:03:46 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 4XC38f6VvJz52Fcb; Mon, 23 Sep 2024 13:03:46 +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 4XC38f51wmz40RJ; Mon, 23 Sep 2024 13:03:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096626; 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=MbhqiOFpgFT4p4kn9lLrJ9JbGFY3mF6KHhcJRmyubM8=; b=wjj+o1Ypacmz/dk3DcP2Qucm7J/8GXeSEjdNdwrIp0Ysu5GUqzyp7cZD8p3ckOXN6jeRWZ /jkIrurqiKEkghmRgiWb6uyMmufYqvL2U0dWpknCas5FO+9mkWvZj/lCt8c+0eOErqwrCf XCCH/XUI9tEK6ocqqJoRpx/52m+KWSRi5uJi5EFjuc2qXK4TLyUDcpmkZtkdrZZmPdT4X3 gNrqnf0VekMZkBzYMjnKtWIoHyV28Bg0kgmaJj5WK5tK7g8TKfRW7q4ijKFIh5gWdu7yB9 qXQjHOHTdkCwEfm+TAM/siAvKPQ540HbfQoKtYUKlt/mReu7HbTbyq6Bd9BuOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096626; a=rsa-sha256; cv=none; b=CM0GbOqgBxnto0br7libom+LSFSlcoxH/BoqKKaCY0YAwmcIYZEksxRXVmIw9VMWXWoM79 NN0CJOT/aXeVpUjN1iRrKYP5uz2GeaYEl43wquQwsNYbpyjok6tlW5KpvlVKMR3vPdg+bD QcNjW/PAkMY5WdqvyR6tIoa0Q97F/vy9DKcMMg3cRaBUUgpRIoAt+ZEYOI0VC6e8QnZsEz CKugs95JictfzyxslvKlDV+n3rd38pPufMeTBDk1ylzPDbaRSC8rNjVlhuAADGA6Dk2o8J qS1GJM07yaQ4n44HHDpciFe9G506kB0VaLnGzAhHoPdTbpfHx/iIiXDa27RRBw== 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=1727096626; 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=MbhqiOFpgFT4p4kn9lLrJ9JbGFY3mF6KHhcJRmyubM8=; b=TBId2YJxLh2njFeO9K1A6IsP7/5dLqsHNs/iww2DUWLFHDKHjva2EOa7Zz32FuIgkBJ41V rf9sYLFoLocINkoiSshAL31U76MSqMxqLtf8HqotaQlyTV031v2r7Oeq7+AkXTCraO3fXn xCLo88URc3ZIMnpaVTkX+YXClfA+I3THlfbheQZsMALsjmIEp1tvySl6q9eQaSR5GZz3O5 WyyYozupGqziHqoVFseXUKexUnQTU7KtziZ1ZhTbTAX8Evdp44QWp/TjpVdF/i2fM6Cwah dtkQ3rZG1VdMvM0vQN1oVkf7CDIadOGdi45quFP8mtLv5AQhME6ZcYoSw1pCRQ== 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 4XC38f4X1gzmJw; Mon, 23 Sep 2024 13:03:46 +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 48ND3kE3007176; Mon, 23 Sep 2024 13:03:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3kq4007174; Mon, 23 Sep 2024 13:03:46 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:46 GMT Message-Id: <202409231303.48ND3kq4007174@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 371dcd4c3554 - stable/14 - amd64 la57_trampoline: lgdt descriptor is always 10 bytes in long mode 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 371dcd4c355481860e21f4bfa7f62a12ce1986ec Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=371dcd4c355481860e21f4bfa7f62a12ce1986ec commit 371dcd4c355481860e21f4bfa7f62a12ce1986ec Author: Konstantin Belousov AuthorDate: 2024-09-12 03:33:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:06 +0000 amd64 la57_trampoline: lgdt descriptor is always 10 bytes in long mode (cherry picked from commit 687b896f8ea58e67c3a0bfbd3af3041733e57dcf) --- sys/amd64/amd64/locore.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index d05f38dbba05..3df3dd722f45 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -151,7 +151,7 @@ l2: movq %r11,%rsp .p2align 4,0 ENTRY(la57_trampoline_gdt_desc) .word la57_trampoline_end - la57_trampoline_gdt - .long 0 /* filled by pmap_bootstrap_la57 */ + .long 0, 0 /* filled by pmap_bootstrap_la57 */ .p2align 4,0 ENTRY(la57_trampoline_gdt) .long 0x00000000 /* null desc */ From nobody Mon Sep 23 13:03:45 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 4XC38d70Gpz52FcZ; Mon, 23 Sep 2024 13:03:45 +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 4XC38d3khzz40Lm; Mon, 23 Sep 2024 13:03:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096625; 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=2zLbkji5V14cWSoteJVvH4wPP7QYewXLWMMEUygqyos=; b=bnSMEeevn/LlOpfcQgxKH/I5RGx7KyQ2KKMwUms4hU1Qu8LkYU/oPQxmWK9XtBvVKuf/1J Fh69ame7LBEpTFdoB8l5SalslaC4NrKREhODq7Y8MjBJ1JJSm/nsYUDpzeDvjx2c8Ip4xX n3y7DSTWJCsWglhVVgByesTtYlAAnX4RxLR+no9iLQdjkyzn0t/Tyr3T95nZZQuVbDpk7Y 98Cxw42iMcIAgLvn17qjkYpalhdsu5WTzCSY6rAE43eDgve6nqhY0ClV+SG/vfw/4nus4M P1C66XPI1KNliQaovvn9fq0V1XgPaCfB5qnn770V+EF+/ehEyz8AHkiOinZCIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096625; a=rsa-sha256; cv=none; b=UeNvnDktrj7vNcIX6kQ3DUQ4LdiDf1ZE8ZSgHe1h0SG3KcH5LZMoyg1HEq5Y+C4/qjuVB6 XmjrnEbhRFpl0iU+ABhvSbBmEwNfyzMbZwWlaVRNyMioABCjzXHS7Wwv8sEtfempd2BhEQ RHTFrHh4C6DDOhTME1RmB528MtAZRi/VM4niqPpPWybrHTHhho8CocamrIOZep450ggLkH SNYD8Pub18aO8psafRLG0OKFLAxNESnV/r91Bh/R1JhAN5hkioCTKNqzakhJIW2+nRNNvO FTYTKFrMMTFxGB7Rpd868TMNRM2p7VFFoIbkn9sFKyJhpJV9g78obD15JS/T2Q== 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=1727096625; 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=2zLbkji5V14cWSoteJVvH4wPP7QYewXLWMMEUygqyos=; b=n5/3pY0/4pBoAn5FY4lh0GdTUmssh2avZ6m4NWilvrHQW7pERQIXTYanqaSzvBW6S343xy KWi76VOl3MGgirkUdzsE9zDLyicCz5cQte0+8Eazg0pboTL6Tfww+I06d5GL1aYEh5/a9m VDWTFxMb+hLNj+tPOyTLcnMCcMq+uBP3/Gj7h2YmWt0C2swhqZ+EDjMbiSpgxeqM05NoGF KMW8yqL12r73Of5SfFSZvE+iba7dpR9latK3/SbhzDhtLJZRcPjeEaPpAkRkX5BmNzNjLO 72cx3fLdJkd/HI2agHCHvtL0w48GI/sWTGraLa2toVyIpOPCNyfjDDViK1IguA== 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 4XC38d36vNzmCy; Mon, 23 Sep 2024 13:03:45 +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 48ND3jrW007116; Mon, 23 Sep 2024 13:03:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3jne007113; Mon, 23 Sep 2024 13:03:45 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:45 GMT Message-Id: <202409231303.48ND3jne007113@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: cdcaf2e07354 - stable/14 - amd64 la57_trampoline: turn off global pages and PCID before turning off paging 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cdcaf2e07354ca74539aecb5f23f0ed35b3c7260 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cdcaf2e07354ca74539aecb5f23f0ed35b3c7260 commit cdcaf2e07354ca74539aecb5f23f0ed35b3c7260 Author: Konstantin Belousov AuthorDate: 2024-09-12 02:42:23 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:06 +0000 amd64 la57_trampoline: turn off global pages and PCID before turning off paging (cherry picked from commit 1be58e67eb24024bc808357771579d396679ecb0) --- sys/amd64/amd64/locore.S | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index 9a991402cdc2..d05f38dbba05 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -94,6 +94,8 @@ ENTRY(la57_trampoline) movq %rsp,%r11 movq %rbx,%r10 movq %rbp,%r9 + movq %cr4,%r8 + orl $CR4_LA57,%r8d leaq la57_trampoline_end(%rip),%rsp movq %cr0,%rbp @@ -110,6 +112,10 @@ ENTRY(la57_trampoline) l1: movl $(3<<3),%eax movl %eax,%ss + movl %cr4,%eax + andl $~(CR4_PGE | CR4_PCIDE),%eax + movl %eax,%cr4 + movl %ebp,%eax andl $~CR0_PG,%eax movl %eax,%cr0 @@ -140,6 +146,7 @@ l1: movl $(3<<3),%eax l2: movq %r11,%rsp movq %r10,%rbx movq %r9,%rbp + movq %r8,%cr4 retq .p2align 4,0 ENTRY(la57_trampoline_gdt_desc) From nobody Mon Sep 23 13:03:47 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 4XC38h2kdHz52Fsd; Mon, 23 Sep 2024 13:03:48 +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 4XC38g6Tfgz40XF; Mon, 23 Sep 2024 13:03:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096627; 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=9IDWK11m326kUBPhUSDnHAb15nZkqO13VaFCYOhFfYY=; b=u7v2+yXdelAfG3DU5/1832r1piVS6appY67lsE5AhUbNhxxGeThWNbx0GZ3RbkVccNdrbg j4HyYYaLFnO2Tojpj/FrbL54sLYpyo9WZ6ggE6XPzF/EuQdSI0EUukUrH/499zvIOigTr+ N4YgykBVgeVA7lRsvzqsLcoitB8njq/TYI3V1vUonpuW2vkD73YhjB1H2rt47p1w43JQD+ UzoNfKufZEFUYFvb72GAEybhRUJsMcmz0sfbzpKksgJc000tBsqzW7nCS3bJdb6Vyo5cF6 b+l/tWpzibajDcQNEcKArH8+W1r2IlwaEjDSQALozAU1m9EhmNMjL9QukCJ68A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096627; a=rsa-sha256; cv=none; b=xx4tuDEFxe1vFg86l1zEknyx3Kpuup2KHL2WGvPyt8MI3ob/6S78aN/l/QCHHOEiSEpPQc npBbCkph02CS97saYSYuhclvTkTHeO++u487wIRrKqHIhjul5ugFcYrR68pn2iATWsXUCo nScb1+1FoNqgnvBSIJ+AslIlG9rXBYLwtA/5w6IYLlvyX2kUDf6fI6djIV3Dhp7yN1VqNo fWiTY5g0tGN5SNjLE1OH3kH+VfPQQrnIWyhcoUVJ8f4TUUDE36Uxm+5CdMSX7OOcFy/RjG Qmc1EI7vqCr2NW0NbhwEvu5sT5WFc3JHdo9yJEvZ0RLGPXRWJUV8QueQPBux6Q== 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=1727096627; 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=9IDWK11m326kUBPhUSDnHAb15nZkqO13VaFCYOhFfYY=; b=sMkWPo0fhnbasIofF2MOHkenEtEiPkbTeH+DwzbV0nJUBTIvK3tinyy44Mm1WYO76z8Ye1 Ogp8e6a0R6xO93rkhV7M9x/e3cBCs1m0evYtSGOzagsbZzDHUWKD/j4ERdbDY6ajQNNE/a fGQv981m4eqhr+74MmCwFyhRAe5oAFsyyboW2+oUqHjoWiMeKbTsDIBv5my+V074uzvZAg OkeL+Xr0F6WLwLa/tMGi9H2rUsnGpk5rTLMwsDm9D4N6g6GhR/cQdh1NFfren6LYChGjZg p7zhBfrzLwZzmklU9cvgRAMfOG8/00kh/Q9YuJjpm/ldobng047qxhQ4GHpj/Q== 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 4XC38g5J1gzmD0; Mon, 23 Sep 2024 13:03:47 +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 48ND3lbk007223; Mon, 23 Sep 2024 13:03:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3lD0007220; Mon, 23 Sep 2024 13:03:47 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:47 GMT Message-Id: <202409231303.48ND3lD0007220@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2e6e9d154100 - stable/14 - amd64 la57_trampoline: save registers in memory 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2e6e9d154100f7bede90f2041cb3a897871f0766 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2e6e9d154100f7bede90f2041cb3a897871f0766 commit 2e6e9d154100f7bede90f2041cb3a897871f0766 Author: Konstantin Belousov AuthorDate: 2024-09-12 05:43:44 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:07 +0000 amd64 la57_trampoline: save registers in memory (cherry picked from commit 280e50461a1f638088e7a0b9116976821c374b56) --- sys/amd64/amd64/locore.S | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S index 3df3dd722f45..1ed9085e655c 100644 --- a/sys/amd64/amd64/locore.S +++ b/sys/amd64/amd64/locore.S @@ -91,11 +91,12 @@ ENTRY(btext) /* la57_trampoline(%rdi pml5) */ ENTRY(la57_trampoline) - movq %rsp,%r11 - movq %rbx,%r10 - movq %rbp,%r9 - movq %cr4,%r8 - orl $CR4_LA57,%r8d + movq %rsp,lst(%rip) + movq %rbx,lst+8(%rip) + movq %rbp,lst+0x10(%rip) + movq %cr4,%rax + orq $CR4_LA57,%rax + movq %rax,lst+0x18(%rip) leaq la57_trampoline_end(%rip),%rsp movq %cr0,%rbp @@ -143,12 +144,14 @@ l1: movl $(3<<3),%eax lretl .code64 -l2: movq %r11,%rsp - movq %r10,%rbx - movq %r9,%rbp - movq %r8,%cr4 +l2: movq lst(%rip),%rsp + movq lst+8(%rip),%rbx + movq lst+0x10(%rip),%rbp + movq lst+0x18(%rip),%rax + movq %rax,%cr4 retq .p2align 4,0 +lst: .quad 0,0,0,0 ENTRY(la57_trampoline_gdt_desc) .word la57_trampoline_end - la57_trampoline_gdt .long 0, 0 /* filled by pmap_bootstrap_la57 */ From nobody Mon Sep 23 13:03:48 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 4XC38j4RZ0z52Fgm; Mon, 23 Sep 2024 13:03:49 +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 4XC38j1PJTz40VM; Mon, 23 Sep 2024 13:03:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096629; 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=QZAJgOEE0Ec77eEmnPHUwoaXPGg2ztngfp+zR8+rVI0=; b=uR7jo/wjGIiXEF3RMaroSZz371MUd9yLOwkqktqdpKPIMPst8d2NIbnE4S0/5SAPsFgPNq OyVwk678gG1BQ/zJX2vGKIFe2pL36mlQhUO+Xw8ZbitOzsaE/o8pZ3o+MeqaVQp3/JZbzY 9E6RDCxeoOU3cPkCUKHMi9XTYpJEcBF76yuYUdwl8XguaRRj13n2jSeLE9lEblgqin/EQO dakGIxyd2VSbPTbmp+tkttQUnTTF1hjqJP05HbOVKsjJvwwUJ6wWqzTxyxeJWRcHG9L9OF 4ESx/rVZzhPtoc21SbKDIMxj+msvAJGQN9MHqvvp5HHQtff1CiI6NuOfEMRxbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096629; a=rsa-sha256; cv=none; b=T3p97NGY2C9VEphB6ZtWOn4i15sd1SCZVnXpi9xywl3Cc04Fl8FKcmeS3ca8AKbBZRrt5B QCEfuRxMzBwE8y9azCu/ZEhcBaFq5PwJdT4p/iW+LD7SSXD4rMqJh1O8G18xCu7HZK+Ep6 yoro8iPQQhEAip/f+VM4betSZfxcly1m3JfDTLoNRU3h+dJ0gosoMTXSeVF+qC+A89VWsH ulnPonH0C8qfah+ViQpzpGtPYygpDUTR/40A8PBiwl17wpwT6eMqTa7MQydt9CBYhmUmfw P/LZFg7SKHQQ2N0IjrLa42m3hOA5ORNa/iGCSnLIVBsO9iZtkoex5XHy1f/zbg== 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=1727096629; 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=QZAJgOEE0Ec77eEmnPHUwoaXPGg2ztngfp+zR8+rVI0=; b=P67nvHb0XvZ/gNRD0lXU70iYnLM7XDIJ+ub8fr93FrIemFCxepi/awvNNpJmqY4VC/ewu+ S9W6CzyI0+Kc+ZKVpSxo4EbxIFa8fKwL23oBbiW95YRTfxz76L7EozNu612wi4ZPp94QzX tOm9ZEM5eca+jmpsDoDH+Gv84OFjsaKlNjrCpdBnkWA9xnD/UknRd26240djPKVtfVxkp3 fhAMN417HQv98BSeibCLj0VHwNVzVR4QZylt25NiYtgqo6TJ5N0ikPOcXJiuZ9dsNNCzZT Sur85S1VjFgJ2Mlq89akZJst/wUrBKTDJy+TSdmsNV4btCYK8EPN1SMfTIhErw== 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 4XC38h6HyfzmVX; Mon, 23 Sep 2024 13:03:48 +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 48ND3mJa007293; Mon, 23 Sep 2024 13:03:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3m6B007290; Mon, 23 Sep 2024 13:03:48 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:48 GMT Message-Id: <202409231303.48ND3m6B007290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e6fa60a77bfb - stable/14 - la57: do not set global bit for PML5 entry 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e6fa60a77bfb8d43feb53bd5f6d7153332f91ad2 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e6fa60a77bfb8d43feb53bd5f6d7153332f91ad2 commit e6fa60a77bfb8d43feb53bd5f6d7153332f91ad2 Author: Konstantin Belousov AuthorDate: 2024-09-14 17:15:51 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:07 +0000 la57: do not set global bit for PML5 entry (cherry picked from commit 678bc2281c3727e920604545240d9115de3d1bd3) --- sys/amd64/amd64/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 9058fa405771..0db1af00874c 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2227,7 +2227,7 @@ pmap_bootstrap_la57(void *arg __unused) * entering all existing kernel mappings into level 5 table. */ v_pml5[pmap_pml5e_index(UPT_MAX_ADDRESS)] = KPML4phys | X86_PG_V | - X86_PG_RW | X86_PG_A | X86_PG_M | pg_g; + X86_PG_RW | X86_PG_A | X86_PG_M; /* * Add pml5 entry for 1:1 trampoline mapping after LA57 is turned on. From nobody Mon Sep 23 13:03:49 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 4XC38k1WBZz52G0m; Mon, 23 Sep 2024 13:03:50 +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 4XC38k0jRBz40Z0; Mon, 23 Sep 2024 13:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096630; 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=Ihcb+P2aTIcyaziy97tuCDhu4/aCGR12Vynmqi6twys=; b=h75JRocyy64Wo/HI7uIWg/VisXOjUOkEyLNCwYWIYQv7c+KbyOHJ+xnKjw/hAlPe4H+jDv JJqF7MEmB7oAbN3SE70IZ3QTseqKAi0fgKGlWsbK7qQd/mjKI2gHQ3mblhGeVkVRmEpRkB CQ7LTX/UPIXMo/OUDr3oRctJZDcROpx3d3BSuPxIUGyc80guTuSCVuZaLwKBc4gLwvwGAv V7vG5aaCOh0Pfp2FM7bft7MU+5kjTMhikLhINxIwqRIw7TC3ixTDcM/KaT0IKzrjrkZnhk cyDYpS54xyjXHBtTU4RFBAWGRfusEuu2BvubbF677GzNhl5lzfEnnHQ9VI4s7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096630; a=rsa-sha256; cv=none; b=TZqNt6oIGnWuOcrZDjTDg+fB6b6YEMmeKyXRrcYA03Gy0CIYc1G/gqPHyV/yADUpIhYFk/ inL7PTk8QU4pbOdneQD2lHP11o3Ls29jZHKQyN342aG41YWow5QCP0n6MT57eHIZVyNudX FL3jQ+1DCGefVndpwK+IESgVbIqae1NpSqb8IGuFDLbDgOFp6sZHsjjjHLGuLJuJvH5Wu6 Lz5OjUv+eVrRTL/pr4uAONvIDTTiXatVBMCYdBfY946tPOUmM3qDuAe+8TpCO+wcnRod7f /yGnKRIvdvbpuLTNSqemJGGMBMGNavBLcshCqJpKF2PQPsyHTTh20+8evCsgsA== 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=1727096630; 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=Ihcb+P2aTIcyaziy97tuCDhu4/aCGR12Vynmqi6twys=; b=ugznFP2YO7XwdDwY6d3f2RnipwjkVdXvSBl8GRaTZ3zrpv1Z1j+sqpiXAP1FilgccxKzQK XMijNh3f2eHUH7bemCXT6kToB7ukHzkchPiQ+b7lHCA3ZSz7XH4aeTfONIgOZ2e8IP7nZI uM9THPxFnb7+C7Ptj5doZXrVjBhyGJVwopS5qO032nVJRvhLMzft2EG5+WWDLMkKjXUaQA zfe3B4NKQWVCcBoLuXKNPVuQ8j+sQtz3AHdBLWKTAfFNEgFDUENLtsk+9W2Z5fBIhaHuJ2 IIo3E1VXZXePDZnQvj2HOjeOCToIVKayYhHBJorQyhp3gh1Cp6WVsHMnxieFgA== 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 4XC38k0KPYzmVY; Mon, 23 Sep 2024 13:03:50 +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 48ND3nlt007329; Mon, 23 Sep 2024 13:03:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3nZe007326; Mon, 23 Sep 2024 13:03:49 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:49 GMT Message-Id: <202409231303.48ND3nZe007326@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ad6b949da57e - stable/14 - pmap_bootstrap_la57(): reload IDT 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ad6b949da57ea6a34a4aaaf721fe36fad053d14a Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ad6b949da57ea6a34a4aaaf721fe36fad053d14a commit ad6b949da57ea6a34a4aaaf721fe36fad053d14a Author: Konstantin Belousov AuthorDate: 2024-09-16 16:36:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:07 +0000 pmap_bootstrap_la57(): reload IDT (cherry picked from commit bbb00b1719f11c58efd5375aebc30ccd13bf0906) --- sys/amd64/amd64/pmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 0db1af00874c..72929f98a0cb 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2264,6 +2264,7 @@ pmap_bootstrap_la57(void *arg __unused) ssdtosyssd(&gdt_segs[GPROC0_SEL], (struct system_segment_descriptor *)&__pcpu[0].pc_gdt[GPROC0_SEL]); ltr(GSEL(GPROC0_SEL, SEL_KPL)); + lidt(&r_idt); if (bootverbose) printf("LA57 trampoline returned, CR4 %#lx\n", rcr4()); From nobody Mon Sep 23 13:03:51 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 4XC38l3vhtz52G0q; Mon, 23 Sep 2024 13:03:51 +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 4XC38l23Qkz40jB; Mon, 23 Sep 2024 13:03:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096631; 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=R8LNFc64yD+4djFQbruhJobRitlle2ZZXsZfoDAdYt0=; b=CRcupks6M1LM05y6N9PvGxOAH3nvQ7thy6tZcGIkWYrLRlVHtzCqrC9uVTP6XSFjzbfaV9 jSlbqE7FYjQXBBq435CRdjXhT3sWW3YSUeuCNR4FfgqiDyQGqkUDiS06RzLQ/iROjT3nJe eN+/QPsOHuLJiIhmspTuSE/Zf83+0xFRwhedN4+mICJ1HmBb0rP7FT9HLumyI3XtnwO10N zCncj24ito6jV19OnrDZOJCJoGtyabclwFkoUspXCQFeLpAxDB+F/tGkvlJhC6kS+zLj+k WYXmiZ3rJ3VlZBqNfi6ETwp+XdWa40Frl7yB3aHnfLWOqdxdi8ZcwYQHddU9Rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096631; a=rsa-sha256; cv=none; b=KtiF5f1sxUFKZ7ann7RrPpkR5hh7MuDeBiIJXPnVe9FyRcKBW9uRnxGH++3MhFKgHc/TC0 zipkUEGF0wJdO4pON45AahUkU+/zvPVbiq6odHAZIqNILeOxGYL2XHQHqtCN56y/VBCWCu JwtDee86vKHEasxM4DvCzD5u5mSF5kHzyc69q5mwBHzrhGMRYBHaA1lIr6BBlpAGQMnTCF ND1FYTwaPJLdo6xT/3lwxvS0jHHp5AZ5OMfq1gSiDsu5/xve5jrr5HYXHbjoS6rCtodjsy LABZKB+c/W/PUmrVWwhK0xetVLTFUZbnH300bTXhJBYjwfCbagLSpcpxEklIfQ== 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=1727096631; 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=R8LNFc64yD+4djFQbruhJobRitlle2ZZXsZfoDAdYt0=; b=TfvLvrEMwet5BtcP++E0HpOa2BuXIoISt7L8gaOWcOXxjZs4yqPbRf6AEslo3U+8TJJyZn xBBrPrpTgqZAofoWnUsiMMM5tE+GQPu2THHql6whn5o9jrXtHyVywNtwuPRAqs8dRc3wYl l8LIpJb/+KMgDPNEZDZ4ibXDOFWn+kJnlkXhG3umYo4UtpAMJ6/g4E8JEfW0qFLqZJszTB wRDe+2WHTvzkrRetlkHbAebh1T4oXBWeKhP02MO1cuthbPhXe23iD9IlxO2XPJ+3MRlz81 irxZwME5LD1RDAPBaZkQs/E5CNc1LKYEY69Lar1GB2cYNi1s4cvPBBbFaEbgrg== 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 4XC38l1f19zmf2; Mon, 23 Sep 2024 13:03:51 +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 48ND3p2v007395; Mon, 23 Sep 2024 13:03:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3p0r007392; Mon, 23 Sep 2024 13:03:51 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:51 GMT Message-Id: <202409231303.48ND3p0r007392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6a0a7c6a052e - stable/14 - amd64 pmap: do not set PG_G for usermode pmap pml5 kernel entry 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6a0a7c6a052e662bad2ae40dc166c0ad6c58d019 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6a0a7c6a052e662bad2ae40dc166c0ad6c58d019 commit 6a0a7c6a052e662bad2ae40dc166c0ad6c58d019 Author: Konstantin Belousov AuthorDate: 2024-09-16 17:57:23 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:07 +0000 amd64 pmap: do not set PG_G for usermode pmap pml5 kernel entry (cherry picked from commit 4f82af24f1113a7df224daded227d4e9de582c0b) --- sys/amd64/amd64/pmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 72929f98a0cb..567382f9924f 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4371,7 +4371,7 @@ pmap_pinit_pml5(vm_page_t pml5pg) * entering all existing kernel mappings into level 5 table. */ pm_pml5[pmap_pml5e_index(UPT_MAX_ADDRESS)] = KPML4phys | X86_PG_V | - X86_PG_RW | X86_PG_A | X86_PG_M | pg_g | + X86_PG_RW | X86_PG_A | X86_PG_M | pmap_cache_bits(kernel_pmap, VM_MEMATTR_DEFAULT, FALSE); /* @@ -4408,7 +4408,7 @@ pmap_pinit_pml5_pti(vm_page_t pml5pgu) */ pm_pml5u[pmap_pml5e_index(UPT_MAX_ADDRESS)] = pmap_kextract((vm_offset_t)pti_pml4) | - X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M | pg_g | + X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M | pmap_cache_bits(kernel_pmap, VM_MEMATTR_DEFAULT, FALSE); } From nobody Mon Sep 23 13:03:52 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 4XC38m5wyMz52Fgq; Mon, 23 Sep 2024 13:03:52 +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 4XC38m3C0vz40jK; Mon, 23 Sep 2024 13:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096632; 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=xxQ5GJjv76ZDI9LTjbCqIilyLPQll5jsHUydGc+LvLI=; b=RH/bH1jY69yfomYXKBnM5pfbNOWn2ZEPVksmCazlSu2NJv0EeQErLv2MEbYbZN1evWNm/D L0eChhPKpWLM+CRQH4qbUZgLS4GOUudoz9LEJEGDrDPva1eSPI5MbOkaF5ru3H41GyMty3 d7DVp7huuv4NVZ5gPr+qoOzlZeroBaq1858kNEAKJK16yvzBM9RVvsdVnMZFKIeOlyiZsD wZgtYvJ/6FBtkVRHWSkg0IX4BjMkwezSJxMOUrbe+ut250X+3Zibx7uNQR7LUgMhvMOn9s Xc2GUvHPqMW1fJa6ql4zzS+GGBMQrQP94BDvz6XGwZkF06KqmoMAUsfo4zGpIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096632; a=rsa-sha256; cv=none; b=DdEGk+GiwxKfK2w3dGU23xV75EC8/MQ1xubPvSbGF9rIVyIUHIxdBNe7IQrDiVaZd5uHb3 lI/TGfUvhszxYBB9Db4ls333OA2Ky607K4ngn7LTqpQCYhTFKGPJmNRJ15gZoRyD/LwMz+ xESE73XJgxCxHcDyWsFmAaNi+6N+nuK4ga7WDjI0yuX26wcxxL9NZTYTE/stAdQkKJSznI HdjtKz0ORolbfPWme8i42RRdZVw915CX90tDpjm85H+85QpEGqx7vr0CRevvpTx4yaFFlM ksO3cmNbp2niitEjyNcGsWKgosodLYB7KeQWjWlzAoY1zYSZgLwCOE1Xzhb1yA== 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=1727096632; 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=xxQ5GJjv76ZDI9LTjbCqIilyLPQll5jsHUydGc+LvLI=; b=NCI18H3fT9uq5+S/Sv405UVH2G4MuPIRxYpmtU3ftm8DrEGkYSZ/nUKVL4DcuPTWvZhaKo QG4hEsT0QrRVRr0EP9bZAFfiDI2xRgEVwC+7vZu+MAxdpyWDv4252TvUYZZ/Kuu4Ra5fYS Hx/RU3l+Pzt0gQ9Yq97mbMgAuTl3z14pyrmtYfw9qTaank/bcQWVYLMGtqyfrztJOKnttP EuLtqC7wK7X3Zaar4SpRBw3ELYxCRhKICK9/fs6I5od5+JrQymSM9LiiN4LDoXLx50sK1P oA/yHDK8FogsZmExxtK3RkQyKPPilubnOW2BWzvOfq8Qv5+wacVLgJp1nT4HGQ== 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 4XC38m2mTtzmVZ; Mon, 23 Sep 2024 13:03:52 +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 48ND3qXo007448; Mon, 23 Sep 2024 13:03:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3qVn007445; Mon, 23 Sep 2024 13:03:52 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:52 GMT Message-Id: <202409231303.48ND3qVn007445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1ed40b45066d - stable/14 - amd64: pml5 entries do not support PAT bits 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1ed40b45066dedea10fb306da8ca258bd7d69a40 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1ed40b45066dedea10fb306da8ca258bd7d69a40 commit 1ed40b45066dedea10fb306da8ca258bd7d69a40 Author: Konstantin Belousov AuthorDate: 2024-09-16 18:34:47 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:07 +0000 amd64: pml5 entries do not support PAT bits (cherry picked from commit e134cd9580ad62e87c8e8678bdbc45936b11ee86) --- sys/amd64/amd64/pmap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 567382f9924f..9e6196de2e89 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -4371,15 +4371,13 @@ pmap_pinit_pml5(vm_page_t pml5pg) * entering all existing kernel mappings into level 5 table. */ pm_pml5[pmap_pml5e_index(UPT_MAX_ADDRESS)] = KPML4phys | X86_PG_V | - X86_PG_RW | X86_PG_A | X86_PG_M | - pmap_cache_bits(kernel_pmap, VM_MEMATTR_DEFAULT, FALSE); + X86_PG_RW | X86_PG_A | X86_PG_M; /* * Install self-referential address mapping entry. */ pm_pml5[PML5PML5I] = VM_PAGE_TO_PHYS(pml5pg) | - X86_PG_RW | X86_PG_V | X86_PG_M | X86_PG_A | - pmap_cache_bits(kernel_pmap, VM_MEMATTR_DEFAULT, FALSE); + X86_PG_RW | X86_PG_V | X86_PG_M | X86_PG_A; } static void @@ -4408,8 +4406,7 @@ pmap_pinit_pml5_pti(vm_page_t pml5pgu) */ pm_pml5u[pmap_pml5e_index(UPT_MAX_ADDRESS)] = pmap_kextract((vm_offset_t)pti_pml4) | - X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M | - pmap_cache_bits(kernel_pmap, VM_MEMATTR_DEFAULT, FALSE); + X86_PG_V | X86_PG_RW | X86_PG_A | X86_PG_M; } /* Allocate a page table page and do related bookkeeping */ From nobody Mon Sep 23 13:03:53 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 4XC38p0HVQz52Fcs; Mon, 23 Sep 2024 13:03:54 +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 4XC38n4Txsz40jk; Mon, 23 Sep 2024 13:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727096633; 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=fnhcO8zvkxwDUQewWIycChQqfgeCHl4E9DeW+XiyEqU=; b=hHb4LHpVouYdS0wbLuv10l0cE1oRmmAGBBgF6Axdfh7smzB2sBBR5X5hirvaw7MuSjwTV1 8EBtQlqp3wPkIT13znOiSAoUFuq+ZJ0xH7dQ2PKNjou9+IV+Ld+fAYL81AYA1280JZ71k2 ag0mMpSsWxV9Pqfs8iP4JgVrTlxwWj4jOAW7/TkTBZjqozyEKGnYDhemje0qGhdQ6odY3q FVhkDK9LEmV8DslGWtR1oJb1AJHtQ85L4fHbhC8WJO543N9/PfWK0r37b4cRmrdnWYuhFN ss5WHn+JgPSUCLVImEWD9kEQkIWbQA6n3C0+kT+ucmBj4zJqWEzfr1IaF6IAuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727096633; a=rsa-sha256; cv=none; b=NVD18RBSAypxs/csr2hEvbnhoqJ6VTvehJVV/4XxsJZ4U5g+cmKkLo/fopsvI4G0G/USB4 1U20vazgMlwBK4OYBRH8ds2veRDYMc4fcAiYbAbRu9e7VrkPGyux/C/Ts2GeE5OuHoT5i2 PtK3x/GIulSKSk7/tsMxhKeal1zwDMnocMMlYwteVwnUEAmkvpNyAb1qwgvu9jFh1IrJcc y4krQDUmfJUs3X2ZPMM8qz+xAkK7LVW3wpHL0nCTW5/1Fg3izeQLogWvJ7mr9TZKMna05E 03Qmh0/7tgbZAVrOQBLl68cp88V5uSWfleYatB19yD47NCg5XjxxY7cOSb2Dmg== 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=1727096633; 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=fnhcO8zvkxwDUQewWIycChQqfgeCHl4E9DeW+XiyEqU=; b=N7ZmBXM31v7BuMsENgMAf/qbPvFZ3sNPfXZWrIB18gjrDxrBW74hA/d+ATh/isPwEmcCzM i1hKa+AxTt7ILNomkrfif6KvAMp6W+Yo1vTTsEgkiHEFDHLR4WnLIkVU4vgWiMFyd64sCe zJYiWekBfipOAh3wJVcEP76tCybj+ysojORL32wfWM3+RPAUcb07ZsvMgqbnbWDbasFTXc ldrNAK4JRSxDeUqfh0+28Zp19ZJiEqyzzETqCiSZVIfWKNcEwNz3TJmRmTGFFGiHO/gOhE zcw3KuRppRcKtmn6tvv2SajQNxmLQm8UZq+cZsLhj9M1pyPg9KUpQgAFC0uoNQ== 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 4XC38n40NVzmf3; Mon, 23 Sep 2024 13:03:53 +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 48ND3rlf007498; Mon, 23 Sep 2024 13:03:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ND3r15007495; Mon, 23 Sep 2024 13:03:53 GMT (envelope-from git) Date: Mon, 23 Sep 2024 13:03:53 GMT Message-Id: <202409231303.48ND3r15007495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 73f2b9f05a6b - stable/14 - sysarch: improve checks for max user address 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 73f2b9f05a6b613e9aa6829101d63ec4e5a2d200 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=73f2b9f05a6b613e9aa6829101d63ec4e5a2d200 commit 73f2b9f05a6b613e9aa6829101d63ec4e5a2d200 Author: Konstantin Belousov AuthorDate: 2024-09-16 19:55:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-23 13:03:07 +0000 sysarch: improve checks for max user address (cherry picked from commit 666303f5980896346c455bc949e49952220d02b7) --- sys/amd64/amd64/sys_machdep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index aae3743f0e91..39c89e2aad87 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -316,7 +317,7 @@ sysarch(struct thread *td, struct sysarch_args *uap) case AMD64_SET_FSBASE: error = copyin(uap->parms, &a64base, sizeof(a64base)); if (error == 0) { - if (a64base < VM_MAXUSER_ADDRESS) { + if (a64base < curproc->p_sysent->sv_maxuser) { set_pcb_flags(pcb, PCB_FULL_IRET); pcb->pcb_fsbase = a64base; td->td_frame->tf_fs = _ufssel; @@ -334,7 +335,7 @@ sysarch(struct thread *td, struct sysarch_args *uap) case AMD64_SET_GSBASE: error = copyin(uap->parms, &a64base, sizeof(a64base)); if (error == 0) { - if (a64base < VM_MAXUSER_ADDRESS) { + if (a64base < curproc->p_sysent->sv_maxuser) { set_pcb_flags(pcb, PCB_FULL_IRET); pcb->pcb_gsbase = a64base; td->td_frame->tf_gs = _ugssel; From nobody Mon Sep 23 14:37:55 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 4XC5Fp57KTz52MJd; Mon, 23 Sep 2024 14:38:22 +0000 (UTC) (envelope-from phil@juniper.net) Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XC5Fp0rHPz4CsZ; Mon, 23 Sep 2024 14:38:22 +0000 (UTC) (envelope-from phil@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108159.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48NBU5kk012774; Mon, 23 Sep 2024 07:38:08 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=PPS1017; bh=dx D9hd6z3b99OnaDkmlLe1hKWbGiUrpj1ryj4GUxTQA=; b=dfMkBHdaFd6HkMOoOq br2PYodh9lF5sUqzf26Wu6YqG8J6SXWNTasheD0o1gy32YAQcNg0G1HhyNZIbHc+ gOS2Ph9y40p39GPwW3dMy0AtwIQrsH1qu7y0nHjEtmoIBauR7UehCmbKW492wRnk bZ5UoMEJFMbn0iOeuZW+l10srMTSR0ofhFKMQA80HvU2bYP5bpjgOetodfn2v3/O ANtMHW+Jo0wPWJzmk6rmbAUpBmuJfjUsOMUXuVC4S/iz1pA1CczqnI1CKnWZ9k16 zlCksl6kuCs8ODeOZ78E1VHoJfRW48uW2K8yf6Zlk7eqMqdixM5vR5ng/uXCI+7i Rqhw== Received: from sj2pr03cu001.outbound.protection.outlook.com (mail-westusazlp17012037.outbound.protection.outlook.com [40.93.1.37]) by mx0a-00273201.pphosted.com (PPS) with ESMTPS id 41sv3uc3e0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Sep 2024 07:38:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hMvxc0OT1bC8hyT2jEMeBQV2u65tnReZmg66pNmBlewX0eQRpKG+T7La/dHWBubVjhymq1p0qKz6x0oS9ZAn/BJqWVo/A9i+QAk0ehZnNtL6TLlHVOf3yJrQ3Q9uVBrJeLnZPxXCXXpgTFkqnhCvdZbFR4GQXjozy+Uo+o1PNHf51UG64t32YliQ4xsh3Hc9BPwYw8aoEM7jQCo/1d2zQKOhBvg4dvjPsXzx5lTZr42S8TRqMK3hlqRiyBNx16NpAuttgVDiiBgtv60FE0pyBIhxyETs7b9XspyIyi4ShFXMznqkwHBtn+g5gYdaVN0Zj9S20Ndq6ztSHoNe2iXD3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dxD9hd6z3b99OnaDkmlLe1hKWbGiUrpj1ryj4GUxTQA=; b=OeLz2Q982/bkYwXhegJt/FIbB5cDfp1ZdYj6WUhZWI/W8ljRCkroFK5zzVxYTQeznsVi98b3j4dBn0hL858nCNEyQTQOqhHW36n9BDs4hkEVDRWCZLCLti61WMkkInz2hv14/RwPe12ZaTypjBr8tsjfPrXiPnmu3QBmtfb8sjlF4m2qpBD6uzhmdkqX1V6zPZbpx84LqH3piKGe1JmoD0yKc3kuFu8rrFdwCf/Io1OonR6aM/t7M3dxg58g9jDmlwq3TulDKVnEiMotee7yU8mV4Nih9+ZnVAVloNWw5nbX3QkLiFP4TGNSXWXGRT0d/4x3MQ9TfrEbx9whY+/Qew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.14) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dxD9hd6z3b99OnaDkmlLe1hKWbGiUrpj1ryj4GUxTQA=; b=HpKftLV/YP4JgL9DUcquD0tbCUovNxwA0c/1oSRfJga+MzU1t74pxIPPQJbFo/BET+9+xzKYfaWEwyaNJWQ3tIrbtGeyxwI7XTTDQzDWS/1TwYHuRAZjSpYj41uJ8Q/z9Yf0QsGmNbaYmCpjs7mb+r7VVe6AJ0y3XhXWyEq3XOo= Received: from BN9PR03CA0985.namprd03.prod.outlook.com (2603:10b6:408:109::30) by SJ0PR05MB8695.namprd05.prod.outlook.com (2603:10b6:a03:388::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.24; Mon, 23 Sep 2024 14:38:00 +0000 Received: from BN3PEPF0000B06E.namprd21.prod.outlook.com (2603:10b6:408:109:cafe::80) by BN9PR03CA0985.outlook.office365.com (2603:10b6:408:109::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.23 via Frontend Transport; Mon, 23 Sep 2024 14:37:59 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.14) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.14 as permitted sender) Received: from p-exchfe-eqx-01.jnpr.net (66.129.239.14) by BN3PEPF0000B06E.mail.protection.outlook.com (10.167.243.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.0 via Frontend Transport; Mon, 23 Sep 2024 14:37:59 +0000 Received: from p-exchbe-eqx-01.jnpr.net (10.104.9.14) by p-exchfe-eqx-01.jnpr.net (10.104.9.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 23 Sep 2024 09:37:59 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-01.jnpr.net (10.104.9.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4 via Frontend Transport; Mon, 23 Sep 2024 09:37:59 -0500 Received: from idleski.juniper.net (idleski.juniper.net [172.25.4.10]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 48NEbvNZ013041; Mon, 23 Sep 2024 07:37:58 -0700 (envelope-from phil@juniper.net) Received: from [10.0.0.203] (localhost [127.0.0.1]) by idleski.juniper.net (8.16.1/8.16.1) with ESMTP id 48NDfnEv012768; Mon, 23 Sep 2024 09:41:50 -0400 (EDT) (envelope-from phil@juniper.net) From: Phil Shafer To: Warner Losh CC: Mark Johnston , Warner Losh , , , , Bram Subject: Re: git: 94567c8641e2 - main - netstat: Resolve duplicate "dropped-packets" key from libxo output Date: Mon, 23 Sep 2024 10:37:55 -0400 X-Mailer: MailMate (1.14r5937) Message-ID: In-Reply-To: References: <202409201558.48KFwAEN048834@gitrepo.freebsd.org> 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 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B06E:EE_|SJ0PR05MB8695:EE_ X-MS-Office365-Filtering-Correlation-Id: c53a8fc4-24c6-4019-1cd1-08dcdbdd5296 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?HcgbfA7xkpR2KYam/K/2IG0qmaIdbmxlGo9PpBZEAb91H0qfbm1zjq8mLgqQ?= =?us-ascii?Q?hzcMFt45+QC2w6FmsRIPf5Vt7g5vp7wAQFokxCIkeapxDs2leqzJEJWDAyaq?= =?us-ascii?Q?xZqJ3340iXVTCyBn8Aebi2KwqWeGxHxTAisPxyMnZoZngTKJEX+XmXNDe1Y4?= =?us-ascii?Q?aSQ6aFqYwH3CxoYfh5OJAD2f47O86arR9xbFbj/oHIFb+7nfyjW/rYLWjMYw?= =?us-ascii?Q?pUqxOYAOi7WyOszkaHIke+qIqLdeyyMGUtwbV+B0XQgQ1PbJjw41mKXeahwW?= =?us-ascii?Q?lry+T63wiPykue7ZIiCgFTuw2c2rGsFHcd3UxHz+0NRs+jtkHrkpLyuJhqfb?= =?us-ascii?Q?T5Ujt+MNphh3LiyBYNBD0C9fNLbPD1JABIpEva0vTVLk0yrBG+3/9uLSzF7a?= =?us-ascii?Q?Hl+jMWJt0QXKeKywg7hCCsfB/k8PkXYhn8XcU+sHH13HRmeWbd8vZettJIhe?= =?us-ascii?Q?CcBiZCyRk0kSRYIraC56AfJ8d1Gt6d9kPxf6bbBDDdwq3kwAN7ZwxcNhZYHd?= =?us-ascii?Q?rVRZFuhcNBOOI7M20Hs+mxSZG+wwrtdo7K3bKFdvPVdkAJoi6RbvYk0/QGGv?= =?us-ascii?Q?mJT+KJcnr8LWTna7t6azQ66VSrq7ePzGKkETt0b79c9MfCvRFOV+UuA1HrDZ?= =?us-ascii?Q?HJ/5UUmnXzDB3mAfjzic7wujhyz6yAnIzCyuo77I4bDwmMVc7QWBleoCKet3?= =?us-ascii?Q?nIWBRMpnDP8dojhqVgMD+H90NRTGwMR2JJF6/g/L1/std7/6ZsIG3UdCNJz+?= =?us-ascii?Q?0JTzxBWzw4qbtWjWhyzQzga8iXAfM04Ksvrx0VqPvukl2vqYqD7FeIAdu4BF?= =?us-ascii?Q?Vczf+GdIx6PjAotgBHrPNGogUo9S35P3dGtmd+3cE5z1kLfHrm8Kh8SI8sbC?= =?us-ascii?Q?seABVbUMVYuxbY33Gt8Zu2fuENS2+XdsGgwKGAHWGQNshtBR4V8Yo1WZZjal?= =?us-ascii?Q?0LGt2OPrPQUtvNYHc0OfpylMa4oM/18BOGW4guY1zuQy+tXrsRv9lMNLM/HY?= =?us-ascii?Q?JIXp/y7bS6gyFQQwsL3ddB54TF5vk9GI6QyqrbFvtFeNxUgdQ4wkcJvisUHS?= =?us-ascii?Q?LxOgwRuIQk3LZC7oYUcYtHyFKgZGvCsdjsJZH5BQyr9Nw1mqdGN6X+R51u+K?= =?us-ascii?Q?2BvLBciU6m4bYwW9xuWqvEgQWwZQTR4RdlzWy0/HUSyaiaQ/+4NIuEiKm/K2?= =?us-ascii?Q?v7ddd2ORReKGwAUbjM4kbMvXSYSQabaxnNNvcRpSCCr7UC5mtNWZXN+8qFkU?= =?us-ascii?Q?AmWc4MmxueaVFewLMwSHDlFp/QPh5IKJf/qLGCN0wP6egSX9mP8xxZa2lXyP?= =?us-ascii?Q?S0zgbEUAKhEc8rIK4UNVnmZmbv5YN0cLztozwlDtX85dex+d8szBLDCS8esQ?= =?us-ascii?Q?uKbKi4E=3D?= X-Forefront-Antispam-Report: CIP:66.129.239.14;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-01.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(82310400026)(376014);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2024 14:37:59.8186 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c53a8fc4-24c6-4019-1cd1-08dcdbdd5296 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.239.14];Helo=[p-exchfe-eqx-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: BN3PEPF0000B06E.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR05MB8695 X-Proofpoint-ORIG-GUID: jWJejLYY3DWU6ybxTibOCvIZBoS-dmNU X-Proofpoint-GUID: jWJejLYY3DWU6ybxTibOCvIZBoS-dmNU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 impostorscore=0 suspectscore=0 spamscore=0 phishscore=0 mlxlogscore=880 lowpriorityscore=0 malwarescore=0 mlxscore=0 clxscore=1011 adultscore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409230108 X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:26211, ipnet:208.84.65.0/24, country:US] X-Rspamd-Queue-Id: 4XC5Fp0rHPz4CsZ X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On 22 Sep 2024, at 12:29, Warner Losh wrote: >> Thanks, the tests seem to be fixed now. > Thanks for the quick shout out it was a problem... Just to confirm: the fix added the "e" (encoding-only) flag so this doesn= 't appear in text/html output, right? Thanks, Phil From nobody Mon Sep 23 16:18:53 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 4XC7V11b9dz5WBLX; Mon, 23 Sep 2024 16:19:05 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XC7V04xLPz4L6X; Mon, 23 Sep 2024 16:19:04 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf2b.google.com with SMTP id 6a1803df08f44-6c548eb3354so36297506d6.2; Mon, 23 Sep 2024 09:19:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727108338; x=1727713138; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=pR9xw0tD1p4nNccVdM5VckWT0zz3k2c2BhmPn4rQIqo=; b=AteHv10ZqGv7VWJ9FXta3KLfoQsxf/831CcU7R+7P7u69MZ7KqOPk9D/zJPfjWqtga jLIhIDmxVl0diaEVCdUCCwQ3qhoLr7NdV7ezIAmvq6qPdTYDm6YNgYjDzSvsG8PhHjkU efe0bFIqkHrRJTqa3OErM63ryTtlOwcx7Kgg3ew5Ftmqz3V/Sb0aCqXpryU41ZS6GKBb cqrz1PNEmTzQjAvYg/HGowKf/DrkaiKD/mx1Sdh7FjVcu32TzthSZQS05pUOJEl9hoXR NuNorlxq0+d9CoNMbLCtYGGm1n/8gtGVzrkP3aPDrBEqv94fp/f/cv5BjvsQ/j8fg5zX JeTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727108338; x=1727713138; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pR9xw0tD1p4nNccVdM5VckWT0zz3k2c2BhmPn4rQIqo=; b=Rg45G+u1nZ8atn9fYgMW721esFLNuHFw9IvZWTobxCjCeHJWcAIymQeyLMk2EdngB0 +ss5yKWcfX+lPf6FNt9qFQBSzV9QgDgGlyzy+acKEJVi3k00Dy4NU7oZD0yt0by9WBXD 8/FaaQUbLmexXrqxm5J4fxcrtaySG9fZQ/39Itqntk+VhA+A/aRb69/v0C2RkWawt6P7 bXqIhxQmXGQQKWiaX4tDr+KhZBxB8scVjuKm8LAbFWKqz12uAhd8K321NYYDipWILac4 G2uZR/2CeY0PygF9rdLcx1wOI5/sNjdMvSYmUZskuaY6rIOEHt5NUJ1tA2rkn5Egj77k PD3g== X-Forwarded-Encrypted: i=1; AJvYcCUxKgp/mYWxJyywG7+nEao/B+hfmQVhUPJaP0lnlNAPq0uKYeFqQ7K9EEGnoy/e4KtsyEMxfNtICNuvTveWfiQ=@freebsd.org, AJvYcCX9C4/wtpoF9D2w037rNYqTfv1aUt57UbqWdipHALjYLS0yJuYFLbPLPIs3ZIUOjnRgsDsATQjNv2SFnyYPlP57D4a5@freebsd.org, AJvYcCXT4c7ZXO2yCAaH6YKsTjzYeCymN7fZUCzxqYObuGUrlYe/P9Gf/H8uhrQMUl7ZO2wBvlU0+oD4DRXRubFZ4vBuYVBieTI=@freebsd.org, AJvYcCXmQj6xAH7C+IFFD7RRgMZlg1W4CaRVJxv5fMvKerPtVyTp+zm1GwN9C5Jjs9vQAE7U8uwD@freebsd.org X-Gm-Message-State: AOJu0YzsW4NFrOQqqGURNcFDfLUdz5XfbAkXb+kdzieCSCx3gdxRpYJA r+WJfEFIa0ix/lbwoHBTdtjg4iVw+5psjUJToqoHDhuNugqHqARL8QU1jZVMbG0= X-Google-Smtp-Source: AGHT+IHijU8+msBoWSBiN62b9Wp0Z5NuIzJWTPfDEyyr8MvyBMKol5H+oGFEuGIbHQ1ls8tR+SX8ZQ== X-Received: by 2002:a05:6214:5982:b0:6c5:ab33:6300 with SMTP id 6a1803df08f44-6c7bd4cf296mr179939876d6.6.1727108337700; Mon, 23 Sep 2024 09:18:57 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6c75e495d6asm48416036d6.73.2024.09.23.09.18.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 09:18:56 -0700 (PDT) Date: Mon, 23 Sep 2024 12:18:53 -0400 From: Mark Johnston To: Phil Shafer Cc: Warner Losh , Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Bram Subject: Re: git: 94567c8641e2 - main - netstat: Resolve duplicate "dropped-packets" key from libxo output Message-ID: References: <202409201558.48KFwAEN048834@gitrepo.freebsd.org> 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=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XC7V04xLPz4L6X X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Mon, Sep 23, 2024 at 10:37:55AM -0400, Phil Shafer wrote: > On 22 Sep 2024, at 12:29, Warner Losh wrote: > >> Thanks, the tests seem to be fixed now. > > Thanks for the quick shout out it was a problem... > > Just to confirm: the fix added the "e" (encoding-only) flag so this doesn't appear in text/html output, right? There is no fix yet, that I'm aware of, so far we've merely reverted the commit in question. But yes, the fix is to add the "e" field modifer, and more specifically to plumb it through to show_stat(). > > Thanks, > Phil From nobody Mon Sep 23 17:13:04 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 4XC8hK08g0z5WFRT; Mon, 23 Sep 2024 17:13:05 +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 4XC8hJ6dhwz4RRs; Mon, 23 Sep 2024 17:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727111584; 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=Db6830U6CxEqgorR85LYvVXUg3Qo8Ls1KC+I/+nNH2g=; b=gSbD0ffxY/v7AfIHnigpDv2mtCuNRr7gupRAxxNUxjw8C+D8Ddyyc5+Bl9gLrRS5pOhHLZ jaP05GYUgPu5L4yUijjzNiqWOaZH70Vs/3l33guT13AWuXl8JRwzv/crS0ougGjHhk6vuk EwJM69nbRVAc21rkVPLXyYjcILKT8N90Ad7y0Ry5MlzDwViVMR910DihSTGjiFYDIueCNh oPtJjdxELSUgtwrEc3bRXf5P2gpIcJLX0vY8dGjKkL97OI1RMpTaHXjAa+1JV8udmNHWDn MB7by3rDePL+x20dTPV0U4iDjJ6mWLNHMrmLyZGA1p/AzLqZ+NL1aThVbWMygg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727111584; a=rsa-sha256; cv=none; b=uA6jnXjiScsvBI9csLdFmcAZO+XA+zjf0uGJ8B+w+NzzThso+B+3oIl5/vT3MXkcNxnQ9R QcRxrs8CGQb8JSrSAlOkepu0rjz6qGSOSFQDCOiLCkdBxCsSMhFnIP1ZOJvURHcI6wWcWJ n3xos9dBIsmjTVzuz558hord3p78vwta76kbBAN5TRNsFw0QCnB6LaavHauOkUm+uUOaAt RD9cgFzrHVkLPZxQUovB6Tk4N9mH6sNo1afzZbK8E0axyroxPWehC8XncXSsRBdHqkNlPb HE7Dg5Z0ivBsXMUMKfA8ySOm48D7t02JsIuM+inHz6mnROGIhe+abQ5SbAfEhA== 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=1727111584; 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=Db6830U6CxEqgorR85LYvVXUg3Qo8Ls1KC+I/+nNH2g=; b=aRaWjSK1SdO4W9PN2bA4Wx0vurMMuJA7oK90GHObXfhC7IQwTNfKLTFF1yzzqp87tJJU3X VNFpkNPCLir44G7DslG0LCwQJepDiGkPsAZxMI2bihcdCnIsedvbAu8ntHk6E/k90canKG VYxk/tgIB/2nzmes63l5oPFn5sJ24VOcczBzUMEd3ibflKTMWsFKZIcx6T63WkCL215IN/ TXmHMpE00SLs/AWOcG+jrIhcJ4qSNJ+CkzLYRMSRbj20WH6V7vHi1/0GprSBt7hG8Gz3Yr ZHnTH7sjljNWXNr+HwvJ24Y0+Yk0Tz4f4rf7L6H/YK5GRyg2tWlZY/5B6dDQ6w== 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 4XC8hJ66Dnztt1; Mon, 23 Sep 2024 17:13:04 +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 48NHD41l033692; Mon, 23 Sep 2024 17:13:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48NHD45j033689; Mon, 23 Sep 2024 17:13:04 GMT (envelope-from git) Date: Mon, 23 Sep 2024 17:13:04 GMT Message-Id: <202409231713.48NHD45j033689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 940fec94b5fc - main - swap_pager: deoptimize swapoff_object 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 940fec94b5fc001333d87c2935de97a4566a0289 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=940fec94b5fc001333d87c2935de97a4566a0289 commit 940fec94b5fc001333d87c2935de97a4566a0289 Author: Doug Moore AuthorDate: 2024-09-23 17:11:55 +0000 Commit: Doug Moore CommitDate: 2024-09-23 17:11:55 +0000 swap_pager: deoptimize swapoff_object Undo a change in swap_pager_swapoff_object that assumed a swap block would be valid after reacquiring a lock, when that validity cannot be assumed. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46753 --- sys/vm/swap_pager.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 44fe4f34bb39..954228dfaaf0 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1954,7 +1954,6 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) vm_object_pip_wakeupn(object, 1); KASSERT(vm_page_all_valid(m), ("%s: Page %p not all valid", __func__, m)); - swp_pager_force_dirty(&range, m, &sb->d[i]); vm_page_xunbusy(m); i = 0; /* Restart scan after object lock dropped. */ } From nobody Mon Sep 23 18:28:58 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 4XCBMt6g9Gz5WL2D; Mon, 23 Sep 2024 18:28:58 +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 4XCBMt62MKz4Vvl; Mon, 23 Sep 2024 18:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727116138; 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=eHZb+rVJImXEqGu8MxHn3H/fvgazsrgReMtdm3z0xtE=; b=LrIBwQfX81K/mtzZuFiF7fiQuu22vMe63XJn/CkOnjyaK2zUjo+/qL4DlxApaXZ0kY7aku SL7xw3t9WHwZQ32fOnZXytEr8Jf5XEo3izQCe0CPWetrKrHjpoU5FlBjMhlWLQpzGR4c5z 1mOMzcK9h9j2IX5gJWpZx8ym+28qEuocRIcQvX4litaqBUb8MAbKgCRw2b2Dj8gbdWVQ4Z uxe89QrczJOgpulxgi5T6VdHjZL2/y6U/GD6z/+G/hiM9PrNEDLrsGLZg2zzvLsZ+0ouvU 2pSTfLG6tCCpVXaNmenD+DYbEEi7rExHT5zVoBGk5COKlVLWJqyFHw9Vh7XAaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727116138; a=rsa-sha256; cv=none; b=En9ZGp41RLe04qUawWYQCXJ73lkiVkpeuAYQKgQ7hsCgwizmD6tEkKPZLIHkiE6NI0O2jI StK7SDhpCSX+OM2POG/Q6WJZKmg2EAbYZpkKljJx0qNrxIim8yoHRP48omgU7fsJ0aCrOH 1hc9Yjq6OjZJLh/2MJ6saCzUW2kQqanx/P4aN1glsA2zO+zVxwhLpTq9ajRcyP98SKU6Zp mVzpUnM5RSAqO4g2FUbcY3Xy36SdOLS35ltNWkaDAvOQQ6q93Mge6lPY7Q0Y1GmoPOZQG0 HfICP4X0OGqyi6AuV6LRcUi2nIfXqiCjJgNcrUempBLyxeaxrTnVOvJSbgIRyw== 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=1727116138; 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=eHZb+rVJImXEqGu8MxHn3H/fvgazsrgReMtdm3z0xtE=; b=A9+mCT5loYmgFAWhOp94smCuQE82ix7WKjrgi8Yj/ktFrGtkiTbNSqvVm/BkowDFYIt63q Oo1Ehpchtinkl7RwDrBBQoAwodXMye2C24d9KIEbqcrmbh37quU4TrdBmZ2L1tX1+DGwDY oyajBDnFevVAnRxTPPelUQld3vItyKXCNo92SQIWFNoPqm2IwQc9YYfdqU7fLYfwFr41y7 2xUXPR5FGQZhMhpm1lZEN6sORCPhhSF6sYzBMazydGGUoRl4GcgskeehbypQJS2reDRXET 7BQn4Jwj1wJ8JidZjKPMb2voR54nd3NaNrI0P1WwyJZyRlvBOXk06itAgIMRwQ== 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 4XCBMt5dW0zwYX; Mon, 23 Sep 2024 18:28:58 +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 48NISwva053323; Mon, 23 Sep 2024 18:28:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48NISwxd053320; Mon, 23 Sep 2024 18:28:58 GMT (envelope-from git) Date: Mon, 23 Sep 2024 18:28:58 GMT Message-Id: <202409231828.48NISwxd053320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: f1aaef47a01a - main - swap_pager: update meta_free comment 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1aaef47a01ad2b690ea251a42cbff99511459cf Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=f1aaef47a01ad2b690ea251a42cbff99511459cf commit f1aaef47a01ad2b690ea251a42cbff99511459cf Author: Doug Moore AuthorDate: 2024-09-23 18:27:54 +0000 Commit: Doug Moore CommitDate: 2024-09-23 18:27:54 +0000 swap_pager: update meta_free comment Clarify the comment that introduces swp_page_meta_free. Reviewed by: markj, alc Differential Revision: https://reviews.freebsd.org/D46754 --- sys/vm/swap_pager.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 954228dfaaf0..aa0297daefe9 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2264,12 +2264,9 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, /* * SWP_PAGER_META_FREE() - free a range of blocks in the object's swap metadata * - * The requested range of blocks is freed, with any associated swap - * returned to the swap bitmap. - * - * This routine will free swap metadata structures as they are cleaned - * out. This routine does *NOT* operate on swap metadata associated - * with resident pages. + * Return freed swap blocks to the swap bitmap, and free emptied swblk + * metadata. With 'freed' set, provide a count of freed blocks that were + * not associated with valid resident pages. */ static void swp_pager_meta_free(vm_object_t object, vm_pindex_t pindex, vm_pindex_t count, From nobody Mon Sep 23 19:35:10 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 4XCCrG66v4z5WQBp; Mon, 23 Sep 2024 19:35:10 +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 4XCCrG5Mdvz4bny; Mon, 23 Sep 2024 19:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727120110; 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=7FnlPCfVFTrljnVRm1D+8/SrlJZdfqOYiHUO28wYdIE=; b=vvuUU9A3wW4Fxmu+muMfhsqnO2xTzfHn4idqLvPSibzyyCRZ+9XiGUq4U0HTviWDlILeZS hVDneq09Y4SfEqA1ebLbHIIwvUI8Y0FhGCIfIu0bz8y1tsirygE+A+wQlSeimr4LoxeS2G u7eMBgOnFPFHwDE1zx8o1ZBy4bEJ1RR22f+mZLAl2TCi07UcMzYT8/YlscHa9vVCikpePX 7Auj7SglmBKhR8F9DWXk2uODl578A8eQR+Mo5QOtOSF8pfUheOWCUizREMOUuMoDuzLUGu BdayavbLA8smgop9IKmmdKrElODLHnCn7HS+bx+p42NMWkaPvtKYHMke2N07rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727120110; a=rsa-sha256; cv=none; b=OMwBPL5uAjZl5uwebAHj1q0KUglH1E7qxMKHZannxoH7I+J2mnvmtSRFwQalHQ0VncbaxY IwSZnA+IRJFV9a0XActVegMnCeas4QUVc9g3XC1lzlZ1KwBl1W3f2YRtshJnircoDpYg82 O+pi6r8dMby9zc2mz8tdfibDlMDQ9W2iQNkmJxu8+/DDY6in4n3KpHVODeWGph/oURYfPd UrBW+c1C16LQYoul3LU8OLTpmiwSJJ3BfM6d1KnaTDouunG82+aF0MvrsA7Xv+hqkZ20jP 6vBzi1NxIIziIyHoN8YHY1yncxE9oahqAQB2le/vge4l1nM1cdmZp10nnDm5xw== 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=1727120110; 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=7FnlPCfVFTrljnVRm1D+8/SrlJZdfqOYiHUO28wYdIE=; b=mG/6OPyMEt3QogQZ5psSmESSuoG9J5sGYWXCphyiUgQyLhT8USkYVwOQHaSRKGDF1qmbPJ 7fi4j3JH43HeZQYVaTJhHAxb4iIaygE1q5vCRGa5FVA00xmY6QoYCq1Pog+itqsZnKwyBn qw2BM476Pn+JvrAE0EXyXtx4CAnh4iJedBxw3BaaiqhUndWPE4VoR1Wq5bDBkf26pOsqLZ 2gno+36WBN+A3ZskNXreXFyyG1Ihr65d215+iZdU9SljtZI7EqbiGgbsewZeZ9EbXeNhro nqBq1NIudkboKOSpznNGhbzp+C7ylHCv2Ir5ZN26NRHrP3/ZUJgSxETutKRFvw== 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 4XCCrG4rGVzyKv; Mon, 23 Sep 2024 19:35:10 +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 48NJZA59072237; Mon, 23 Sep 2024 19:35:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48NJZARY072234; Mon, 23 Sep 2024 19:35:10 GMT (envelope-from git) Date: Mon, 23 Sep 2024 19:35:10 GMT Message-Id: <202409231935.48NJZARY072234@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: 0a7e5f1f02aa - main - tcpdump: Update to 4.99.5 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: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a7e5f1f02aad2ff5fff1c60f44c6975fd07e1d9 Auto-Submitted: auto-generated The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=0a7e5f1f02aad2ff5fff1c60f44c6975fd07e1d9 commit 0a7e5f1f02aad2ff5fff1c60f44c6975fd07e1d9 Merge: f1aaef47a01a 75d9de99aec2 Author: Joseph Mingrone AuthorDate: 2024-09-23 19:23:25 +0000 Commit: Joseph Mingrone CommitDate: 2024-09-23 19:23:25 +0000 tcpdump: Update to 4.99.5 Changes: https://git.tcpdump.org/tcpdump/blob/4a789712f187e3ac7b2c0044c3a3f8c71b83646e:/CHANGES Obtained from: https://www.tcpdump.org/release/tcpdump-4.99.5.tar.xz Sponsored by: The FreeBSD Foundation contrib/tcpdump/CHANGES | 131 +- contrib/tcpdump/CMakeLists.txt | 301 +- contrib/tcpdump/CONTRIBUTING.md | 269 +- contrib/tcpdump/CREDITS | 34 +- contrib/tcpdump/INSTALL.md | 35 +- contrib/tcpdump/Makefile.in | 98 +- contrib/tcpdump/VERSION | 2 +- contrib/tcpdump/addrtoname.c | 7 +- contrib/tcpdump/addrtostr.c | 24 +- contrib/tcpdump/af.c | 2 - contrib/tcpdump/autogen.sh | 25 + contrib/tcpdump/bpf_dump.c | 2 - contrib/tcpdump/checksum.c | 39 +- contrib/tcpdump/cmake/Modules/FindCRYPTO.cmake | 185 +- contrib/tcpdump/cmakeconfig.h.in | 14 +- contrib/tcpdump/config.guess | 62 +- contrib/tcpdump/config.h.in | 27 +- contrib/tcpdump/config.sub | 230 +- contrib/tcpdump/configure | 7188 ++++++++++++++---------- contrib/tcpdump/configure.ac | 476 +- contrib/tcpdump/cpack.c | 2 - contrib/tcpdump/diag-control.h | 95 +- contrib/tcpdump/doc/README.Win32.md | 200 - contrib/tcpdump/doc/README.haiku.md | 33 + contrib/tcpdump/doc/README.solaris.md | 5 + contrib/tcpdump/extract.h | 2 +- contrib/tcpdump/ftmacros.h | 2 +- contrib/tcpdump/funcattrs.h | 5 +- contrib/tcpdump/gmpls.c | 2 - contrib/tcpdump/in_cksum.c | 2 - contrib/tcpdump/install-sh | 689 ++- contrib/tcpdump/instrument-functions.c | 250 + contrib/tcpdump/interface.h | 2 +- contrib/tcpdump/ip.h | 1 - contrib/tcpdump/ipproto.c | 2 - contrib/tcpdump/l2vpn.c | 2 - contrib/tcpdump/machdep.c | 2 - contrib/tcpdump/makemib | 2 +- contrib/tcpdump/mib.h | 12 +- contrib/tcpdump/missing/datalinks.c | 2 - contrib/tcpdump/missing/dlnames.c | 2 - contrib/tcpdump/missing/getopt_long.c | 3 +- contrib/tcpdump/missing/getservent.c | 2 - contrib/tcpdump/missing/snprintf.c | 2 - contrib/tcpdump/missing/strlcat.c | 2 - contrib/tcpdump/missing/strlcpy.c | 2 - contrib/tcpdump/missing/strsep.c | 2 - contrib/tcpdump/mkdep | 28 +- contrib/tcpdump/nameser.h | 8 +- contrib/tcpdump/netdissect-alloc.c | 2 - contrib/tcpdump/netdissect.c | 16 +- contrib/tcpdump/netdissect.h | 75 +- contrib/tcpdump/nlpid.c | 2 - contrib/tcpdump/ntp.c | 2 - contrib/tcpdump/oui.c | 2 - contrib/tcpdump/parsenfsfh.c | 53 +- contrib/tcpdump/pflog.h | 45 +- contrib/tcpdump/print-802_11.c | 62 +- contrib/tcpdump/print-802_15_4.c | 32 +- contrib/tcpdump/print-ah.c | 2 - contrib/tcpdump/print-ahcp.c | 2 - contrib/tcpdump/print-aodv.c | 2 - contrib/tcpdump/print-aoe.c | 2 - contrib/tcpdump/print-ap1394.c | 2 - contrib/tcpdump/print-arcnet.c | 2 - contrib/tcpdump/print-arista.c | 2 - contrib/tcpdump/print-arp.c | 2 - contrib/tcpdump/print-ascii.c | 8 +- contrib/tcpdump/print-atalk.c | 2 - contrib/tcpdump/print-atm.c | 4 +- contrib/tcpdump/print-babel.c | 2 - contrib/tcpdump/print-bcm-li.c | 2 - contrib/tcpdump/print-beep.c | 2 - contrib/tcpdump/print-bfd.c | 8 +- contrib/tcpdump/print-bgp.c | 23 +- contrib/tcpdump/print-bootp.c | 43 +- contrib/tcpdump/print-brcmtag.c | 3 - contrib/tcpdump/print-bt.c | 2 - contrib/tcpdump/print-calm-fast.c | 2 - contrib/tcpdump/print-carp.c | 5 +- contrib/tcpdump/print-cdp.c | 10 +- contrib/tcpdump/print-cfm.c | 2 - contrib/tcpdump/print-chdlc.c | 2 - contrib/tcpdump/print-cip.c | 2 - contrib/tcpdump/print-cnfp.c | 2 - contrib/tcpdump/print-dccp.c | 2 - contrib/tcpdump/print-decnet.c | 2 - contrib/tcpdump/print-dhcp6.c | 70 +- contrib/tcpdump/print-domain.c | 12 +- contrib/tcpdump/print-dsa.c | 2 - contrib/tcpdump/print-dtp.c | 4 +- contrib/tcpdump/print-dvmrp.c | 4 +- contrib/tcpdump/print-eap.c | 3 +- contrib/tcpdump/print-egp.c | 2 - contrib/tcpdump/print-eigrp.c | 2 - contrib/tcpdump/print-enc.c | 2 - contrib/tcpdump/print-esp.c | 29 +- contrib/tcpdump/print-ether.c | 6 +- contrib/tcpdump/print-fddi.c | 5 +- contrib/tcpdump/print-forces.c | 2 - contrib/tcpdump/print-fr.c | 18 +- contrib/tcpdump/print-frag6.c | 26 +- contrib/tcpdump/print-ftp.c | 2 - contrib/tcpdump/print-geneve.c | 2 - contrib/tcpdump/print-geonet.c | 2 - contrib/tcpdump/print-gre.c | 2 - contrib/tcpdump/print-hncp.c | 2 - contrib/tcpdump/print-hsrp.c | 2 - contrib/tcpdump/print-http.c | 2 - contrib/tcpdump/print-icmp.c | 2 - contrib/tcpdump/print-icmp6.c | 15 +- contrib/tcpdump/print-igmp.c | 2 - contrib/tcpdump/print-igrp.c | 2 - contrib/tcpdump/print-ip-demux.c | 2 - contrib/tcpdump/print-ip.c | 68 +- contrib/tcpdump/print-ip6.c | 45 +- contrib/tcpdump/print-ip6opts.c | 2 - contrib/tcpdump/print-ipcomp.c | 2 - contrib/tcpdump/print-ipfc.c | 2 - contrib/tcpdump/print-ipnet.c | 2 - contrib/tcpdump/print-ipoib.c | 2 - contrib/tcpdump/print-ipx.c | 6 +- contrib/tcpdump/print-isakmp.c | 25 +- contrib/tcpdump/print-isoclns.c | 34 +- contrib/tcpdump/print-juniper.c | 5 +- contrib/tcpdump/print-krb.c | 11 +- contrib/tcpdump/print-l2tp.c | 2 - contrib/tcpdump/print-lane.c | 2 - contrib/tcpdump/print-ldp.c | 20 +- contrib/tcpdump/print-lisp.c | 14 +- contrib/tcpdump/print-llc.c | 2 - contrib/tcpdump/print-lldp.c | 4 +- contrib/tcpdump/print-lmp.c | 2 - contrib/tcpdump/print-loopback.c | 5 +- contrib/tcpdump/print-lspping.c | 2 - contrib/tcpdump/print-lwapp.c | 2 - contrib/tcpdump/print-lwres.c | 10 +- contrib/tcpdump/print-m3ua.c | 2 - contrib/tcpdump/print-macsec.c | 3 - contrib/tcpdump/print-mobile.c | 2 - contrib/tcpdump/print-mobility.c | 5 +- contrib/tcpdump/print-mpcp.c | 2 - contrib/tcpdump/print-mpls.c | 2 - contrib/tcpdump/print-mptcp.c | 2 - contrib/tcpdump/print-msdp.c | 2 - contrib/tcpdump/print-msnlb.c | 2 - contrib/tcpdump/print-nflog.c | 22 +- contrib/tcpdump/print-nfs.c | 29 +- contrib/tcpdump/print-nsh.c | 7 +- contrib/tcpdump/print-ntp.c | 4 - contrib/tcpdump/print-null.c | 2 - contrib/tcpdump/print-olsr.c | 16 +- contrib/tcpdump/print-openflow-1.0.c | 143 +- contrib/tcpdump/print-openflow-1.3.c | 15 +- contrib/tcpdump/print-openflow.c | 2 - contrib/tcpdump/print-ospf.c | 10 +- contrib/tcpdump/print-ospf6.c | 15 +- contrib/tcpdump/print-otv.c | 2 - contrib/tcpdump/print-pflog.c | 30 +- contrib/tcpdump/print-pgm.c | 2 - contrib/tcpdump/print-pim.c | 8 +- contrib/tcpdump/print-pktap.c | 2 - contrib/tcpdump/print-ppi.c | 2 - contrib/tcpdump/print-ppp.c | 11 +- contrib/tcpdump/print-pppoe.c | 2 - contrib/tcpdump/print-pptp.c | 2 - contrib/tcpdump/print-ptp.c | 45 +- contrib/tcpdump/print-radius.c | 173 +- contrib/tcpdump/print-raw.c | 2 - contrib/tcpdump/print-realtek.c | 2 - contrib/tcpdump/print-resp.c | 6 +- contrib/tcpdump/print-rip.c | 46 +- contrib/tcpdump/print-ripng.c | 2 - contrib/tcpdump/print-rpki-rtr.c | 40 +- contrib/tcpdump/print-rsvp.c | 2 - contrib/tcpdump/print-rt6.c | 4 +- contrib/tcpdump/print-rtsp.c | 2 - contrib/tcpdump/print-rx.c | 4 +- contrib/tcpdump/print-sctp.c | 7 +- contrib/tcpdump/print-sflow.c | 8 +- contrib/tcpdump/print-sip.c | 2 - contrib/tcpdump/print-sl.c | 2 - contrib/tcpdump/print-sll.c | 2 - contrib/tcpdump/print-slow.c | 2 - contrib/tcpdump/print-smb.c | 20 +- contrib/tcpdump/print-smtp.c | 2 - contrib/tcpdump/print-snmp.c | 12 +- contrib/tcpdump/print-someip.c | 3 - contrib/tcpdump/print-ssh.c | 2 - contrib/tcpdump/print-stp.c | 5 +- contrib/tcpdump/print-sunatm.c | 2 - contrib/tcpdump/print-sunrpc.c | 2 - contrib/tcpdump/print-symantec.c | 2 - contrib/tcpdump/print-syslog.c | 5 +- contrib/tcpdump/print-tcp.c | 64 +- contrib/tcpdump/print-telnet.c | 4 +- contrib/tcpdump/print-tftp.c | 2 - contrib/tcpdump/print-timed.c | 2 - contrib/tcpdump/print-tipc.c | 6 +- contrib/tcpdump/print-token.c | 2 - contrib/tcpdump/print-udld.c | 2 - contrib/tcpdump/print-udp.c | 101 +- contrib/tcpdump/print-unsupported.c | 2 - contrib/tcpdump/print-usb.c | 14 +- contrib/tcpdump/print-vjc.c | 2 - contrib/tcpdump/print-vqp.c | 2 - contrib/tcpdump/print-vrrp.c | 2 - contrib/tcpdump/print-vsock.c | 2 - contrib/tcpdump/print-vtp.c | 6 +- contrib/tcpdump/print-vxlan-gpe.c | 2 - contrib/tcpdump/print-vxlan.c | 2 - contrib/tcpdump/print-wb.c | 2 - contrib/tcpdump/print-whois.c | 2 - contrib/tcpdump/print-zep.c | 10 +- contrib/tcpdump/print-zephyr.c | 2 - contrib/tcpdump/print-zeromq.c | 26 +- contrib/tcpdump/print.c | 18 +- contrib/tcpdump/signature.c | 2 - contrib/tcpdump/smbutil.c | 19 +- contrib/tcpdump/status-exit-codes.h | 1 - contrib/tcpdump/strtoaddr.c | 2 - contrib/tcpdump/tcp.h | 6 +- contrib/tcpdump/tcpdump.1.in | 87 +- contrib/tcpdump/tcpdump.c | 107 +- contrib/tcpdump/udp.h | 14 +- contrib/tcpdump/util-print.c | 67 +- usr.sbin/tcpdump/tcpdump/config.h | 4 +- 227 files changed, 7690 insertions(+), 5092 deletions(-) diff --cc contrib/tcpdump/CONTRIBUTING.md index 26f226ebd973,000000000000..215e4c6831c4 mode 100644,000000..100644 --- a/contrib/tcpdump/CONTRIBUTING.md +++ b/contrib/tcpdump/CONTRIBUTING.md @@@ -1,191 -1,0 +1,394 @@@ +# Some Information for Contributors +Thank you for considering to make a contribution to tcpdump! Please use the +guidelines below to achieve the best results and experience for everyone. + +## How to report bugs and other problems +**To report a security issue (segfault, buffer overflow, infinite loop, arbitrary +code execution etc) please send an e-mail to security@tcpdump.org, do not use +the bug tracker!** + +To report a non-security problem (failure to compile, incorrect output in the +protocol printout, missing support for a particular protocol etc) please check +first that it reproduces with the latest stable release of tcpdump and the latest +stable release of libpcap. If it does, please check that the problem reproduces +with the current git master branch of tcpdump and the current git master branch of +libpcap. If it does (and it is not a security-related problem, otherwise see +above), please navigate to the +[bug tracker](https://github.com/the-tcpdump-group/tcpdump/issues) +and check if the problem has already been reported. If it has not, please open +a new issue and provide the following details: + +* tcpdump and libpcap version (`tcpdump --version`) +* operating system name and version and any other details that may be relevant + (`uname -a`, compiler name and version, CPU type etc.) +* custom `configure`/`cmake` flags, if any +* statement of the problem +* steps to reproduce + +Please note that if you know exactly how to solve the problem and the solution +would not be too intrusive, it would be best to contribute some development time +and to open a pull request instead as discussed below. + +Still not sure how to do? Feel free to +[subscribe to the mailing list](https://www.tcpdump.org/#mailing-lists) +and ask! + + +## How to add new code and to update existing code + - 0) Check that there isn't a pull request already opened for the changes you ++1) Check that there isn't a pull request already opened for the changes you + intend to make. + - 1) [Fork](https://help.github.com/articles/fork-a-repo/) the Tcpdump ++2) [Fork](https://help.github.com/articles/fork-a-repo/) the Tcpdump + [repository](https://github.com/the-tcpdump-group/tcpdump). + - 2) The easiest way to test your changes on multiple operating systems and ++3) The easiest way to test your changes on multiple operating systems and + architectures is to let the upstream CI test your pull request (more on + this below). + - 3) Setup your git working copy ++4) Setup your git working copy + ``` + git clone https://github.com//tcpdump.git + cd tcpdump + git remote add upstream https://github.com/the-tcpdump-group/tcpdump + git fetch upstream + ``` + - 4) Do a `touch .devel` in your working directory. ++5) Do a `touch .devel` in your working directory. + Currently, the effect is + * add (via `configure`, in `Makefile`) some warnings options (`-Wall`, + `-Wmissing-prototypes`, `-Wstrict-prototypes`, ...) to the compiler if it + supports these options, + * have the `Makefile` support `make depend` and the `configure` script run it. + - 5) Configure and build ++6) Configure and build + ``` + ./configure && make -s && make check + ``` + - 6) Add/update tests ++7) Add/update tests + The `tests` directory contains regression tests of the dissection of captured + packets. Those captured packets were saved running tcpdump with option + `-w sample.pcap`. Additional options, such as `-n`, are used to create relevant + and reproducible output; `-#` is used to indicate which particular packets + have output that differs. The tests are run with the `TZ` environment + variable set to `GMT0`, so that UTC, rather than the local time where the + tests are being run, is used when "local time" values are printed. The + actual test compares the current text output with the expected result + (`sample.out`) saved from a previous version. + + Any new/updated fields in a dissector must be present in a `sample.pcap` file + and the corresponding output file. + + Configuration is set in `tests/TESTLIST`. + Each line in this file has the following format: + ``` + test-name sample.pcap sample.out tcpdump-options + ``` + + The `sample.out` file can be produced as follows: + ``` + (cd tests && TZ=GMT0 ../tcpdump -# -n -r sample.pcap tcpdump-options > sample.out) + ``` + + Or, for convenience, use `./update-test.sh test-name` + + It is often useful to have test outputs with different verbosity levels + (none, `-v`, `-vv`, `-vvv`, etc.) depending on the code. + - 7) Test using `make check` (current build options) and `./build_matrix.sh` ++8) Test using `make check` (current build options) and `./build_matrix.sh` + (a multitude of build options, build systems and compilers). If you can, + test on more than one operating system. Don't send a pull request until + all tests pass. + - 8) Try to rebase your commits to keep the history simple. ++9) Try to rebase your commits to keep the history simple. + ``` + git fetch upstream + git rebase upstream/master + ``` + (If the rebase fails and you cannot resolve, issue `git rebase --abort` + and ask for help in the pull request comment.) + - 9) Once 100% happy, put your work into your forked repository using `git push`. ++10) Once 100% happy, put your work into your forked repository using `git push`. + - 10) [Initiate and send](https://help.github.com/articles/using-pull-requests/) ++11) [Initiate and send](https://help.github.com/articles/using-pull-requests/) + a pull request. + This will trigger the upstream repository CI tests. + + +## Code style and generic remarks - * A thorough reading of some other printers code is useful. ++1) A thorough reading of some other printers code is useful. + - * Put the normative reference if any as comments (RFC, etc.). ++2) To help learn how tcpdump works or to help debugging: ++ You can configure and build tcpdump with the instrumentation of functions: ++ ``` ++ $ ./configure --enable-instrument-functions ++ $ make -s clean all ++ ``` ++ ++ This generates instrumentation calls for entry and exit to functions. ++ Just after function entry and just before function exit, these ++ profiling functions are called and print the function names with ++ indentation and call level. ++ ++ If entering in a function, it prints also the calling function name with ++ file name and line number. There may be a small shift in the line number. ++ ++ In some cases, with Clang 11, the file number is unknown (printed '??') ++ or the line number is unknown (printed '?'). In this case, use GCC. ++ ++ If the environment variable INSTRUMENT is ++ - unset or set to an empty string, print nothing, like with no ++ instrumentation ++ - set to "all" or "a", print all the functions names ++ - set to "global" or "g", print only the global functions names ++ ++ This allows to run: ++ ``` ++ $ INSTRUMENT=a ./tcpdump ... ++ $ INSTRUMENT=g ./tcpdump ... ++ $ INSTRUMENT= ./tcpdump ... ++ ``` ++ or ++ ``` ++ $ export INSTRUMENT=global ++ $ ./tcpdump ... ++ ``` ++ ++ The library libbfd is used, therefore the binutils-dev package is required. + - * Put the format of packets/headers/options as comments if there is no ++3) Put the normative reference if any as comments (RFC, etc.). ++ ++4) Put the format of packets/headers/options as comments if there is no + published normative reference. + - * The printer may receive incomplete packet in the buffer, truncated at any ++5) The printer may receive incomplete packet in the buffer, truncated at any + random position, for example by capturing with `-s size` option. ++ This means that an attempt to fetch packet data based on the expected ++ format of the packet may run the risk of overrunning the buffer. ++ ++ Furthermore, if the packet is complete, but is not correctly formed, ++ that can also cause a printer to overrun the buffer, as it will be ++ fetching packet data based on the expected format of the packet. ++ ++ Therefore, integral, IPv4 address, and octet sequence values should ++ be fetched using the `GET_*()` macros, which are defined in ++ `extract.h`. ++ + If your code reads and decodes every byte of the protocol packet, then to + ensure proper and complete bounds checks it would be sufficient to read all - packet data using the `GET_*()` macros, typically: - ``` - GET_U_1(p) - GET_S_1(p) - GET_BE_U_n(p), n in { 2, 3, 4, 5, 6, 7, 8 } - GET_BE_S_n(p), n in { 2, 3, 4, 5, 6, 7, 8 } - ``` ++ packet data using the `GET_*()` macros. ++ + If your code uses the macros above only on some packet data, then the gaps + would have to be bounds-checked using the `ND_TCHECK_*()` macros: + ``` + ND_TCHECK_n(p), n in { 1, 2, 3, 4, 5, 6, 7, 8, 16 } + ND_TCHECK_SIZE(p) + ND_TCHECK_LEN(p, l) + ``` - For the `ND_TCHECK_*` macros (if not already done): ++ ++ where *p* points to the data not being decoded. For `ND_CHECK_n()`, ++ *n* is the length of the gap, in bytes. For `ND_CHECK_SIZE()`, the ++ length of the gap, in bytes, is the size of an item of the data type ++ to which *p* points. For `ND_CHECK_LEN()`, *l* is the length of the ++ gap, in bytes. ++ ++ For the `GET_*()` and `ND_TCHECK_*` macros (if not already done): + * Assign: `ndo->ndo_protocol = "protocol";` + * Define: `ND_LONGJMP_FROM_TCHECK` before including `netdissect.h` + * Make sure that the intersection of `GET_*()` and `ND_TCHECK_*()` is minimal, + but at the same time their union covers all packet data in all cases. + + You can test the code via: + ``` + sudo ./tcpdump -s snaplen [-v][v][...] -i lo # in a terminal + sudo tcpreplay -i lo sample.pcap # in another terminal + ``` + You should try several values for snaplen to do various truncation. + - * Do invalid packet checks in code: Think that your code can receive in input ++* The `GET_*()` macros that fetch integral values are: ++ ``` ++ GET_U_1(p) ++ GET_S_1(p) ++ GET_BE_U_n(p), n in { 2, 3, 4, 5, 6, 7, 8 } ++ GET_BE_S_n(p), n in { 2, 3, 4, 5, 6, 7, 8 } ++ GET_LE_U_n(p), n in { 2, 3, 4, 5, 6, 7, 8 } ++ GET_LE_S_n(p), n in { 2, 3, 4, 5, 6, 7, 8 } ++ ``` ++ ++ where *p* points to the integral value in the packet buffer. The ++ macro returns the integral value at that location. ++ ++ `U` indicates that an unsigned value is fetched; `S` indicates that a ++ signed value is fetched. For multi-byte values, `BE` indicates that ++ a big-endian value ("network byte order") is fetched, and `LE` ++ indicates that a little-endian value is fetched. *n* is the length, ++ in bytes, of the multi-byte integral value to be fetched. ++ ++ In addition to the bounds checking the `GET_*()` macros perform, ++ using those macros has other advantages: ++ ++ * tcpdump runs on both big-endian and little-endian systems, so ++ fetches of multi-byte integral values must be done in a fashion ++ that works regardless of the byte order of the machine running ++ tcpdump. The `GET_BE_*()` macros will fetch a big-endian value and ++ return a host-byte-order value on both big-endian and little-endian ++ machines, and the `GET_LE_*()` macros will fetch a little-endian ++ value and return a host-byte-order value on both big-endian and ++ little-endian machines. ++ ++ * tcpdump runs on machines that do not support unaligned access to ++ multi-byte values, and packet values are not guaranteed to be ++ aligned on the proper boundary. The `GET_BE_*()` and `GET_LE_*()` ++ macros will fetch values even if they are not aligned on the proper ++ boundary. ++ ++* The `GET_*()` macros that fetch IPv4 address values are: ++ ``` ++ GET_IPV4_TO_HOST_ORDER(p) ++ GET_IPV4_TO_NETWORK_ORDER(p) ++ ``` ++ ++ where *p* points to the address in the packet buffer. ++ `GET_IPV4_TO_HOST_ORDER()` returns the address in the byte order of ++ the host that is running tcpdump; `GET_IPV4_TO_NETWORK_ORDER()` ++ returns it in network byte order. ++ ++ Like the integral `GET_*()` macros, these macros work correctly on ++ both big-endian and little-endian machines and will fetch values even ++ if they are not aligned on the proper boundary. ++ ++* The `GET_*()` macro that fetches an arbitrary sequences of bytes is: ++ ``` ++ GET_CPY_BYTES(dst, p, len) ++ ``` ++ ++ where *dst* is the destination to which the sequence of bytes should ++ be copied, *p* points to the first byte of the sequence of bytes, and ++ *len* is the number of bytes to be copied. The bytes are copied in ++ the order in which they appear in the packet. ++ ++* To fetch a network address and convert it to a printable string, use ++ the following `GET_*()` macros, defined in `addrtoname.h`, to ++ perform bounds checks to make sure the entire address is within the ++ buffer and to translate the address to a string to print: ++ ``` ++ GET_IPADDR_STRING(p) ++ GET_IP6ADDR_STRING(p) ++ GET_MAC48_STRING(p) ++ GET_EUI64_STRING(p) ++ GET_EUI64LE_STRING(p) ++ GET_LINKADDR_STRING(p, type, len) ++ GET_ISONSAP_STRING(nsap, nsap_length) ++ ``` ++ ++ `GET_IPADDR_STRING()` fetches an IPv4 address pointed to by *p* and ++ returns a string that is either a host name, if the `-n` flag wasn't ++ specified and a host name could be found for the address, or the ++ standard XXX.XXX.XXX.XXX-style representation of the address. ++ ++ `GET_IP6ADDR_STRING()` fetches an IPv6 address pointed to by *p* and ++ returns a string that is either a host name, if the `-n` flag wasn't ++ specified and a host name could be found for the address, or the ++ standard XXXX::XXXX-style representation of the address. ++ ++ `GET_MAC48_STRING()` fetches a 48-bit MAC address (Ethernet, 802.11, ++ etc.) pointed to by *p* and returns a string that is either a host ++ name, if the `-n` flag wasn't specified and a host name could be ++ found in the ethers file for the address, or the standard ++ XX:XX:XX:XX:XX:XX-style representation of the address. ++ ++ `GET_EUI64_STRING()` fetches a 64-bit EUI pointed to by *p* and ++ returns a string that is the standard XX:XX:XX:XX:XX:XX:XX:XX-style ++ representation of the address. ++ ++ `GET_EUI64LE_STRING()` fetches a 64-bit EUI, in reverse byte order, ++ pointed to by *p* and returns a string that is the standard ++ XX:XX:XX:XX:XX:XX:XX:XX-style representation of the address. ++ ++ `GET_LINKADDR_STRING()` fetches an octet string, of length *length* ++ and type *type*, pointed to by *p* and returns a string whose format ++ depends on the value of *type*: ++ ++ * `LINKADDR_MAC48` - if the length is 6, the string has the same ++ value as `GET_MAC48_STRING()` would return for that address, ++ otherwise, the string is a sequence of XX:XX:... values for the bytes ++ of the address; ++ ++ * `LINKADDR_FRELAY` - the string is "DLCI XXX", where XXX is the ++ DLCI, if the address is a valid Q.922 header, and an error indication ++ otherwise; ++ ++ * `LINKADDR_EUI64`, `LINKADDR_ATM`, `LINKADDR_OTHER` - ++ the string is a sequence of XX:XX:... values for the bytes ++ of the address. ++ ++6) When defining a structure corresponding to a packet or part of a ++ packet, so that a pointer to packet data can be cast to a pointer to ++ that structure and that structure pointer used to refer to fields in ++ the packet, use the `nd_*` types for the structure members. ++ ++ Those types all are aligned only on a 1-byte boundary, so a ++ compiler will not assume that the structure is aligned on a boundary ++ stricter than one byte; there is no guarantee that fields in packets ++ are aligned on any particular boundary. ++ ++ This means that all padding in the structure must be explicitly ++ declared as fields in the structure. ++ ++ The `nd_*` types for integral values are: ++ ++ * `nd_uintN_t`, for unsigned integral values, where *N* is the number ++ of bytes in the value. ++ * `nd_intN_t`, for signed integral values, where *N* is the number ++ of bytes in the value. ++ ++ The `nd_*` types for IP addresses are: ++ ++ * `nd_ipv4`, for IPv4 addresses; ++ * `nd_ipv6`, for IPv6 addresses. ++ ++ The `nd_*` types for link-layer addresses are: ++ ++ * `nd_mac48`, for MAC-48 (Ethernet, 802.11, etc.) addresses; ++ * `nd_eui64`, for EUI-64 values. ++ ++ The `nd_*` type for a byte in a sequence of bytes is `nd_byte`; an ++ *N*-byte sequence should be declared as `nd_byte[N]`. ++ ++7) Do invalid packet checks in code: Think that your code can receive in input + not only a valid packet but any arbitrary random sequence of octets (packet + * built malformed originally by the sender or by a fuzz tester, + * became corrupted in transit or for some other reason). + + Print with: `nd_print_invalid(ndo); /* to print " (invalid)" */` + - * Use `struct tok` for indexed strings and print them with ++8) Use `struct tok` for indexed strings and print them with + `tok2str()` or `bittok2str()` (for flags). ++ All `struct tok` must end with `{ 0, NULL }`. + - * Avoid empty lines in output of printers. ++9) Avoid empty lines in output of printers. + - * A commit message must have: ++10) A commit message must have: + ``` + First line: Capitalized short summary in the imperative (50 chars or less) + + If the commit concerns a protocol, the summary line must start with + "protocol: ". + + Body: Detailed explanatory text, if necessary. Fold it to approximately + 72 characters. There must be an empty line separating the summary from + the body. + ``` + - * Avoid non-ASCII characters in code and commit messages. ++11) Avoid non-ASCII characters in code and commit messages. + - * Use the style of the modified sources. ++12) Use the style of the modified sources. + - * Don't mix declarations and code. ++13) Don't mix declarations and code. + - * Don't use `//` for comments. - Not all C compilers accept C++/C99 comments by default. ++14) tcpdump requires a compiler that supports C99 or later, so C99 ++ features may be used in code, but C11 or later features should not be ++ used. + - * Avoid trailing tabs/spaces ++15) Avoid trailing tabs/spaces diff --cc contrib/tcpdump/autogen.sh index 000000000000,000000000000..c84a6b5c5dd2 new file mode 100755 --- /dev/null +++ b/contrib/tcpdump/autogen.sh @@@ -1,0 -1,0 +1,25 @@@ ++#!/bin/sh -e ++ ++: "${AUTORECONF:=autoreconf}" ++ ++AUTORECONFVERSION=`$AUTORECONF --version 2>&1 | grep "^autoreconf" | sed 's/.*) *//'` ++ ++maj=`echo "$AUTORECONFVERSION" | cut -d. -f1` ++min=`echo "$AUTORECONFVERSION" | cut -d. -f2` ++# The minimum required version of autoconf is currently 2.69. ++if [ "$maj" = "" ] || [ "$min" = "" ] || \ ++ [ "$maj" -lt 2 ] || { [ "$maj" -eq 2 ] && [ "$min" -lt 69 ]; }; then ++ cat >&2 <<-EOF ++ Please install the 'autoconf' package version 2.69 or later. ++ If version 2.69 or later is already installed and there is no ++ autoconf default, it may be necessary to set the AUTORECONF ++ environment variable to enable the one to use, like: ++ AUTORECONF=autoreconf-2.69 ./autogen.sh ++ or ++ AUTORECONF=autoreconf-2.71 ./autogen.sh ++ EOF ++ exit 1 ++fi ++ ++echo "$AUTORECONF identification: $AUTORECONFVERSION" ++"$AUTORECONF" -f diff --cc contrib/tcpdump/config.guess index 69188da73d74,000000000000..f6d217a49f8f mode 100755,000000..100755 --- a/contrib/tcpdump/config.guess +++ b/contrib/tcpdump/config.guess @@@ -1,1774 -1,0 +1,1812 @@@ +#! /bin/sh +# Attempt to guess a canonical system name. - # Copyright 1992-2023 Free Software Foundation, Inc. ++# Copyright 1992-2024 Free Software Foundation, Inc. + +# shellcheck disable=SC2006,SC2268 # see below for rationale + - timestamp='2023-01-01' ++timestamp='2024-01-01' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess +# +# Please send patches to . + + +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + - Output the configuration name of the system \`$me' is run on. ++Output the configuration name of the system '$me' is run on. + +Options: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. - Copyright 1992-2023 Free Software Foundation, Inc. ++Copyright 1992-2024 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" - Try \`$me --help' for more information." ++Try '$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +# Just in case it came from the environment. +GUESS= + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + - # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still - # use `HOST_CC' if defined, but it is deprecated. ++# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still ++# use 'HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD=$driver + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if test -f /.attbin/uname ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case $UNAME_SYSTEM in +Linux|GNU|GNU/*) + LIBC=unknown + + set_cc_for_build + cat <<-EOF > "$dummy.c" ++ #if defined(__ANDROID__) ++ LIBC=android ++ #else + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #elif defined(__GLIBC__) + LIBC=gnu ++ #elif defined(__LLVM_LIBC__) ++ LIBC=llvm + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif + #endif ++ #endif + EOF + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" + + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu + fi + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)` + case $UNAME_MACHINE_ARCH in + aarch64eb) machine=aarch64_be-unknown ;; + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown + ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently (or will in the future) and ABI. + case $UNAME_MACHINE_ARCH in + earm*) + os=netbsdelf + ;; + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # Determine ABI tags. + case $UNAME_MACHINE_ARCH in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case $UNAME_VERSION in + Debian*) *** 5498 LINES SKIPPED *** From nobody Mon Sep 23 21:33:16 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 4XCGSX5NVhz5WXvh; Mon, 23 Sep 2024 21:33:16 +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 4XCGSX4gF1z4kpr; Mon, 23 Sep 2024 21:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727127196; 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=dM6E3FUZ/TQQWs/5N8PW5FpipfuZvfNBHxrmVjvdGto=; b=ioFJdun4xhYIbI+lkHfhrCfH/U5/YpzIdRG0L8fU0Kqe5wYfSeY7QWlvTB1Haqi37Htu0S 3AyJ5lPGuSafNM6fNmw1jVjiibSmRZ2qIaDkSpZGYuAVCBj+OBn6x5oKMUuO/0f4ZQQYBB pO4vYvk7LOQ/gtDju6Q6/F362szIMPmQcaZYTdbi2083vTUFJlmg19LfZAylJcW/XrW+N+ Xez69qA0svgJm6wLkZos1TXS67SjQJ+1yH+r5s1qAE8qkx09o1TTn7pHsSHybT6WTaTrdW 6aqRy6NQd4i1w+DZCSipShbbccfO3VO8zRmRRcVYeQJi4bRvV/LEnhJAj8bHgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727127196; a=rsa-sha256; cv=none; b=R/C0njNEXAZZIkPpg+Lxtq4nGgp4ADV9GPXdGwuHk4I/8lZs6XXt4SSNDOH5QMSKslZ9VQ y5BSe0yn5nB+mAUf8ug/2OzBl0i6EeLFp71Dvx8FG1J/buk6xKMIuxL7xUxldnaP4S1d22 WY+cnOnOBorHg+maEJEyZkhu6rYQhpwupVCaQoLFOnr/M5tj4ECVz7HFBSe3Z2mdu8Nc8Q /87dQjqqCOpXOg+0VAF0CNC7UsXi5ItBGQ93ZjMGLAzx+1XZJnd4Qz5RRFrTpdg778Pyjo aW08tXXiQ41xas9X+L7PAs31YdynIOxoL4b24kG3+87XvgnP3stpMIX0RR8PZg== 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=1727127196; 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=dM6E3FUZ/TQQWs/5N8PW5FpipfuZvfNBHxrmVjvdGto=; b=iGpBOaX0p3ySNeLyxZ1DGfiPNqDodEurhIj2rGJIVPaSDPoZVwB3Zx/MtE33L0p9HaXYlY gi63HmCrc+ZsKJ3WqfKBN9ZKFmKME/su7cefTREsZCZ6uRKWaq3F20Hko//YMo+8dgdHvs DzEKcgyKBh+YKNrkV89IiILFfAKbjAxTiUtF3gTQQLkEkgNrgsv04enoVNjCxuC0ZYFFr0 yINyMYACEeV0MSNubt1ZFzIehruANtP6oZHlTdZEkTuTU55H0YCzqIBwa1pF3YZIDL+3zB ZXunVaZplsz9Jn/V1dmTQFcxiqVvat+NlvfAMT40OK0ChMk7rUxG/0t4ERBhNQ== 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 4XCGSX4CYTz11N8; Mon, 23 Sep 2024 21:33:16 +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 48NLXGRL075281; Mon, 23 Sep 2024 21:33:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48NLXGBo075278; Mon, 23 Sep 2024 21:33:16 GMT (envelope-from git) Date: Mon, 23 Sep 2024 21:33:16 GMT Message-Id: <202409232133.48NLXGBo075278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 5dd89e6b6777 - stable/13 - pf: use AF_INET6 when comparing IPv6 addresses 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5dd89e6b6777f40dd0fe329b64470e25f7a5784b Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5dd89e6b6777f40dd0fe329b64470e25f7a5784b commit 5dd89e6b6777f40dd0fe329b64470e25f7a5784b Author: Kristof Provost AuthorDate: 2024-08-28 13:40:42 +0000 Commit: Kristof Provost CommitDate: 2024-09-23 15:09:37 +0000 pf: use AF_INET6 when comparing IPv6 addresses Reviewed by: zlei MFC after: 1 week Obtained from: OpenBSD, henning , cf7c0bf78a Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46576 (cherry picked from commit 50ecaf1bd46a834c4fdaf483eb39df7bb62501e3) --- sys/netpfil/pf/pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index f940950a2479..810966f88a89 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6821,10 +6821,10 @@ pf_test_state_other(struct pf_kstate **state, int direction, struct pfi_kkif *ki #endif /* INET */ #ifdef INET6 case AF_INET6: - if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], AF_INET)) + if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], AF_INET6)) PF_ACPY(pd->src, &nk->addr[pd->sidx], pd->af); - if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], AF_INET)) + if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], AF_INET6)) PF_ACPY(pd->dst, &nk->addr[pd->didx], pd->af); #endif /* INET6 */ } From nobody Mon Sep 23 21:33:17 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 4XCGSY2bm1z5WY38; Mon, 23 Sep 2024 21:33:17 +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 4XCGSY1mqqz4ktn; Mon, 23 Sep 2024 21:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727127197; 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=0aOVRGO0P36ECIxf0hDN9p8+E09OZpvKjOwxbwTC+Jw=; b=kg6XNGFwc95Q2WMq9d1a+1dMbD/DxUApOjCpf1sESDiQ1D/5ATEF8zbQSxg41wav9OVZ0L CzB7n0A68Zm8f2p0iamrV6C2euattxJkaxz+MRckZjlbIos2ustigoBIjK82lbJFLgJS7n 7vHThEZYFsAEzBbAMeGwX1zI9bg9uEIibUjcw8RrpwXHLoNR3+vsH/zylNi1JIS4d8G+hf AHAUDoQGkc5mkralkB4C8/0FO28e/mEmP7Bui8VJ9uI6kO/cUvrg9OpocPvonR7Qt79nv4 rheKKx0IAIjLQtad9GSdHIS2ITMRspINxVkmLleHAIHR7Vcag+e/+dMybMO6iA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727127197; a=rsa-sha256; cv=none; b=qt6POby7oPh43j6o3pgc8rz4xiwswxlYDCcy5ahtQMhJszoVKhFWeKRE5vn2bVhA7ieb2x 7ZXsyLqslQGkmpZy4la2uhj36gOlg816WXWdePVo7xiGMiQKquFugb8MwyHEdzI4udyjNe yK6IylOZAkhgMulXvt4tufHTQ5GHzN+9C9ZWjO1Nw/BFlHqUwRxqq+nAjU+80gUgKD/L1F vh1JfJnfxjlKHPJ9JTllhmONp1vkqvS3EpMZ02I86VsWWzl5VEeGxhPhk2Ze0NkUXentz4 j3Sum+fU/IRy3CS0Jm0BUPGuarpn7psN1pwLi2XiN65bIxapmI8/vWgivlSMuw== 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=1727127197; 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=0aOVRGO0P36ECIxf0hDN9p8+E09OZpvKjOwxbwTC+Jw=; b=mzlzxSbC0JCybhABs3rpDwUIMzIiwNnBoQg4rEusx/h/RhIgfxg5ji+EstyWUAgf21lcL4 qSouyM7k1GONuSMBnZMJUto7gC4Pn0CiS2AKe/lFzmImXVYahAP9vwXeAnY0X3487r1sda gG5v9l0FUjF8cKyvsAofWpg386aMfi0JdPE54rYPOiUFFWJRmHN6mnt5n58qtF8A1WAYBJ gOPsaUYEEI2kKYtnDhaOz5F0sI+LU/viYxTDb+Wxb4GNfDeLgXFDZ6Jfl+EPLZtE0eCeOa 9Rq5ypQoOL/mVD5pxT24/5pBKp6h+xlF/TLNW+iDpEnrAVU0dnhCz86f+jHmbQ== 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 4XCGSY1N94z12HS; Mon, 23 Sep 2024 21:33:17 +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 48NLXHI6075385; Mon, 23 Sep 2024 21:33:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48NLXHK4075382; Mon, 23 Sep 2024 21:33:17 GMT (envelope-from git) Date: Mon, 23 Sep 2024 21:33:17 GMT Message-Id: <202409232133.48NLXHK4075382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: c5a9d5ff0c0c - stable/14 - pf: use AF_INET6 when comparing IPv6 addresses 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c5a9d5ff0c0cca6b4650e7853580ae3dbd623fd6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c5a9d5ff0c0cca6b4650e7853580ae3dbd623fd6 commit c5a9d5ff0c0cca6b4650e7853580ae3dbd623fd6 Author: Kristof Provost AuthorDate: 2024-08-28 13:40:42 +0000 Commit: Kristof Provost CommitDate: 2024-09-23 15:09:42 +0000 pf: use AF_INET6 when comparing IPv6 addresses Reviewed by: zlei MFC after: 1 week Obtained from: OpenBSD, henning , cf7c0bf78a Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46576 (cherry picked from commit 50ecaf1bd46a834c4fdaf483eb39df7bb62501e3) --- sys/netpfil/pf/pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index f4ee8fb3344a..d6541bc6627b 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7413,10 +7413,10 @@ pf_test_state_other(struct pf_kstate **state, struct pfi_kkif *kif, #endif /* INET */ #ifdef INET6 case AF_INET6: - if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], AF_INET)) + if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], AF_INET6)) PF_ACPY(pd->src, &nk->addr[pd->sidx], pd->af); - if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], AF_INET)) + if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], AF_INET6)) PF_ACPY(pd->dst, &nk->addr[pd->didx], pd->af); #endif /* INET6 */ } From nobody Mon Sep 23 23:52: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 4XCKYC5hMdz5Wjc1; Mon, 23 Sep 2024 23:52:31 +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 4XCKYC5DLtz41Kd; Mon, 23 Sep 2024 23:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727135551; 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=GnRC7njLYc4bhKCWYlNYjVoV7rFk42sMLxQQTOFqFaQ=; b=Vq97rNCP1Nu4czUn7ggMWcJhvUm28UNzgwyV6ppCPdLXDzIPzAGRMch67L5PDP1dUqe0tT U101YCJnN5cQPOv1/AOQ4sQHKeJgWlTehQfBBVD8vbDji6L9FFrqlOgLg2fQfUHCDtJc2e vHWJCn9fGRSBDn382SnZzixmyUgzs9lpZZVgTOPruvkrPZB6qytI/qOh9w2slj0sxbDieM VrBLgKdJCEoH6JEkKQOH2litesUNyzMh/FQSYqko2jBNiQsEwzF4aEnXadL89GSbLm2ANn AArxQXmIHr2VfFMyeGwDUyHz6ZGugloV+t+64+lBC8W6TMkITmO69FbZVrnOWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727135551; a=rsa-sha256; cv=none; b=WFIZvFQSb9ml+7kxEHOjLhT12kBlvnK22yCpdPxDWm39iJytkG5WToiIB6Nm7cqFedIoRM l+FeMDPaqNkpyujAqhm3lxQCUqHqXYK8q3CBaw8ejDi2k4/TG1pSHmCLx4eahcsH0xPt6B 1N/d/Bvg9cDXjAGQLr5DJhCnfShd+dxpbDaHjK314f7z9hNUXpkzcKzLSoxbglF1BfHI/c HN2lQBA2XL19DQrwP688Uyj4ovgrQP+pokablIB4saM8bvc2zsRIt/IzLfOSNdz+1wS+Gs TGPf0G+Q/u71b4nQm8fmOrRmWqcZ0QpfgCvyqfXkf3sx26uQKMFtXbmoYNKqEA== 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=1727135551; 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=GnRC7njLYc4bhKCWYlNYjVoV7rFk42sMLxQQTOFqFaQ=; b=Pg9hskf5/zDrlNY4/Zznh1LaxCQEi60JtXXDGTq9WLjhvbVWYGDp8rLC5WpHPcJnUTgNvb tZhILuZQoFeWGMTtreuwQ+kO9E7ZaXIb/QhGbt7WzhmrFi9aCd+clvMGNURDp9izI9OqCa f+YOfK1lsjK75ZtraV1PIgQDnfTa/Yzgwgh3jgI5qpgHQXC82A29aDnGnRuADBa9EZbK7L cmRfSTod2cJvHT+ldUZhHPl6Oftfxyz5SN49TmiZKCuyOp+4JH48SPuFIWNE4Qml0bGzHO bf/KHbp6Nm/XuENeB1xTtEcd+kdlZ3tWRFATbkpdx42vX7v/89UKONyfTe9hTg== 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 4XCKYC4qG4z15GJ; Mon, 23 Sep 2024 23:52:31 +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 48NNqVuZ014618; Mon, 23 Sep 2024 23:52:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48NNqVRU014615; Mon, 23 Sep 2024 23:52:31 GMT (envelope-from git) Date: Mon, 23 Sep 2024 23:52:31 GMT Message-Id: <202409232352.48NNqVRU014615@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 018a491dcea9 - main - dirdeps: Update Makefile.depend.host for hosttools 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: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 018a491dcea9ed5402bc7f1f4d8b7b1cf5825b9b Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=018a491dcea9ed5402bc7f1f4d8b7b1cf5825b9b commit 018a491dcea9ed5402bc7f1f4d8b7b1cf5825b9b Author: Ka Ho Ng AuthorDate: 2024-09-23 23:49:38 +0000 Commit: Ka Ho Ng CommitDate: 2024-09-23 23:52:28 +0000 dirdeps: Update Makefile.depend.host for hosttools Sponsored by: Juniper Networks, Inc. --- usr.bin/clang/llvm-tblgen/Makefile.depend.host | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/clang/llvm-tblgen/Makefile.depend.host b/usr.bin/clang/llvm-tblgen/Makefile.depend.host index 2f7a10cf10d6..4ace687cb406 100644 --- a/usr.bin/clang/llvm-tblgen/Makefile.depend.host +++ b/usr.bin/clang/llvm-tblgen/Makefile.depend.host @@ -3,6 +3,7 @@ DIRDEPS = \ lib/clang/libllvmminimal \ lib/ncurses/tinfo \ + usr.bin/clang/llvm-min-tblgen \ .include From nobody Tue Sep 24 00:27:18 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 4XCLKM26Rdz5WlZy; Tue, 24 Sep 2024 00:27:19 +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 4XCLKM1Yk8z44qS; Tue, 24 Sep 2024 00:27:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727137639; 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=8ZxCj0sKAUg7peeLLWRFLgSz7pGGjyOpal/QdxF/WXE=; b=fBUanhwFF5YHQn9NncpRhS1p0H4kyjmNdfw8Kb/Vv8Y0ajNCMWSw3h75Kq3N9DJsbWSlTs b/lRq/odYHl+Tpp5TQe4YfbiJbuqcl/F10UmCm7fg7U/p4nqTtiW/P6TneFBIAb19wfdj9 Lqt9NgXH1kEuhc3kyb+tAIujTXVknaVKR04lERNqxKxxet4Ey53gDotCPAKI8bdZrTTMMq 3ENP1re0UQHTXPklD8E8FcaNY2xV3OHjae3jlZKDrj2KdzTzmqQShAuqSsVaoVtx9kbgOi AjAhtg34PtoBoZSyl7e9nLILD70nfqO5Eia8MhuWdOfsAJxQSj60irH0BCRX6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727137639; a=rsa-sha256; cv=none; b=xXs7ovq70W+fpJ1TIwUAH45/0SprX/DmfYv43h9Vlr/HZVXHlc1KV9Ws0Ll0BKByflamuS uuIQCY+JjduRvRrSdhbfS5lY4GRoZ9ge0h4fwuRHnzJ1b2WeiC1bT394CKB/SJpoER1W1s Dn3v4iD6xnU2/A3ZbGQ9DZvpmuc8ZkkX/HvCUIZ2YPPXxCmwipZzlnf3bToEmUvOO3ur5X I+7LTIetYyP5TIUQ977xO8P0yCWt2ULN+G8pI/0/WuG5xhTVMyuOlb5QlrGUA/Z+o/nJSB dvXnigNNis0hGmhT1tLA25AutsLs41yeYF9QGqedgxgTfNnmieKvip3OQGlb/w== 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=1727137639; 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=8ZxCj0sKAUg7peeLLWRFLgSz7pGGjyOpal/QdxF/WXE=; b=A7cFeNqvgpahmqdfmNKnwUkK3z4c8dck1C01UgTLVOKeOBGuEne5wZENIM++gXCJEZDMdp j3lWAzy1Ll/IQdIYbd3xekX6aaeoUbqO29ffn50ZPhlx3Epx2Fpa1fklxIdM5pRmU+/Lou O0BiNmuR+p+54pOvfj/OoW6C5jo/JEPtE0zjH8GdTIFRFrsh7+lt8j8XTqawoZVdG2UROT D8fG8yL6cHMRkXXPhZEGD4fZsjVV4foZHPxZ6WFssStzGbBDgTJIN7tAhXCM1OyG23+XO6 Tckr3cJr4JkvK0lfX2SZNlHgygdbq/FBbQX73fUBnHcKGJd3yG3aQe5WqnSdNQ== 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 4XCLKM0m3Fz16Kx; Tue, 24 Sep 2024 00:27:19 +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 48O0RIOi066982; Tue, 24 Sep 2024 00:27:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48O0RIjZ066979; Tue, 24 Sep 2024 00:27:18 GMT (envelope-from git) Date: Tue, 24 Sep 2024 00:27:18 GMT Message-Id: <202409240027.48O0RIjZ066979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 8067debcd19f - main - dirdeps: update/fix Makefile.depend.host for hosttools 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: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8067debcd19f18a60d79d91f3b5107eed2a6faae Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=8067debcd19f18a60d79d91f3b5107eed2a6faae commit 8067debcd19f18a60d79d91f3b5107eed2a6faae Author: Ka Ho Ng AuthorDate: 2024-09-24 00:15:48 +0000 Commit: Ka Ho Ng CommitDate: 2024-09-24 00:26:20 +0000 dirdeps: update/fix Makefile.depend.host for hosttools There were some leftover bits not picked up in 018a491dcea9. Sponsored by: Juniper Networks, Inc. --- usr.bin/clang/clang-tblgen/Makefile.depend.host | 1 - usr.bin/clang/llvm-min-tblgen/Makefile.depend.host | 11 +++++++++++ usr.bin/clang/llvm-tblgen/Makefile.depend.host | 1 - 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/usr.bin/clang/clang-tblgen/Makefile.depend.host b/usr.bin/clang/clang-tblgen/Makefile.depend.host index 8127b03d8797..5ae6e1d38324 100644 --- a/usr.bin/clang/clang-tblgen/Makefile.depend.host +++ b/usr.bin/clang/clang-tblgen/Makefile.depend.host @@ -3,7 +3,6 @@ DIRDEPS = \ lib/clang/libclangminimal \ lib/clang/libllvmminimal \ - lib/ncurses/tinfo \ .include diff --git a/usr.bin/clang/llvm-min-tblgen/Makefile.depend.host b/usr.bin/clang/llvm-min-tblgen/Makefile.depend.host new file mode 100644 index 000000000000..e41a35dcde12 --- /dev/null +++ b/usr.bin/clang/llvm-min-tblgen/Makefile.depend.host @@ -0,0 +1,11 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + lib/clang/libllvmminimal \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.bin/clang/llvm-tblgen/Makefile.depend.host b/usr.bin/clang/llvm-tblgen/Makefile.depend.host index 4ace687cb406..1f33aa35999a 100644 --- a/usr.bin/clang/llvm-tblgen/Makefile.depend.host +++ b/usr.bin/clang/llvm-tblgen/Makefile.depend.host @@ -2,7 +2,6 @@ DIRDEPS = \ lib/clang/libllvmminimal \ - lib/ncurses/tinfo \ usr.bin/clang/llvm-min-tblgen \ From nobody Tue Sep 24 01:25:07 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 4XCMc34Zw9z5X4vl; Tue, 24 Sep 2024 01:25:07 +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 4XCMc33zZGz4CfR; Tue, 24 Sep 2024 01:25:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727141107; 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=xhCG//5EvfDrIKfotDaiBXWmI2ckEOj8fZK8YKAkcrc=; b=jheufYu/0jPfQPa/2a2Rkpgl6wucBGOJV8WtfWkNC7aqhmqXVAmsWV7BcBDpXRemUskXx7 TNSEv7MZfDKvAQzpIk23zLQFs1MkIHf5J6kSOg/kMK6uD+hqQAecmqsDE9KeL648MmOJGP Iw/aGO486yxtUuvk7lhGDoloY6gReciPyDwRPL2ka9CSc63Ju9QusraEO4q21Kp9f/BERn jYCjupLccOKjAediE+4pqI0ztDXwkGV2fcQTFl4dSLNuyJA3N/daEBUd0uK92pw/LeGcGz 4xQ13VLj5vTCKcUDE8M6cOdcNY9Lm/+89+I6OYbVB1e2yoGhlhdwfnZ8LIxvjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727141107; a=rsa-sha256; cv=none; b=QgvRW1Y07OGpQRl6E0GCw6B6dOgiVHM6kFg2eti/tYKgIGoCIHHLfJSltHKia+Gl4DirLp EsHdF3s9slzeMpBqb1qvcfCdo/twbfx+NSOg/cbJ2OZk5gF1MCxuIYejfiJZXi2JuuDeXD lG4TCCqrvr/6GAJKqci9OWNdIg1MsFicU7ycHW8IRa6UFLNOmxPT4VyGRjUn2pTetyQcff usZXyDXo9tx83hJWh8iLPWi5+k+PBybnxd2svDBZACMvAfHS8v1tWR076oVPRvDYh8tZ8m StvjxRh6qmT7QMdeYXpGVpqeM7KLCOwHNBaFMmPdy7IEVhavTnOn1hSZrr3U3w== 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=1727141107; 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=xhCG//5EvfDrIKfotDaiBXWmI2ckEOj8fZK8YKAkcrc=; b=tuDrEV3iSvozdMYm0z5OFhxD7LqEIoVrCWuBfrn8BHTcPOZgtV8sF3CdPUkaoHWF0vkBxl B/NeHDaxdvesqo0z3su8NVgc+fIOVmNb0+EpqTJuk44Al2tVVKbBEk6IzLUJSPHr1yJjl8 qlb3crur2HXRu6GZLbCQSsoCnE64+NNQm5s4xfL7v86/7Fcuo+mQq6DHQpfTgCaoNeC+0N 8oq0pwa1YXB5MrPYSH4Q+s/+DdNzEAGf/qyr/3jwgeeB3HIXytHkqhmXwc/yVID5+2crlM I+Bnqnw38eMZp27ZsJfu9WvckD0WLbm9hyOXTvc2SKQIzWspgz2J/Lv4/dlkIA== 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 4XCMc33ZWxz17mD; Tue, 24 Sep 2024 01:25:07 +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 48O1P7Uo068359; Tue, 24 Sep 2024 01:25:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48O1P7le068356; Tue, 24 Sep 2024 01:25:07 GMT (envelope-from git) Date: Tue, 24 Sep 2024 01:25:07 GMT Message-Id: <202409240125.48O1P7le068356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 306113630dd6 - main - libthr: add libsys for dirdeps build 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: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 306113630dd67c55975acd20bfa08931e3aa6637 Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=306113630dd67c55975acd20bfa08931e3aa6637 commit 306113630dd67c55975acd20bfa08931e3aa6637 Author: Ka Ho Ng AuthorDate: 2024-09-24 01:23:48 +0000 Commit: Ka Ho Ng CommitDate: 2024-09-24 01:24:36 +0000 libthr: add libsys for dirdeps build Sponsored by: Juniper Networks, Inc. --- lib/libthr/Makefile.depend | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libthr/Makefile.depend b/lib/libthr/Makefile.depend index 40575a605e97..2f0697372a4a 100644 --- a/lib/libthr/Makefile.depend +++ b/lib/libthr/Makefile.depend @@ -6,6 +6,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libsys \ usr.bin/awk.host \ From nobody Tue Sep 24 01:25:08 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 4XCMc509zRz5X53X; Tue, 24 Sep 2024 01:25:09 +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 4XCMc44wSCz4CmV; Tue, 24 Sep 2024 01:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727141108; 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=9EXF9RyO3hmGKgcQOCf8u1Rh1EbdZl6VxQFty1GHb+w=; b=QQlWxtiUVR3hnPvz9rf2vIIjBl/9RdWW3u18utg9Or13SkstCzoKNngBsYaoHE9Q/2iw8H 4BX8GJT2LdIatspucmluMj61U0zJzT2IqWedshvCkgzKu9rdE9bGREaW/9+VwAgw4Vf+JY sbS304yqhLxHVwbkEt6qiS4r97/Akd6UhE0J0IGu3e/FITYWF13+1gLmvvbqhSH11Qt74a aD/Ki4i/+j7mBpsVUkTmEhK8Re3k6Lm/t8zeg+gznnpJczkkZuj80ZRfVkuXkoQ4auo8KC POf0YQZezwh0ro3p9UvT01UrYinpVTW6g0Y9nIXH1AgvsnwpIBRU0aOt2j8uag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727141108; a=rsa-sha256; cv=none; b=jUMvaQBxkymU9b8eSuLzsNUw8BdW5z6C9myyHxqxYDPjOPLD0URB+oj3vD3cO248giZ8mN zpX/HmMueLZmsmE9qomUKHzBxfIzXcR+yRrdLFx8XHYPhMIsDnxvbhtJtWJtYtMIS7sQpp J/JMQIB4vyQO34OQRrgrZ/3qUVZzVstZN6DlZLlc0JSKM66V6CEEyB5nF+dFXke6gF6aKh 8ywS8d9vywS2JS6M6WfkAVKgWIGeW3DcX4rKAAqYdfGK8noa7CePz7+3jOfvyrR45te8gi L2pQqZS6qEIKfbfCofK1ew/hVwZ1LpFVjRFsFT3FsWgJkPgh9mfEuJZjFuV0oA== 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=1727141108; 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=9EXF9RyO3hmGKgcQOCf8u1Rh1EbdZl6VxQFty1GHb+w=; b=Y2WJ+ogBuk6YpfUAJi0eOERgFoVN8xm+FiuK+2Qf1w7GU916XgjRoHOjttfI4Q2ckW28O/ oKLhKRZqEqrX3d2iVmlUJNt99Ns5HQN0r1WMUB/us9vG3SUopLkUMmR9RBiZ5B+g8+ejMD F1md4B8vF7IP555c327S9mTD4v3uxP919A/wHwIcn8THE00q/TZEof/jBQIYu3rELNVyiP nLDiCuX+HuSHFABMco4rr6noIMDY7um6aEL28pBrQqf6+2yvqDYDy4UmEJ5oU4+wXhf+I3 DWAYeBR61W69o+QKjwoug5MgaL14cTenxh2uOBhKjCtXInY4j0WX2i4B1j5Xvg== 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 4XCMc44XTdz17mF; Tue, 24 Sep 2024 01:25:08 +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 48O1P8o7068404; Tue, 24 Sep 2024 01:25:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48O1P8Qr068401; Tue, 24 Sep 2024 01:25:08 GMT (envelope-from git) Date: Tue, 24 Sep 2024 01:25:08 GMT Message-Id: <202409240125.48O1P8Qr068401@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 1d910b5f8819 - main - dirdeps: update Makefile.depend for toolchain 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: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d910b5f88197de4f43c2c464bda1000e4df8ba8 Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=1d910b5f88197de4f43c2c464bda1000e4df8ba8 commit 1d910b5f88197de4f43c2c464bda1000e4df8ba8 Author: Ka Ho Ng AuthorDate: 2024-09-24 01:02:27 +0000 Commit: Ka Ho Ng CommitDate: 2024-09-24 01:24:45 +0000 dirdeps: update Makefile.depend for toolchain Sponsored by: Juniper Networks, Inc. --- lib/clang/libllvm/Makefile.depend | 1 + usr.bin/clang/llvm-min-tblgen/Makefile.depend | 24 ++++++++++++++++++++++++ usr.bin/clang/llvm-tblgen/Makefile.depend | 1 + 3 files changed, 26 insertions(+) diff --git a/lib/clang/libllvm/Makefile.depend b/lib/clang/libllvm/Makefile.depend index d2461af845e4..e3399cc28b1c 100644 --- a/lib/clang/libllvm/Makefile.depend +++ b/lib/clang/libllvm/Makefile.depend @@ -7,6 +7,7 @@ DIRDEPS = \ lib/libexecinfo \ lib/libz \ lib/msun \ + usr.bin/clang/llvm-min-tblgen.host \ usr.bin/clang/llvm-tblgen.host \ diff --git a/usr.bin/clang/llvm-min-tblgen/Makefile.depend b/usr.bin/clang/llvm-min-tblgen/Makefile.depend new file mode 100644 index 000000000000..bb8d5321da66 --- /dev/null +++ b/usr.bin/clang/llvm-min-tblgen/Makefile.depend @@ -0,0 +1,24 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/clang/libllvm \ + lib/libc \ + lib/libc++ \ + lib/libcompiler_rt \ + lib/libcxxrt \ + lib/libexecinfo \ + lib/libthr \ + lib/libz \ + lib/libzstd \ + lib/msun \ + lib/ncurses/tinfo \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.bin/clang/llvm-tblgen/Makefile.depend b/usr.bin/clang/llvm-tblgen/Makefile.depend index bb8d5321da66..a4c44d6cfcfb 100644 --- a/usr.bin/clang/llvm-tblgen/Makefile.depend +++ b/usr.bin/clang/llvm-tblgen/Makefile.depend @@ -15,6 +15,7 @@ DIRDEPS = \ lib/libzstd \ lib/msun \ lib/ncurses/tinfo \ + usr.bin/clang/llvm-min-tblgen.host \ .include From nobody Tue Sep 24 04:15:59 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 4XCRPC5Kyjz5XFrw; Tue, 24 Sep 2024 04:15: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 4XCRPC4bBGz4QL3; Tue, 24 Sep 2024 04:15:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727151359; 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=VqNnb+qGpZkr8I9TLUjDiQVBRBm3Xlk0vS71S2STa/A=; b=ZMBYUgqjClvuhhX+FhC9f3T09gGZnzOlPetdRIgTdyo2umaZYVKQuwaFHFbRb+S8nmb/mI MetqN9lRaLu3anZ1cnc6BHvdmv9yF8cEaV0dEkmacisqP0INI5NdX3qhDDv1C2hrDzRZ0p CDDVNzLcXmG53KY//OyWBD5SWrUY7hCIToa5IVSveCTxa/EdzdXC4IHMzodE9VvMa0GJwP 6O1KOZHjuzpf6gcjbr8wpNkIU2/e5KU9vnPfSbHKHWYX12BtKXoZwz4sIN5hlGAVPh0TvQ M1QEUCCKVmajP7l5EYK1u0YJF0JCEmzqeWmBKWaQTQAldGD3q9qndPQZ/Vd4bQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727151359; a=rsa-sha256; cv=none; b=mk9SUfODdwVtfqFV4dFeQwVGX8ZAzuEgsoDnKZCoFSGIv8bGePJObGqnwgBVhgprCe+3+n GZNFjIU8fX8BhtJX4quyb6uMfUFTj4dTdtjwcEZ4pkTctDPqPzIVTUazxH8KAk0d5/Knbo ACP0td0La7iqrQrYRO0hQtlLMYbsKULhW2O4mWMEJk5Mpty4xJUmZhtuIJ8VlbXaQxFeLI qOKrDpu0wiuNrTvuztNFpCkxuzwN2oIfyvCg6bvEpjOyQgzgR/W4/J7h1/+X/7lDhBEPhy ZjzJAmUOvFL8Ma1QGqB/r3IV0WTCACTWX2k8KJ6l4IBCMBmlTToD7rvRr21edw== 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=1727151359; 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=VqNnb+qGpZkr8I9TLUjDiQVBRBm3Xlk0vS71S2STa/A=; b=o4o0vVET3+4jJIVGODTOSbSc1VrZlb45qXG4RXzR4uu5uQTg+iIRKGOqygEnnpngj2Vw3Y yoGD+GnNBNISk+QeFc3Ek9tYYqDaM+zKx7r2LtnB3DUQXcCsVu3qJ3RtxEzQlpd21bgtIP Mn2lyi/nFQ9PJ0Q50eLnlrlPvon/BeomYYzop908ocJZNQRPwy4rKPF5zE5mosWYTj9/GG jLiosICsIbqtV7Xh0s8vepSaALRPDF+c2KYMjkAhEY5YlbNXl7ExOpWAnaqk5PTZRpqNVC 9PTzdeo+HZ6Wa1vimeMuESGxn1OsSq6ST67edNXCb8f85Hbsfz5tZd41vnC3mw== 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 4XCRPC4BVnzDn5; Tue, 24 Sep 2024 04:15: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 48O4Fx2Y059035; Tue, 24 Sep 2024 04:15:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48O4FxUX059032; Tue, 24 Sep 2024 04:15:59 GMT (envelope-from git) Date: Tue, 24 Sep 2024 04:15:59 GMT Message-Id: <202409240415.48O4FxUX059032@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 87841ead405f - stable/13 - kernel: Fix defining of .init_array and .fini_array sections 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 87841ead405f7b380cbe18963d02c28ff0163ba2 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=87841ead405f7b380cbe18963d02c28ff0163ba2 commit 87841ead405f7b380cbe18963d02c28ff0163ba2 Author: Zhenlei Huang AuthorDate: 2024-09-02 04:26:47 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-24 04:15:25 +0000 kernel: Fix defining of .init_array and .fini_array sections These input sections can have decimal numbers as the priority suffix. Clang emits the '%u' form, while SORT is an alias for SORT_BY_NAME, hence will result in wrong order of constructors / destructors in output sections. Fix by using the correct sorting command SORT_BY_INIT_PRIORITY instead [1]. The functions referenced by section .fini_array is in the normal order, but been executed in the reverse order. The order is same with .init_array section. Currently these sections are not used, there should be no functional change. Note: As for the .ctors and .dtors sections, both Clang and GCC emit the priority suffix in the form of '%05u', so there is no semantic difference between SORT_BY_NAME and SORT_BY_INIT_PRIORITY for those sections [2]. This fix is extracted from a bigger patch [3] of hselasky, with additional fix for .fini_array section. 1. https://sourceware.org/binutils/docs/ld/Input-Section-Wildcards.html 2. https://reviews.llvm.org/D91187 3. https://reviews.freebsd.org/D40467 Reviewed by: imp (previous version) Obtained from: hselasky MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45194 (cherry picked from commit e15b5ba77d693609c9a452d1b0a1cdd5eb29350d) (cherry picked from commit 1d94490aee5c8353ed08909bbd00af7cfb48a8dc) --- sys/conf/ldscript.amd64 | 4 ++-- sys/conf/ldscript.i386 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/conf/ldscript.amd64 b/sys/conf/ldscript.amd64 index 9c6e603a5753..72dc573f113e 100644 --- a/sys/conf/ldscript.amd64 +++ b/sys/conf/ldscript.amd64 @@ -93,15 +93,15 @@ SECTIONS .init_array : { PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*))) KEEP (*(.init_array)) PROVIDE_HIDDEN (__init_array_end = .); } .fini_array : { PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*))) KEEP (*(.fini_array)) - KEEP (*(SORT(.fini_array.*))) PROVIDE_HIDDEN (__fini_array_end = .); } _start_ctors = .; diff --git a/sys/conf/ldscript.i386 b/sys/conf/ldscript.i386 index 6563ed2cd623..c46a9910eb3b 100644 --- a/sys/conf/ldscript.i386 +++ b/sys/conf/ldscript.i386 @@ -87,15 +87,15 @@ SECTIONS .init_array : { PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*))) KEEP (*(.init_array)) PROVIDE_HIDDEN (__init_array_end = .); } .fini_array : { PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*))) KEEP (*(.fini_array)) - KEEP (*(SORT(.fini_array.*))) PROVIDE_HIDDEN (__fini_array_end = .); } _start_ctors = .; From nobody Tue Sep 24 04:32:06 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 4XCRlq11zNz5XGY5; Tue, 24 Sep 2024 04:32:07 +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 4XCRlq0Twmz4RbQ; Tue, 24 Sep 2024 04:32:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727152327; 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=QOa2M6qmSjEf1s8ZwC7zCk7nnCIEEaieM4BgC9/tZJg=; b=w013aVGXWQECcdFSzkwVhKvNpyleNuLWtvwBS+/ekdXyQpsB9HuMQA5U+mlWCAsphs6rAD mmxhfd+lwltV15AenYWRcf35Kw422MPuMmeUOusqGI1l9SK31O99IRnTZL7ae/3yfEBzn6 4AwfklpqU0OCjLyC3mhGD+rIxi2fX9Luprbu6JX108FrfJEJALwI/XwPaA7dlFwEYQiZ/f jSJ0dZpRgAYxq7YVUGoLHqhWl1Xnn4k9gTX69yZJ8HMDY9jlTIEXDfVAaMigVUhifHyfOc iSeZ5qLc0wkf5Hq06ISdYkaCCTc4PFCZo7ZhXjUCgjth+WkAffHFQFweiTcMkw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727152327; a=rsa-sha256; cv=none; b=qFebwmkgZoj2sAwZ+dSRrOBegvPBYAQon4sxgiCz0eM4dO/EmIzm31+YutHodtHzpWhpCA StVIOnrT4KYfXglQUcUI6dM9jb8WSP0JMuQKTRt6x8AH/YGi6WEEfxkRWdai7XnJy8VzQd gw6MM+R5buZe/bmPP/nKtMRrdgMjG2YEiSHsYAkOM54bVSOlJnoNHXMr6kz+kJYp0Ll/yy +QZ+7B0px/R97ew/vxOpfkkWwkNOm4vgfcR7TzEIFfpfflG3e7LhMJs5tFqQayhfgTqw3x DGhBmh4+4+BwNqjSGgTg4y1SmoKqWVFqcKkwQ3tsb+FXuweJFJnAB2GXt7AbiA== 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=1727152327; 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=QOa2M6qmSjEf1s8ZwC7zCk7nnCIEEaieM4BgC9/tZJg=; b=IHX6I6EmOw4GPfXn7+38AGBfaykpvL6BgnX1PCB9WKkOrTz7rL2hVYiLyti6CqoIyudkOK UpnBxxzc+/NCL7MLqB/CVlnbOiQaZHOh9IT8l+xGI7RNrPy0d3IpXXnfXshjBTbVUl5xo+ XuZ5ffVq17aH7YMMJfNqL/exxoFzTiEIDf9ycRwTsL0Lx6O1LzQRrBvfknWeOnAWji4bI5 D9h5csaOoX6P+OSEaWxHvA78CxF4rmI68pDj6dp/rzCYTS4O9WHKZebtUXrnxB1pSPccVp BvlL3i7ZvvgepzJZj41mtHBFxRlIpjsAQGC3lGGeNW7IhwbuUT3whkU1BEcVqQ== 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 4XCRlq05L2zF5G; Tue, 24 Sep 2024 04:32:07 +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 48O4W6wW091849; Tue, 24 Sep 2024 04:32:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48O4W6wt091846; Tue, 24 Sep 2024 04:32:06 GMT (envelope-from git) Date: Tue, 24 Sep 2024 04:32:06 GMT Message-Id: <202409240432.48O4W6wt091846@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 6c2430c72b4c - stable/14 - bpf: Add IfAPI analogue for bpf_peers_present() 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6c2430c72b4c3516752b7541b100847522ab2225 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6c2430c72b4c3516752b7541b100847522ab2225 commit 6c2430c72b4c3516752b7541b100847522ab2225 Author: Justin Hibbits AuthorDate: 2023-10-04 20:56:52 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-24 04:30:48 +0000 bpf: Add IfAPI analogue for bpf_peers_present() An interface's bpf could feasibly not exist, in which case bpf_peers_present() would panic from a NULL pointer dereference. Solve this by adding a new IfAPI that could deal with a NULL bpf, if such could occur in the network stack. Reviewed by: zlei Sponsored by: Juniper Networks, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42082 (cherry picked from commit 8f31b879ecaf9e738dba631df4606742ee404e8e) bpf: Prefer the boolean form when calling bpf_peers_present() Reviewed by: markj, kp, #network MFC with: 8f31b879ecaf Differential Revision: https://reviews.freebsd.org/D45509 (cherry picked from commit 89204d9dcbe28558fae65936a0e93f44d926b88f) --- sys/dev/firewire/if_fwip.c | 4 ++-- sys/dev/hyperv/netvsc/if_hn.c | 4 ++-- sys/dev/my/if_my.c | 2 +- sys/dev/usb/usb_pf.c | 4 +--- sys/net/bpf.c | 12 ++++++++++++ sys/net/bpf.h | 1 + 6 files changed, 19 insertions(+), 8 deletions(-) diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index 91a27800f308..6350ec9cb56e 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -778,7 +778,7 @@ fwip_stream_input(struct fw_xferq *xferq) * Record the sender ID for possible BPF usage. */ src = ntohl(p[1]) >> 16; - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { mtag = m_tag_alloc(MTAG_FIREWIRE, MTAG_FIREWIRE_SENDER_EUID, 2*sizeof(uint32_t), M_NOWAIT); @@ -878,7 +878,7 @@ fwip_unicast_input(struct fw_xfer *xfer) goto done; } - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { /* * Record the sender ID for possible BPF usage. */ diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index 41be4226e592..9f51f5b32199 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -3263,7 +3263,7 @@ hn_txpkt(if_t ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd) int error, send_failed = 0, has_bpf; again: - has_bpf = bpf_peers_present(if_getbpf(ifp)); + has_bpf = bpf_peers_present_if(ifp); if (has_bpf) { /* * Make sure that this txd and any aggregated txds are not @@ -5973,7 +5973,7 @@ hn_transmit(if_t ifp, struct mbuf *m) omcast = (m->m_flags & M_MCAST) != 0; if (sc->hn_xvf_flags & HN_XVFFLAG_ACCBPF) { - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { m_bpf = m_copypacket(m, M_NOWAIT); if (m_bpf == NULL) { /* diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c index 3de394f424a2..6064c9de46c3 100644 --- a/sys/dev/my/if_my.c +++ b/sys/dev/my/if_my.c @@ -1146,7 +1146,7 @@ my_rxeof(struct my_softc * sc) * broadcast packet, multicast packet, matches our ethernet * address or the interface is in promiscuous mode. */ - if (bpf_peers_present(if_getbpf(ifp))) { + if (bpf_peers_present_if(ifp)) { bpf_mtap_if(ifp, m); if (if_getflags(ifp) & IFF_PROMISC && (bcmp(eh->ether_dhost, if_getlladdr(sc->my_ifp), diff --git a/sys/dev/usb/usb_pf.c b/sys/dev/usb/usb_pf.c index 3b03e80db489..0e7a75d04d6a 100644 --- a/sys/dev/usb/usb_pf.c +++ b/sys/dev/usb/usb_pf.c @@ -402,9 +402,7 @@ usbpf_xfertap(struct usb_xfer *xfer, int type) bus = xfer->xroot->bus; /* sanity checks */ - if (bus->ifp == NULL || if_getbpf(bus->ifp) == NULL) - return; - if (!bpf_peers_present(if_getbpf(bus->ifp))) + if (bus->ifp == NULL || !bpf_peers_present_if(bus->ifp)) return; totlen = usbpf_xfer_precompute_size(xfer, type); diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 61eb674a7c0a..e65d890f891b 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -2879,6 +2879,12 @@ bpfdetach(struct ifnet *ifp) BPF_UNLOCK(); } +bool +bpf_peers_present_if(struct ifnet *ifp) +{ + return (bpf_peers_present(ifp->if_bpf)); +} + /* * Get a list of available data link type of the interface. */ @@ -3162,6 +3168,12 @@ bpfdetach(struct ifnet *ifp) { } +bool +bpf_peers_present_if(struct ifnet *ifp) +{ + return (false); +} + u_int bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen) { diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 7b76129aec94..ed3239971db5 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -428,6 +428,7 @@ void bpf_mtap2_if(struct ifnet *, void *, u_int, struct mbuf *); void bpfattach(struct ifnet *, u_int, u_int); void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **); void bpfdetach(struct ifnet *); +bool bpf_peers_present_if(struct ifnet *); #ifdef VIMAGE int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); #endif From nobody Tue Sep 24 04:32:08 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 4XCRlr36bMz5XG62; Tue, 24 Sep 2024 04:32:08 +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 4XCRlr1DFmz4RMt; Tue, 24 Sep 2024 04:32:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727152328; 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=6emypY/I/Eof+NVPxj82QCc080qIyiyIzYXyIa7EfHY=; b=qBw6rWkN73yx0NEtKQ28I9YkwjmJFoEWeGUXSM56Vo370CJT1EBiXKa0X4qWuW+PNQnM38 2YtakDehFNCQFLSXb82VujPo7IUvnRvXY8mWrPGoA1npi4/lpd/heS+YPqJzC6v+p45q+r 9RSUErvA4FlAWFC/IjoWW9cXP+8WP0x1qbP034a8N4soroXSiMkxZYJBwlm7r0NwrreQLw FWEJF43eUVzvTpGOJn3hm16Im2W/Y7reVpEBvRtcs9Pjo/a5LuS51987heI8VEf62V5fOf xZRRaYLLIHx3TMGon4wxTmExGnKMSCBi39461wluvnCQ7xHmSQ5I+NrpmshTeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727152328; a=rsa-sha256; cv=none; b=F42ijOEeVaJFUOvpaszqpsbqfRfR30i+Vm1lrTIB8F5Dq+LwCeZPcJc8aYs6X3VTk/crOL 6bEN8n55e0BY3aBhmYAa7WoculBbRjarxLuDE3ZJe5cylXveNAKni7rjjgEXrpAcnPy9b8 9jqJ6QWPfnUwqd15DjRDhijlQ/2HawOGhjmj+vFwGjbu1kPjP46oMMRct50O3xDg9hoCDK EDyPDUwh9fxnjaSeeOnNrv2Get8LBN8rcO9p8zxdfUAtwdKKLgV1Lz91LEpQFlGevYk6Ed 3dBqCvSY1ZHS3Wgspk/eUPgX4pH3wnYMnv08bIE1S2RGqRxsOKIxp1cylxWf3w== 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=1727152328; 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=6emypY/I/Eof+NVPxj82QCc080qIyiyIzYXyIa7EfHY=; b=hTAj/fSebkw77OeiCuQLLya2MSWoHLJv3bIXjVhTYAYPa7JioXvqPAivb9FX7B39+uXWoS bhPcvAUDOg/xsVqdGH0V+H7d+u6FjnxwiPBmTqoaw7oo4ZI1fVHQ7MoRGuxliqQiTL3hC4 kWPeL1CCWJwMQSzfUbOxnZRuNri2d32pPfwv6M4qMwCiHJhZO3CREpgg1ervnRTMifjBXZ l+9C55Lm6NAo9BCmm4xBQQsFHDFb2hhHZsKwfAMIEkqdhcQXmRabOSSguN9pYae4r/8sH/ GlqYGXCXZtHC8wAsvuDDStxDgTv0eQmcFXbC73AM0Gh1JGlNHp/bZV3gV9KXmQ== 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 4XCRlr0rLVzF5K; Tue, 24 Sep 2024 04:32:08 +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 48O4W8aV092937; Tue, 24 Sep 2024 04:32:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48O4W8Lw092934; Tue, 24 Sep 2024 04:32:08 GMT (envelope-from git) Date: Tue, 24 Sep 2024 04:32:08 GMT Message-Id: <202409240432.48O4W8Lw092934@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 4bf231d10070 - stable/14 - bpf: Update a comment 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4bf231d100702021ae38aafa0583d50d2ba94f70 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=4bf231d100702021ae38aafa0583d50d2ba94f70 commit 4bf231d100702021ae38aafa0583d50d2ba94f70 Author: Zhenlei Huang AuthorDate: 2024-09-10 10:03:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-24 04:30:49 +0000 bpf: Update a comment This comment was introduced by fix [1], later the fix was refined by change [2], and the context of the usage of `m_get2()` and `m_getjcl()` got lost, then the comment became obscure. Update to reflect the current behavior. 1. f13da24715a7 net/bpf: Fix writing of buffer bigger than PAGESIZE 2. a051ca72e281 Introduce m_get3() Fixes: a051ca72e281 Introduce m_get3() MFC after: 3 days (cherry picked from commit 343bf78e487190557889c8ba53d8080b268867f7) --- sys/net/bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index e65d890f891b..c8b2f30dd6bd 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -649,7 +649,7 @@ bpf_movein(struct uio *uio, int linktype, struct ifnet *ifp, struct mbuf **mp, if (len < hlen || len - hlen > ifp->if_mtu) return (EMSGSIZE); - /* Allocate a mbuf for our write, since m_get2 fails if len >= to MJUMPAGESIZE, use m_getjcl for bigger buffers */ + /* Allocate a mbuf, up to MJUM16BYTES bytes, for our write. */ m = m_get3(len, M_WAITOK, MT_DATA, M_PKTHDR); if (m == NULL) return (EIO); From nobody Tue Sep 24 04:32:09 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 4XCRls6jthz5XGRK; Tue, 24 Sep 2024 04:32:09 +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 4XCRls2Sm6z4RQC; Tue, 24 Sep 2024 04:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727152329; 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=+xwQuevP4coXettCN7/dO960j+5ZE1DX8AXMNuSr2x8=; b=J0JEOcJoxHKdNbX++gqkxfYCvU8sjOZvaGqP1y62fD2MgtDHrQ1yn20v6M3+W9QsVtv58J viydj8wgIPwhoZ8na+TqAovFmBkUwWWgzahyx/wX/3fxzMm2Hc+87SnazWxp0LhcuBkg0A mx09Gh0r3+0LFzutazH1GWidhYpBqx5DNMsCoOIDv+VDDC/Qb0z0TWeZuhbrjT4IaKsaYI k0TgidpD3Jj43vAZYz2M2Ljy+lWqDgG1PgxDg7yl7mbzwMVyqCA1tSLndd7ggMETmGRhPB hwlhIsxN011+JW3+YOsPjXg2oBhhkzhUzJme924legX54qxLG4b/PNSp63I08g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727152329; a=rsa-sha256; cv=none; b=ISh5BJfzh+MCRRngadO4ieWiURNuH/yVbf1oguf/Q3BIMmHYzt5dboYoVhllQedALk+2Xn G1bW1r2CwRDKWSlxYgd3ForfcT6X4scO5c8HRbyv8xbP0utQnOESMzfMWEIt+xStFrd6Y0 IXZCA+J7l5/lj4zSioE8xSb097dZw/uxOpSUteH05jELy+0SG+GsOTPO4Lq1jxH4QUDrSA +ghlwX7wRrXQS7YeqAeNUAjw0QJtIS/V7BRaAcLjKT6vSOahlgfFWvHl9iDWb18x0TutVY s03MD4zIoghqBpxJEZwIyYsqF8tQliYZmtrvku14wc/oZqXnGSyyxbERtSpBMQ== 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=1727152329; 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=+xwQuevP4coXettCN7/dO960j+5ZE1DX8AXMNuSr2x8=; b=xRCCiarwrgCtB+ygQW4bnH7ojz1Aawk7mALzGUKFSvDohI0FI8QL3m/9THdEmBmYPqif8O mffzjQ21VIhiQG4DG6i55oXCQDWXj9Qsfo8/c7HbY29fQgRKLt+50BoAWPXc8QOF3RfdVC V15ITdV2xpkOGnSp/ZLdmmHiortp9hLX2L81G3ZbdMn24IvM9zTXYTKhLG6V5mdU/ASIGo w673knhipxkS1zFGStkdXO2J4Vxw08oWsxQo5/A3xKAHGQAHZ+XGFIollOP2e1MJt3UKJp WTnzN4t2vQVI1FZix6400r1se1Ddfo97wcOcxILBa+/MkY9RnKiyGSnv4/IGiQ== 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 4XCRls1vgnz1CyS; Tue, 24 Sep 2024 04:32:09 +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 48O4W9AZ092995; Tue, 24 Sep 2024 04:32:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48O4W9hx092992; Tue, 24 Sep 2024 04:32:09 GMT (envelope-from git) Date: Tue, 24 Sep 2024 04:32:09 GMT Message-Id: <202409240432.48O4W9hx092992@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e8ced9914389 - stable/14 - bpf: Add a comment on the large `#ifdef _KERNEL` block 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e8ced991438950c49d7acca5d393209bbc143a38 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e8ced991438950c49d7acca5d393209bbc143a38 commit e8ced991438950c49d7acca5d393209bbc143a38 Author: Zhenlei Huang AuthorDate: 2024-09-20 10:06:22 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-24 04:30:49 +0000 bpf: Add a comment on the large `#ifdef _KERNEL` block This improves readability a little. MFC after: 3 days (cherry picked from commit e30b58846003a54df028686363b5abed59897779) --- sys/net/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/bpf.h b/sys/net/bpf.h index ed3239971db5..b2dc1ea90bd1 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -451,7 +451,7 @@ bpf_peers_present(struct bpf_if *bpf) bpf_mtap_if((_ifp), (_m)) #define BPF_MTAP2(_ifp,_data,_dlen,_m) \ bpf_mtap2_if((_ifp), (_data), (_dlen), (_m)) -#endif +#endif /* _KERNEL */ /* * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). From nobody Tue Sep 24 04:32:10 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 4XCRlv0DKpz5XGRL; Tue, 24 Sep 2024 04:32:11 +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 4XCRlt3F5Fz4RkP; Tue, 24 Sep 2024 04:32:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727152330; 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=zwq5cSbk3QqIlpBkFeTwPcA4wyCsXEqHeTpiQaKxooA=; b=fSqrvqwG+rrd2gHjlEoNhBREg2jnR7xZm6wmLP5/0Q6j6xFZkFUHjHoo3ULCNMA2hGtm2t J4qzyTVMdzJRDyYrJxBg6fqz20F7tbqnBurlfzL2LrFypVxtyHUoiQKhEdmjS4k211lbHY e7UhAiR/D1fOpucEFXDBXII2ic9nKvwLdm0BS0t3p/vYpB99KzAcjxiJcZiYt7AaCr1JDd vB0kMWFUHRiXXRfHykS5IUX0iR+LFVbB7Tr4BYovyHKHyjo/Ehd2jImAcSYXIDeUf1AEFw PP9nDsZxeFd4uh8PjqyaHIrruEvMjfVX/doXPXEhI4uOZ7UmW/Erg7mHULE5lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727152330; a=rsa-sha256; cv=none; b=xc05Uw3gvJMUjgcqSzi3IDbpdl6vzYCdSv1SkYJkGWAdQONmdbdBXFod7sAIoMAXAUOgzD yyh1ZCsxeBrheUWSXROoGVFTTU5DgRA9hf/PgnYyLWSvsxlgB7aZpyIC4/wiqIAVMebvc/ m/Y15qlqN6ODcopzdd4ykuJ2r3OX/Ijpmyw5DCu3O9dkHcKgbQiJtxgC/ozhwudcVtPbGn oro9zGZsOhSxdapN2ZDUi1Wl/aG6K3o33wmR5kIrR6gsN6Wj6s9r4ew4X0oWsyHMMVCXm6 nQobam5mPw3CmtuHtpu+H2jJOZZdic5dSRvPs10cmoFsbMXBVzvm26OiD1a3ow== 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=1727152330; 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=zwq5cSbk3QqIlpBkFeTwPcA4wyCsXEqHeTpiQaKxooA=; b=J87EnJhO6UHucBE1wDOEsNGoeD/Do41xGAincMs1/vrmYeOS+dKSabbocGxUOsPl6zn3jU sah4mwYsBFhaEvXzkxkvS7kVrVuFOqSN6pdH4np35JPyNgcGkCzvs0LH/DToqRIGv10EeL g0x/gBKplQRMViYG23kNDhZaHLJTyOHFsNiFZPSFI+KucEMXLYirNFzagKtyfjSnFBXO1/ +qq88vYxescjzZKy+JdO22OxRIXICdpEkgFHLpjwwcrUEBIHTxKKhf60cCve2DYu7v3cR4 ZHR0fqVLXsux58FMUWTUoEMNaEN5kGX3YrPoBuNW2vVixt+eW2kzqrihWVauyA== 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 4XCRlt2pG8zF1v; Tue, 24 Sep 2024 04:32:10 +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 48O4WAYh093045; Tue, 24 Sep 2024 04:32:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48O4WAjx093042; Tue, 24 Sep 2024 04:32:10 GMT (envelope-from git) Date: Tue, 24 Sep 2024 04:32:10 GMT Message-Id: <202409240432.48O4WAjx093042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: f97d0c91eefc - stable/14 - bpf: Some style and white space cleanup 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f97d0c91eefc8568a11ad47f910cdd9dc7826a72 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=f97d0c91eefc8568a11ad47f910cdd9dc7826a72 commit f97d0c91eefc8568a11ad47f910cdd9dc7826a72 Author: Zhenlei Huang AuthorDate: 2024-09-20 10:06:22 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-24 04:30:50 +0000 bpf: Some style and white space cleanup MFC after: 3 days (cherry picked from commit 1baf6164e4d671ca1547a3096d8ce8fe69ed4e5c) --- sys/net/bpf.c | 14 +++++++------- sys/net/bpf.h | 44 ++++++++++++++++++++++---------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index c8b2f30dd6bd..c0631591a10e 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -174,7 +174,7 @@ struct bpf_dltlist32 { #define BIOCSETFNR32 _IOW('B', 130, struct bpf_program32) #endif -#define BPF_LOCK() sx_xlock(&bpf_sx) +#define BPF_LOCK() sx_xlock(&bpf_sx) #define BPF_UNLOCK() sx_xunlock(&bpf_sx) #define BPF_LOCK_ASSERT() sx_assert(&bpf_sx, SA_XLOCKED) /* @@ -1024,7 +1024,7 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag) d->bd_state = BPF_IDLE; while (d->bd_hbuf_in_use) { error = mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock, - PRINET|PCATCH, "bd_hbuf", 0); + PRINET | PCATCH, "bd_hbuf", 0); if (error != 0) { BPFD_UNLOCK(d); return (error); @@ -1067,7 +1067,7 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag) BPFD_UNLOCK(d); return (EWOULDBLOCK); } - error = msleep(d, &d->bd_lock, PRINET|PCATCH, + error = msleep(d, &d->bd_lock, PRINET | PCATCH, "bpf", d->bd_rtout); if (error == EINTR || error == ERESTART) { BPFD_UNLOCK(d); @@ -2134,7 +2134,7 @@ bpfpoll(struct cdev *dev, int events, struct thread *td) if (devfs_get_cdevpriv((void **)&d) != 0 || d->bd_bif == NULL) return (events & - (POLLHUP|POLLIN|POLLRDNORM|POLLOUT|POLLWRNORM)); + (POLLHUP | POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM)); /* * Refresh PID associated with this descriptor. @@ -3108,7 +3108,7 @@ bpf_stats_sysctl(SYSCTL_HANDLER_ARGS) return (error); } -SYSINIT(bpfdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE,bpf_drvinit,NULL); +SYSINIT(bpfdev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, bpf_drvinit, NULL); #else /* !DEV_BPF && !NETGRAPH_BPF */ @@ -3177,13 +3177,13 @@ bpf_peers_present_if(struct ifnet *ifp) u_int bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen) { - return -1; /* "no filter" behaviour */ + return (-1); /* "no filter" behaviour */ } int bpf_validate(const struct bpf_insn *f, int len) { - return 0; /* false */ + return (0); /* false */ } #endif /* !DEV_BPF && !NETGRAPH_BPF */ diff --git a/sys/net/bpf.h b/sys/net/bpf.h index b2dc1ea90bd1..991d50bcd68c 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -58,7 +58,7 @@ struct ifnet; * BPF_ALIGNMENT. */ #define BPF_ALIGNMENT sizeof(long) -#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) +#define BPF_WORDALIGN(x) (((x) + (BPF_ALIGNMENT - 1)) & ~(BPF_ALIGNMENT - 1)) #define BPF_MAXINSNS 512 #define BPF_MAXBUFSIZE 0x80000 @@ -370,8 +370,8 @@ struct bpf_insn { /* * Macros for insn array initializers. */ -#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } -#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } +#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } +#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } /* * Structure to retrieve available DLTs for the interface. @@ -417,24 +417,24 @@ struct bpf_if_ext { struct bpfd_list bif_dlist; /* descriptor list */ }; -void bpf_bufheld(struct bpf_d *d); -int bpf_validate(const struct bpf_insn *, int); -void bpf_tap(struct bpf_if *, u_char *, u_int); -void bpf_tap_if(struct ifnet *, u_char *, u_int); -void bpf_mtap(struct bpf_if *, struct mbuf *); -void bpf_mtap_if(struct ifnet *, struct mbuf *); -void bpf_mtap2(struct bpf_if *, void *, u_int, struct mbuf *); -void bpf_mtap2_if(struct ifnet *, void *, u_int, struct mbuf *); -void bpfattach(struct ifnet *, u_int, u_int); -void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **); -void bpfdetach(struct ifnet *); -bool bpf_peers_present_if(struct ifnet *); +void bpf_bufheld(struct bpf_d *d); +int bpf_validate(const struct bpf_insn *, int); +void bpf_tap(struct bpf_if *, u_char *, u_int); +void bpf_tap_if(struct ifnet *, u_char *, u_int); +void bpf_mtap(struct bpf_if *, struct mbuf *); +void bpf_mtap_if(struct ifnet *, struct mbuf *); +void bpf_mtap2(struct bpf_if *, void *, u_int, struct mbuf *); +void bpf_mtap2_if(struct ifnet *, void *, u_int, struct mbuf *); +void bpfattach(struct ifnet *, u_int, u_int); +void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **); +void bpfdetach(struct ifnet *); +bool bpf_peers_present_if(struct ifnet *); #ifdef VIMAGE -int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); +int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); #endif -void bpfilterattach(int); -u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int); +void bpfilterattach(int); +u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int); static __inline bool bpf_peers_present(struct bpf_if *bpf) @@ -445,11 +445,11 @@ bpf_peers_present(struct bpf_if *bpf) return (!CK_LIST_EMPTY(&ext->bif_dlist)); } -#define BPF_TAP(_ifp,_pkt,_pktlen) \ - bpf_tap_if((_ifp), (_pkt), (_pktlen)) -#define BPF_MTAP(_ifp,_m) \ +#define BPF_TAP(_ifp, _pkt, _pktlen) \ + bpf_tap_if((_ifp), (_pkt), (_pktlen)) +#define BPF_MTAP(_ifp, _m) \ bpf_mtap_if((_ifp), (_m)) -#define BPF_MTAP2(_ifp,_data,_dlen,_m) \ +#define BPF_MTAP2(_ifp, _data, _dlen, _m) \ bpf_mtap2_if((_ifp), (_data), (_dlen), (_m)) #endif /* _KERNEL */ From nobody Tue Sep 24 05:03:19 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 4XCSRq4D2xz5XJ6s; Tue, 24 Sep 2024 05:03:19 +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 4XCSRq3hf9z4WgG; Tue, 24 Sep 2024 05:03:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727154199; 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=s/StfHfumnzDkLwv3+GPMMCVNgYz+qQAFAetCEFNjbM=; b=V1O7TWYHoIFIlPm4p83LW+CIMyIpt2CivCXtcTOq+7ZMg+hSnhv41k9SreZzOUvD+78ic3 xOeSW5IJMH+zXNFFBYqvSigf9nL3tNgFcg04waMOOP5fihRmxwTob9Kyj4fmxviw8WMT/H n6ewHwJWyE3rjExgo6q+fkrE/NgOnxBAwjtVtlNwOxzVwzNda5WY8OYh4UHlgV8s1wOTO7 QLc8UufkyMD6kKGyGwMvn1jHF+5KZjficd2BMIcvUmAmNlqqM7xJQuMQJv3lssbSme8S4M M020hjc7NTKwOkdiLXfrDQc1wG4+AltprGkgF4BYm5WZwTiFpUBS8EGwQljpGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727154199; a=rsa-sha256; cv=none; b=aFwz0WLz8K/qKk3rSERKrB9pd6Rk60LAPlizNKMLtu9YPSj1xk27E1tVtieD4bQ1k63oY6 PZDHWEXG6QJtC8qPpTENxSDaLV0q0jPSIXd4XU8ZzcJZT1b3II+d0Aloxqw/PCWzwCpSHy vEfsaQLthJHor0fEXqG6maooid0yPeWqV0gH8hMs/uDW0x7KQI254ohWjPr90vhBhcQ+pa IG+ZYJUMEwMMUsVvlzJU2Qp1NbtpgXg1/91fhZeRjKjyha+i0RYEM3oLWMB7dkRweyS9D8 DY6ObAOIxRTDw9UJZVf/YDsWtsg2qBsEgpXHLiuGKQVJAZmKVpuLpOtBzspXCg== 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=1727154199; 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=s/StfHfumnzDkLwv3+GPMMCVNgYz+qQAFAetCEFNjbM=; b=izLSzkfiOZx3pERcAXQIbKP6Dmoy00qrqdDaT8SyFXTRb5vnMAneH+UntCJzVUz+O9/MwS QZ+xRwpEY9C4NoKnYu0auEsoI7F3PrubyyKKbrFpqLvOwDf3klzJ1bpEehFOoGhFMnCXjs +Zp/PbXLaOdlM4rD/D+sElB6nYmLlHYvaDO3hCK1X21zvzAIhGghomQ0ns79VzfX7rzoPu qVxvcv1fZR8y61A6lBwl1cXFi0WS39oO7XuLeEFMlx13dg9gW5XnPic7EU36i+n2rP5qbd TExWvEj/ITTqIAv2zgGwxyK4goWGlRGNZj1jaGXqsEHV+yoqBsSP39ctbqngPw== 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 4XCSRq3HhkzFqZ; Tue, 24 Sep 2024 05:03:19 +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 48O53JOp046317; Tue, 24 Sep 2024 05:03:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48O53JDD046314; Tue, 24 Sep 2024 05:03:19 GMT (envelope-from git) Date: Tue, 24 Sep 2024 05:03:19 GMT Message-Id: <202409240503.48O53JDD046314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 7ba975426834 - stable/13 - bpf: Add a comment on the large `#ifdef _KERNEL` block 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7ba9754268344da81b697df04ef3d05441022be0 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7ba9754268344da81b697df04ef3d05441022be0 commit 7ba9754268344da81b697df04ef3d05441022be0 Author: Zhenlei Huang AuthorDate: 2024-09-20 10:06:22 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-24 05:02:29 +0000 bpf: Add a comment on the large `#ifdef _KERNEL` block This improves readability a little. MFC after: 3 days (cherry picked from commit e30b58846003a54df028686363b5abed59897779) (cherry picked from commit e8ced991438950c49d7acca5d393209bbc143a38) --- sys/net/bpf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 347b764735d0..2fe8b6a78647 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -456,7 +456,7 @@ bpf_peers_present(struct bpf_if *bpf) bpf_mtap2((_ifp)->if_bpf,(_data),(_dlen),(_m)); \ } \ } while (0) -#endif +#endif /* _KERNEL */ /* * Number of scratch memory words (for BPF_LD|BPF_MEM and BPF_ST). From nobody Tue Sep 24 05:03:20 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 4XCSRr5j4vz5XJ6w; Tue, 24 Sep 2024 05:03:20 +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 4XCSRr54wNz4WgH; Tue, 24 Sep 2024 05:03:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727154200; 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=HLkQ6yp0Zlq1zrdbuj77jbrMMglZ3kbhdAepOfKt54k=; b=l/FxWQDxWMcf6wpookaV1xq7i1Pli+hlLexZ+VUJyb0iSsXVD4kA6j/WssHRRzlRplFuXN 73FcF5b8hxkSnCI34UTEc4p+qRRQ+LKG6lpiM8jZjS7r2NMIEgaErzS3XFnwmzSyhqDcW4 nZ8I+aZSf7uh6PYdxPA8kVZ7TK7gEWT49ODWwWsQLNKB2HKVUoxtwO20mq+fSLN9Venzi3 jQ390OGDRl0FKCv2bMb1CIaj8QL58mm5wS4292ZV8m/R4TH7HBgpxCX/hY9eSQPauJ3nbz So8HYCYijNdgo3lhDhP5NOCDTpH+k1WAJWdrXeTJ4nW/NaUNx1D3M+X+Zge+ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727154200; a=rsa-sha256; cv=none; b=NOF3ITlsnUxwP2d1W2U6aexeoYB6QInlJ/xVU0R4oMdfbRo5g3F9h4iGs14a7CSggkMlPR El6zxA9e9gZtdetFPstIQGrmoTn2SOgQAAa+n9j6tydDw3x9JuEGx6rCmtRBnoXMCnRPQP I0FfIMScT3Oor0ysgn0rNq1jCHXpvQfqzrMKgFPbk0WvyXuFvaeNgope6KT7tLHmuS9aWJ kT7greaWa5XZhuqLaKmoX2QzvN8vE9wUhejXhw4gyFzy9xw3vw/eCwA9tExIBPKr6u5/xD EMO85VRvqLsXrW6mZee9gLTnphInQgBHvqXHZVyj1ABCZS/OOEHKk4/jA5gDTQ== 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=1727154200; 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=HLkQ6yp0Zlq1zrdbuj77jbrMMglZ3kbhdAepOfKt54k=; b=m630VeiaF4uofqo7TrlpCrFr5jpi2yQmlg3lIItUk4jQu0nLQec4SVAWyFw8Jnn+3LjBMb Nn4XEOm9Ozt+HTfSrmX2wkFlDxjGY+8AR9QwoKVTeaKQIeOwZPXXgUsxElOFtoD3k/rPNJ nWTWnXb1612NwDjl9atZ7WPX21v9x+5EkIioODRGJKApxbvbG6KkV21gyFyL+S6PcAc3P1 fA91uauqr9IOeUW+kcTayD7VHjS9ITMeSBcEvIx6taJERidXPxXaQcZppdiydejgLXz5hK YcV9A4Z6jfx10rY+VoWobAmBBu2wDDFPlh7XwV/5jr39Y34wNDIn8EH3n5A5eQ== 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 4XCSRr4J6MzFqb; Tue, 24 Sep 2024 05:03:20 +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 48O53KsL046365; Tue, 24 Sep 2024 05:03:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48O53K1t046362; Tue, 24 Sep 2024 05:03:20 GMT (envelope-from git) Date: Tue, 24 Sep 2024 05:03:20 GMT Message-Id: <202409240503.48O53K1t046362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 7b657faa655c - stable/13 - bpf: Some style and white space cleanup 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7b657faa655ceba6965a8873add57b079b910690 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7b657faa655ceba6965a8873add57b079b910690 commit 7b657faa655ceba6965a8873add57b079b910690 Author: Zhenlei Huang AuthorDate: 2024-09-20 10:06:22 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-24 05:02:29 +0000 bpf: Some style and white space cleanup MFC after: 3 days (cherry picked from commit 1baf6164e4d671ca1547a3096d8ce8fe69ed4e5c) (cherry picked from commit f97d0c91eefc8568a11ad47f910cdd9dc7826a72) --- sys/net/bpf.c | 19 +++++++++++-------- sys/net/bpf.h | 54 +++++++++++++++++++++++++++--------------------------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 7aa1dfd302f4..b7c964ac8ac4 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -173,7 +173,7 @@ struct bpf_dltlist32 { #define BIOCSETFNR32 _IOW('B', 130, struct bpf_program32) #endif -#define BPF_LOCK() sx_xlock(&bpf_sx) +#define BPF_LOCK() sx_xlock(&bpf_sx) #define BPF_UNLOCK() sx_xunlock(&bpf_sx) #define BPF_LOCK_ASSERT() sx_assert(&bpf_sx, SA_XLOCKED) /* @@ -641,7 +641,10 @@ bpf_movein(struct uio *uio, int linktype, struct ifnet *ifp, struct mbuf **mp, if (len < hlen || len - hlen > ifp->if_mtu) return (EMSGSIZE); - /* Allocate a mbuf for our write, since m_get2 fails if len >= to MJUMPAGESIZE, use m_getjcl for bigger buffers */ + /* + * Allocate a mbuf for our write, since m_get2 fails if len >= to + * MJUMPAGESIZE, use m_getjcl for bigger buffers + */ if (len < MJUMPAGESIZE) m = m_get2(len, M_WAITOK, MT_DATA, M_PKTHDR); else if (len <= MJUM9BYTES) @@ -1019,7 +1022,7 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag) d->bd_state = BPF_IDLE; while (d->bd_hbuf_in_use) { error = mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock, - PRINET|PCATCH, "bd_hbuf", 0); + PRINET | PCATCH, "bd_hbuf", 0); if (error != 0) { BPFD_UNLOCK(d); return (error); @@ -1062,7 +1065,7 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag) BPFD_UNLOCK(d); return (EWOULDBLOCK); } - error = msleep(d, &d->bd_lock, PRINET|PCATCH, + error = msleep(d, &d->bd_lock, PRINET | PCATCH, "bpf", d->bd_rtout); if (error == EINTR || error == ERESTART) { BPFD_UNLOCK(d); @@ -2129,7 +2132,7 @@ bpfpoll(struct cdev *dev, int events, struct thread *td) if (devfs_get_cdevpriv((void **)&d) != 0 || d->bd_bif == NULL) return (events & - (POLLHUP|POLLIN|POLLRDNORM|POLLOUT|POLLWRNORM)); + (POLLHUP | POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM)); /* * Refresh PID associated with this descriptor. @@ -3039,7 +3042,7 @@ bpf_stats_sysctl(SYSCTL_HANDLER_ARGS) return (error); } -SYSINIT(bpfdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE,bpf_drvinit,NULL); +SYSINIT(bpfdev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, bpf_drvinit, NULL); #else /* !DEV_BPF && !NETGRAPH_BPF */ @@ -3087,13 +3090,13 @@ bpfdetach(struct ifnet *ifp) u_int bpf_filter(const struct bpf_insn *pc, u_char *p, u_int wirelen, u_int buflen) { - return -1; /* "no filter" behaviour */ + return (-1); /* "no filter" behaviour */ } int bpf_validate(const struct bpf_insn *f, int len) { - return 0; /* false */ + return (0); /* false */ } #endif /* !DEV_BPF && !NETGRAPH_BPF */ diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 2fe8b6a78647..d6213ebd10f4 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -57,7 +57,7 @@ typedef u_int64_t bpf_u_int64; * BPF_ALIGNMENT. */ #define BPF_ALIGNMENT sizeof(long) -#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) +#define BPF_WORDALIGN(x) (((x) + (BPF_ALIGNMENT - 1)) & ~(BPF_ALIGNMENT - 1)) #define BPF_MAXINSNS 512 #define BPF_MAXBUFSIZE 0x80000 @@ -369,8 +369,8 @@ struct bpf_insn { /* * Macros for insn array initializers. */ -#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } -#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } +#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } +#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } /* * Structure to retrieve available DLTs for the interface. @@ -416,20 +416,20 @@ struct bpf_if_ext { struct bpfd_list bif_dlist; /* descriptor list */ }; -void bpf_bufheld(struct bpf_d *d); -int bpf_validate(const struct bpf_insn *, int); -void bpf_tap(struct bpf_if *, u_char *, u_int); -void bpf_mtap(struct bpf_if *, struct mbuf *); -void bpf_mtap2(struct bpf_if *, void *, u_int, struct mbuf *); -void bpfattach(struct ifnet *, u_int, u_int); -void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **); -void bpfdetach(struct ifnet *); +void bpf_bufheld(struct bpf_d *d); +int bpf_validate(const struct bpf_insn *, int); +void bpf_tap(struct bpf_if *, u_char *, u_int); +void bpf_mtap(struct bpf_if *, struct mbuf *); +void bpf_mtap2(struct bpf_if *, void *, u_int, struct mbuf *); +void bpfattach(struct ifnet *, u_int, u_int); +void bpfattach2(struct ifnet *, u_int, u_int, struct bpf_if **); +void bpfdetach(struct ifnet *); #ifdef VIMAGE -int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); +int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *); #endif -void bpfilterattach(int); -u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int); +void bpfilterattach(int); +u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int); static __inline bool bpf_peers_present(struct bpf_if *bpf) @@ -440,21 +440,21 @@ bpf_peers_present(struct bpf_if *bpf) return (!CK_LIST_EMPTY(&ext->bif_dlist)); } -#define BPF_TAP(_ifp,_pkt,_pktlen) do { \ - if (bpf_peers_present((_ifp)->if_bpf)) \ - bpf_tap((_ifp)->if_bpf, (_pkt), (_pktlen)); \ +#define BPF_TAP(_ifp, _pkt, _pktlen) do { \ + if (bpf_peers_present((_ifp)->if_bpf)) \ + bpf_tap((_ifp)->if_bpf, (_pkt), (_pktlen)); \ } while (0) -#define BPF_MTAP(_ifp,_m) do { \ - if (bpf_peers_present((_ifp)->if_bpf)) { \ - M_ASSERTVALID(_m); \ - bpf_mtap((_ifp)->if_bpf, (_m)); \ - } \ +#define BPF_MTAP(_ifp, _m) do { \ + if (bpf_peers_present((_ifp)->if_bpf)) { \ + M_ASSERTVALID(_m); \ + bpf_mtap((_ifp)->if_bpf, (_m)); \ + } \ } while (0) -#define BPF_MTAP2(_ifp,_data,_dlen,_m) do { \ - if (bpf_peers_present((_ifp)->if_bpf)) { \ - M_ASSERTVALID(_m); \ - bpf_mtap2((_ifp)->if_bpf,(_data),(_dlen),(_m)); \ - } \ +#define BPF_MTAP2(_ifp, _data, _dlen, _m) do { \ + if (bpf_peers_present((_ifp)->if_bpf)) { \ + M_ASSERTVALID(_m); \ + bpf_mtap2((_ifp)->if_bpf, (_data), (_dlen), (_m)); \ + } \ } while (0) #endif /* _KERNEL */ From nobody Tue Sep 24 10:04:21 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 4XCb795xCPz5XbcX; Tue, 24 Sep 2024 10:04:21 +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 4XCb795NF6z4xJH; Tue, 24 Sep 2024 10:04:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727172261; 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=N/Az2+hEVY9dm7EqGNecfi5Qs5v2VX2UW+jgma/07Yo=; b=oIxcDMADq3u48dGyTuXGrl7Kr01yJRXPA5FRvHY6toZ5vBmuMmI3Dq9jUAGSa9cArIpUiS k7kxFvnw99qQBTR89vdRsP3o+ywoet7OYbEOGQN6d1rBL+uw7j99hVuAAm7AC5rN4SdRgW PrtStT20DXoNh9Qh4wVsR6V9Ivpf5TOluL0IClCxrrVa9dh2pQHUrXzkOnyhsyrD42bfaR WtJ97TyYNWFzwUsXrEMtR2FP8TEL8rjW253z3ZiNeIdhnxYexzCzsCjCvwdY7f8T2Bwmp1 s8JIbBGM3upYXBOaeOyS2iSsduiqC3DytDzeGQABkQwRXHxtXzWu32Wj0FdKYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727172261; a=rsa-sha256; cv=none; b=XXwhuE1qxvZHJlFOsNlKEitSA5I7Dzb4KApdRQ6B3a0FrCRCxZB5WuLjfKp3rLTa0J6AOD nfLqV4yoa4YLckK8avYuA/2RJAlA3wBY/3eGH5ZuegOj/97Iaa4PwT1daDkKeO3/GTr8LF 7WvNJNDa+D9mWafmn4Br8aPEj+Rg2ZcZ6oAVIgJdLP6RpTQzfOqXL2k6vNo1W2Ni+erJ53 r0vY2a0FNpl2BmLQuLo54o1fUFPFl8jyB+r0DxxVmZsebN0S932lRRylK90PBgBP+tULZ1 LvOATxLJcB6cM3jdGn1F1T6xtTdpw87wZeAuD+35DLhjWYyDWddyqTBV1fBHlQ== 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=1727172261; 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=N/Az2+hEVY9dm7EqGNecfi5Qs5v2VX2UW+jgma/07Yo=; b=X0SbZIsyXON8E3V3/ztZmz0KG9GgWM+ofjGruOx/M1zwxoi/xPjzTt9gqJ/QNnBeTRBHrx 3i79SHeCfId9EsV+Utg6ULUQHtsOPsULkK2YDWzaIXgIz+E7VdtAXN1S+kUo6DWMfY3JPR sGlgY2YxXA1lxCBtp0keCCR6Huf0L+PT4TFpS8zk/iw2aw/1th5xhux0OnI32PQ3D5+qm4 p4Fklnkxcq0h0szLYTY40uB+YHrma/UCHDU4LuOWMz9474y7BCxOQN+ARplBRJxln0bfg2 A4v5nhvIsKgWtLzmkpp7qmuUVIjCjOJYt/LIL9mbly+olrxwX5QcZlYtG4Z1iA== 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 4XCb7949pyzPVR; Tue, 24 Sep 2024 10:04:21 +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 48OA4LdG058837; Tue, 24 Sep 2024 10:04:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OA4Laa058834; Tue, 24 Sep 2024 10:04:21 GMT (envelope-from git) Date: Tue, 24 Sep 2024 10:04:21 GMT Message-Id: <202409241004.48OA4Laa058834@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: aa7d086ad946 - main - e1000: Add sysctls for some missing MAC stats 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: aa7d086ad94642fa40375db9976177fc9e54a2cf Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=aa7d086ad94642fa40375db9976177fc9e54a2cf commit aa7d086ad94642fa40375db9976177fc9e54a2cf Author: Kevin Bowling AuthorDate: 2024-09-24 09:39:33 +0000 Commit: Kevin Bowling CommitDate: 2024-09-24 10:00:18 +0000 e1000: Add sysctls for some missing MAC stats MFC after: 1 week Sponsored by: Blue Box Systems --- sys/dev/e1000/if_em.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index e2d8535143ef..5fb46c9f6dce 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -4304,6 +4304,10 @@ em_update_stats_counters(struct e1000_softc *sc) sc->stats.roc += E1000_READ_REG(&sc->hw, E1000_ROC); sc->stats.rjc += E1000_READ_REG(&sc->hw, E1000_RJC); + sc->stats.mgprc += E1000_READ_REG(&sc->hw, E1000_MGTPRC); + sc->stats.mgpdc += E1000_READ_REG(&sc->hw, E1000_MGTPDC); + sc->stats.mgptc += E1000_READ_REG(&sc->hw, E1000_MGTPTC); + sc->stats.tor += E1000_READ_REG(&sc->hw, E1000_TORH); sc->stats.tot += E1000_READ_REG(&sc->hw, E1000_TOTH); @@ -4520,6 +4524,9 @@ em_add_hw_stats(struct e1000_softc *sc) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "missed_packets", CTLFLAG_RD, &sc->stats.mpc, "Missed Packets"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_length_errors", + CTLFLAG_RD, &sc->stats.rlec, + "Receive Length Errors"); SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "recv_no_buff", CTLFLAG_RD, &sc->stats.rnbc, "Receive No Buffers"); @@ -4560,6 +4567,18 @@ em_add_hw_stats(struct e1000_softc *sc) SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "xoff_txd", CTLFLAG_RD, &sc->stats.xofftxc, "XOFF Transmitted"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "unsupported_fc_recvd", + CTLFLAG_RD, &sc->stats.fcruc, + "Unsupported Flow Control Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_recvd", + CTLFLAG_RD, &sc->stats.mgprc, + "Management Packets Received"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_drop", + CTLFLAG_RD, &sc->stats.mgpdc, + "Management Packets Dropped"); + SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "mgmt_pkts_txd", + CTLFLAG_RD, &sc->stats.mgptc, + "Management Packets Transmitted"); /* Packet Reception Stats */ SYSCTL_ADD_UQUAD(ctx, stat_list, OID_AUTO, "total_pkts_recvd", From nobody Tue Sep 24 10:09:03 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 4XCbG55Gdnz5Xbss; Tue, 24 Sep 2024 10:10:21 +0000 (UTC) (envelope-from ronald@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XCbG54phMz4xr2; Tue, 24 Sep 2024 10:10:21 +0000 (UTC) (envelope-from ronald@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727172621; 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: in-reply-to:in-reply-to:references:references; bh=50dr2e3nfGDISs9d0y5Z+DTRKHqr804auZDYIo/WbaE=; b=kXBvdz+Zrzd9+lDkInp4kPt78uOKkUSdkmXkKrh9dp1T+ZQPOmnlkabLVAYe7lsl2lcrQL /Qw/a75EdugEgdEZan4n15CHlKxr0SGivjDUaQx6YLZuNK4+ljqTdvxnqm5ZX6r61XN5rF vthXpq7YBo0to1aguyqhxqEHdpm1tk4MT/s8eJIthdUUBmo1+kYzjuSKWqQW/Kl8adr0qL V9yyRBY3kymPNtCZWGwbYzpFl+6d05K8U1PX0CFGtjtAJd3dddp31Ek+hzP87Himv5frmO 5dUotQin0vRWBma0UgbTZEUyL6yz3hYpqz8dwdACEmfJmrV0ThKepbklbuL6oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727172621; a=rsa-sha256; cv=none; b=G27IlyFCvGKZJmaId+iGs+cz9tDw9DohRvyK9XMn75zdgvpedg7bZEYc385S2mJhTiKfgg /XQAX24ttF5xGN4rAaJBk8/yDi/SLy9aqyzQ6ptwEKyjKUrCCWrFkx8sFzp1B9YF9AUcde NhycBR9VVJ4NG9B8T0aRJDG9oBNC6Xb6uMJxN2RO5i0E6eA+BqiDcvQSrghv7zystSNu55 +QRq44QDEb0uQkpqUKkM3MER0lDzyBgIjj2SvB+vz3NU9x+HFTjJM4nyI7IJ/zCmrCzKrM 1lShsgaAVOlDwLHyQt70ZNC9Qs3xG+ztmWjN/qLUcypWZsKPSBcYtRdmB9ghag== 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=1727172621; 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: in-reply-to:in-reply-to:references:references; bh=50dr2e3nfGDISs9d0y5Z+DTRKHqr804auZDYIo/WbaE=; b=AwilxRa5s8PBXYyXhdGYtFKBS7n9Akf6Bo4JYz7bIdC/we8eaDQyJkS5CKgVzzlibSMB4A o6RJv8aFYOvcHXYbEU8He9f59DqoMsZjCgSntmT7bh9DdNyagw4mRJXNROP7yBt1LAtbRy JTLHGKAmQc8mq49vwhZBHTxBJ4Erwy/lM54ahL7YLIMedY53t8qS2i9o8LcuxQmeG6tr8Q NJjcbXlizKDpQp5ymONDp37HH9SkUK97AOQjK6fDrmYcgbYCWHzZ9U6DCCIpsL7GqHEI7R F2PCnQws8nxvS5FImTXqZDC8E489XpfT4YolydjjBWSjC0SkHFQg6F0tmSYZbQ== Received: from [192.168.1.142] (84-105-120-103.cable.dynamic.v4.ziggo.nl [84.105.120.103]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: ronald/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XCbG50Ldpz1RjP; Tue, 24 Sep 2024 10:10:20 +0000 (UTC) (envelope-from ronald@FreeBSD.org) Message-ID: <9ce619ca-07b0-47d6-9ed6-4c6fe5dbd801@FreeBSD.org> Date: Tue, 24 Sep 2024 12:09:03 +0200 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 User-Agent: Mozilla Thunderbird Subject: Re: git: 0aabcd75dbc2 - main - EC2: Disable RSA host key generation for sshd To: Colin Percival , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202409180648.48I6mKNj004233@gitrepo.freebsd.org> Content-Language: en-US From: Ronald Klop In-Reply-To: <202409180648.48I6mKNj004233@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Op 18-09-2024 om 08:48 schreef Colin Percival: > The branch main has been updated by cperciva: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0aabcd75dbc2457be65e3c3c46948761ac5e50ed > > commit 0aabcd75dbc2457be65e3c3c46948761ac5e50ed > Author: Colin Percival > AuthorDate: 2024-09-11 05:00:07 +0000 > Commit: Colin Percival > CommitDate: 2024-09-18 06:47:58 +0000 > > EC2: Disable RSA host key generation for sshd > > These are largely obsolete, and generating them is responsible for > over 10% of the total boot time of EC2 instances. > Wouldn't it be a good idea to disable this in general in 15-CURRENT? It wouldn't affect existing installations. Regards, Ronald. > Sponsored by: Amazon > Differential Revision: https://reviews.freebsd.org/D46638 > --- > release/tools/ec2.conf | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf > index 2cca5fa713af..34434f86a0b1 100644 > --- a/release/tools/ec2.conf > +++ b/release/tools/ec2.conf > @@ -71,6 +71,9 @@ ec2_common() { > 's/^#KbdInteractiveAuthentication yes/KbdInteractiveAuthentication no/' \ > ${DESTDIR}/etc/ssh/sshd_config > > + # RSA host keys are obsolete and also very slow to generate > + echo 'sshd_rsa_enable="NO"' >> ${DESTDIR}/etc/rc.conf > + > # Use FreeBSD Update mirrors hosted in AWS > sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ > ${DESTDIR}/etc/freebsd-update.conf > From nobody Tue Sep 24 10:16:36 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 4XCbPJ6CWbz5Xbqy; Tue, 24 Sep 2024 10:16:36 +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 4XCbPJ5b6Tz4yFZ; Tue, 24 Sep 2024 10:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727172996; 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=2JU7Q6a56uYUZ8EXZRfEFMGoYwVKFUVi/uSJEmfbBM4=; b=Ifqqu6IsbvRSZFrNJC35Xb7yIgxdtI5Pt92A5k9Ty4G/PXjC/vBk2zPyjRVUrRQAMwHh2j gdn6QChB1LdUlR/R2t4up6OdTTMr9EXP7l6jrFslC2nZTQps0FAxi4YunSA04iPEbZBb9R ZI+PyWP0npFvybwMN7bY9xLqmWDl0bIeZj7TeOZauorad8L5vDk0OBYt95hNEulN+ucq57 gdESIq0TZTGjUOVPD0NTziKICBz4trt5nrBy2EP3PAxURXpiGX+LjKUvXTY5tRbzFrBVe/ I3y52fYw/JeFaOIzsANCXKlCgcYmUwOPUsG5vA7AKnUg26FWrJytW1GoFrJ2UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727172996; a=rsa-sha256; cv=none; b=N9rvigq0bdlgUJzHzZ3nTtOr4F0ApMaNhSCCr1xEBCxRaYWZZ4STG1i7A/O7L7bipHWeEi Vce4VEotNgkRqcRnrDBTRG4KTZ4Ea+evWk1HBugXBHKRsoQALbyD5VkZp4NFL/e9wsZiBQ A5rDxNd+GTAO1Q8pu3qr72ZmNzACyGX5zyj64ZE3LOlYGUD2u4ZY506LmLR8xa0V16KnBx z2VFTV3unuzFeilH8nTnMmcJDe7PNGF4v7e41lk5jPn0osD8RMEAL9jRvKtdLKhqMpbRmm bvEvIl7jvGptNpgaWni5eA4MePUCI8WNbvaY+o8fX8ZIgLQygz7+bZI0PWwD0A== 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=1727172996; 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=2JU7Q6a56uYUZ8EXZRfEFMGoYwVKFUVi/uSJEmfbBM4=; b=BIfHu+nm8GYzPEwF1Xe5KHzuPgs+A/+ikvrlSLoMkQNhn1ixgtNMeppdQAheVqDVWRLnvt cF+ruwurzlHHFWCZb6PZEJy4w4KenCixtv3CpG7f3dyGw02HEZSybR3NFR+ncpi2PN7giJ 26cdX0qFQ95ZDC3R1hm0Ud+78XFbix2jp7p50KjjbftSz7K7fBDaRoErIiLC+GSRCVpJWL 4LzPsa25Y5f1iWedO+uMgZI6HTARkLq+d7QYZDMik1EUoSWOcJphZ8Wv/D+bsyYPFYIy+a 4WhrlI964RUMuszB060WgSI9CPi//p9OCmwYq6Oo026wSKVO43GrlgKWsKqdow== 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 4XCbPJ53n0zPyG; Tue, 24 Sep 2024 10:16:36 +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 48OAGa3s076418; Tue, 24 Sep 2024 10:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OAGa9h076415; Tue, 24 Sep 2024 10:16:36 GMT (envelope-from git) Date: Tue, 24 Sep 2024 10:16:36 GMT Message-Id: <202409241016.48OAGa9h076415@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: 2e78e568c268 - main - e1000: Handle igb EEE sysctl 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: 2e78e568c268e4ba846ab140d9ac6b42886f8ec7 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2e78e568c268e4ba846ab140d9ac6b42886f8ec7 commit 2e78e568c268e4ba846ab140d9ac6b42886f8ec7 Author: Kevin Bowling AuthorDate: 2024-09-24 10:12:40 +0000 Commit: Kevin Bowling CommitDate: 2024-09-24 10:15:58 +0000 e1000: Handle igb EEE sysctl MFC after: 1 week Sponsored by: Blue Box Systems --- sys/dev/e1000/if_em.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 5fb46c9f6dce..d06627bcfda1 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1094,7 +1094,10 @@ em_if_attach_pre(if_ctx_t ctx) " due to SOL/IDER session.\n"); /* Sysctl for setting Energy Efficient Ethernet */ - hw->dev_spec.ich8lan.eee_disable = eee_setting; + if (hw->mac.type < igb_mac_min) + hw->dev_spec.ich8lan.eee_disable = eee_setting; + else + hw->dev_spec._82575.eee_disable = eee_setting; SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "eee_control", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, em_sysctl_eee, "I", "Disable Energy Efficient Ethernet"); @@ -4981,11 +4984,17 @@ em_sysctl_eee(SYSCTL_HANDLER_ARGS) struct e1000_softc *sc = (struct e1000_softc *) arg1; int error, value; - value = sc->hw.dev_spec.ich8lan.eee_disable; + if (sc->hw.mac.type < igb_mac_min) + value = sc->hw.dev_spec.ich8lan.eee_disable; + else + value = sc->hw.dev_spec._82575.eee_disable; error = sysctl_handle_int(oidp, &value, 0, req); if (error || req->newptr == NULL) return (error); - sc->hw.dev_spec.ich8lan.eee_disable = (value != 0); + if (sc->hw.mac.type < igb_mac_min) + sc->hw.dev_spec.ich8lan.eee_disable = (value != 0); + else + sc->hw.dev_spec._82575.eee_disable = (value != 0); em_if_init(sc->ctx); return (0); From nobody Tue Sep 24 10:48:54 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 4XCc6Z4C68z5Xdqw; Tue, 24 Sep 2024 10:48:54 +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 4XCc6Z3XSVz52W5; Tue, 24 Sep 2024 10:48:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727174934; 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=za/jhMlg2on0xIUDu/kN6seEpkDc8zvM1X7BMDoYcyA=; b=CQuoUSnkNGAAf/RICm9QTNwuaXcvtYWDrwFAun0nQvw4nwlCeIg+bCJUxkABE/EAe+MCLC 8JYOEYl7iBrJ7KKEY1YGLLi7dILYl/8yjHeBKzgtfuPjFAbB6WU/OG1JDFCA0C0Uns8VW6 R5ljRj8rlWuwW0zs5XiSd9CA0T9E8SExfLJ2SCwFRUakNrcbwn9/NMcA4ZpzQQO0NLRlk3 icJAI6vfcl5BEzMcxsFlOSm4nhqjYLxQ1PGE5gYfmHhdft1AfEldwUYasJAYPRK6u27x4P nKOwOhE/5dEWIe3AtzGxQpV5Q0RkRIdTAUeelyz9Q0hVOHs0RIvh3VusyymniQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727174934; a=rsa-sha256; cv=none; b=t/IiYLMJE1O3XKwih2Q8ojDe3zkRKztUtzqXHWnRZ/YVzdVDiak7GmLv6W74I+nHH2GOrI DYaqiHfE/MzO8xFlbnLlul8AyPpzYnyN9DA+xQIxyIDWoK1D2jgXewoKfFQke9FFBVXjmc UJfqVVJx/EFCfti10icX2azS00DrNZpA9AlHWLOM+v8AM37srafPkcWMqU4Lfo9Lf5MsS0 rFOhGPaBFt8JBSstkeyaD6+vp10orf7IFST5UNXcZOUSjcY2M9v4UFB7KQkvUuNFM++Abg vXBp5tCnG4HWE/wNKJG42indiIGev4tjmPmSH7GCwG35Z+Qxx/4Tu8Sfz5365g== 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=1727174934; 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=za/jhMlg2on0xIUDu/kN6seEpkDc8zvM1X7BMDoYcyA=; b=TmZ4bs7+QvT4CgAY92vvSDTqy3rtjs9f4stC8QYZ72TEXA104Xnp6aof0h2h1xGO5vkO26 nuTUuL9JjJCtXqkXIhR+FXx7hrBvJfZBIvYLHESbqLUtDACox5wUVseHhYKIENiBWGwLwF raJ5XO8p0zr8MCXGPfFFvVoR4hGvkbeMQ1Kmzjfjs1LJ1HOWG55OptHC1LoeMOLmY8Ac6Z fIvFxx6DycanE/TqcEuUwXcybpcvyyqLgdeS160oP4FFtPQUGgp8jJVW0qqfkJADm1Aal7 0MJsKz8SqBR4C01HoR2xWyY/8G/zx75MY7jf3qNbkyR+9kc69txM2Sb9eGiFrQ== 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 4XCc6Z2kJ7zQTs; Tue, 24 Sep 2024 10:48:54 +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 48OAmsr0027497; Tue, 24 Sep 2024 10:48:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OAmsEl027494; Tue, 24 Sep 2024 10:48:54 GMT (envelope-from git) Date: Tue, 24 Sep 2024 10:48:54 GMT Message-Id: <202409241048.48OAmsEl027494@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: c9021340a326 - main - e1000: Add sysctl for igb(4) DMA Coalesce 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: c9021340a3266f924bf721182f14f2d265d8a82c Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=c9021340a3266f924bf721182f14f2d265d8a82c commit c9021340a3266f924bf721182f14f2d265d8a82c Author: Kevin Bowling AuthorDate: 2024-09-24 10:25:24 +0000 Commit: Kevin Bowling CommitDate: 2024-09-24 10:47:05 +0000 e1000: Add sysctl for igb(4) DMA Coalesce This feature can increase efficiency at the expense of latency It does not work well with the default interrupt delay, but expose the otherwise unconnected code in the driver in case people want to experiment. See https://www.intel.com/content/dam/support/us/en/documents/network/adapter/pro100/sb/466827_intel_r__dma_coalescing_white_paper_v003.pdf MFC after: 1 week Sponsored by: Blue Box Systems --- sys/dev/e1000/if_em.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index d06627bcfda1..ad12171487f6 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -354,6 +354,7 @@ static void em_enable_vectors_82574(if_ctx_t); static int em_set_flowcntl(SYSCTL_HANDLER_ARGS); static int em_sysctl_eee(SYSCTL_HANDLER_ARGS); +static int igb_sysctl_dmac(SYSCTL_HANDLER_ARGS); static void em_if_led_func(if_ctx_t, int); static int em_get_regs(SYSCTL_HANDLER_ARGS); @@ -855,6 +856,12 @@ em_if_attach_pre(if_ctx_t ctx) CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, em_get_rs, "I", "Dump RS indexes"); + if (hw->mac.type >= e1000_i350) { + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "dmac", + CTLTYPE_INT | CTLFLAG_RW, sc, 0, + igb_sysctl_dmac, "I", "DMA Coalesce"); + } + scctx->isc_tx_nsegments = EM_MAX_SCATTER; scctx->isc_nrxqsets_max = scctx->isc_ntxqsets_max = em_set_num_queues(ctx); if (bootverbose) @@ -4973,6 +4980,55 @@ em_set_flowcntl(SYSCTL_HANDLER_ARGS) return (error); } +/* + * Manage DMA Coalesce: + * Control values: + * 0/1 - off/on + * Legal timer values are: + * 250,500,1000-10000 in thousands + */ +static int +igb_sysctl_dmac(SYSCTL_HANDLER_ARGS) +{ + struct e1000_softc *sc = (struct e1000_softc *) arg1; + int error; + + error = sysctl_handle_int(oidp, &sc->dmac, 0, req); + + if ((error) || (req->newptr == NULL)) + return (error); + + switch (sc->dmac) { + case 0: + /* Disabling */ + break; + case 1: /* Just enable and use default */ + sc->dmac = 1000; + break; + case 250: + case 500: + case 1000: + case 2000: + case 3000: + case 4000: + case 5000: + case 6000: + case 7000: + case 8000: + case 9000: + case 10000: + /* Legal values - allow */ + break; + default: + /* Do nothing, illegal value */ + sc->dmac = 0; + return (EINVAL); + } + /* Reinit the interface */ + em_if_init(sc->ctx); + return (error); +} + /* * Manage Energy Efficient Ethernet: * Control values: From nobody Tue Sep 24 11:00:58 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 4XCcNV6HX7z5Xf9h; Tue, 24 Sep 2024 11:00:58 +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 4XCcNV5n5tz53x1; Tue, 24 Sep 2024 11:00:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727175658; 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=z9AC68vZdipUK4g9Fzn4t0G+1Mz7MtQWT5npRYH/jdw=; b=OssLBpbmTv0HKYZigS9N6L9U7Xtp+U58aDm3wh5Bo0KvxTCavdQ+53c+o9u5SrqWivysxf FbAsUUZU2MyK69eHUQ86YRxNa/xL1Rsb3pOBF1Q14mkWYvbYGyUk4g1sF6rGJeZ+cTVtdz G9Puuas5fOKYZForEcogl3O2ItodhCh+fkJmb94qWERWQKY/H8OG3IOC4IuedeGNnbnXBv +qFjGe4bZWx/12Hv/a7x/C5MA6kSlxzh1Ke4UfFOUZxXbjrTYEjRuyVN+YFeQMrmPdjR7/ fcQP/hI0Fz3diC/7wZD0hXaxj6NuvWTXac1cCsMWrOy3WjhNZXvPt5Ba6V8a1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727175658; a=rsa-sha256; cv=none; b=CbOO5QI16esfmYk5dq3vWxlP3V6tnnuWA+OfefYLLoSlRgeOijgnj47biEYygHJeSiTLID EiIjExCFy7PYt/RuAAFiBP516OmiF/5fKGK74xZfF13LVgIHBoRcwQMZd4myecdCwo2zxP 8Gfl1o5EsKzV9/uCcrEMvuNMtt5BsS5DjgSRSoVUAJZDApvp5vCqcJFEf8FtrwEmXOK2cG SWqv70ULW6zxH95aElzOXQav5ScrybCgk1J4oIM6YLMtowW6BOSm2lX2idTRflmBkSD/0s 5PacuxNbtpih0o5YJ5fYBrcgJfzI5WqJtg1zUsjJGZhvcHsMVGIq9PbNmp+ulQ== 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=1727175658; 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=z9AC68vZdipUK4g9Fzn4t0G+1Mz7MtQWT5npRYH/jdw=; b=UqC9L7w4JTTEPKNO7Ar1U53hzKw70C1kLUAfKZDQDm9SZdeG4RTSvwFkUS2GzWWV1Wnj5M HuNRWWQ29AELi3HqKauOAxOBu4d5HnAFuKh+h4hIZRZLkW27i0mokOGJOoKNaxLPiEBP8K gultHkwAeRxmDB2e2lu/o3IDh65EwECTdCQtDkBISVQA/Q6KbWwBxabkZQiRtQEpTnTg1z 3Uwgo6xQ4r+YO10IBieTF74mFuJhZBeEikLMguZfpeP+NpoQm7C9W6eiqQuco/Mudfn5BT /2Xjgxl4nA0dVSYwVtuDJzrDJjmaGVGtJG65tAZaeA1zNEylvMUfuoPjQmTExQ== 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 4XCcNV5FpmzQVj; Tue, 24 Sep 2024 11:00:58 +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 48OB0wrR055503; Tue, 24 Sep 2024 11:00:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OB0w4v055500; Tue, 24 Sep 2024 11:00:58 GMT (envelope-from git) Date: Tue, 24 Sep 2024 11:00:58 GMT Message-Id: <202409241100.48OB0w4v055500@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: bf085659dac9 - main - Revert "ixl: Increase tx/rx ring size to 8160" 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: bf085659dac9dd32259d05311a0a78d068fd59ef Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=bf085659dac9dd32259d05311a0a78d068fd59ef commit bf085659dac9dd32259d05311a0a78d068fd59ef Author: Kevin Bowling AuthorDate: 2024-09-24 10:58:50 +0000 Commit: Kevin Bowling CommitDate: 2024-09-24 10:58:50 +0000 Revert "ixl: Increase tx/rx ring size to 8160" iflib enforces powerof2 on the ring size: panic: Assertion powerof2(sctx->isc_nrxd_max[i]) Revert until this change is better understood. Reported by: tuexen This reverts commit 14561f1eda85fabfba2d764ca11e064ed871224e. --- sys/dev/ixl/ixl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixl/ixl.h b/sys/dev/ixl/ixl.h index 042e4e3e6e1a..f45354d29300 100644 --- a/sys/dev/ixl/ixl.h +++ b/sys/dev/ixl/ixl.h @@ -122,7 +122,7 @@ * The driver currently always uses 32 byte Rx descriptors. */ #define IXL_DEFAULT_RING 1024 -#define IXL_MAX_RING 8160 +#define IXL_MAX_RING 4096 #define IXL_MIN_RING 64 #define IXL_RING_INCREMENT 32 From nobody Tue Sep 24 15:45:21 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 4XCkhf1ZPxz5Xw3X for ; Tue, 24 Sep 2024 15:45:22 +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 4XCkhf0dTbz4HxD; Tue, 24 Sep 2024 15:45:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727192722; 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=eCciySzMVKbDtj4R1PIAg1SL9blf5DPvNH9ecaYASs8=; b=ijuEG0upNLbLV+7eoTSewxGAajmcZiBUW2LYzsraVKqC9ZBJXJXenTVqRgWw2Kpi16Xm7b OG586SMKwtcD9cbBPuyZa45DiFhsZR6WvlJHdBuWoO3oeXMgMOqarVIg/xCxuwnQPJbbrm tZ87GHM1XvzmksdoUmYZsqgRcKgqUG5cFtIvFpTiPEZ7yVXTcSLtUQkjpWEgFtdA3bYSiL 3H3lcLBAjf94Mh4jYUF9BlOKMxs5Peyko6v4xJkW63hyb21mCMxRgjmhzlXXwoUFVDHtdk m4EDwxhdEpfTCS8ZwQ1apqy8GazT4w6H3hGNZGD9omm1Q0yp+BonjCry0cUVqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727192722; a=rsa-sha256; cv=none; b=LYOd0GvBYNc3sGfWiulqVrfUUOf8aM6nZPrv2ebSNbOOed52i3QzuRdeIwM3625CcLhqXs 64iOiovJ2Ei38ZEf0r+67bc6jRHDcGIrxi1riixVZ9BvheS63Rso4oYvt3wkAQbWA6i5za NAbqtzf8oDCZJCpxv6m6aZanUa3YWwwYcO+D7wb/yDVRJuNl/McC1eqn30FVeOIYwDuoMR ynpGWWDfdwZHuIn/MAVdq53bwzElER9oUg4+uRlc3/OEhkCbedNYknj+jf7ZA+zup+LCxK L/YnpUMonZH7c9msZFlJFxe5scXefI3oPexUwNQv5UZFeIjgyT2cdVTGjBdiJg== 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=1727192722; 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=eCciySzMVKbDtj4R1PIAg1SL9blf5DPvNH9ecaYASs8=; b=lVCETJljQktIpjkm0MUCwZDDttAkT4+zk8wXOr/cY1jI1djAMkgMFQ8cnwQr7kLU0rc6+P LCV+eOjLqpEvav/fOB9/G9PeBZBiw6qHcxk+Lz6apulbuUbsPRHCoAGWUbbEX97Wi9Iew8 bKpqIMMX++y+iSqifpRU0XRdxtA3UQ7sSgBLbmFXiI0OEDeUHyOh4Tz2djjpyrIvuKo4cV s2wHST2Di5/v9shGDewDQUIEqHVIe1f3iGZ2KDXC+19hmuJuxk40g5+5GxYUaAkgNwtRQk JQ6ELenInWXN+sMwmoQRwIpN1LYVg7oBSmfCpVPCbG9K1CJgnMKTNKdGRF5lKA== 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 4XCkhd71M6zZpX; Tue, 24 Sep 2024 15:45:21 +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 48OFjLkn039084; Tue, 24 Sep 2024 15:45:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OFjLHp039081; Tue, 24 Sep 2024 15:45:21 GMT (envelope-from git) Date: Tue, 24 Sep 2024 15:45:21 GMT Message-Id: <202409241545.48OFjLHp039081@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: John Baldwin Subject: git: 3017b37a8318 - internal/admin - Take karels commit bit into safekeeping 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: jhb X-Git-Repository: src X-Git-Refname: refs/internal/admin X-Git-Reftype: branch X-Git-Commit: 3017b37a8318f19bad71774b39e5a2eb775a8158 Auto-Submitted: auto-generated The branch internal/admin has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3017b37a8318f19bad71774b39e5a2eb775a8158 commit 3017b37a8318f19bad71774b39e5a2eb775a8158 Author: John Baldwin AuthorDate: 2024-09-24 15:42:31 +0000 Commit: John Baldwin CommitDate: 2024-09-24 15:44:29 +0000 Take karels commit bit into safekeeping Rest in peace. Approved by: core (implicit) --- access | 1 - 1 file changed, 1 deletion(-) diff --git a/access b/access index 96a7f04dce8e..9b36cb5f7f7e 100644 --- a/access +++ b/access @@ -87,7 +87,6 @@ joerg freebsd-devel@uriah.heep.sax.de jrtc27 jtl kaktus -karels kd ken kevans From nobody Tue Sep 24 15:58:00 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 4XCkzD1m8Sz5Xwn0; Tue, 24 Sep 2024 15:58:00 +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 4XCkzD1DLzz4Jjd; Tue, 24 Sep 2024 15:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727193480; 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=OukdR4d4mSqQ7m4paToZRfkyh7x2O10rZM04Fjp0geQ=; b=KVXVdJ34toLGcQykrR8t/2aH94VkYWbDOEbMJDzvnCD9N1FmMEKxaIXeb8JZs/NKsGCE0Y skOmsH49NN7QGicdXpJ18UmmaL3QLiIKZThXoVFdI90755cO9H+PQZWfHXTrDbBHtjW5Jl MAo8SrPtNUpPkOm0YE0cnK0B8enAvep54mSigLthOSBm728P7MBDEI/VqCDGdd18siFWaD X6rSmYRCVlWHslp8GTGOGI9XiJHE62u5D48GphKCSkuc4MA2BbLMoJXS98k94xk7iVhwmg KrwbeJtkh388hHhMWi/0FbaA3QIIENoM4U6xcrJmBpEyx9MtPCZXgphPSupuEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727193480; a=rsa-sha256; cv=none; b=HHw3lmjtiXXjgeIyAfV68GXXtbDNc9wNFyuw5kngruivm6+4jIW4JHxTIhtxSruzAXAr+Y Rk8u4EUr9TwtVpezRu+MJ2acGGUDn8B2dCH8V+LzRn0Eq7/AfxiKzDCK5J8WbumwCLxTkQ dFDExzYI3ne8geFRFH2aZx3RT2wa5PpfLdnqDBXZW/+7HXwQ0qToRXy6QBrrU8ngR1Ftk/ xxXlJb4C0gmfEtkxm8Ol6AODMCnbRiGK24W9IJWW0vTu302pckYb5ZX4ldYjh3irp6Ob59 EcheCEZjVCq/e/Afa68hjU/MEz9DNjtjpqitIHm6jLxWgO5LLAhz3HKN1QEtpg== 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=1727193480; 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=OukdR4d4mSqQ7m4paToZRfkyh7x2O10rZM04Fjp0geQ=; b=ynis88yMKXwgXNqLisZy3YpevqRQ1RcX84tf6tDNN7VfNcbx7luZca6aszmnCKtDsjNg66 0rQ2C8rm5DwzK0xzl1/AjenUgb1tCJz3sglSUb4g4OJSGQC2JT43tVXUC6dgp/bb0wJWoS SSm1HorxMzpDk9ADLZObiPKz2jXuDB9udIzBXUazhfuzXQ4PErpjPj9nOnTOgxrimMkZrQ shSGD1uE1sxSlNejUDtkg6UPshqPdnNKr4BZo25w58hHxXcbMTxrSIgbSMkdT8AuGiT3Bf zIXlTPhVhcN9BECg/0WG+mz/RjNAVUL0otj9cBZyMkOLGdx2qeMyrzgLLKSWvQ== 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 4XCkzD0qPWzb8m; Tue, 24 Sep 2024 15:58:00 +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 48OFw0Pd056468; Tue, 24 Sep 2024 15:58:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OFw0Xq056465; Tue, 24 Sep 2024 15:58:00 GMT (envelope-from git) Date: Tue, 24 Sep 2024 15:58:00 GMT Message-Id: <202409241558.48OFw0Xq056465@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 3883300afe0b - main - cxgbe/t4_tom: Do not set unresolved entries to STALE in t4_l2t_update. 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3883300afe0bff5c5658274c4d8cfe773d08343e Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=3883300afe0bff5c5658274c4d8cfe773d08343e commit 3883300afe0bff5c5658274c4d8cfe773d08343e Author: Navdeep Parhar AuthorDate: 2024-09-24 14:35:09 +0000 Commit: Navdeep Parhar CommitDate: 2024-09-24 15:53:11 +0000 cxgbe/t4_tom: Do not set unresolved entries to STALE in t4_l2t_update. An L2 entry in the driver's hash was marked STALE unconditionally if it changed in the kernel when its driver refcount is 0. Fix the driver to do this for VALID entries only. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_tom_l2t.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/tom/t4_tom_l2t.c b/sys/dev/cxgbe/tom/t4_tom_l2t.c index be42a887323f..8cc3e633444a 100644 --- a/sys/dev/cxgbe/tom/t4_tom_l2t.c +++ b/sys/dev/cxgbe/tom/t4_tom_l2t.c @@ -441,7 +441,8 @@ t4_l2_update(struct toedev *tod, if_t ifp, struct sockaddr *sa, mtx_lock(&e->lock); if (atomic_load_acq_int(&e->refcnt)) goto found; - e->state = L2T_STATE_STALE; + if (e->state == L2T_STATE_VALID) + e->state = L2T_STATE_STALE; mtx_unlock(&e->lock); break; } From nobody Tue Sep 24 16:34:24 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 4XClnF1DGkz5Y2wK; Tue, 24 Sep 2024 16:34:25 +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 4XClnD6wg2z4NvH; Tue, 24 Sep 2024 16:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727195664; 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=/pw6HPer7zpEghLxL3j5xqTqNQJ0ocViJCAWcrUEOuc=; b=p2eTBnAY7fkTrjcZ3olXMelHwDsXe/jUqMKIFiemxayuxaKi5OmORfu1RGCyTX1Bf9Hclu hRvaGx44VYaZ0y6N5aXx+BqrmXpyW6aXJkqNv7f8KWARP6MTDxF9adSSi9KjeQUGYQUPgg xUo+ASiiu/osKcVQ5Rixp86cm9wvVroemiX+2zS+qGlVy3NlSubF+x/cUgmdl2w4TGXs/V Y3xbaUL7wn0us657N3XfiacMe+e5yGDEpIlfkDafGaR3dRulmziHdYLD+sAYZrh+zUWo2P SmKsyUvXr6/CMpm0LqDQ0Fw3MLz/fSL9txJUqyO+d8oIR5F2AUbyuPc6hpOzOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727195664; a=rsa-sha256; cv=none; b=agb0+YjIHCKLiP+Ws4bE1h63Fd8Ls5bCzsFd25h8MFK9jaCtCoNv/KwQOPtdsmoXk6seOC r8DJbsHtlEKeP8NufWoLIO2kihAiszD7QLD47uHYI2D6IkQQMhupLXac+kVmPJT3g9+5ok iN/AGk1nm0ujZ0amWnpz7Up+dmsoRum5YjUWTpR1k0L/29ASiUwfiWD73CNWum0U7wE6np /gl695RozXypbFrwv3OF+lMyAjSv8BIyxfhi79+U4FV+FUc+StV10DzllwE5Y5WcLAcqal Er7Zd5k/46u9bcYOm8SNuAcjWJSDW45NFdMHVF6/jvFUL6r18F97gRJof1ESyg== 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=1727195664; 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=/pw6HPer7zpEghLxL3j5xqTqNQJ0ocViJCAWcrUEOuc=; b=vKn0LNITthVUq71fKMOn3FOuGt2L+mDnu0S4UkJUd3dixNTVy9ugkPr/cbZOX50Nyc0hTU 4hdgybVeJh+O72jev+Ar3h06mWq7kzZ9G6D2hAaiE5vxq9qCuhB8Zkwju8qyr+6fE7sJxw bVdUSIvj6B6KOwy9nfrScVNVyt7yeiJOSzbglAcNXW3T3hP3Le2Kf2VosRcxsazmsoUQ2U 7mz0wmkSMoYg7g+ugk/1L8IVs9n2QbEI5feMvgMCuVVsHbbRY1Hewe9rcMb8Bxlutw9qTx pEUA5Jl8fCSn8nC4Y9Ab48QFb3x7VqGTxQeytt83dg3F8kDteGjhhVY92fdV8A== 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 4XClnD6X79zcW3; Tue, 24 Sep 2024 16:34: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 48OGYOn1024424; Tue, 24 Sep 2024 16:34:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OGYOtC024421; Tue, 24 Sep 2024 16:34:24 GMT (envelope-from git) Date: Tue, 24 Sep 2024 16:34:24 GMT Message-Id: <202409241634.48OGYOtC024421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: bb18c65a9177 - stable/13 - vendor/bc: upgrade to version 7.0.2 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: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bb18c65a917749ff42c0d610f1e311a47bfaac7f Auto-Submitted: auto-generated The branch stable/13 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=bb18c65a917749ff42c0d610f1e311a47bfaac7f commit bb18c65a917749ff42c0d610f1e311a47bfaac7f Author: Stefan Eßer AuthorDate: 2024-09-18 05:55:46 +0000 Commit: Stefan Eßer CommitDate: 2024-09-24 16:34:16 +0000 vendor/bc: upgrade to version 7.0.2 This update fixes exiting from an interactive bc session with ^D on FreeBSD and Linux when using editline. This bug was caused by the macOS fix for editline in version 7.0.0, which has been reverted in this version. Reported by: mack@macktronics.com (cherry picked from commit c2c85f88902d18d2e9702381f1628112e15a5c3c) (cherry picked from commit 9b04aee86ccd58a6f3c936e0cd95bb9305a69848) --- contrib/bc/NEWS.md | 8 ++++++++ contrib/bc/include/history.h | 24 ++++++++++++++++++++++++ contrib/bc/include/version.h | 2 +- contrib/bc/manuals/bc/A.1 | 6 +++--- contrib/bc/manuals/bc/A.1.md | 4 ++-- contrib/bc/manuals/bc/E.1 | 2 +- contrib/bc/manuals/bc/EH.1 | 2 +- contrib/bc/manuals/bc/EHN.1 | 2 +- contrib/bc/manuals/bc/EN.1 | 2 +- contrib/bc/manuals/bc/H.1 | 6 +++--- contrib/bc/manuals/bc/H.1.md | 4 ++-- contrib/bc/manuals/bc/HN.1 | 6 +++--- contrib/bc/manuals/bc/HN.1.md | 4 ++-- contrib/bc/manuals/bc/N.1 | 6 +++--- contrib/bc/manuals/bc/N.1.md | 4 ++-- contrib/bc/src/history.c | 13 ++++++++++++- 16 files changed, 69 insertions(+), 26 deletions(-) diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index 8156b673ce04..e3b1f9ecb7bc 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,13 @@ # News +## 7.0.2 + +This is a production release that fixes `Ctrl+d` on FreeBSD and Linux when using +`editline`. + +This bug was caused by the macOS fix in `7.0.0`. Unfortunately, this means that +macOS does not respond properly to `Ctrl+d`. + ## 7.0.1 This is a production release that fixes a warning using GCC on FreeBSD. diff --git a/contrib/bc/include/history.h b/contrib/bc/include/history.h index 460524bd7b87..13f6dc6e985c 100644 --- a/contrib/bc/include/history.h +++ b/contrib/bc/include/history.h @@ -120,6 +120,30 @@ typedef struct BcHistory extern const char bc_history_editrc[]; extern const size_t bc_history_editrc_len; +#ifdef __APPLE__ + +/** + * Returns true if the line is a valid line, false otherwise. + * @param line The line. + * @param len The length of the line. + * @return True if the line is valid, false otherwise. + */ +#define BC_HISTORY_INVALID_LINE(line, len) \ + ((line) == NULL && ((len) == -1 || errno == EINTR)) + +#else // __APPLE__ + +/** + * Returns true if the line is a valid line, false otherwise. + * @param line The line. + * @param len The length of the line. + * @return True if the line is valid, false otherwise. + */ +#define BC_HISTORY_INVALID_LINE(line, len) \ + ((line) == NULL && (len) == -1 && errno == EINTR) + +#endif // __APPLE__ + #else // BC_ENABLE_EDITLINE #if BC_ENABLE_READLINE diff --git a/contrib/bc/include/version.h b/contrib/bc/include/version.h index 4d2f6acfb433..a4fb8def5024 100644 --- a/contrib/bc/include/version.h +++ b/contrib/bc/include/version.h @@ -37,6 +37,6 @@ #define BC_VERSION_H /// The current version. -#define VERSION 7.0.1 +#define VERSION 7.0.2 #endif // BC_VERSION_H diff --git a/contrib/bc/manuals/bc/A.1 b/contrib/bc/manuals/bc/A.1 index 4750598b55fc..adeb62f82e6a 100644 --- a/contrib/bc/manuals/bc/A.1 +++ b/contrib/bc/manuals/bc/A.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME @@ -1731,7 +1731,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and +Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo\-random integer that is between \f[B]0\f[R] +Generates a pseudo\-random number that is between \f[B]0\f[R] (inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. diff --git a/contrib/bc/manuals/bc/A.1.md b/contrib/bc/manuals/bc/A.1.md index 56f7c52fb2cd..e89305b1af44 100644 --- a/contrib/bc/manuals/bc/A.1.md +++ b/contrib/bc/manuals/bc/A.1.md @@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random integer between **0** (inclusive) and **1** +: Generates a pseudo-random number between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random integer that is between **0** (inclusive) and the +: Generates a pseudo-random number that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and diff --git a/contrib/bc/manuals/bc/E.1 b/contrib/bc/manuals/bc/E.1 index 62b18165fe92..e2f1b034e69a 100644 --- a/contrib/bc/manuals/bc/E.1 +++ b/contrib/bc/manuals/bc/E.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME diff --git a/contrib/bc/manuals/bc/EH.1 b/contrib/bc/manuals/bc/EH.1 index 69f28e875990..c132a0b76a49 100644 --- a/contrib/bc/manuals/bc/EH.1 +++ b/contrib/bc/manuals/bc/EH.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME diff --git a/contrib/bc/manuals/bc/EHN.1 b/contrib/bc/manuals/bc/EHN.1 index fb453b05363d..e3395b1cc20d 100644 --- a/contrib/bc/manuals/bc/EHN.1 +++ b/contrib/bc/manuals/bc/EHN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME diff --git a/contrib/bc/manuals/bc/EN.1 b/contrib/bc/manuals/bc/EN.1 index 4833e3e70ddc..c1ccbec567ec 100644 --- a/contrib/bc/manuals/bc/EN.1 +++ b/contrib/bc/manuals/bc/EN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME diff --git a/contrib/bc/manuals/bc/H.1 b/contrib/bc/manuals/bc/H.1 index 4787435ae052..9dc46ee50dee 100644 --- a/contrib/bc/manuals/bc/H.1 +++ b/contrib/bc/manuals/bc/H.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME @@ -1731,7 +1731,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and +Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo\-random integer that is between \f[B]0\f[R] +Generates a pseudo\-random number that is between \f[B]0\f[R] (inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. diff --git a/contrib/bc/manuals/bc/H.1.md b/contrib/bc/manuals/bc/H.1.md index aa313cd14b63..fbc0658d8171 100644 --- a/contrib/bc/manuals/bc/H.1.md +++ b/contrib/bc/manuals/bc/H.1.md @@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random integer between **0** (inclusive) and **1** +: Generates a pseudo-random number between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random integer that is between **0** (inclusive) and the +: Generates a pseudo-random number that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and diff --git a/contrib/bc/manuals/bc/HN.1 b/contrib/bc/manuals/bc/HN.1 index 73c243310d5c..7b4577f2dbd3 100644 --- a/contrib/bc/manuals/bc/HN.1 +++ b/contrib/bc/manuals/bc/HN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME @@ -1731,7 +1731,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and +Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo\-random integer that is between \f[B]0\f[R] +Generates a pseudo\-random number that is between \f[B]0\f[R] (inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. diff --git a/contrib/bc/manuals/bc/HN.1.md b/contrib/bc/manuals/bc/HN.1.md index dc537ffe4cfa..015035c14daf 100644 --- a/contrib/bc/manuals/bc/HN.1.md +++ b/contrib/bc/manuals/bc/HN.1.md @@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random integer between **0** (inclusive) and **1** +: Generates a pseudo-random number between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random integer that is between **0** (inclusive) and the +: Generates a pseudo-random number that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and diff --git a/contrib/bc/manuals/bc/N.1 b/contrib/bc/manuals/bc/N.1 index f66ae06d9c3a..193e0d15f6fb 100644 --- a/contrib/bc/manuals/bc/N.1 +++ b/contrib/bc/manuals/bc/N.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME @@ -1731,7 +1731,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and +Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo\-random integer that is between \f[B]0\f[R] +Generates a pseudo\-random number that is between \f[B]0\f[R] (inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. diff --git a/contrib/bc/manuals/bc/N.1.md b/contrib/bc/manuals/bc/N.1.md index ad1e603392ae..859c32e3e774 100644 --- a/contrib/bc/manuals/bc/N.1.md +++ b/contrib/bc/manuals/bc/N.1.md @@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random integer between **0** (inclusive) and **1** +: Generates a pseudo-random number between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random integer that is between **0** (inclusive) and the +: Generates a pseudo-random number that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and diff --git a/contrib/bc/src/history.c b/contrib/bc/src/history.c index 6ae9785d9a79..32a19f71d777 100644 --- a/contrib/bc/src/history.c +++ b/contrib/bc/src/history.c @@ -264,7 +264,18 @@ bc_history_line(BcHistory* h, BcVec* vec, const char* prompt) errno = EINTR; // Get the line. - while (line == NULL && (len == -1 || errno == EINTR)) + // + // XXX: Why have a macro here? Because macOS needs to be special. Honestly, + // it's starting to feel special like Windows at this point. Anyway, the + // second SIGWINCH signal of multiple will return a valid line length on + // macOS, so we need to allow for that on macOS. However, FreeBSD's editline + // is different and will mess up the terminal if we do it that way. + // + // There is one limitation with this, however: Ctrl+D won't work on macOS. + // But it's because of macOS that this problem exists, and I can't really do + // anything about it. So macOS should fix their broken editline; once they + // do, I'll fix Ctrl+D on macOS. + while (BC_HISTORY_INVALID_LINE(line, len)) { line = el_gets(h->el, &len); bc_history_use_prompt = false; From nobody Tue Sep 24 16: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 4XClnM73XWz5Y2wL; Tue, 24 Sep 2024 16:34:31 +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 4XClnM61GSz4NsY; Tue, 24 Sep 2024 16:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727195671; 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=1fjE9g6N3HprdFCYjOJjuol610BUEBzRrslz/QWAwa8=; b=ut0CnBKiAruN+vp6pZBaLGopSDHdAGdgaMOiJeCDr9rWi15WU6765jTEXw8akx431r7Bqq fs6KUwRcZF+qZaSb40O3gQCRBAW0nnhDQRt7KDjHHbXxNKfDpIDoURvNDAnarRCjmx3BF5 Wgt+urwek3LPD1DVbRGiUSHZuoZLOeK7H5Q4AeKkb/XcPKMlKpDybh1Sz7RyVT/FPOzNTc LEilnLNOtPQJBuPLIPA25uj0m/gdZwNelT8kQikcL2Fm9Q9k2nLOX3ESahMLvypvvMjTSB UVlSFjWy4Oo7FDDng7RVod7sdzQpxtCJoe9eq31jM8r9U8+l762x8g3pbZLOSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727195671; a=rsa-sha256; cv=none; b=c3YC+y+3s2jjpZPxS0GRaW7VEmMJitQBz30e6X+TzUbblmZtUZXAh1T6htVqSy1L0Le3So hOcQb4VBlNMIvbLbyMWwf5uim3m+XaLpHdXGCl9M60PTswtTmn1OmNyI2ev5vHZwsWrGkR EeePZelPVYR6Fm19tR7Nojs91EJBWoXLfsM4vnhji2F77/TpbTz832pD4Tya64N4S596Pc SCnn0xXqBL7uqgFrZTQgpRKJJjeyCN/Qy88qM6KQblnW1bjnc6HeyjWVQ+b2AK6qdziPHx wtu9sVSBtM76Wr+zYQkeIbqFtDVIlMNn6sqogOeoo5yOqS3V+pIQMEbhXe7FJw== 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=1727195671; 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=1fjE9g6N3HprdFCYjOJjuol610BUEBzRrslz/QWAwa8=; b=PQhecmrtbTDSdNmGjR1LHH4pFl2yxo9yxl7HixeOsFZmH7MXBZ7MSuQnohVobK5AUnF5Qa /E0uiGi8kLX5iMNaY/bjU8pQPpEANUSY6VzrkXII06bJrX503a+wYm3V/r2tZnxFJZe+ph lYLYBtEOI6kKQs2VDiTRuaaEBMY9KniLv3s9wQR0DK5pPMX5YDTMquMVCuN3aVVuXNnB/8 K2uAKyDxVCT84peKaZQn/ol+joTjL1yRswlsab/cB1jra7nYVc6LnWLvTuZnpyV4UPJlbX HlIkJEUU8OpF5BSNGRXw+pHDWQqfqi0xB7ltJ2rbHNYCpYVADpyLf4FPPRWuxA== 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 4XClnM4Bw8zcG4; Tue, 24 Sep 2024 16:34:31 +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 48OGYVfA024571; Tue, 24 Sep 2024 16: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 48OGYVYa024568; Tue, 24 Sep 2024 16:34:31 GMT (envelope-from git) Date: Tue, 24 Sep 2024 16:34:31 GMT Message-Id: <202409241634.48OGYVYa024568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: 90ea553a0d30 - stable/14 - vendor/bc: upgrade to version 7.0.2 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: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 90ea553a0d309acc3bdb50a3fe2ed0449c8d7e4c Auto-Submitted: auto-generated The branch stable/14 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=90ea553a0d309acc3bdb50a3fe2ed0449c8d7e4c commit 90ea553a0d309acc3bdb50a3fe2ed0449c8d7e4c Author: Stefan Eßer AuthorDate: 2024-09-18 05:55:46 +0000 Commit: Stefan Eßer CommitDate: 2024-09-24 16:33:30 +0000 vendor/bc: upgrade to version 7.0.2 This update fixes exiting from an interactive bc session with ^D on FreeBSD and Linux when using editline. This bug was caused by the macOS fix for editline in version 7.0.0, which has been reverted in this version. Reported by: mack@macktronics.com (cherry picked from commit c2c85f88902d18d2e9702381f1628112e15a5c3c) (cherry picked from commit 9b04aee86ccd58a6f3c936e0cd95bb9305a69848) --- contrib/bc/NEWS.md | 8 ++++++++ contrib/bc/include/history.h | 24 ++++++++++++++++++++++++ contrib/bc/include/version.h | 2 +- contrib/bc/manuals/bc/A.1 | 6 +++--- contrib/bc/manuals/bc/A.1.md | 4 ++-- contrib/bc/manuals/bc/E.1 | 2 +- contrib/bc/manuals/bc/EH.1 | 2 +- contrib/bc/manuals/bc/EHN.1 | 2 +- contrib/bc/manuals/bc/EN.1 | 2 +- contrib/bc/manuals/bc/H.1 | 6 +++--- contrib/bc/manuals/bc/H.1.md | 4 ++-- contrib/bc/manuals/bc/HN.1 | 6 +++--- contrib/bc/manuals/bc/HN.1.md | 4 ++-- contrib/bc/manuals/bc/N.1 | 6 +++--- contrib/bc/manuals/bc/N.1.md | 4 ++-- contrib/bc/src/history.c | 13 ++++++++++++- 16 files changed, 69 insertions(+), 26 deletions(-) diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index 8156b673ce04..e3b1f9ecb7bc 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,13 @@ # News +## 7.0.2 + +This is a production release that fixes `Ctrl+d` on FreeBSD and Linux when using +`editline`. + +This bug was caused by the macOS fix in `7.0.0`. Unfortunately, this means that +macOS does not respond properly to `Ctrl+d`. + ## 7.0.1 This is a production release that fixes a warning using GCC on FreeBSD. diff --git a/contrib/bc/include/history.h b/contrib/bc/include/history.h index 460524bd7b87..13f6dc6e985c 100644 --- a/contrib/bc/include/history.h +++ b/contrib/bc/include/history.h @@ -120,6 +120,30 @@ typedef struct BcHistory extern const char bc_history_editrc[]; extern const size_t bc_history_editrc_len; +#ifdef __APPLE__ + +/** + * Returns true if the line is a valid line, false otherwise. + * @param line The line. + * @param len The length of the line. + * @return True if the line is valid, false otherwise. + */ +#define BC_HISTORY_INVALID_LINE(line, len) \ + ((line) == NULL && ((len) == -1 || errno == EINTR)) + +#else // __APPLE__ + +/** + * Returns true if the line is a valid line, false otherwise. + * @param line The line. + * @param len The length of the line. + * @return True if the line is valid, false otherwise. + */ +#define BC_HISTORY_INVALID_LINE(line, len) \ + ((line) == NULL && (len) == -1 && errno == EINTR) + +#endif // __APPLE__ + #else // BC_ENABLE_EDITLINE #if BC_ENABLE_READLINE diff --git a/contrib/bc/include/version.h b/contrib/bc/include/version.h index 4d2f6acfb433..a4fb8def5024 100644 --- a/contrib/bc/include/version.h +++ b/contrib/bc/include/version.h @@ -37,6 +37,6 @@ #define BC_VERSION_H /// The current version. -#define VERSION 7.0.1 +#define VERSION 7.0.2 #endif // BC_VERSION_H diff --git a/contrib/bc/manuals/bc/A.1 b/contrib/bc/manuals/bc/A.1 index 4750598b55fc..adeb62f82e6a 100644 --- a/contrib/bc/manuals/bc/A.1 +++ b/contrib/bc/manuals/bc/A.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME @@ -1731,7 +1731,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and +Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo\-random integer that is between \f[B]0\f[R] +Generates a pseudo\-random number that is between \f[B]0\f[R] (inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. diff --git a/contrib/bc/manuals/bc/A.1.md b/contrib/bc/manuals/bc/A.1.md index 56f7c52fb2cd..e89305b1af44 100644 --- a/contrib/bc/manuals/bc/A.1.md +++ b/contrib/bc/manuals/bc/A.1.md @@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random integer between **0** (inclusive) and **1** +: Generates a pseudo-random number between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random integer that is between **0** (inclusive) and the +: Generates a pseudo-random number that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and diff --git a/contrib/bc/manuals/bc/E.1 b/contrib/bc/manuals/bc/E.1 index 62b18165fe92..e2f1b034e69a 100644 --- a/contrib/bc/manuals/bc/E.1 +++ b/contrib/bc/manuals/bc/E.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME diff --git a/contrib/bc/manuals/bc/EH.1 b/contrib/bc/manuals/bc/EH.1 index 69f28e875990..c132a0b76a49 100644 --- a/contrib/bc/manuals/bc/EH.1 +++ b/contrib/bc/manuals/bc/EH.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME diff --git a/contrib/bc/manuals/bc/EHN.1 b/contrib/bc/manuals/bc/EHN.1 index fb453b05363d..e3395b1cc20d 100644 --- a/contrib/bc/manuals/bc/EHN.1 +++ b/contrib/bc/manuals/bc/EHN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME diff --git a/contrib/bc/manuals/bc/EN.1 b/contrib/bc/manuals/bc/EN.1 index 4833e3e70ddc..c1ccbec567ec 100644 --- a/contrib/bc/manuals/bc/EN.1 +++ b/contrib/bc/manuals/bc/EN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME diff --git a/contrib/bc/manuals/bc/H.1 b/contrib/bc/manuals/bc/H.1 index 4787435ae052..9dc46ee50dee 100644 --- a/contrib/bc/manuals/bc/H.1 +++ b/contrib/bc/manuals/bc/H.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME @@ -1731,7 +1731,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and +Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo\-random integer that is between \f[B]0\f[R] +Generates a pseudo\-random number that is between \f[B]0\f[R] (inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. diff --git a/contrib/bc/manuals/bc/H.1.md b/contrib/bc/manuals/bc/H.1.md index aa313cd14b63..fbc0658d8171 100644 --- a/contrib/bc/manuals/bc/H.1.md +++ b/contrib/bc/manuals/bc/H.1.md @@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random integer between **0** (inclusive) and **1** +: Generates a pseudo-random number between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random integer that is between **0** (inclusive) and the +: Generates a pseudo-random number that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and diff --git a/contrib/bc/manuals/bc/HN.1 b/contrib/bc/manuals/bc/HN.1 index 73c243310d5c..7b4577f2dbd3 100644 --- a/contrib/bc/manuals/bc/HN.1 +++ b/contrib/bc/manuals/bc/HN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME @@ -1731,7 +1731,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and +Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo\-random integer that is between \f[B]0\f[R] +Generates a pseudo\-random number that is between \f[B]0\f[R] (inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. diff --git a/contrib/bc/manuals/bc/HN.1.md b/contrib/bc/manuals/bc/HN.1.md index dc537ffe4cfa..015035c14daf 100644 --- a/contrib/bc/manuals/bc/HN.1.md +++ b/contrib/bc/manuals/bc/HN.1.md @@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random integer between **0** (inclusive) and **1** +: Generates a pseudo-random number between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random integer that is between **0** (inclusive) and the +: Generates a pseudo-random number that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and diff --git a/contrib/bc/manuals/bc/N.1 b/contrib/bc/manuals/bc/N.1 index f66ae06d9c3a..193e0d15f6fb 100644 --- a/contrib/bc/manuals/bc/N.1 +++ b/contrib/bc/manuals/bc/N.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2024" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "August 2024" "Gavin D. Howard" "General Commands Manual" .nh .ad l .SH NAME @@ -1731,7 +1731,7 @@ Functions\f[R] subsection below). .RE .TP \f[B]frand(p)\f[R] -Generates a pseudo\-random integer between \f[B]0\f[R] (inclusive) and +Generates a pseudo\-random number between \f[B]0\f[R] (inclusive) and \f[B]1\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. If \f[B]p\f[R] is not \f[B]0\f[R], then calling this function will @@ -1740,7 +1740,7 @@ If \f[B]p\f[R] is \f[B]0\f[R], then \f[B]0\f[R] is returned, and \f[B]seed\f[R] is \f[I]not\f[R] changed. .TP \f[B]ifrand(i, p)\f[R] -Generates a pseudo\-random integer that is between \f[B]0\f[R] +Generates a pseudo\-random number that is between \f[B]0\f[R] (inclusive) and the truncated absolute value of \f[B]i\f[R] (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of \f[B]p\f[R]. diff --git a/contrib/bc/manuals/bc/N.1.md b/contrib/bc/manuals/bc/N.1.md index ad1e603392ae..859c32e3e774 100644 --- a/contrib/bc/manuals/bc/N.1.md +++ b/contrib/bc/manuals/bc/N.1.md @@ -1433,7 +1433,7 @@ The extended library is a **non-portable extension**. **frand(p)** -: Generates a pseudo-random integer between **0** (inclusive) and **1** +: Generates a pseudo-random number between **0** (inclusive) and **1** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If **p** is not **0**, then calling this function will change the value of **seed**. If **p** is **0**, @@ -1441,7 +1441,7 @@ The extended library is a **non-portable extension**. **ifrand(i, p)** -: Generates a pseudo-random integer that is between **0** (inclusive) and the +: Generates a pseudo-random number that is between **0** (inclusive) and the truncated absolute value of **i** (exclusive) with the number of decimal digits after the decimal point equal to the truncated absolute value of **p**. If the absolute value of **i** is greater than or equal to **2**, and diff --git a/contrib/bc/src/history.c b/contrib/bc/src/history.c index 6ae9785d9a79..32a19f71d777 100644 --- a/contrib/bc/src/history.c +++ b/contrib/bc/src/history.c @@ -264,7 +264,18 @@ bc_history_line(BcHistory* h, BcVec* vec, const char* prompt) errno = EINTR; // Get the line. - while (line == NULL && (len == -1 || errno == EINTR)) + // + // XXX: Why have a macro here? Because macOS needs to be special. Honestly, + // it's starting to feel special like Windows at this point. Anyway, the + // second SIGWINCH signal of multiple will return a valid line length on + // macOS, so we need to allow for that on macOS. However, FreeBSD's editline + // is different and will mess up the terminal if we do it that way. + // + // There is one limitation with this, however: Ctrl+D won't work on macOS. + // But it's because of macOS that this problem exists, and I can't really do + // anything about it. So macOS should fix their broken editline; once they + // do, I'll fix Ctrl+D on macOS. + while (BC_HISTORY_INVALID_LINE(line, len)) { line = el_gets(h->el, &len); bc_history_use_prompt = false; From nobody Tue Sep 24 16:42:50 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 4XClyy6vMCz5Y3SF; Tue, 24 Sep 2024 16:42:50 +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 4XClyy6CVlz4Qny; Tue, 24 Sep 2024 16:42:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727196170; 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=ddKRrgiEEGN6jXIYNT4pzGuNn6qjiwZSEPRv2Oh41hc=; b=eV4FXCMsHuNF/drzD51FIaVdL51fFKvC0fEqc12n5dXQytmkeGtrdVAegEmyAYSrbhTsT1 4BAikMPmqrSTV6sFVKrDn6fmaIMrSkdSOGk/hLqzYEUxGz3S615amMaBji1GKs/Psu53BZ osupg1D7YBmiOyEwofzBuPquAqmG2H/T5tbslXTZj/pB6gjwbEcnkOnhJ9y7fnXpSZSxHB zlCyuPNaYf8Ij32qGkI/ly6jcYVdRxlJvSP8Y7fBtdd9Ysa5pxILj4qmoOV3dAxWA1MfAM 7WWNZ/3L1CrBe6q63XaH+ZM5+HTQesU/MN/uJSx12NoiuQThEHy3kozCEVtYiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727196170; a=rsa-sha256; cv=none; b=Smzw3sDfxprT4LvGimMdM6R8gd2JyUyU1IDLK2hq7VdW/pmOse/E2f5WuRqH5XvSt7IKFM A9uMKgzXqI+c1GQqkN1c9tFqtSyjxxRWwercfwyxh/Bc9GLJkEn/D0IIzD35V1oxALqiit u7Ce7isphDOFmVvoG7h/qQTEMTSb3wxanR2WNZtb1siq2pZSFYIlHyWv+Rr36WGY0/18np njYi4Txt0q34wtLpJoWbXfp6KaPfNdFOfQVayLdcK1/XX4VjpXFnE/kdjbKh1OTD4DflPE Uk7hBN9rSRo/jKPRF7G4ELzXYjSkYONacvmpuqD8/AmZTUOAOlk2spH6yq73/g== 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=1727196170; 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=ddKRrgiEEGN6jXIYNT4pzGuNn6qjiwZSEPRv2Oh41hc=; b=Uwh/PgqQSR5Nh0RcWVuQ1HEBQutSJe//DeQzPyIVgQRLL2+jhkccXl4P1qhOUSxOiqAeTg fU5xust8SRQQqETsJ7mlvPKXrjlSWYRgPiv7yryqh0fpXho/P1XqdJgeVQwOX/n+I8/wC9 0hlpDzglR+rg9zE9MBDuhuHgXAhS9RRwQergtQpYrsuxYcQcstYYkRDmVKUFaips1EDs09 GFe/W8tEaIyMUTRrPOP69E+4ObnKv2gKZJ5qhWrpOksDDjN/2TYeZ94lYXTuocFsYpxQI0 +FJbaa0zfzxT8Vf20LxTE5Ga2wcyt1+z5L2OwLLfXtMtBTgsOjTXGbDxFZOlpw== 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 4XClyy5dd5zcZ6; Tue, 24 Sep 2024 16:42:50 +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 48OGgoNI040754; Tue, 24 Sep 2024 16:42:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OGgoWH040751; Tue, 24 Sep 2024 16:42:50 GMT (envelope-from git) Date: Tue, 24 Sep 2024 16:42:50 GMT Message-Id: <202409241642.48OGgoWH040751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 044f94adff55 - main - timeout(1): Update STANDARDS section 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: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 044f94adff55f13130f03c0c170fa879c8febb5b Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=044f94adff55f13130f03c0c170fa879c8febb5b commit 044f94adff55f13130f03c0c170fa879c8febb5b Author: Gordon Bergling AuthorDate: 2024-09-24 16:42:18 +0000 Commit: Gordon Bergling CommitDate: 2024-09-24 16:42:18 +0000 timeout(1): Update STANDARDS section Update the STANDARDS section for timeout(1) to POSIX 1003.1-2024. Update mandoc to be able to render the new POSIX macro. Reviewed by: bapt, bcr Approved by: bapt Obtained from: OpenBSD MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D45691 --- bin/timeout/timeout.1 | 8 +++++++- contrib/mandoc/st.c | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/timeout/timeout.1 b/bin/timeout/timeout.1 index 9e624e809376..10e5fd70c393 100644 --- a/bin/timeout/timeout.1 +++ b/bin/timeout/timeout.1 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 26, 2023 +.Dd June 17, 2024 .Dt TIMEOUT 1 .Os .Sh NAME @@ -195,6 +195,12 @@ $ timeout -k 5s 1m fetch \\ .Xr nohup 1 , .Xr signal 3 , .Xr daemon 8 +.Sh STANDARDS +The +.Nm +utility is compliant with the +.St -p1003.1-2024 +specification. .Sh HISTORY The .Nm diff --git a/contrib/mandoc/st.c b/contrib/mandoc/st.c index ec754cc036f2..266df0081a95 100644 --- a/contrib/mandoc/st.c +++ b/contrib/mandoc/st.c @@ -37,6 +37,7 @@ LINE("-p1003.1-96", "ISO/IEC 9945-1:1996 (\\(lqPOSIX.1\\(rq)") LINE("-p1003.1-2001", "IEEE Std 1003.1-2001 (\\(lqPOSIX.1\\(rq)") LINE("-p1003.1-2004", "IEEE Std 1003.1-2004 (\\(lqPOSIX.1\\(rq)") LINE("-p1003.1-2008", "IEEE Std 1003.1-2008 (\\(lqPOSIX.1\\(rq)") +LINE("-p1003.1-2024", "IEEE Std 1003.1-2024 (\\(lqPOSIX.1\\(rq)") LINE("-p1003.1-2013", "IEEE Std 1003.1-2008, 2013 Edition (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1-2016", "IEEE Std 1003.1-2008, 2016 Edition (\\(LqPOSIX.1\\(Rq)") LINE("-p1003.1", "IEEE Std 1003.1 (\\(lqPOSIX.1\\(rq)") From nobody Tue Sep 24 16:56:39 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 4XCmGv544wz5Y3vv; Tue, 24 Sep 2024 16:56:39 +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 4XCmGv4Dn8z4RT3; Tue, 24 Sep 2024 16:56:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727196999; 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=hJ0tK2HNNic+icqBWjjiBTqP4aGKZGyB/6L9FTSJhh4=; b=j1QPs6h3ylCXDTN85FHgaS5bB9HcFCmEqUo/VQy3DYtVlXAl/AmWYmtjk1i1HGXuUbmPHS 1zx+EuGCRu74hwnLCLlgVl7AMO4AszOO1kbMFYejhB25fYhF7lOuIE1ny6FS3AfChDhkKl I37e14gZU6RKRC9wmQ5ekrlSAmN5fe+9YF1OqvD+qLB47Z/5I8mv0JSQPdRF3mAQBG+wKZ K0zPc+/frJL5i1GwShsCaw9Bzl0F8JaKcl/flajnAR43QTJqlwAw2r3WZI1QJB3stvupD1 aSCA4ZiRC14lwkxai7TCzEE35TX1kMfsMhLNO3FsVBAsVwwqNg4WxGDdf0sBKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727196999; a=rsa-sha256; cv=none; b=PKRWY+IaXmW+F35HwxeOw2BaKJNzKC5xqHgS59NOMH3s0q/w87Xz4BtiH4MGAoL9hiNsHk VQBjVfGtgUSQzJJ1R0x4oTLowW3TnqD2wa7lyG0AGB1/fxPrSi3AWT4Xf8Hexz+mX60Frc UBv5fTvX0Bnha2juI7SfROaUZz8MZSR+GNl0K4xB6jHyoAfuP4u9IPlekOnTuZonKXHKer j+4Prj6Kbvuj6Rdd949eLUsNECweNBPY8pF+DlmOhcot52rv/v9SM7DhYsqZTt18yRB1cq exGYOT0SUZRNdH8M6mSmu+zWDQC+KJPUSowJ9Iupv781EunyBUTjuAOCstbUPA== 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=1727196999; 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=hJ0tK2HNNic+icqBWjjiBTqP4aGKZGyB/6L9FTSJhh4=; b=mDsoIhEYQjW7CDT71GTPGgrGY6QP1gvCW6/ZRdC81zrN+hP/pbOyIv5/4p8jDVQHOdXf7/ sV3zQucGvus9et3XN9qWKVM3Crm7O8ztAnmmlNu02HNJnqdP0NLhsQ+RbWN7S5Sf/U9wIA HYjDlmcSef0eTgRF0KC4umPJQFrdKnnW+2bvdMqxBfxst7eIyVM7Nx3/OgtVBOCaewMDpQ 3gvULYNPvX3lQIDGVs6gR72FFzxA0IDh7r87jRewszYmZK3mnhHsIDlXm+GdMC3T25zp6v RCyhrS4mr8eic4TMIFDRlOZGuG4Y0TQc2rX4XPTerhZGPWkkQ3pGO8eSMb67Kg== 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 4XCmGv3qc2zcLR; Tue, 24 Sep 2024 16:56:39 +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 48OGudBp058850; Tue, 24 Sep 2024 16:56:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OGudvI058847; Tue, 24 Sep 2024 16:56:39 GMT (envelope-from git) Date: Tue, 24 Sep 2024 16:56:39 GMT Message-Id: <202409241656.48OGudvI058847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3fb656f8ef21 - main - loader: Use printc instead of print to fit in 24,80 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3fb656f8ef21332d96de8097521aaa51ddeb649d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3fb656f8ef21332d96de8097521aaa51ddeb649d commit 3fb656f8ef21332d96de8097521aaa51ddeb649d Author: Warner Losh AuthorDate: 2024-09-24 16:52:18 +0000 Commit: Warner Losh CommitDate: 2024-09-24 16:57:11 +0000 loader: Use printc instead of print to fit in 24,80 print automatically adds a newline, while printc does not. Use printc in preference to print for managing the autoboot message. This means we can use line 24 safely on a 24x80 terminal, restoring some functionality that was lost in 101afbc6ee2f0. Note: we still set the default curosor position to 25,1 in screen.lua, but real VT100s (and successors) will treat any row larger than the pnumber of rows in a cursor motion command to be the last physical row (this is so you can move to 9999,9999 and do a cursor location query to get the size of the screen). Keeping that as is looks better on a typical VGA console. Fixes: 101afbc6ee2f0 Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D46771 --- stand/lua/menu.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index ed84360d93b0..5820d80532b5 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -530,6 +530,7 @@ function menu.run() drawn_menu = nil screen.defcursor() + -- We explicitly want the newline print adds print("Exiting menu!") end @@ -544,7 +545,7 @@ function menu.autoboot(delay) if last == nil or last ~= time then last = time screen.setcursor(x, y) - print("Autoboot in " .. time .. + printc("Autoboot in " .. time .. " seconds. [Space] to pause ") screen.defcursor() end @@ -553,9 +554,12 @@ function menu.autoboot(delay) if ch == core.KEY_ENTER then break else - -- erase autoboot msg + -- Erase autoboot msg. While real VT100s + -- wouldn't scroll when receiving a char with + -- the cursor at (24, 79), bad emulators do. + -- Avoid the issue by stopping at 79. screen.setcursor(0, y) - print(string.rep(" ", 80)) + printc(string.rep(" ", 79)) screen.defcursor() return ch end From nobody Tue Sep 24 17:07:56 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 4XCmWx2ZTxz5Y49L; Tue, 24 Sep 2024 17:07:57 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XCmWx1kSPz4Rsl; Tue, 24 Sep 2024 17:07:57 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727197677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AJ81hgUfZwzNNy2mv2Y7c+WcCvirOA0rt0IkQ2wAoVA=; b=ysZR1p4aDb6wixoh1RWAunS441QyjXZ7AzG+6sm+2G3vV2tjUyUaju8kxqzOKPsOgjmHu2 9T13CNuVUPOq/Hk+vrf9LTGycMTVuNvVqjXZ303MDDnU91y3eMqhRe2BYcDA6C7WD94pDv x5edLbhgYHrDOphjZPD1qSmT88Fu4KdRlDVvPlQgv2iPDsQvGHseq5aJLI7YnqTfYQgKle wDqn/S7ZpJcJI1Z237O8U5AnU60QYTdQ7ttXa9ceGPNphnXCg3JrA9gvSmDKXd1kCWjVad ofKB3CMl3ao6XQJSM0DyBjwsmRTpcgKH2bkKDuj0SISOA68EbODfl/KftWOnpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727197677; a=rsa-sha256; cv=none; b=esEbPgnDhhh8vb0U/t15ewg27c/bgnWLpdIWHcHgF/dQzQe6H93e1Rm95Y318KGXJ2nfva gqwG6AayJy2ikQ7rmSwDJhvdgUTCkem/HA4B7jD0ZhDlf+d+Sp9W/f3diK76RPAAkI/bML GvlY6Q+Lik0XH9mSqtV5jxSWEAg+iwR171pcwZr7Ki1KUttBLgzf37NiJZ/ZoxogSshmCE X3FT9ZCsF5zXKugo4ufcu/dsLxDiuiX5RVmPoFrRAOA8KOluFs5VppZVma6P2jyM1zF7E1 G7Wu74FLI7yZ8Dw0/JI9i3f/iQqG3nQYTKC5nfRRHcI3QA6bZQOW59485IKhGg== 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=1727197677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AJ81hgUfZwzNNy2mv2Y7c+WcCvirOA0rt0IkQ2wAoVA=; b=I+RtdceGy2dflW/fhfySiNXTgz6o2zxajI8lPLo4JA39vvlxAVkxnlsw+fTO5RqWBfWyZf 3+jDJRwYfNsAVN+Cej+qwrZQ5hp2bJI0HEFqtJzYIJ8kUtPLeY+1h4CCo1uBgMWjlDzqCK g/FDIKr9KrU8EJN/fbHQj1ZIw+krgPBe1QcS+KvN+9YQSYoRaitthPVJzbJXASZg3Z/svH wsU4ZYQ+rLW3tfTMTrlvVK1kAzYxVYKmN++2jUwTS6diCB0X4wDc6dgk7wv9jNTYq1GMkm J+xCKA0RLqbZluGKXli22fGNMK140axIJFwrQaeZ87oLp//mCyapwUjgf7frvg== Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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) (Authenticated sender: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XCmWx10zqzLfW; Tue, 24 Sep 2024 17:07:57 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 729443C019B; Tue, 24 Sep 2024 17:07:56 +0000 (UTC) Date: Tue, 24 Sep 2024 17:07:56 +0000 From: Brooks Davis To: Gordon Bergling Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 044f94adff55 - main - timeout(1): Update STANDARDS section Message-ID: References: <202409241642.48OGgoWH040751@gitrepo.freebsd.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <202409241642.48OGgoWH040751@gitrepo.freebsd.org> On Tue, Sep 24, 2024 at 04:42:50PM +0000, Gordon Bergling wrote: > The branch main has been updated by gbe: > > URL: https://cgit.FreeBSD.org/src/commit/?id=044f94adff55f13130f03c0c170fa879c8febb5b > > commit 044f94adff55f13130f03c0c170fa879c8febb5b > Author: Gordon Bergling > AuthorDate: 2024-09-24 16:42:18 +0000 > Commit: Gordon Bergling > CommitDate: 2024-09-24 16:42:18 +0000 > > timeout(1): Update STANDARDS section > > Update the STANDARDS section for timeout(1) to > POSIX 1003.1-2024. > > Update mandoc to be able to render the > new POSIX macro. This should not have been a single commit. mandoc should have been updated first in it's own commit, ideally referencing the upstream commit or better as a full update of mandoc from upstream. -- Brooks From nobody Tue Sep 24 17:16:18 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 4XCmjb00M6z5Y4m1; Tue, 24 Sep 2024 17:16:19 +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 4XCmjZ6dTJz4Tf6; Tue, 24 Sep 2024 17:16:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727198178; 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=UfeN/zeaIX4ez5ZNGBPbsBeiY4Du/Tn6IsjFnYscwKo=; b=EyXBj3RbK50UwE2YcNY2uY2KVTfXec9YcQAwp7nriswPpq65WRmVyJzvBl/dsHQ+R8vT51 Q8qJ5N5eDaod+F/KLV9Ad7DmyoEo6cdVtKEMg+PKO8vozaODfKkbpaw54Rc6SpuCwjyCSV gyZHeDKh1dR/UjSt7i8paxX+Io29fM4SQij0trUd3lfmNtDv1qRSdFT5Ps+R8NzGqDLoWt +blrPlTS1NZspPrY6/TbbNVf4/BNoT3G8P5Cw1MrIZIwAzru7FKVfn8E34jkzo3jNfidmC sC1CPZFtcm9XjdYW9XbDQSDOwsxrLeq0kqadwGmXBIGKIdD6ps7kecdMwajwaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727198178; a=rsa-sha256; cv=none; b=kbXM0aCUsh6x5bDTXeLK9xvpGqHCGJ2G4dxK/n4E5nJcluWEkO8qymGymNbMZChF4Pbl84 FGUgJJXPAIELQZBEBByo2fyMseX/YPH8JOHDTH8aV8cbONEKwwT6cElxf+4JS93Dfoao4G +EiWcYCalodDF+TeEAtB3a882ZD+Dj6r1GQOBylOXnNny9FMgbrfzGD/Oxw7qceJT+KdWw FOulsk7vxIrRCb2eG4u2n9XpjHDmncQ1NgVL5mZGJYfAUN6I8VNAVRA2xqT6TLEyS9RFgd ua565dlPo7FH3mA971mRIgAmOqRXTAl10vqpe+namNAxnThf+ksWC6M9dZFgeQ== 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=1727198178; 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=UfeN/zeaIX4ez5ZNGBPbsBeiY4Du/Tn6IsjFnYscwKo=; b=UccnU5nohgfVG+CDX9G0ApSU1r21Uwff8CI+3oBnxA6hSnXxZhCDkxeZj2+ISiYAaj3R3o FQsi23TksxS3G+bVNaR+mEY9JJvw/SZVBmYsCRM4OrEkYz1VfvEKDCCt09PVJZKfMw0v0b E8jMKuV3ord+2vAY0CQl96mCLO4FvZylOkMmPmkDEHAda3ek+5ohFmB8JKapH2noYiLQLv vBYzkBXy7z0Him6gWMN31m8sfkAqAGSKGdRTRe0OPS8yytv8HZswlWMOACjlgpVs7I3pnl Zp+5MFDmLDx/27qX5ZCfb//eyX4X1emBVQipRSq+1qZMuR4IvciDF1G8TRNJjQ== 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 4XCmjZ5pq5zd38; Tue, 24 Sep 2024 17:16:18 +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 48OHGIFS093522; Tue, 24 Sep 2024 17:16:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OHGI1w093519; Tue, 24 Sep 2024 17:16:18 GMT (envelope-from git) Date: Tue, 24 Sep 2024 17:16:18 GMT Message-Id: <202409241716.48OHGI1w093519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jamie Gritton Subject: git: 80c5d78d90e6 - stable/14 - MFC jail: unbreak the zfs.mount_snapshot option 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: jamie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 80c5d78d90e65042cf7364b79f5afd3a0509c92e Auto-Submitted: auto-generated The branch stable/14 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=80c5d78d90e65042cf7364b79f5afd3a0509c92e commit 80c5d78d90e65042cf7364b79f5afd3a0509c92e Author: Jamie Gritton AuthorDate: 2024-09-19 19:49:01 +0000 Commit: Jamie Gritton CommitDate: 2024-09-24 17:14:22 +0000 MFC jail: unbreak the zfs.mount_snapshot option The change of its description from integer to boolean didn't actually change it to a boolean, but only made it impossible to set as either a boolean or an integer. Rather than make it work as a boolean parameter should, just revert to the old (working) integer parameter, and change the documentation to match. PR: 274263 Reported by: andrew.hotlab at hotmail (cherry picked from commit ae1a0648b05acf798816e7b83b3c10856de5c8e5) --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 2 +- usr.sbin/jail/jail.8 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c index 9b56d15f1095..a972c720dfdb 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c @@ -100,7 +100,7 @@ static struct zfs_jailparam zfs_jailparam0 = { static int zfs_jailparam_slot; SYSCTL_JAIL_PARAM_SYS_NODE(zfs, CTLFLAG_RW, "Jail ZFS parameters"); -SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "B", +SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "I", "Allow mounting snapshots in the .zfs directory for unjailed datasets"); SYSCTL_NODE(_vfs_zfs, OID_AUTO, version, CTLFLAG_RD, 0, "ZFS versions"); diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index 75a0b86eed4c..7fc5357adfd3 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 12, 2024 +.Dd September 19, 2024 .Dt JAIL 8 .Os .Sh NAME @@ -763,8 +763,8 @@ Allow access to SYSV IPC semaphore and shared memory primitives, in the same manner as .Va sysvmsg . .It Va zfs.mount_snapshot -Allow jailed users to access the contents of ZFS snapshots under the -filesystem's +When set to 1, jailed users may access the contents of ZFS snapshots +under the filesystem's .Pa .zfs directory. If From nobody Tue Sep 24 17:18:59 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 4XCmmg375vz5Y4x0; Tue, 24 Sep 2024 17:18: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 4XCmmg2fQYz4V6m; Tue, 24 Sep 2024 17:18:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727198339; 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=C0ANDk8n8G/LUM2I7SHZjHGhgm8hrgY1BXsXgf4CA4g=; b=HXjmi5xj5iK74zvdLqkHudlevvuPtDebZB8jzaJDy2lMjad6UzyZ4A9LoB6PPGLSq/krsq WXBdB4gEfxeyNJ6E7g1+u3ZTV0IdlBL3Z9LyuKnnootKK6WoY5WMhzsDShViPTVlDB4C0u 2U/Z32huiAPCYDyR12HqMpaXsIoIHbU/cnck8eIu9nHdHDsbUCTiYHI3rVkVFwOskmtkU3 Zz3x09QtQm1frlmFdXbGYF0CzePe5jIJcxwUsnfSpYN+nXLFCPv1iSittVAXnhIVIjXGzo dEtAVgoFjOuHX6YSYAvQCOJwgoC8kNZhJjTJniq02vqAO49qiwMhFJ5oMeuO6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727198339; a=rsa-sha256; cv=none; b=aUPa5lR7+8uT8gSXDST9tBAMcAIIhr7BwU393MrKeqx754osrVdYVFQslFjSFVyAOR4ux/ UIsBdYL9hho6qEKsnDRIjuJEBNoO0KMLBQnsUXDfMRtKE8cI9kaUsdNovpyFtv7CI37HKb 3+jUW7uXzWF9w7o5v4MfVhlnSPn3f9ErgQa3JlVWJrC1yj3K17MxB1SfN47I0OMUIXoW+H 0/ELtBVp3wIK2NmlvER0oT7djZFps2jFoNOkfQyseqr1VHdLah2Ffrznmq5R386cQZvxmK rgCRn9kkXQIgTGZsWIqJhgWNnDSSu5sAc8woBrOzVL6OmrxmKVkrjfmNDHhz1g== 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=1727198339; 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=C0ANDk8n8G/LUM2I7SHZjHGhgm8hrgY1BXsXgf4CA4g=; b=sJERU1dJNg0GkyxM13Uxhj9YAs2Tbb5ITWy12XbrzYrU+284cIrWzBz/GpkvPy4cZSWmi2 dtIXsiRB1UsDWtW624+G6MIa2QQzgQTWAx/Kz6xJfZU2h8PAk1Hm7QnBCgYKICYmamoSLs I5TOFJB7nUOVe/YCeve4ntqyU6+A6lrA/K7AXBwqrOB9VYj9+TaakgdaPhOm/SipyKNxG3 pUerWamGsqVZ8MHDYosCoV99+wvd2x7hl3oLHAzOABogCSxEELECIMkzjYLMk0mx9f7R1c 0gnY90gFjN11/R6aeWw9j6YVbTX/QFmqXyYkqecY61RbgEWv5Gu0mZf35RZWXQ== 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 4XCmmg2FkqzdXm; Tue, 24 Sep 2024 17:18: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 48OHIxgI094014; Tue, 24 Sep 2024 17:18:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OHIxWQ094011; Tue, 24 Sep 2024 17:18:59 GMT (envelope-from git) Date: Tue, 24 Sep 2024 17:18:59 GMT Message-Id: <202409241718.48OHIxWQ094011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jamie Gritton Subject: git: f616b13bb35a - stable/13 - MFC jail: unbreak the zfs.mount_snapshot option 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: jamie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f616b13bb35a5ffcc904d5282f09d93fe9d3a305 Auto-Submitted: auto-generated The branch stable/13 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=f616b13bb35a5ffcc904d5282f09d93fe9d3a305 commit f616b13bb35a5ffcc904d5282f09d93fe9d3a305 Author: Jamie Gritton AuthorDate: 2024-09-19 19:49:01 +0000 Commit: Jamie Gritton CommitDate: 2024-09-24 17:18:41 +0000 MFC jail: unbreak the zfs.mount_snapshot option The change of its description from integer to boolean didn't actually change it to a boolean, but only made it impossible to set as either a boolean or an integer. Rather than make it work as a boolean parameter should, just revert to the old (working) integer parameter, and change the documentation to match. PR: 274263 Reported by: andrew.hotlab at hotmail (cherry picked from commit ae1a0648b05acf798816e7b83b3c10856de5c8e5) --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 2 +- usr.sbin/jail/jail.8 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c index 42c8287a7c03..33581d018256 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vfsops.c @@ -102,7 +102,7 @@ static struct zfs_jailparam zfs_jailparam0 = { static int zfs_jailparam_slot; SYSCTL_JAIL_PARAM_SYS_NODE(zfs, CTLFLAG_RW, "Jail ZFS parameters"); -SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "B", +SYSCTL_JAIL_PARAM(_zfs, mount_snapshot, CTLTYPE_INT | CTLFLAG_RW, "I", "Allow mounting snapshots in the .zfs directory for unjailed datasets"); SYSCTL_NODE(_vfs_zfs, OID_AUTO, version, CTLFLAG_RD, 0, "ZFS versions"); diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index b66e3464dc5e..18dd54aa9b68 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 24, 2024 +.Dd September 19, 2024 .Dt JAIL 8 .Os .Sh NAME @@ -759,8 +759,8 @@ Allow access to SYSV IPC semaphore and shared memory primitives, in the same manner as .Va sysvmsg . .It Va zfs.mount_snapshot -Allow jailed users to access the contents of ZFS snapshots under the -filesystem's +When set to 1, jailed users may access the contents of ZFS snapshots +under the filesystem's .Pa .zfs directory. If From nobody Tue Sep 24 17:30:32 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 4XCn20322Mz5Y54m; Tue, 24 Sep 2024 17:30: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 4XCn201zDkz4W0G; Tue, 24 Sep 2024 17:30:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727199032; 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=Yykni52xMSm+xBnkkkVWxUXFGsUO3xvaoNMSICbRiSk=; b=wCC1CwFoBwR/+YsPl1DYUux16TVo/P1ib2ZuhIUzOW8DGmv5KIiUyEGAEYFTq146VJj/WX rJOM98AI2+WgkeXLxQoe9VqyBHvWSKqlH4EMltpGdCPGbr9ozlp9F3WGGpEeCINWz/S71K RMKQOMcayG0dgAJXgBb/CzzgrMLOUivzncxJ5F24HPGywjJ/EaP5gnoGjQZI4pXibZcn7L 9spfbJW4YRDMs5G6L2Az6axPGmGRe00d/f8Toi4qPbtnRw7SSq7xe1bod7bvCqEpYjXstk OZlSFznPu+37w3F1h1hMW54Tk/P2Be3UW/Yg1+mVcKHTeAJhw4n8FlZNIvLl9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727199032; a=rsa-sha256; cv=none; b=t1jMWwokzGjnaG1C+43oezzCCKPOulIGZ/G1Vlqhv8VwTKV7Y/au8+N+JRK9kvEQ7GGzBs 2cXM/T8fcvxuvIMmaJo290fURRGLcxYz0iZdYeRS5HW5Ksanw6jXQf6zZKzCZOkfBJH0Cz 7v0hiC63hxSZw+AyJNYffhAsEklVTSrtC3oMcM6+YMd7QpKIor6XHz39KSlusp4vNfk0xM y6/sJd5l57Xu8wMlGUn6syvL8OQw4rVbmgZYz4hAk7Nv3S++K1KmljX0zmA9T2slUA6y9R HBzQTJbVMLt9rBPC1jbwoZUIhnuMRSB+tg/Kd9Jasrxl2697bmLhneKhdYuvUg== 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=1727199032; 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=Yykni52xMSm+xBnkkkVWxUXFGsUO3xvaoNMSICbRiSk=; b=b+RSF8M/QKZ5dEBbRRNVIfonpE/Zi7HgpfsxhZfRfzL0SjLAsCQKDWUimcWdq2K5GDVoIa VqGKtSlf/dojNZ9kwe4XpTRV/6NvfbOGZzQaqkX5kpBr1MacO2uo3Mssm9dnSSJEv6I12R JPTea7VdCC8H4hlOQmMhiJxVG4K2KcQ7OjrMtWvbNaBoKHlqNfzNEv93fswQCiBJEWhUMo B+SukMlAxv1S7U96ijL0H08wzVF1/GiHjmZXQ6ITaOxK13EwWLLEatpxIPLg5QAkvWM2Qe Ei9X7OpEQGe1rLlhKntMbPMyP6kzd/lE08ATC+OPtvMvZCYkAefup1fxgIc2QQ== 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 4XCn201Zt9zdnV; Tue, 24 Sep 2024 17:30: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 48OHUWut019664; Tue, 24 Sep 2024 17:30:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OHUW8F019661; Tue, 24 Sep 2024 17:30:32 GMT (envelope-from git) Date: Tue, 24 Sep 2024 17:30:32 GMT Message-Id: <202409241730.48OHUW8F019661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: ce251baf42f3 - main - ipf.5: revert C style(9) applied to man page 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ce251baf42f32317b4b4ef60203d6f47204c47e9 Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ce251baf42f32317b4b4ef60203d6f47204c47e9 commit ce251baf42f32317b4b4ef60203d6f47204c47e9 Author: Graham Percival AuthorDate: 2024-09-24 17:11:33 +0000 Commit: Mitchell Horne CommitDate: 2024-09-24 17:29:39 +0000 ipf.5: revert C style(9) applied to man page These changes were made by accident in: ipfilter: Adjust userland returns to conform to style(9) 2582ae5740181e0d2bab10003d66ae91c9b56329 That commit made similar mistakes in other man pages, but those have already been fixed. Signed-off-by: Graham Percival Reviewed by: mhorne Sponsored by: Tarsnap Backup Inc. Pull Request: https://github.com/freebsd/freebsd-src/pull/1433 --- sbin/ipf/ipf/ipf.5 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ipf/ipf/ipf.5 b/sbin/ipf/ipf/ipf.5 index 7fbba17594ba..9cde8be0b1d5 100644 --- a/sbin/ipf/ipf/ipf.5 +++ b/sbin/ipf/ipf/ipf.5 @@ -223,7 +223,7 @@ To address this problem, a block rule can be qualified in two ways. The first of these is specific to TCP and instructs IPFilter to send back a reset (RST) packet. This packet indicates to the remote system that the packet it sent has been rejected and that it shouldn't make any further -attempts( to send packets to that port. Telling IPFilter to return a TCP); +attempts to send packets to that port. Telling IPFilter to return a TCP RST packet in response to something that has been received is achieved with the return-rst keyword like this: .PP @@ -239,18 +239,18 @@ For all of the other protocols handled by the IP protocol suite, to send back an error indicating that the received packet was dropped requires sending back an ICMP error packet. Whilst these can also be used for TCP, the sending host may not treat the received ICMP error as a hard error -in( the same way as it does the TCP RST packet. To return an ICMP error); +in the same way as it does the TCP RST packet. To return an ICMP error it is necessary to place return-icmp after the block keyword like this: .PP .nf block return-icmp in proto udp from any to 192.168.0.1/24 .fi .PP -When( electing to return an ICMP error packet, it is also possible to); +When electing to return an ICMP error packet, it is also possible to select what type of ICMP error is returned. Whilst the full compliment of ICMP unreachable codes can be used by specifying a number instead of the string below, only the following should be used in conjunction with -return-icmp.( Which return code to use is a choice to be made when); +return-icmp. Which return code to use is a choice to be made when weighing up the pro's and con's. Using some of the codes may make it more obvious that a firewall is being used rather than just the host not responding. From nobody Tue Sep 24 17:30:43 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 4XCn2D38KCz5Y5ch; Tue, 24 Sep 2024 17:30:44 +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 4XCn2D0sMFz4W8Q; Tue, 24 Sep 2024 17:30:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727199044; 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=vsOa0opbTzo5gg8DyMLCvfZJJBMlXIje4f4rEr6QowE=; b=s1uzPIz3gYwUfijYzDkN6KRsMTa6yb3X+S2DHC+lkNXGjLTF5VUe2QmEHWL/VjKLM1dHde gFIKDGSUmXqBgtomrH0ICSFIpMnP8lk5VS8kEJU5K2ReZey4KgyLd9FHZBliKxmLYPfBao xDdCdtvsQsJgoBZ29A+NtF0BYYuRVGMrwravyl6OTJMehi6s4J4h/56TqXUKfGALx5cNeG YZHXumrtxI/O4P4OFW3AjYUV/Xvu/KeWukbD8KwoCJ1VTnK46X9ffAcdoIcmBWdDAJPZ8l BPdE7v/qRQ10aXJf94UppnpSx6tessYPpaH2HGE1oFn8TjQvOHDvpYZPF+IQ6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727199044; a=rsa-sha256; cv=none; b=bZLBMTsHWQ0qwTrf3ZHjr3RvpIXGf5oRdPigh6CvuhMexIbPW7Ap2/SkDqyU4ZPkhQKsH9 4jMLXtp3HVcEBnF278VJL1Elfw/CcaAth5Y2NiwkD4sbE+HTDQjEMxNLSAtsiOhMrjK/I/ j4CrD9mmRFWGS2Y3/kEDt0pnY3QI1/FgfPlafM0HUa5PzQHPBSzBc/nkey1Cgp4PSe1A15 JPg3PwnUeuxgil8PpH+aDGukr9PEquFDdkuRv+crC4A/z69mux9xPWRD4RaySzszx5NgLp fO/6/SlkR/SWCeGFqgZgkLLqiHdNWNNkFE5czZA/CBbnMc9JT0uxrH1zmbVD3g== 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=1727199044; 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=vsOa0opbTzo5gg8DyMLCvfZJJBMlXIje4f4rEr6QowE=; b=SN9Dgqo37Ck5UVwTRAN1xRspuAD8LTGH4d/Vv9rS+rIHSdLH2Xq+KjQk9KxRAH2NgKdGLu SOuh1X4p4MmdZq1E8ruCdbEsdRaIlMOn+ZqWJMdOzfzt1i2EzOWD4eF8K/DYZDkJEkKkF8 jZrxwWCtZBUnfwh+vkINkq27iZxwsmiVCcI3O7NwKD5WpiHrBN6NlaNxsh/VfUpjCEWbXt WycAupKLU+yVI7KYoBx8ZHd2A7g1ComUU4GYkWf7GvpgRxV4A6hRuEHQ8hps0GUgCRihew KB31itoSgBdG5rtMhN/v/H/IezA567pgDL9GkYDlEKFGaN1Lbf2ylzyx9m35fQ== 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 4XCn2D08qXzdc9; Tue, 24 Sep 2024 17:30:44 +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 48OHUhHv019821; Tue, 24 Sep 2024 17:30:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OHUhra019818; Tue, 24 Sep 2024 17:30:43 GMT (envelope-from git) Date: Tue, 24 Sep 2024 17:30:43 GMT Message-Id: <202409241730.48OHUhra019818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 9b8df84c23ed - stable/14 - src.conf.5: regen for ZFS_TESTS knob 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9b8df84c23ed741b53cb1c765c5bf1d8919ce858 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=9b8df84c23ed741b53cb1c765c5bf1d8919ce858 commit 9b8df84c23ed741b53cb1c765c5bf1d8919ce858 Author: Ed Maste AuthorDate: 2024-09-24 17:28:30 +0000 Commit: Ed Maste CommitDate: 2024-09-24 17:30:34 +0000 src.conf.5: regen for ZFS_TESTS knob (cherry picked from commit a6c8ab4f45496d0e7e49ef8ae0c44f39caefd1fa) Fixes: 20191b71bae1 ("src.conf: Add a MK_ZFS_TESTS knob") Sponsored by: The FreeBSD Foundation --- share/man/man5/src.conf.5 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 11801456716c..b868b5265763 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd August 27, 2024 +.Dd September 24, 2024 .Dt SRC.CONF 5 .Os .Sh NAME @@ -342,6 +342,8 @@ When set, it enforces these options: .Va WITHOUT_LOADER_ZFS .It .Va WITHOUT_ZFS +.It +.Va WITHOUT_ZFS_TESTS .El .It Va WITHOUT_CLANG Do not build the Clang C/C++ compiler during the regular phase of the build. @@ -452,6 +454,8 @@ When set, it enforces these options: .Va WITHOUT_UNBOUND .It .Va WITHOUT_ZFS +.It +.Va WITHOUT_ZFS_TESTS .El .Pp When set, these options are also in effect: @@ -1422,6 +1426,8 @@ When set, it enforces these options: .Va WITHOUT_UNBOUND .It .Va WITHOUT_ZFS +.It +.Va WITHOUT_ZFS_TESTS .El .Pp When set, these options are also in effect: @@ -1698,6 +1704,8 @@ When set, it enforces these options: .Bl -item -compact .It .Va WITHOUT_DTRACE_TESTS +.It +.Va WITHOUT_ZFS_TESTS .El .Pp When set, these options are also in effect: @@ -1848,6 +1856,14 @@ or .Xr zfs 8 . Also disable ZFS support in utilities and libraries which implement ZFS-specific functionality. +When set, it enforces these options: +.Pp +.Bl -item -compact +.It +.Va WITHOUT_ZFS_TESTS +.El +.It Va WITHOUT_ZFS_TESTS +Do not build and install the legacy ZFS test suite. .It Va WITHOUT_ZONEINFO Do not build the timezone database. When set, it enforces these options: From nobody Tue Sep 24 17:30:55 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 4XCn2R2lKcz5Y5Tl; Tue, 24 Sep 2024 17:30:55 +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 4XCn2R1zsFz4WW0; Tue, 24 Sep 2024 17:30:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727199055; 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=d9SwjTV2rPKjXekxNr4yp+bDmYuVLBRaDlJZGdRlXPs=; b=kMZbOWJILs4jvcJ0JyLQxX/2THCIBaxYc9SVG+QZ4gQFfBZhdDYI31T65uzmVwU5cCX6Kr 5a9OqYpQt4i52TiBlF+bARx1JoylSYvbROENPXAyq9SOWzVBf3nofyNAx0JygG8nqLf4p+ h9PHlD1VImpIGDhJ1HmHqNKZwBUTsiG8GroytDy0S7q7JaWgtP0KMvbYJmF3/6uIToarUL s5yhOEOkYdngioZZ60SyhDeBJcVvoLAf26xBdEmPKHBjkDuqybcpLHon3WU0MuueeAyHxv hMcMjfmin60VE3r1Jncv/O8jqXgczajCCONiv6FYmfIxLXXjc82Itjbczt2ooQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727199055; a=rsa-sha256; cv=none; b=p27doA6TC8yWBQ9/QXpvjby7yVUibIGdXPrDVQaPngk2W+4Teu+6Dj/LC5Lz5x2N2c2XIp UjcdwuH986KKNj4EJdDmwTwgQ+fWWn/GluC+s9+DglitOzmREmfTSKJ3Y0Fjn5e7kzoWAJ F6TBhvq+IGiKOxvwMrT/m6OhM/wFOteoEaEEwycNqYyX0ytYRhv6je4csXir2LrhqZcfSt sUrvblVbKdtwqqsyw8M+Vg3OnRPcDAsb5taNmlmILY3Jqilb2dM6N1Wo0UGdpykMhVyd4j kbRNSW2QR4DFGgkO1plMAw2lNC/TxFfvT3YI2oIhJZXZjWrQCJowd2sa+OFwPQ== 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=1727199055; 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=d9SwjTV2rPKjXekxNr4yp+bDmYuVLBRaDlJZGdRlXPs=; b=YKWvK+Jt7zMIh3vB9gdY+d3ljyKlCT627pgXV81VwKYong/eHEDvBmrR8APYzpT1kN6ZQl Ig/so9+cBakVq10yYbCSv1cfQwsxRLs8nwWS2Cdaq+2YUw2nc4AdrS7VLoTOc+MH10XvKI IAPkxP7NPtjGVlMEX5mlHYMUckddv4dsa0ww8Bx5hXcwoTqCa2S+m2W7K2rxjFuDUAO8tf 2XKqKJADUyvOg3jlJ1LHOCszgtI0VOSkYZjFs2LGavM4de6YeuIz4PHlHo1ij8TwDHh8ZJ QJMv33RFqrZ/LK3mPNWXuQ3EuQtcAwPb72I1AHkxcgqlpxGaejR4SK76CwLqFQ== 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 4XCn2R1bzzzdcJ; Tue, 24 Sep 2024 17:30:55 +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 48OHUtGb021032; Tue, 24 Sep 2024 17:30:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OHUtFe021029; Tue, 24 Sep 2024 17:30:55 GMT (envelope-from git) Date: Tue, 24 Sep 2024 17:30:55 GMT Message-Id: <202409241730.48OHUtFe021029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6a645bb3535c - stable/14 - bhyve: validate corb->wp to avoid infinite loop 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6a645bb3535cb73b1f20db652c9e3893f26a986e Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6a645bb3535cb73b1f20db652c9e3893f26a986e commit 6a645bb3535cb73b1f20db652c9e3893f26a986e Author: Ed Maste AuthorDate: 2024-09-19 18:57:42 +0000 Commit: Ed Maste CommitDate: 2024-09-24 17:30:35 +0000 bhyve: validate corb->wp to avoid infinite loop Guests must set HDAC_CORBWP less than corb->size. Treat invalid values as an error rather than entering an infinite loop. Reported by: Synacktiv Reviewed by: markj Security: HYP-12 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46134 (cherry picked from commit a305f44d1404fbf386bb2b50ab7233ce9eabe0bb) --- usr.sbin/bhyve/pci_hda.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c index 6f0c1b6cfba9..58481af71a4c 100644 --- a/usr.sbin/bhyve/pci_hda.c +++ b/usr.sbin/bhyve/pci_hda.c @@ -789,6 +789,11 @@ hda_corb_run(struct hda_softc *sc) int err; corb->wp = hda_get_reg_by_offset(sc, HDAC_CORBWP); + if (corb->wp >= corb->size) { + DPRINTF("Invalid HDAC_CORBWP %u >= size %u", corb->wp, + corb->size); + return (-1); + } while (corb->rp != corb->wp && corb->run) { corb->rp++; From nobody Tue Sep 24 17:58:50 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 4XCnff3BFzz5Y6Rm; Tue, 24 Sep 2024 17:58:50 +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 4XCnff2b0jz4dQn; Tue, 24 Sep 2024 17:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727200730; 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=USSEQyyJmi6e9ZCEuozN1AMAcin7u5GX6pqpQ9Ig+tg=; b=rhnFuDRWLjG35Zo1sQRsLN19Eede1fAZ6oSoHYpMOJvgAL4Uqz21oRBX1UPrmZBJBI9mRs UHlQpGKpMFKoy/6naQQtBXrJqC7qadz2xHqumNs2Krl9vpR9Ws1YDucA3Zy5ns/NuuLNea 4AZoy/oGuV0Kb+xcgX7HG2aBBP6W9Xire7rg0o+RRjmO8Hh+QISeO5Gd73EoXFXHnB6L2l xfveKgPGO1uBDhEhuV/4xqYeaybKKiDYRRzioQ9f9v2LFQuP0s8wU+GOv+xAJSjd3huJoV K0MhmjN0Ole9F9rwpchRzGfHR1JeP4xXXIta7MgtZkEEM93r26qWe5lAFPE/6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727200730; a=rsa-sha256; cv=none; b=ZBJBRFlx9f2p5AIjs3NnBlFpPC6D7V+bNsZQx8e1bUvKH17AEnMyh0ChRB7wQlsDMfdDmO jLHECQPTaW8siRJPipf1nX9vSD6g3J/WGTyulxdWVEfkgtl5/IPCG9cA1hcVb5qClI0StC dISH0c4wrzHb4TiBPemIViQaQ6S+nO1b4v397rsSdSm56dNJI2pV5dDvMttL99qdqdUaAq 8Tc1vmrPOHGmlypIvHGyUYGgdWSkuF9zRd8eIEXuwRCXKDQYiaXjnqm8opnCxtNmwB4nBW 37AWGPzNomySHY6pFl8t2S9B7ReZ5S0iK5YQZjn5nTDVvJCX8fSIfwmDS0i2ww== 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=1727200730; 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=USSEQyyJmi6e9ZCEuozN1AMAcin7u5GX6pqpQ9Ig+tg=; b=Li6N91ViI6PBfAytYf0dYegoMNmbZQklNwAiDbMplZj5lDgwrKb0rZ4YOZT0OHb+bU/4OA 4Xnk3PnzpaJWKOjlQp5Hq1GMe+AncGfLcycJ3p4Ae1qwPTbm+g0fqNraHHXL+MGbhglxT3 5hylynCsGq+OvDGez/EOtpEHZV1UdSqGy2y0unzt9PtZKlNLab/kfxm9e0KUsZrm9QTbw3 Yj5x9Famt7U+cR/GalUkhaMUK63UzBasEjNiGgx59Hl450cN/29pJtBtu9UCcZ6jCa1j05 FSbAp6PO5OxlmV5e7keNZHlYu6FWcojHjAj9gVXWUoG7FgLarnx2nKSkEs77yw== 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 4XCnff25QXzdsn; Tue, 24 Sep 2024 17:58:50 +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 48OHwoBJ061658; Tue, 24 Sep 2024 17:58:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OHwoYQ061655; Tue, 24 Sep 2024 17:58:50 GMT (envelope-from git) Date: Tue, 24 Sep 2024 17:58:50 GMT Message-Id: <202409241758.48OHwoYQ061655@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 3cf834d069d1 - main - linuxulator: ignore AT_NO_AUTOMOUNT for all stat variants 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cf834d069d1dcdbe464ea74624930eaf916715d Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3cf834d069d1dcdbe464ea74624930eaf916715d commit 3cf834d069d1dcdbe464ea74624930eaf916715d Author: Ed Maste AuthorDate: 2024-09-19 21:11:19 +0000 Commit: Ed Maste CommitDate: 2024-09-24 17:58:42 +0000 linuxulator: ignore AT_NO_AUTOMOUNT for all stat variants Commit ff39d74aa99a ignored AT_NO_AUTOMOUNT for statx(), but did not change fstat64() or newfstatat(), which also take an equivalent flags argument. Add a linux_to_bsd_stat_flags() helper and use it in all three places. PR: 281526 Reviewed by: trasz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46711 --- sys/compat/linux/linux_stats.c | 65 +++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 6c032cc569f8..03783d466211 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -485,6 +485,31 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args) } #endif +/* + * Convert Linux stat flags to BSD flags. Return value indicates successful + * conversion (no unknown flags). + */ +static bool +linux_to_bsd_stat_flags(int linux_flags, int *out_flags) +{ + int flags, unsupported; + + unsupported = linux_flags & ~(LINUX_AT_SYMLINK_NOFOLLOW | + LINUX_AT_EMPTY_PATH | LINUX_AT_NO_AUTOMOUNT); + if (unsupported != 0) { + *out_flags = unsupported; + return (false); + } + + flags = 0; + if (linux_flags & LINUX_AT_SYMLINK_NOFOLLOW) + flags |= AT_SYMLINK_NOFOLLOW; + if (linux_flags & LINUX_AT_EMPTY_PATH) + flags |= AT_EMPTY_PATH; + *out_flags = flags; + return (true); +} + #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) static int @@ -561,21 +586,16 @@ linux_fstat64(struct thread *td, struct linux_fstat64_args *args) int linux_fstatat64(struct thread *td, struct linux_fstatat64_args *args) { - int error, dfd, flag, unsupported; + int error, dfd, flags; struct stat buf; - unsupported = args->flag & ~(LINUX_AT_SYMLINK_NOFOLLOW | LINUX_AT_EMPTY_PATH); - if (unsupported != 0) { - linux_msg(td, "fstatat64 unsupported flag 0x%x", unsupported); + if (!linux_to_bsd_stat_flags(args->flag, &flags)) { + linux_msg(td, "fstatat64 unsupported flags 0x%x", flags); return (EINVAL); } - flag = (args->flag & LINUX_AT_SYMLINK_NOFOLLOW) ? - AT_SYMLINK_NOFOLLOW : 0; - flag |= (args->flag & LINUX_AT_EMPTY_PATH) ? - AT_EMPTY_PATH : 0; dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; - error = linux_kern_statat(td, flag, dfd, args->pathname, + error = linux_kern_statat(td, flags, dfd, args->pathname, UIO_USERSPACE, &buf); if (error == 0) error = stat64_copyout(&buf, args->statbuf); @@ -588,22 +608,16 @@ linux_fstatat64(struct thread *td, struct linux_fstatat64_args *args) int linux_newfstatat(struct thread *td, struct linux_newfstatat_args *args) { - int error, dfd, flag, unsupported; + int error, dfd, flags; struct stat buf; - unsupported = args->flag & ~(LINUX_AT_SYMLINK_NOFOLLOW | LINUX_AT_EMPTY_PATH); - if (unsupported != 0) { - linux_msg(td, "fstatat unsupported flag 0x%x", unsupported); + if (!linux_to_bsd_stat_flags(args->flag, &flags)) { + linux_msg(td, "fstatat unsupported flags 0x%x", flags); return (EINVAL); } - flag = (args->flag & LINUX_AT_SYMLINK_NOFOLLOW) ? - AT_SYMLINK_NOFOLLOW : 0; - flag |= (args->flag & LINUX_AT_EMPTY_PATH) ? - AT_EMPTY_PATH : 0; - dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; - error = linux_kern_statat(td, flag, dfd, args->pathname, + error = linux_kern_statat(td, flags, dfd, args->pathname, UIO_USERSPACE, &buf); if (error == 0) error = newstat_copyout(&buf, args->statbuf); @@ -688,21 +702,14 @@ statx_copyout(struct stat *buf, void *ubuf) int linux_statx(struct thread *td, struct linux_statx_args *args) { - int error, dirfd, flags, unsupported; + int error, dirfd, flags; struct stat buf; - unsupported = args->flags & ~(LINUX_AT_SYMLINK_NOFOLLOW | - LINUX_AT_EMPTY_PATH | LINUX_AT_NO_AUTOMOUNT); - if (unsupported != 0) { - linux_msg(td, "statx unsupported flags 0x%x", unsupported); + if (!linux_to_bsd_stat_flags(args->flags, &flags)) { + linux_msg(td, "statx unsupported flags 0x%x", flags); return (EINVAL); } - flags = (args->flags & LINUX_AT_SYMLINK_NOFOLLOW) ? - AT_SYMLINK_NOFOLLOW : 0; - flags |= (args->flags & LINUX_AT_EMPTY_PATH) ? - AT_EMPTY_PATH : 0; - dirfd = (args->dirfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dirfd; error = linux_kern_statat(td, flags, dirfd, args->pathname, UIO_USERSPACE, &buf); From nobody Tue Sep 24 19:40:52 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 4XCqwf60W1z5YCnb; Tue, 24 Sep 2024 19:41:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4XCqwf2W9Vz4sR1; Tue, 24 Sep 2024 19:41:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 48OJerVr031790; Tue, 24 Sep 2024 22:40:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 48OJerVr031790 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 48OJerDI031789; Tue, 24 Sep 2024 22:40:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 24 Sep 2024 22:40:52 +0300 From: Konstantin Belousov To: Gordon Bergling Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 044f94adff55 - main - timeout(1): Update STANDARDS section Message-ID: References: <202409241642.48OGgoWH040751@gitrepo.freebsd.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <202409241642.48OGgoWH040751@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4XCqwf2W9Vz4sR1 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Tue, Sep 24, 2024 at 04:42:50PM +0000, Gordon Bergling wrote: > The branch main has been updated by gbe: > > URL: https://cgit.FreeBSD.org/src/commit/?id=044f94adff55f13130f03c0c170fa879c8febb5b > > commit 044f94adff55f13130f03c0c170fa879c8febb5b > Author: Gordon Bergling > AuthorDate: 2024-09-24 16:42:18 +0000 > Commit: Gordon Bergling > CommitDate: 2024-09-24 16:42:18 +0000 > > timeout(1): Update STANDARDS section > > Update the STANDARDS section for timeout(1) to > POSIX 1003.1-2024. > > Update mandoc to be able to render the > new POSIX macro. > > Reviewed by: bapt, bcr > Approved by: bapt > Obtained from: OpenBSD > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D45691 > --- > bin/timeout/timeout.1 | 8 +++++++- > contrib/mandoc/st.c | 1 + > 2 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/bin/timeout/timeout.1 b/bin/timeout/timeout.1 > index 9e624e809376..10e5fd70c393 100644 > --- a/bin/timeout/timeout.1 > +++ b/bin/timeout/timeout.1 > @@ -24,7 +24,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > .\" SUCH DAMAGE. > .\" > -.Dd June 26, 2023 > +.Dd June 17, 2024 > .Dt TIMEOUT 1 > .Os > .Sh NAME > @@ -195,6 +195,12 @@ $ timeout -k 5s 1m fetch \\ > .Xr nohup 1 , > .Xr signal 3 , > .Xr daemon 8 > +.Sh STANDARDS > +The > +.Nm > +utility is compliant with the > +.St -p1003.1-2024 > +specification. It is not. At very least, we do not support short versions of -f and -p options. (OTOH they should be simply an aliases for existing long options) From nobody Tue Sep 24 20:16: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 4XCrjW69XQz5YFSN; Tue, 24 Sep 2024 20:16:31 +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 4XCrjW5fFhz3xDn; Tue, 24 Sep 2024 20:16:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727208991; 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=RWNpCs818cHnEyENJOI594KBiDwio9B5/aek2ApYAvE=; b=sOeUNDYmvRB8COBu0rw1MbVX5dS1KqqcLNH0qxfkxZymY7Q4fZtRkTOxqJTotvAium8P44 nvxTl7ejU9h07QTjydXAOoEDwIDIWalPGb2oBQt8QFIpjkisPXwl3qwrwFkiAlxibqkcEa ndoYQsMzMwca+9gjFOHklq2m8T73MeZo1fGM4M4F3sIW78gS1e5yCFyhHyi15Hm9jFiRmw VkwF4rJ4Q5dvDIb5GHbWV5IzVV2dE8xdL7kezmqfZMYqvFnGdryUWDYmUVAuqPNkm8ysN8 WBfI27yjG+wf83ZCPa1anKOcsXSeIQMlmjnUtnlgFVx0iBAJHtXR3l2oNVrsFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727208991; a=rsa-sha256; cv=none; b=xr/2yzgj1hU4sg/QZAQXiGSWjRW+yLZ8Z8UvmfgjBudIr4FgBbdgTrso5PkVdofHt1irBA 1gMxCLtvTMVaYb1HzBqU3diJIz8y2kRjuFTSZWPFAzQd0AzLStPrIxjAlAVYKKgYmy9SFC RghvkH9TdSipI5eP+t1baiKshCWjYoYeSKbTWTvVQrKcDI+A2OkxCGWvZ82gQ52XaQPoCh RGJ4QP6Gxct60m9llWL4qqk9zqiINQ7yD5gCVCtieFhkhnbgbEL/oyxs7BdLsedZ/6KP88 poFZBXJF6O4aM3QOHt/SBZGdWVNTjNbnoQAQDQK4E5iCecbHI+i5R6elow7ozQ== 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=1727208991; 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=RWNpCs818cHnEyENJOI594KBiDwio9B5/aek2ApYAvE=; b=IdAb27fxd4OWJWRHKUeO2AYeYDPT7X8NVgBQNoC8qEM1zBw6CJTJnBDm0IQ7MpE2cybfUN wB0uOieSa9vw7497DZxu7gsfWc4/z4EXnVx4e4w2HYWBGWZACl1ejZy/6tWAvEEx1fry0n aAirqXddYMxXsDE7DtCjM7TqxVHgZ94qEplrKe74MZfB+CF54/3HedzWCsXlHpE3LUT6ro HEMVW8gX0sPWSwcuF+4BqREriV1cth7cUg/mAZWKxPEQa46lxHWPp83R7AM6lTrdzFY5a1 McrIfIX4ruxWLwa1NhjYax4b9RAYUSlS9oR4mLAOJq1qmpBT3XlzqD+iLl4PrQ== 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 4XCrjW5FCwzjW4; Tue, 24 Sep 2024 20:16:31 +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 48OKGVxU000213; Tue, 24 Sep 2024 20:16:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OKGVGE000210; Tue, 24 Sep 2024 20:16:31 GMT (envelope-from git) Date: Tue, 24 Sep 2024 20:16:31 GMT Message-Id: <202409242016.48OKGVGE000210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1b3fa1ac36d1 - main - nvmft: Defer datamove operations to a pool of taskqueue threads 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b3fa1ac36d1b48a906dc98d9d9f22447a213d47 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1b3fa1ac36d1b48a906dc98d9d9f22447a213d47 commit 1b3fa1ac36d1b48a906dc98d9d9f22447a213d47 Author: John Baldwin AuthorDate: 2024-09-24 20:16:11 +0000 Commit: John Baldwin CommitDate: 2024-09-24 20:16:11 +0000 nvmft: Defer datamove operations to a pool of taskqueue threads Some block devices may request datamove operations from an ithread context while holding locks. Queue datamove operations to a taskqueue backed by a thread pool to safely permit blocking allocations, etc. in datamove handling. Reviewed by: asomers Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46551 --- sys/dev/nvmf/controller/ctl_frontend_nvmf.c | 52 +++++++++++++++++++++++++- sys/dev/nvmf/controller/nvmft_qpair.c | 57 +++++++++++++++++++++++++++++ sys/dev/nvmf/controller/nvmft_var.h | 5 +++ 3 files changed, 112 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvmf/controller/ctl_frontend_nvmf.c b/sys/dev/nvmf/controller/ctl_frontend_nvmf.c index a203bb1c90a6..bc061947a9a0 100644 --- a/sys/dev/nvmf/controller/ctl_frontend_nvmf.c +++ b/sys/dev/nvmf/controller/ctl_frontend_nvmf.c @@ -19,7 +19,9 @@ #include #include #include +#include #include +#include #include #include @@ -31,8 +33,10 @@ #include #include +#include #include #include +#include /* * Store pointers to the capsule and qpair in the two pointer members @@ -47,6 +51,9 @@ static int nvmft_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int flag, struct thread *td); static int nvmft_shutdown(void); +extern struct ctl_softc *control_softc; + +static struct taskqueue *nvmft_taskq; static TAILQ_HEAD(, nvmft_port) nvmft_ports; static struct sx nvmft_ports_lock; @@ -458,8 +465,8 @@ nvmft_datamove_in(struct ctl_nvmeio *ctnio, struct nvmft_qpair *qp, ctl_datamove_done((union ctl_io *)ctnio, true); } -static void -nvmft_datamove(union ctl_io *io) +void +nvmft_handle_datamove(union ctl_io *io) { struct nvmf_capsule *nc; struct nvmft_qpair *qp; @@ -478,6 +485,35 @@ nvmft_datamove(union ctl_io *io) nvmft_datamove_out(&io->nvmeio, qp, nc); } +void +nvmft_abort_datamove(union ctl_io *io) +{ + io->io_hdr.port_status = 1; + io->io_hdr.flags |= CTL_FLAG_ABORT; + ctl_datamove_done(io, true); +} + +static void +nvmft_datamove(union ctl_io *io) +{ + struct nvmft_qpair *qp; + + qp = NVMFT_QP(io); + nvmft_qpair_datamove(qp, io); +} + +void +nvmft_enqueue_task(struct task *task) +{ + taskqueue_enqueue(nvmft_taskq, task); +} + +void +nvmft_drain_task(struct task *task) +{ + taskqueue_drain(nvmft_taskq, task); +} + static void hip_add(uint64_t pair[2], uint64_t addend) { @@ -561,6 +597,17 @@ end: static int nvmft_init(void) { + int error; + + nvmft_taskq = taskqueue_create("nvmft", M_WAITOK, + taskqueue_thread_enqueue, &nvmft_taskq); + error = taskqueue_start_threads_in_proc(&nvmft_taskq, mp_ncpus, PWAIT, + control_softc->ctl_proc, "nvmft"); + if (error != 0) { + taskqueue_free(nvmft_taskq); + return (error); + } + TAILQ_INIT(&nvmft_ports); sx_init(&nvmft_ports_lock, "nvmft ports"); return (0); @@ -1115,6 +1162,7 @@ nvmft_shutdown(void) if (!TAILQ_EMPTY(&nvmft_ports)) return (EBUSY); + taskqueue_free(nvmft_taskq); sx_destroy(&nvmft_ports_lock); return (0); } diff --git a/sys/dev/nvmf/controller/nvmft_qpair.c b/sys/dev/nvmf/controller/nvmft_qpair.c index 6cb3ebd76884..e66d98f38225 100644 --- a/sys/dev/nvmf/controller/nvmft_qpair.c +++ b/sys/dev/nvmf/controller/nvmft_qpair.c @@ -34,6 +34,9 @@ struct nvmft_qpair { uint16_t sqtail; volatile u_int qp_refs; /* Internal references on 'qp'. */ + struct task datamove_task; + STAILQ_HEAD(, ctl_io_hdr) datamove_queue; + struct mtx lock; char name[16]; @@ -41,6 +44,7 @@ struct nvmft_qpair { static int _nvmft_send_generic_error(struct nvmft_qpair *qp, struct nvmf_capsule *nc, uint8_t sc_status); +static void nvmft_datamove_task(void *context, int pending); static void nvmft_qpair_error(void *arg, int error) @@ -114,6 +118,8 @@ nvmft_qpair_init(enum nvmf_trtype trtype, strlcpy(qp->name, name, sizeof(qp->name)); mtx_init(&qp->lock, "nvmft qp", NULL, MTX_DEF); qp->cids = BITSET_ALLOC(NUM_CIDS, M_NVMFT, M_WAITOK | M_ZERO); + STAILQ_INIT(&qp->datamove_queue); + TASK_INIT(&qp->datamove_task, 0, nvmft_datamove_task, qp); qp->qp = nvmf_allocate_qpair(trtype, true, handoff, nvmft_qpair_error, qp, nvmft_receive_capsule, qp); @@ -131,14 +137,25 @@ nvmft_qpair_init(enum nvmf_trtype trtype, void nvmft_qpair_shutdown(struct nvmft_qpair *qp) { + STAILQ_HEAD(, ctl_io_hdr) datamove_queue; struct nvmf_qpair *nq; + union ctl_io *io; + STAILQ_INIT(&datamove_queue); mtx_lock(&qp->lock); nq = qp->qp; qp->qp = NULL; + STAILQ_CONCAT(&datamove_queue, &qp->datamove_queue); mtx_unlock(&qp->lock); if (nq != NULL && refcount_release(&qp->qp_refs)) nvmf_free_qpair(nq); + + while (!STAILQ_EMPTY(&datamove_queue)) { + io = (union ctl_io *)STAILQ_FIRST(&datamove_queue); + STAILQ_REMOVE_HEAD(&datamove_queue, links); + nvmft_abort_datamove(io); + } + nvmft_drain_task(&qp->datamove_task); } void @@ -359,3 +376,43 @@ nvmft_finish_accept(struct nvmft_qpair *qp, rsp.status_code_specific.success.cntlid = htole16(ctrlr->cntlid); return (nvmft_send_connect_response(qp, &rsp)); } + +void +nvmft_qpair_datamove(struct nvmft_qpair *qp, union ctl_io *io) +{ + bool enqueue_task; + + mtx_lock(&qp->lock); + if (qp->qp == NULL) { + mtx_unlock(&qp->lock); + nvmft_abort_datamove(io); + return; + } + enqueue_task = STAILQ_EMPTY(&qp->datamove_queue); + STAILQ_INSERT_TAIL(&qp->datamove_queue, &io->io_hdr, links); + mtx_unlock(&qp->lock); + if (enqueue_task) + nvmft_enqueue_task(&qp->datamove_task); +} + +static void +nvmft_datamove_task(void *context, int pending __unused) +{ + struct nvmft_qpair *qp = context; + union ctl_io *io; + bool abort; + + mtx_lock(&qp->lock); + while (!STAILQ_EMPTY(&qp->datamove_queue)) { + io = (union ctl_io *)STAILQ_FIRST(&qp->datamove_queue); + STAILQ_REMOVE_HEAD(&qp->datamove_queue, links); + abort = (qp->qp == NULL); + mtx_unlock(&qp->lock); + if (abort) + nvmft_abort_datamove(io); + else + nvmft_handle_datamove(io); + mtx_lock(&qp->lock); + } + mtx_unlock(&qp->lock); +} diff --git a/sys/dev/nvmf/controller/nvmft_var.h b/sys/dev/nvmf/controller/nvmft_var.h index fc1f86754382..4fda297c8a85 100644 --- a/sys/dev/nvmf/controller/nvmft_var.h +++ b/sys/dev/nvmf/controller/nvmft_var.h @@ -110,6 +110,10 @@ void nvmft_populate_active_nslist(struct nvmft_port *np, uint32_t nsid, void nvmft_dispatch_command(struct nvmft_qpair *qp, struct nvmf_capsule *nc, bool admin); void nvmft_terminate_commands(struct nvmft_controller *ctrlr); +void nvmft_abort_datamove(union ctl_io *io); +void nvmft_handle_datamove(union ctl_io *io); +void nvmft_drain_task(struct task *task); +void nvmft_enqueue_task(struct task *task); /* nvmft_controller.c */ void nvmft_controller_error(struct nvmft_controller *ctrlr, @@ -138,6 +142,7 @@ struct nvmft_qpair *nvmft_qpair_init(enum nvmf_trtype trtype, void nvmft_qpair_shutdown(struct nvmft_qpair *qp); void nvmft_qpair_destroy(struct nvmft_qpair *qp); struct nvmft_controller *nvmft_qpair_ctrlr(struct nvmft_qpair *qp); +void nvmft_qpair_datamove(struct nvmft_qpair *qp, union ctl_io *io); uint16_t nvmft_qpair_id(struct nvmft_qpair *qp); const char *nvmft_qpair_name(struct nvmft_qpair *qp); void nvmft_command_completed(struct nvmft_qpair *qp, From nobody Tue Sep 24 20:18:14 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 4XCrlW0LZsz5YFDH; Tue, 24 Sep 2024 20:18:15 +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 4XCrlV5L2hz3xZH; Tue, 24 Sep 2024 20:18:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727209094; 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=2lID23N98dCVk7PJQaEBAzf3RVJJGqVMDGFKl5YRH3Q=; b=EmFhyf6HKkvbDLeTxZbnetf0Z1AKeGxBNFM4K0PEGC/WGLb/5PShSghRz75yXrM3dQVZjq klPjvU/oLKtqWLMWFYTzDtxO3DEJdxwuAFjD/rSkxOFO3qAb6fNMgjFfyJcpq5vi4CpInt 5NpLessw6aEIR9B9wqOUMmulvkixEqk/KDbHwjOmvCqMKFah3qcyUw80ZQSfyTwtZmNpGn Czi68CeoaEVtzCMNcfAKltwiaIkGKHU33v1JvLw/JrTLrQovSzPFhLXLLa531AvDpXm3ru +NUbo4gQceGTnDJf5rKcrMU5265daaWuIod+tUTZf6CRForXZLCXnWnm4JxT9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727209094; a=rsa-sha256; cv=none; b=SzNQRhM/8I5rn7SGuCW6tpyOSFtnq/Yw1pZ0q0UpGQ/jEoo+HB2m0CqECIqcZiAcHYDRIE HslE/8K7tET1IQjcq2q3vUjglrGolKwzI9L4psVabSVmvjYbDzDdA0QbOVNDGM2aFTksPK h+IrBjFpwmhCfr/KCxHqCKndnTu6OK5QDdpGZIJLxZf31O1TvCN2DA3vjqxrrQuhVimKiu W0G5utKyL/qkT/f/CmG9XXhwu+035pqm2vOKiZ2QzYFmytV0klEXC8Zgy8/mvlsLb/N9hS r6JtE+CdRDgp19cbowAeWG09xIaZgXe9vJeKP9rAHfCT4+e1ZOqutLJxyNLmOQ== 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=1727209094; 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=2lID23N98dCVk7PJQaEBAzf3RVJJGqVMDGFKl5YRH3Q=; b=IdmpAMS3dBOg6yHDHqv8nUOwcHMtAXx8Cly0LEsWhUAUkk86g14JkuItNzb71NeJHKF0KV 3S6PBt9miEQV1BMPAGu1JPG5GQ1ByWdIO0IgHSwGUzGXBqddSRgCo5nb3iob5KUInl1NsX ZzfhSp5uHuom+pQT1UI8Io6lxNlg8Gh1B/x3P9xIB2dmtsJs2IoJkOomOLV8WGRGFacuzE LWYtG5QBn371KBV9kX1VN+gkUHnIUPGOGvgntWhMYQBIDA6vI594s/lrlQZcXcVNYVrUV2 DENO2USclFOJkCvoEpSr1G4fhkzV1ecj0DTa9cOjvlrxMZc5M4WtV9iCi5ppbQ== 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 4XCrlV4y8qzk28; Tue, 24 Sep 2024 20:18:14 +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 48OKIE0l000608; Tue, 24 Sep 2024 20:18:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OKIEvQ000605; Tue, 24 Sep 2024 20:18:14 GMT (envelope-from git) Date: Tue, 24 Sep 2024 20:18:14 GMT Message-Id: <202409242018.48OKIEvQ000605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 604919c47fa4 - main - loader: Fix 0 vs 1 confusion for column numbers 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 604919c47fa4092db08dadd282851afc9cba0a90 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=604919c47fa4092db08dadd282851afc9cba0a90 commit 604919c47fa4092db08dadd282851afc9cba0a90 Author: Warner Losh AuthorDate: 2024-09-24 19:54:56 +0000 Commit: Warner Losh CommitDate: 2024-09-24 20:18:42 +0000 loader: Fix 0 vs 1 confusion for column numbers In two places we use '0' for a column number. However, the upper left hand corner of the screen is 1, 1. Fix those two confusions. Also, fix a comment that flipped the coordinates in a comment (I'm used to the vt100 convention where it's row, column (eg y, x)) and didn't notice the rest of the code uses x, y. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D46777 --- stand/lua/menu.lua | 4 ++-- stand/lua/screen.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 5820d80532b5..72f5648cae91 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -556,9 +556,9 @@ function menu.autoboot(delay) else -- Erase autoboot msg. While real VT100s -- wouldn't scroll when receiving a char with - -- the cursor at (24, 79), bad emulators do. + -- the cursor at (79, 24), bad emulators do. -- Avoid the issue by stopping at 79. - screen.setcursor(0, y) + screen.setcursor(1, y) printc(string.rep(" ", 79)) screen.defcursor() return ch diff --git a/stand/lua/screen.lua b/stand/lua/screen.lua index 4437a34f95f1..89d5416815fd 100644 --- a/stand/lua/screen.lua +++ b/stand/lua/screen.lua @@ -32,7 +32,7 @@ local core = require("core") local screen = {} -- Module exports -screen.default_x = 0 +screen.default_x = 1 screen.default_y = 25 function screen.clear() From nobody Tue Sep 24 21:19:24 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 4XCt664jd2z5W5Bc; Tue, 24 Sep 2024 21:19:26 +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 4XCt663qvHz43d1; Tue, 24 Sep 2024 21:19:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727212766; 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=SQ/3i2OfokJKt7eui5pYPz2P518Zj7f9kEIwe52PwNM=; b=K9e9GQlEaSMgw86WTc9fo79s8VnOfmEmmY6w+y3AOc95Te/huWSFO4StNCPE6nS15XtzPa bk3jLSALz8Pc596aU/Ga7Ew3rIrVStHx7mulCrUwYn58l1N2OKO1yLbze3xd+g5/iKQjAK gyKbzyjCAARqDEYWMcx7BwGojpHaGWQurvgjUOeZG3op/WB4FZbwR/WQtdgzFVibHs9Pzq jJk4HZJm2e0GLM5UPUB0zBNzdDUtyXYPDtbRzpM5Mv6sFjgEH2cnWThLyC37dZgyyVyxVk /R5ifyRqBQQQjf3E/p+2Vs2R+tTgu8OIxr/DHZfbrYxMwdO6swKhDhqog1gHxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727212766; a=rsa-sha256; cv=none; b=I9As4vym/M9DvN/F2NmIG+tvL8dXpWTCQri5jCIhnmpEGTmBEmdBbZLsv/jI21uuOcmfTQ /k8CfD8PRjpxPcK0DVxJseRce9GGB0jiACSGRKpx4gLxAlTfDJEwyVEYlqZQ4chwzG7qmm t6Q+4KnDx/BgC8qxQULjL1g9w1cbbSV3ndBVKV0htQB7rE81CPm4TeZTSRbA5+S7VVEcSu Ba5UHYKUS3LxNfwRekwm0iJTf6bR/BDg/DXYOBxlwrjK+PeWiPIxMdPRCx/Nz2LAmKGqQL h5FiG254KrYZoC2WU9doaR3BqDOq2ZtMgIC23i2FIk1WXWQD52ZKRx+D9Xi+zw== 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=1727212766; 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=SQ/3i2OfokJKt7eui5pYPz2P518Zj7f9kEIwe52PwNM=; b=UaQoXBcTQsriqVaxxuiwj6x315ZX32merq1YjSe69WONA2fO4Zs5jWGAajXr1dwUgbhMDc xIJaSAlDlexXZ/5J8/EwyixW9hZz8CEt3meF9IRMs6I5SMycKRnxXPizDmivZP+GzOetZY kdJyFGyWXNfGFIfZa98WQPREvmM+ujObWiKoiQHCRIzWYbVU5q/btng0NEMlM90AzvIbJV QYIR/Y0MOB8imhc2paSqFofx6wKWBAfMyDcbvPDNARLMGSXTdvyNXfH6B27JPH1rAjU9rG Joffn6zERPOgKRbhMVcQeF9YCqU8o+z4N5bujUa5ASP4ac/vocosBPGTlC92aA== 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 4XCt6639QfzlFL; Tue, 24 Sep 2024 21:19:26 +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 48OLJQTj002723; Tue, 24 Sep 2024 21:19:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OLJOws002720; Tue, 24 Sep 2024 21:19:24 GMT (envelope-from git) Date: Tue, 24 Sep 2024 21:19:24 GMT Message-Id: <202409242119.48OLJOws002720@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 413c5e9082a7 - main - Merge remote-tracking branch 'freebsd/vendor/Linux/ath-common' 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 413c5e9082a7d1d25fd3a95f0e77a949621f1433 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=413c5e9082a7d1d25fd3a95f0e77a949621f1433 commit 413c5e9082a7d1d25fd3a95f0e77a949621f1433 Merge: 604919c47fa4 9c6b6723ca84 Author: Bjoern A. Zeeb AuthorDate: 2024-09-24 21:06:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-24 21:06:19 +0000 Merge remote-tracking branch 'freebsd/vendor/Linux/ath-common' Sponsored by: The FreeBSD Foundation From nobody Tue Sep 24 21:19:27 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 4XCt680vQqz5YJWj; Tue, 24 Sep 2024 21:19:28 +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 4XCt680BjNz43m8; Tue, 24 Sep 2024 21:19:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727212768; 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=K3ODMULm1AvVPL96vADUXHzztL6NG62njI6/0TH/Bt0=; b=oBucT7kAYjEUqON4334WodfiAkRFzB5AHUlK+1aX3ktatuRj32jGb7/5boQH3AZqvWZJNt gk2ggsNZuxS5ju/vt2ZmZ9MXNrcIZrS9pJOfA0whgbLho2FBaHLPvrx4kzZzr3UdxrD35L 5LVhHu8agImfmvrTgq7Hqwh3SV4ugGjBSyuXnfehvwAMGe//Rh2PIK3LZL76flRCzVv7uV cfgZ+YIXkzb+hS2Il9RMR+HYnMFo1F8fV0FRp5ELYvO2QkOyPeDuhVmA3ChY6GAVMjkpz/ joZ2xRTWr++UHQ3UZR1TuAC6+BorOVJtm/KsJ5FTT6+JS6E5Vbw6ycbYHJS8uQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727212768; a=rsa-sha256; cv=none; b=h2wpPhz3Ki6YbJfYA/6M9WuLkTROhrDwDuo41KdewSPngZxbxN5of3srlX1SDrDi2OT6hk 4KahIFea3sl1ylML9xxnvO3PEECzNDYJV2vVQ8WfiLrYV+A0djAXcMxNQXJO7xOIF/QflN 3RN+e5ALB89/ZWYSDXH95dn5+UD0kVGi3KV9ZyHvyQHF4hcQozSv44zyOraua/1XAv1YQw nzvVmvEDtbbar7oPRBqYMEmdMIvakZS2GqIQDtjnqZwpm/7o8h/J8/FChXMdThnQmjSu2s qVr0aqjQlnUNWYppHeIJVXKlGNmKY37FHHviO4SSRwW6dkXwyiW5HG8luoLSHw== 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=1727212768; 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=K3ODMULm1AvVPL96vADUXHzztL6NG62njI6/0TH/Bt0=; b=pbKqWw4KXukxG74EOCGAMJHUG4m5fiuHh8kWDh4pYjg7UgU46RJPN5AQQ81Hr6wq4U9anr MBETZLQyJLaE4YXkDBfMyppVlxvKd2X/KW8Mn5NmDgrXIM1w76hkvsxLY/JKyOr+ktcrve ZMgitSV42LHcNi0lzIf6c2rxOhlkHvk88bRsH0PY/UFqyPunXAgIx8Wezi+zro+E0NimN+ HCGNH1lMcbzt0ow27HZYFP5GBXHBz6MSbfG5/EjheY/kNTelSxBhB1NG0EhxoJZehcb0vq Y2OGVwjtnauGj0bsAMc/3etWU5CT4poGMWNmha/XdqJt2ZDYme8Y1Y2o1UdNvA== 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 4XCt676vqrzlGG; Tue, 24 Sep 2024 21:19:27 +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 48OLJR1d002772; Tue, 24 Sep 2024 21:19:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OLJRd6002769; Tue, 24 Sep 2024 21:19:27 GMT (envelope-from git) Date: Tue, 24 Sep 2024 21:19:27 GMT Message-Id: <202409242119.48OLJRd6002769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 114f709b088c - main - Merge remote-tracking branch 'freebsd/vendor/Linux/ath10k' 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 114f709b088c82b9676cb2275600465a5ae3e204 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=114f709b088c82b9676cb2275600465a5ae3e204 commit 114f709b088c82b9676cb2275600465a5ae3e204 Merge: 413c5e9082a7 e05a7642395e Author: Bjoern A. Zeeb AuthorDate: 2024-09-24 21:16:34 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-24 21:16:34 +0000 Merge remote-tracking branch 'freebsd/vendor/Linux/ath10k' Sponsored by: The FreeBSD Foundation From nobody Tue Sep 24 21:19:29 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 4XCt695tRJz5W5GK; Tue, 24 Sep 2024 21:19:29 +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 4XCt693wSVz43dG; Tue, 24 Sep 2024 21:19:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727212769; 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=s9IOmUMQ+y55SM5Nz50gsxP3+g/qzpXjtAvNgHklaSI=; b=RFDjEBEsbLcJX1g/sfjJ72PKBVCaHKO+D/zTMzNNOi9bZrOXvdVuTr6wdseve6wKST0x8g HUHaj7+q/Fo6oP7bA+zR48FLhBVW+cLwTjHNbAsuogZOw254T7O3Hy8rVBTTM6lLNIGqy4 ua1u38VXDFnDrMKutB+Uzjs2raea8U3WWnhZpW2O7i9VSeGjE2b28UBsbWgbgCpiiKT2Jz XkbKs+s7Z2/9deDvLF/lL5LdXfk5fgPyQ6P48HdpnY9wzGsPkL1a22+Ltq16ayhV2+HZse VMp0EqS0dMulGS3I4pUlDp2fKxlSOSWtCtLvkbHlV7Nb6HqOuaNm8O0NGVQMIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727212769; a=rsa-sha256; cv=none; b=vI8Xug3/Qcb+IbMjIcQRcU+hmJi0eJkxSq046iQG67Xwsio65ERIjQYBlkwgSIwQAfJFgb DKxCQDa4BW/lyb7c75naDB2TC/yFMBXcQviVj6SDNwid0uGXsPqZSGZrKnyqmrtibJcQ9N vsQ+px0Ujn3CS8Tx6KQW7JO3Te5mNV/wASLzbV17ujvhqvRuiru3ga8SAdlskr+iuCUdD/ Fo/SP5lYCmSMr9XSCwBzZjO7Gtfja0GTUCOXVSMr1IrkVPELvRSYpl3EgeO8OHl/WSNA3e pkkIcZ5MDDM/GplcaVUqWyAW3vNvqECvaGNYzmtXTsfFS73FAY1BL+9be6SE3A== 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=1727212769; 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=s9IOmUMQ+y55SM5Nz50gsxP3+g/qzpXjtAvNgHklaSI=; b=jQ1DyclIECNGrEXhHe15ywPjQD1sMv+ztnK8lzUKkSpS1vrMxnhdYyPbBGnqWqOtO51Do6 sDPyyvKvcPGoNe4/HYDF4/LQzyNBDPFqdk50fUg+0tguRzjsIxlnuzcpwONe/tcG7Y+dzK HFkFyRYoFX83RDIOxsnqnDSRMGyuXVcYI7e+jQQrlX16R+z5/U+LMDihiFGwxG/HE7J6rB 9AaJEp5h9Q1r2Z3L4Eyzjq95D23kaMhYG6QtaMd6mAzkFlpdywl5JV0FPFtgR1p2ybrH79 e892N0i7fLp5wJ/DpnwdnTLCuUkr7B9sJ7uQk5Pb8ibL+dQ5BR9U8zUBVTEDmg== 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 4XCt693XfHzlFM; Tue, 24 Sep 2024 21:19:29 +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 48OLJT3K002817; Tue, 24 Sep 2024 21:19:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OLJTPq002814; Tue, 24 Sep 2024 21:19:29 GMT (envelope-from git) Date: Tue, 24 Sep 2024 21:19:29 GMT Message-Id: <202409242119.48OLJTPq002814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 182375d342bc - main - Merge remote-tracking branch 'freebsd/vendor/Linux/ath11k' 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 182375d342bcd1c2786bf5efa04700aa2bdbd302 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=182375d342bcd1c2786bf5efa04700aa2bdbd302 commit 182375d342bcd1c2786bf5efa04700aa2bdbd302 Merge: 114f709b088c 60805fea02fb Author: Bjoern A. Zeeb AuthorDate: 2024-09-24 21:16:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-24 21:16:49 +0000 Merge remote-tracking branch 'freebsd/vendor/Linux/ath11k' Sponsored by: The FreeBSD Foundation From nobody Tue Sep 24 21:19:30 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 4XCt6C2QTWz5W5DX; Tue, 24 Sep 2024 21:19:31 +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 4XCt6C0hQ5z43Vn; Tue, 24 Sep 2024 21:19:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727212771; 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=KOBUnKUfMY2jDAXzcYmqVTUvDhmtjzQfDsb+ci8ik4g=; b=jguFtS19WK3CGMN34JbWF6GxemI5HSIUqzpfSl7ZAtLO0vBrYNfK+v8YNWH2t60m38LTsS tVJraGY2KozvFkSTqzwBpubKGBHamw64zY0Der4g96Q5jaFjylGTxumRVg9v+pEs6mezzX rtPL0cb+IOr6heGwiVLqUdOzrE+q0nh0So0UzAJCX0IPd0892yS7otS6N3PA2dluFXU0MO G/HqInEGYjV+Q+YjOxJi8D9RithcYUlzDk4cifKPhU9PoyYN7lUJ1yThoV7FZztt/YggXC r9cmrYzfZqQmLpXetlGqfY59Bg6mKu/AJ784CtmyCyCpIo2WAy7RrCt33YM/9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727212771; a=rsa-sha256; cv=none; b=McdkblRsHRP8ZYdskAA+2QDl2PGcN84tBPIJUSqidEkTY/D00WZ4cVtgGF5Gf7ZAScp0yv wh+IJbxJg6JbXRWL6cQtklNWNe5M3whXu4pB2/g2ZWAvjoIK78LuZCsC3pCqPdUUxcJwPq PnIBZlyMUuGSkApkPQaIE/Vf9z6GGqTILBAhxzn91sLGOIHa3VJDnIMU0ppRTz8qIHkQW9 fXkvW1dZt/1GmlXttR9PlydiQFkbl8OImlS5JidrLbO6htdtl7TA8BshtHMt7Vc1Nmult9 5T/VUUgMYxNqCGqa7+v/QGnn+cs3mo1u+RQyM8OBAHFKOt9jM77BzVc7bonoLw== 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=1727212771; 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=KOBUnKUfMY2jDAXzcYmqVTUvDhmtjzQfDsb+ci8ik4g=; b=v2774IU2S0zzR4CA4c5qp5SlYN+rOGiWb5fWG/9vYqU/Qkss7glj2+mLj89bn+QqGqa5zb /ZBXogWyB9BUSjjE+NhXp94JE/T0kfWI2Hqm5RCwZ7lTZZJ6IGrncvosRD6Y5OBuLBdD+O gdsGGOVLgCvDjYTqUnK6sADtkBkvs4f7J15mKgBtp747VXiYngCtAgM6B7GqcQBrliLP2C fvgU8UlzTgAnbXV3Bskk0g/M4d1BOxYbyqg2kIakLI/+24TNCBJeD6TLGUhQz5VGmwf256 uBFsF8fXf1EXDAtrRQsCL12uzLZWyQ/yCLEm56HEpPMI8uOaYWHGgN3tZjahJw== 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 4XCt6C0135zlT8; Tue, 24 Sep 2024 21:19:31 +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 48OLJU0R002868; Tue, 24 Sep 2024 21:19:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OLJUpJ002865; Tue, 24 Sep 2024 21:19:30 GMT (envelope-from git) Date: Tue, 24 Sep 2024 21:19:30 GMT Message-Id: <202409242119.48OLJUpJ002865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: d8f6658c9a37 - main - Merge remote-tracking branch 'freebsd/vendor/Linux/ath12k' 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8f6658c9a37504b380f21b7904099ef37d06962 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d8f6658c9a37504b380f21b7904099ef37d06962 commit d8f6658c9a37504b380f21b7904099ef37d06962 Merge: 182375d342bc a4f8848c53b8 Author: Bjoern A. Zeeb AuthorDate: 2024-09-24 21:17:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-24 21:17:04 +0000 Merge remote-tracking branch 'freebsd/vendor/Linux/ath12k' Sponsored by: The FreeBSD Foundation From nobody Tue Sep 24 21:19:32 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 4XCt6D5SRvz5YJC6; Tue, 24 Sep 2024 21:19: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 4XCt6D4Br3z43hY; Tue, 24 Sep 2024 21:19:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727212772; 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=o0thZD/YxhfhCWdCjrYs8TqzkRL6hQTf0ErC5kCNm+Y=; b=fkSNF+S8Ur/U4Upayxc2ZJd+dWj6IORsRPEwKhXbf1aQ9gttC8M8KA74YYbDR96azRw+2+ 3Z3O2v1dWzwlpN4sasdFmZ/IS8cA8r4xdU5hfGMemqPPeI+tAMEni0+6d3YyRfJNf2REfU 2J74aTeg8C+vKFISlfuTg5Q15y193e4kqkIYLpF5LIxOTLymQnDfJfymKCIwgPAY4Ip35W hCh/NG3R7iipEclBnyJvSQPNfMKKX9PhqKMUS/cH1VUmz/V3lRuIqSONJlXoKOghCSEHSQ dxRAfnmRCWkISdtIgABYkLhezrf8f1jMycimOdsAYLkTQZKHaoYDkXTFsw3ohw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727212772; a=rsa-sha256; cv=none; b=FwcxEBi7nrnQdi7bJVYnl9oZQWsr2BgKBRNn2bnQsslhwoZI7XOVDmsk554b1ClIZFhipM 5e4p8N4bRNO/PtNjvaPCY6mawhnWXwRGN13dfeKQPaIJPOfQ7/dXpa7WqJP1iVunIuP6fn tBv772LEy35RgSUGXPjpgNMTGxxyyNfUcNDn5iLkrBwMBSIkNBkpcHCRpHDlBto5Gh7V5W s6I+KQhljrqfMwjhACrHpxhsGpSuJDAGGObO6O85hpGVGyElxo4SsY9Wc2vDiFPw7Il3t1 YIKsiW/ShTbFMv4m+urIPyyaADoYBsIQUzAtV/GYIP5LktpFlkiNdLMQmdEmAw== 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=1727212772; 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=o0thZD/YxhfhCWdCjrYs8TqzkRL6hQTf0ErC5kCNm+Y=; b=gro0jK2GYFNMCdycO05fc5XOSUvPvWKuQtORhtuC7i5HW0sCiYco+bLCSx6oEzXvLh90WX lhid3FPlE4VwcoybhWZ9xzEgunMXVeci6DjCP36GGXLKUJEzcYSwniyjPH9uyFcc5fmwza aYKFPgQOLFfgXmR0yhECx6V9BTSVaJv7PLoc3s7Mc0hbP1ZcVN3N3rvKGuLwvoNYBDKCtl lUeTGrzZYCaJrLyn6uLMEVl9cw1hs66FtO4JSEi+EUR9erA66a7+U5SnyDRfVTvnEgFygR 1qw7eT9jw8+QODvxvfUEk1+uV4/uceHJs+4J8B8zcyIcbJMPb3ptdrCEjfZ0kQ== 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 4XCt6D3qPmzlGH; Tue, 24 Sep 2024 21:19: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 48OLJWP1002916; Tue, 24 Sep 2024 21:19:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OLJWfJ002911; Tue, 24 Sep 2024 21:19:32 GMT (envelope-from git) Date: Tue, 24 Sep 2024 21:19:32 GMT Message-Id: <202409242119.48OLJWfJ002911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: bbd5885bfc15 - main - Merge remote-tracking branch 'freebsd/vendor/Linux/iwlwifi' 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbd5885bfc159556e1f3ceb0ff40de2d9242d00b Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bbd5885bfc159556e1f3ceb0ff40de2d9242d00b commit bbd5885bfc159556e1f3ceb0ff40de2d9242d00b Merge: d8f6658c9a37 c6bcce0f5b92 Author: Bjoern A. Zeeb AuthorDate: 2024-09-24 21:17:18 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-24 21:17:18 +0000 Merge remote-tracking branch 'freebsd/vendor/Linux/iwlwifi' Sponsored by: The FreeBSD Foundation From nobody Tue Sep 24 21:19:33 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 4XCt6G3515z5W5DY; Tue, 24 Sep 2024 21:19:34 +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 4XCt6G18Fxz43n3; Tue, 24 Sep 2024 21:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727212774; 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=OyDLn4oqryYJhtKay7QrMIcAnBF9t7NQF6XNsg3o/oI=; b=o81otboPEbF1qVN3YiVbwFkqx3ljROanZZWwmpf3OHPDE94WtikCmsxOWZX2gd0SUze/Ra mxRY/S3KYGTDYrB7HaPh+JCDViQIBDF5PetCfRo5XcUUREUl3J7wuJ7iz0pl93DMiuQuBt Sp90wzvbDdwhvVUL/68tx50UZJ59bq1sZvb1gGm/Xad2v2ckjOu+rzo8T/BbJWkFHw4bPt 0CCGRtJW4zY6E49jf3b8vqHXd2YpFkH4aFUkx1t/q64BKzj36CwTkLQfz+SJC1Nhlh6flb rLz3DVB7NqtG5RMzJjRxeivYOIpsDPRVqJg0FGv8N9hfpdkPIXznsEnDJogKRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727212774; a=rsa-sha256; cv=none; b=xKeXDl5xT99giUyFEwohw0gQ+dm/QwuSuGiRRRwxx25Ix3nZM13q8i4KR//7KLEyjHWcSj 7j9iZ7kkoZcpyLRsmiLVvTXqoC7O66srIrZeAjU4ZMsIoTWoeEWHjkz97pr2iajYq3ESKl 3nQb5GN78HyoTeefjggnsihNPldhYg5jTTUHtu8TvVe+ptB5Z8Bkh7DNWFjofYv+HVyo2v YqbP3ftg2min1bKnSC9EudDcewYaIBJXC5tW67usGexgkeQP3uEihEMdu1bOaxepdgaVgh 7yWZGOALReNC+nvMmVgWd0TEw78nuGAPD1Nvrp14uCQLkgEkXYa9BKP/3miZ0w== 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=1727212774; 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=OyDLn4oqryYJhtKay7QrMIcAnBF9t7NQF6XNsg3o/oI=; b=vRymJxPKc8J4kEMAvF4sT4doBb9amf8UbNSKu99jQDPBT6TzxRMi/rO/0Zhi9lotM0bzkD Yax/fxACGpcT44F7fvnSEqeOj5kaB0DTLfs94LRjzIYs4AGSu/H4FwlreK62KqQSzWGizp 6kFjlchF2XWoLZE/cxI5cDjlVWD7nkU2OWaZ0R7zTP+6UzlMOx9r4yxEwEAxkEkEZGrQ2l tTkaY3WiTJMyDpVtINZFm/v0mlKIXTCyzHCbNorJjI+dyfV00r1jzgWTi7+z0L6jFelkT0 4p4EwGwGqZqCRNEaf30KFRujMmGu3jMAhvg/kzK+RYMyvbaB74gE3fgjgD1fHw== 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 4XCt6G0NQVzlXv; Tue, 24 Sep 2024 21:19:34 +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 48OLJXlt002961; Tue, 24 Sep 2024 21:19:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OLJX4c002957; Tue, 24 Sep 2024 21:19:33 GMT (envelope-from git) Date: Tue, 24 Sep 2024 21:19:33 GMT Message-Id: <202409242119.48OLJX4c002957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: c9f9342a481d - main - Merge remote-tracking branch 'freebsd/vendor/Linux/mt76' 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c9f9342a481d48d44b2129b84e4f58cf47d076a0 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c9f9342a481d48d44b2129b84e4f58cf47d076a0 commit c9f9342a481d48d44b2129b84e4f58cf47d076a0 Merge: bbd5885bfc15 2911a07e5602 Author: Bjoern A. Zeeb AuthorDate: 2024-09-24 21:17:31 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-24 21:17:31 +0000 Merge remote-tracking branch 'freebsd/vendor/Linux/mt76' Sponsored by: The FreeBSD Foundation From nobody Tue Sep 24 21:19:35 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 4XCt6J0bQtz5YJFN; Tue, 24 Sep 2024 21:19:36 +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 4XCt6H4WKXz43qX; Tue, 24 Sep 2024 21:19:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727212775; 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=XEwSwtR22+K/kikBP9raOH9IDVjEsr+MroRdDcCLdJM=; b=uxn6CtEiEoQGNSFrayd2vPz6n6jZdSpxthOO+X+dZV2T/Lckuf3qmARCvCbSKCGoEaiWD0 z4dFClLTaa++4LTWUk9my4aRLw/0nTIimFiOfNaEyZhVsZkFOOLT870DRORZCj0oBc6omq p45XoczdVqhAmwJRcQupwAb3bfXE8TvA/Sddt886XAi1hGB4m4XTlwW9Z+M4rhaF7LWLQc tKZexKKax/MZVURLK7NW9KEOtdcB+pd1e28/cVI3cC5gsse7SFCsStnLjniSNF/8TwjUcg V/FGxxyoduhOBT+xNM+q/x9hdh/4WBcsE8KJGaxrOuGvBJWnxGVI7DS+CWSYKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727212775; a=rsa-sha256; cv=none; b=bIR1ZIq2KTop/gPjM++nzEh0qUiZnt7AKa+y58AX3DnZnT0Pvian7taacFLucC82xgx1qy T85ZaRUtZr3Ii4aYjKdGjth3h9lNIg3VSqKQxrZMFRKZ9ZgXFEl2x0s1XF1RKEyJ1Wa6fM HLHYCpQhncPQVx5YJsw9tSyAZEu2adLK31ivAN7JzbuATRU2qu8iW3P6YSq6rgGqadxAMQ Q3JgQtkmKPOEuzkihFibHys57WxV0okELI1UCESz1YdK28EC9LJldlVyqdEXOkrO6iToiC jO8MEtzUy5+tft42PucqyDFsvi++PibTumETxsra16AJX2kRdxApxBcPypH+NQ== 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=1727212775; 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=XEwSwtR22+K/kikBP9raOH9IDVjEsr+MroRdDcCLdJM=; b=VmBu01CPttyr0RfeXXyrSyKaOhPG7oea9aquaGvzmKjF0zb5dXMYHlelYJDdySmiCeQK0q 8/MIQEGv/V9GhFvz1pU43rrjx4ji44d04ScngyhVER2QNxgbBfeeS3c7s7nmwWgIqH3WI8 G5X9BHcDW84eoc9ZAw5cztddtdwkxi9UW1n2vvO702lODq0QRGwZIDyT30Q3eWlGy+qnrN toGoER+TSsE2i+hrrUB7Io4tBhM5PzviAJ7p2P9p+ApaDdT6md0kEv7Rt7Oq5U7VtZK8cw O6+eCylSyTuA1B5z0v856wkh/kSP6TiHpK5Bc+ENgMxRXxdA+JFkA8a/yPZR6A== 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 4XCt6H46WTzlJs; Tue, 24 Sep 2024 21:19:35 +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 48OLJZcW003004; Tue, 24 Sep 2024 21:19:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OLJZr9003001; Tue, 24 Sep 2024 21:19:35 GMT (envelope-from git) Date: Tue, 24 Sep 2024 21:19:35 GMT Message-Id: <202409242119.48OLJZr9003001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 3c0de76f06ef - main - Merge remote-tracking branch 'freebsd/vendor/Linux/rtw88' 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3c0de76f06efb73d0eff6edcc11d32fd84ba7190 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3c0de76f06efb73d0eff6edcc11d32fd84ba7190 commit 3c0de76f06efb73d0eff6edcc11d32fd84ba7190 Merge: c9f9342a481d 1f3bff0d3082 Author: Bjoern A. Zeeb AuthorDate: 2024-09-24 21:17:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-24 21:17:45 +0000 Merge remote-tracking branch 'freebsd/vendor/Linux/rtw88' Sponsored by: The FreeBSD Foundation From nobody Tue Sep 24 21:19:36 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 4XCt6K6Gy3z5YJFT; Tue, 24 Sep 2024 21:19:37 +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 4XCt6K2PSTz43l8; Tue, 24 Sep 2024 21:19:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727212777; 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=75rb24DJZu87QId24zoD1mbRP9BMECRM5shzjirm35o=; b=bRAO672KJIzbpm33PUFndLSb31jbLHxupHNUkDyG/6oSJ4aw+WOm6N/r7ssFK9hFIOWyKS zOjg31FWbi1ZKY7CWLjEQaRDv0k+vJTgEIO/D7syiXeg/PbfaBdA57zn11NAYPoTUG8Fio 7bPmU9qjdrpV7xEUhZhHFoMN4LCT3ArCnKWExy/LZeQzpM1T8vfLPpubzFFXG+H/C8mQ4V ZJkMsiCCFAN8OfE+Bf2rotBZoPw9XtgnQxsHw9aYnGqmHMpgjyPD/XZ2+vPrZcpzoPst37 1UpS1ViH3JMGkfMpE16yfEJImtR+mi8Ean+9ockkvUEQ0DHLUN9ZIJxhZwg0Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727212777; a=rsa-sha256; cv=none; b=cA00NniHl0A1V2rDesIDnuLdKkNjcmylZeCzAreEjhSrPatrkEXm8EpkS58BIRQftsiEkz rAfmCn0KNMJ5o/UtadQ4AXztnCFQe+dnU4jxfz0gW/0EU2HT5x2gHNuRwVnMvutoLhRsR0 lvSmz289o0OWMZaeyDDhnL16u12xYXmbR23KT8BJ+M8yJ3CJE8bzs16Me6jR7CJkagINk/ 0zvAPPRrJheFMhMIvCorprA67Rj3OpjaI0lqMm3RKQ39C/cFSozGEWcBN0Zeq5gNKbvFSj sJrXOlSQD4BjkBd+MYj6Ef1McSvGAc8sM+1UIp7XjVpUmW+JL53WXX/BiKkcVQ== 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=1727212777; 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=75rb24DJZu87QId24zoD1mbRP9BMECRM5shzjirm35o=; b=n0Oanr+wZxPVrDOGOtAHnhr7DNpKvpnoy2GCa69X1EkiQHZN0ZtHu7aJ/2MmQvBDZjjw5L jwnQEYjW1B44a9m4dywSTBWAlJncORIjzCbHJvnC6ssb/ZLDM4JLmRfKEhXnnwQwEcZa/P iCdxeQATytMsas/7zGTOrARltB4Tk6jThi7syM4ivk2eznDnjHOY4iNQl7oheTOMHUYZAb J0OHzlT1yb4WibsOReUWtf/taB/fPTBFR4xipFU7vdO+V4qjD7J43xbmc10/1XPcW7x49D Hp8V0lFC/jRrW1ya8S2syyRMtROWack2G0z8dDDJMpecEzboQkEOygFGhtUBxw== 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 4XCt6K0n4yzlJt; Tue, 24 Sep 2024 21:19:37 +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 48OLJbEL003054; Tue, 24 Sep 2024 21:19:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OLJa0A003051; Tue, 24 Sep 2024 21:19:36 GMT (envelope-from git) Date: Tue, 24 Sep 2024 21:19:36 GMT Message-Id: <202409242119.48OLJa0A003051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e3b12ef6f74e - main - Merge remote-tracking branch 'freebsd/vendor/Linux/rtw89' 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3b12ef6f74e72e8250bcf55e5bcdfc029857913 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e3b12ef6f74e72e8250bcf55e5bcdfc029857913 commit e3b12ef6f74e72e8250bcf55e5bcdfc029857913 Merge: 3c0de76f06ef 6224ff21f3ff Author: Bjoern A. Zeeb AuthorDate: 2024-09-24 21:17:56 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-24 21:17:56 +0000 Merge remote-tracking branch 'freebsd/vendor/Linux/rtw89' Sponsored by: The FreeBSD Foundation From nobody Tue Sep 24 21:26:07 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 4XCtFq6JSvz5W5v6 for ; Tue, 24 Sep 2024 21:26:07 +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 4XCtFq5pQjz46Y9; Tue, 24 Sep 2024 21:26:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727213167; 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=j5hHh8bgywsn80Rd4ac0f5Jux+/hm5xhLH6v1jeem4s=; b=qrX1jSTnjdxxOqsPbYgtHXdQxIuClmv7V8qY3oF+LDw5UBYurCoTDRKUmMpEX+qpxwISB8 2n5Qb0mo6y8ci/SoR7J32f+8vnsMKP3tBOoDKawfD8uz7gqTI/YYJCvVOIecw7LpfC1OWH JMlrNLYQR1STeu4CiDuru3hl+Qb9zeNcrvDP7zYW/kJnobDajRkicST55U1G8G2/UfENvn aJYg4dbPNxqkOw2D6HdlCw1vu4YZZZ/98/Zh0LuDI2tfmicJgFlY0BENsr4SKEWfw2/24/ xVNuy/L0A5rBMQG1OQSpyGspLXxdrqsNix5aJMcogfur8yfsiO1VLo4QrkqV7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727213167; a=rsa-sha256; cv=none; b=UlPL3/HXZZKLb3pby/I/00OPYaxIez16al8JKzcCm/Afo9BQlYf8J2rKn5EPH50Bvdc8Nv od7y3FPiXdZ5ZBggdGQavT8i3faqyT5u/bIKL7XYtMPd6fjvD5z7wby80l+nHf5zwM1V8H tNcn4h+BlJLjzKRiwJ3cVaufILj/d4jOvui9YG0Q3W7Nd9BI2OWGEpiQfp91kZ/2jhxJQS XvZVf7LX1kw/oEgZ+yp3TzazcCQdTxG7w6pBbs5isNg7ZKbOGOR7sPKqstGBjXCzFXnwj5 kUOi53CQPilzrTAWdoraUzwP0C3y6QFunGyrZUBa+VWjvYnquiFQdbhGCpY7+w== 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=1727213167; 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=j5hHh8bgywsn80Rd4ac0f5Jux+/hm5xhLH6v1jeem4s=; b=gqQ7aUR5KQox2d4AQzouC8q60UM7muhV/eexs/fN8nq7I1K+JQeNkprB9akTlJortJrfBH l5j8QNkIz0K+We57uzPlvjiXTbqwnduTjA169bWIyNcuvn3rIZTNtFofMqNuaUxlADVzeX QSZtti6tgkRhqX7qKeZnE9q5aQUYlYubDuSfC3hO8iYj7DaETIEISky+EpcRAxe7HIyV6s vuya0os64xELD2h3Y3F23gp4hO2pfi6dRrtmdUV2eYVH+h4BNGOt4ccw5lz111NCdAsSRv A2GZz0uPbM5VY7yip7YFFii9nZJ1FSS7iFJJJzYJ/rdHBcrdxCO0uGvL5pU+1w== 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 4XCtFq5J5lzlVt; Tue, 24 Sep 2024 21:26:07 +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 48OLQ7Nf020218; Tue, 24 Sep 2024 21:26:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OLQ7R8020217; Tue, 24 Sep 2024 21:26:07 GMT (envelope-from git) Date: Tue, 24 Sep 2024 21:26:07 GMT Message-Id: <202409242126.48OLQ7R8020217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: 812fe297f455 - Create tag vendor/bc/7.0.3 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: se X-Git-Repository: src X-Git-Refname: refs/tags/vendor/bc/7.0.3 X-Git-Reftype: annotated tag X-Git-Commit: 812fe297f4551f38c8664d535337526aa2361ec2 Auto-Submitted: auto-generated The annotated tag vendor/bc/7.0.3 has been created by se: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/bc/7.0.3 tag vendor/bc/7.0.3 Tagger: Stefan Eßer TaggerDate: 2024-09-24 21:25:17 +0000 Tag version 7.0.3 commit 5a7f1dde93a4c681a5a4246ddabc562a7f7ce14d Author: Stefan Eßer AuthorDate: 2024-09-24 21:22:37 +0000 Commit: Stefan Eßer CommitDate: 2024-09-24 21:22:37 +0000 vendor/bc: upgrade to version 7.0.3 This version fixes build warnings on other systems than FreeBSD. There are no functional changes relative to the previous version. From nobody Tue Sep 24 21:26:07 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 4XCtFq6MHcz5W5Y8 for ; Tue, 24 Sep 2024 21:26:07 +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 4XCtFq5jkJz46Yx; Tue, 24 Sep 2024 21:26:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727213167; 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=bdmChWA00Gq4/mlZr7APGbhLFj+fxMWXf/SNWKNTpJU=; b=YYQwLkql0HN9R/5fqOwjMRp15dEW+BvDSX5bAuoXzD6Y81aht7c2mY49nHTsyZMhzatczz wWRk2FueuvLSESqsslFI3UR3LsdUER5FJQMkGT9SHvDl/vPFOJDAjgiQMYNTEJMEQBOSXp Bma37lZYYv+PdvOsyGKDRB5fxxK3owwjHrf/PJ0LqHxasP3FYW3UI8bmRUhNisvtT/TUZW r4o6V36e81eeXwRJKwKfY1ziOGVMKtjTU3AfeDr8JAp359YnRqRG+1icdkPvvSJrbS9OBk qO8xmb+2LXkGXxGuGK6tBPJW6nTacWQRf5KHJmyK9RAs8kNcvJ9jf49ABi7yrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727213167; a=rsa-sha256; cv=none; b=oAIT3/BLEDyvifA0af+n7MVUBpqcUrEDKTF8z1VQmszgY3QwoEPeqwU7RWufjt06j6HrHX 2uGSpc5A6C6TlzSBU3lOy847U8qcvfMAZC2bV+5NM0yiEWulQj3ZXzQKSY1WFh5uRCIXQJ FdT+l7PRlCdGa5fb+F8pR9hUdd9wVSnGKXfDp3guoGc8CqGzT9puy6oA5HQS7CJoDiFuuH VU5GAEwDYRtJH5hJYpP+sxgzG4Yapb2EEFP1/ROpvtbIP1J0PC01KpEqJkHUwl9Bk5IGV3 qspAf0SwzTXS9/i5V99rinIwS20JZJMOMvEQ5nx7XxAgcB66Y5CBujx22dkkeA== 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=1727213167; 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=bdmChWA00Gq4/mlZr7APGbhLFj+fxMWXf/SNWKNTpJU=; b=cwya5y53UHKJCGx0IqlN8VHkBXfbrBtlRFihWJ2+9XtAOGpj+JAxEU62nnEqLyyx2+lZRq uh7TsSpR8GVReqPGroj2FiOgmecvXg4uRz1NtedsCvsYiCoYhhgSqkn9R6PzAndJZkantF mZE6rGoM5L6kzpcqh0kgo26ONRC3HoBiYsXXfnf/ilD4nmyhJ/sX/iClIxTEhYe+q4oSdo EkLbLmcDWmnOEy3J0e2RUn0lTXi6D3cwf/YuaJnrkkpcPgJNJx2SlXnNIJBp28WpdIRbAA c3K6j2Lb5/htQphYF/ClsxVMQ2Mc+Fbn3ArTF0in/fIfNKMU46Xm7LNAY4dvbw== 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 4XCtFq4v9czlVs; Tue, 24 Sep 2024 21:26:07 +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 48OLQ752020187; Tue, 24 Sep 2024 21:26:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OLQ7hI020186; Tue, 24 Sep 2024 21:26:07 GMT (envelope-from git) Date: Tue, 24 Sep 2024 21:26:07 GMT Message-Id: <202409242126.48OLQ7hI020186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Stefan =?utf-8?Q?E=C3=9Fer?= Subject: git: c2c85f88902d..5a7f1dde93a4 - vendor/bc - vendor branch updated 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: se X-Git-Repository: src X-Git-Refname: refs/heads/vendor/bc X-Git-Reftype: branch X-Git-Commit: 5a7f1dde93a4c681a5a4246ddabc562a7f7ce14d X-Git-Oldrev: c2c85f88902d18d2e9702381f1628112e15a5c3c X-Git-Newrev: 5a7f1dde93a4c681a5a4246ddabc562a7f7ce14d Auto-Submitted: auto-generated The branch vendor/bc has been updated by se: URL: https://cgit.FreeBSD.org/src/log/?id=c2c85f88902d..5a7f1dde93a4 5a7f1dde93a4 vendor/bc: upgrade to version 7.0.3 From nobody Tue Sep 24 21:33:02 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 4XCtQ412QYz5W6LT for ; Tue, 24 Sep 2024 21:33:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XCtQ366fdz474W for ; Tue, 24 Sep 2024 21:33:15 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-42cde6b5094so55911335e9.3 for ; Tue, 24 Sep 2024 14:33:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727213594; x=1727818394; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k/Agsjr7pDggAgOwa606BIzuh7y+2EFBqHcqpOhmxuo=; b=TpQg8pZH3hHzM2I37ljxGG77Per7awvrfpf2cQFCtiXXSlaaKcFuD9v44oIZ+pYpFD Th1BIur5uT8SXiwV+QUnVQmX4d4d+RWvyR+4uFT/tgLrTSFjQlg0BXKbeOs3f3fvZDTF HVkmugz+PAVGwsi7bicZEoWPQNI7OxxJPHoXuU1ZuNtLyOTWYM2+QibezypMBZDV1OUO ulkvKa5O7OZ5O+ff7aIJOUDMmN8odWX8qGyVXxDfSDQ4OXDRXJuYOLDaggHDrqIHp//f WXwllJOPdud4QfR0txoerD8ME2YFoojx8UvuNJ9BZU58Ynq8axEn+7caLz86UxTQ1Zpb T3dA== X-Forwarded-Encrypted: i=1; AJvYcCV39gX4heDQ/Bn+42PFEoY5F3oRjGt7iABG+y7d/KO3hi+PxhwDF3LCKP7Sn0EM/vtL/zoGzJc4PEIlKVj86cCNJ01B@freebsd.org X-Gm-Message-State: AOJu0Yz5ULlC7PzTAVlUr4M5DMYl4T9RacCUNOseNkB6rwLYTijHtij/ fkaSJW3POV5a2EFCZEK3gdu6KRoDEa4fi8z79UTHM1a8EOE1DfQu56Qa/gCi56U= X-Google-Smtp-Source: AGHT+IE0RqgOAfAMvT39kLk0eVMGLEtYGUzgDxhisDg+5T+pAUrrxsVekBcuA8kKgfSyE9H/rw4B+A== X-Received: by 2002:a5d:6290:0:b0:375:b52:7d75 with SMTP id ffacd0b85a97d-37cc24c9e66mr455769f8f.53.1727213593956; Tue, 24 Sep 2024 14:33:13 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c5cf48c04esm1186490a12.14.2024.09.24.14.33.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Sep 2024 14:33:13 -0700 (PDT) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3818.100.11.1.3\)) Subject: Re: git: 413c5e9082a7 - main - Merge remote-tracking branch 'freebsd/vendor/Linux/ath-common' From: Jessica Clarke In-Reply-To: <202409242119.48OLJOws002720@gitrepo.freebsd.org> Date: Tue, 24 Sep 2024 22:33:02 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202409242119.48OLJOws002720@gitrepo.freebsd.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.3818.100.11.1.3) X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4XCtQ366fdz474W X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On 24 Sep 2024, at 22:19, Bjoern A. Zeeb wrote: >=20 > The branch main has been updated by bz: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D413c5e9082a7d1d25fd3a95f0e77a949= 621f1433 >=20 > commit 413c5e9082a7d1d25fd3a95f0e77a949621f1433 > Merge: 604919c47fa4 9c6b6723ca84 > Author: Bjoern A. Zeeb > AuthorDate: 2024-09-24 21:06:19 +0000 > Commit: Bjoern A. Zeeb > CommitDate: 2024-09-24 21:06:19 +0000 >=20 > Merge remote-tracking branch 'freebsd/vendor/Linux/ath-common' >=20 > Sponsored by: The FreeBSD Foundation Hi Bjoern, This slew of merge commits has zero context for what they=E2=80=99re = actually importing beyond the branch name, which goes against the documentation for how to do vendor imports: > Include details about the changes being merged in the merge commit = message. -- = https://docs.freebsd.org/en/articles/committers-guide/#_updating_the_freeb= sd_source_tree This is unhelpful for anyone wanting to understand what you=E2=80=99re = doing. Jess From nobody Tue Sep 24 21:40:44 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 4XCtZm3R3xz5W65l; Tue, 24 Sep 2024 21:40:48 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XCtZm2yYLz47Qw; Tue, 24 Sep 2024 21:40:48 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727214048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cXrZXjmeFOVR+LTlYfvnsz/7yK3gZAbg7N0S6Vy6wL4=; b=m8ZpjfcWMZmPM7Z0rqw/fezasiXRlwYf80Zjo6inP+EDph+DW3Wr3LXHC/vIBHmA5KV3qd zTwZN/ryTyCkhLDhk77AAvDFNK5rYWtJJ+Es4gJH6xv2d7N4Oz4c0fuD2G1evnFNfyxeXX KSn7KdHQ+Vtzgy8HLpd/BlxvnV6Y92Z9RaiJ3wX677Tnr0qyjbIeXdBJd7/bPsK8gf9Eks 93luAZLgieN8rpDHooPwePIxs4m94XvcWBiJlX1smXkWbPA4vCgpGS7YwcKRdKThjFSuwe N7/251wMgeaMBKPZi+0julDIsZkAUGZxvFBgLZpan3SJav1aAg6FDt5LWaUO4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727214048; a=rsa-sha256; cv=none; b=s/HPy3ViCXNdjCV3QWJ4dlpWG/NRTgRmSAkYzcZiLgiulELyAS7r5T67N/VVEwKuVVOa0b Z+hFocQ1AaJK7W6oHcU6L6lr2jywmSBIEScxw6ezzduQVTd0AKCx0E63xJGpyANeLZxwPf Lq6S5tqoT5s5ZNvR9Kp9BqX5BVq5VlQDQ2n2zHvKsDoax5+5pP19m90EltNppBjPgViCP1 YlFygiUrqBpJwMeEslnXrAE+0jMQMEYDe26eVUibUZ9JkZcfUABlaLA+Ie2WxmPeufBnYU E8n3GoMZ8xA+qx6ccxcFqZ2g9zcGrkksJyS+dcEQBBQOnSfg8tfL/aTDClWgAg== 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=1727214048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cXrZXjmeFOVR+LTlYfvnsz/7yK3gZAbg7N0S6Vy6wL4=; b=gQrNQDKEcPp7KT4dY4ZkoTxNuXx3O7b0sk1u3bTq1bvYmJEAFX3jTRF/2rywyUMaY153HW tKx3J3l+g9Q0SvKZEZbszLQgNPySvpgt+Qm/WJ+mr8Ekh9Vu7E/SWBqoJ0pO1MldmLDWM/ VKMtDFntSShNtqgu5Auu625Kd4FlBQZRIN0veMLAXmr5N0w9x+NWXmvqlHKzr6vXdpIwOo k4qOuHsVE6sm4U+Kdfo7HCcLaSvYnDFlsklHS1bnjbxcG0KorR5I8G4PkXdZ3ZrzIgsCj4 vvSUYOfqoaOsDXv7lJDcjCt5MdSZLDmpZmPEwV9s7ugElQ58S0UuEDgvvkFdfw== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XCtZl601LzSsx; Tue, 24 Sep 2024 21:40:47 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 24 Sep 2024 14:40:44 -0700 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e3b12ef6f74e - main - Merge remote-tracking branch 'freebsd/vendor/Linux/rtw89' Message-ID: References: <202409242119.48OLJa0A003051@gitrepo.freebsd.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <202409242119.48OLJa0A003051@gitrepo.freebsd.org> On Tue, Sep 24, 2024 at 09:19:36PM +0000, Bjoern A. Zeeb wrote: B> The branch main has been updated by bz: B> B> URL: https://cgit.FreeBSD.org/src/commit/?id=e3b12ef6f74e72e8250bcf55e5bcdfc029857913 B> B> commit e3b12ef6f74e72e8250bcf55e5bcdfc029857913 B> Merge: 3c0de76f06ef 6224ff21f3ff B> Author: Bjoern A. Zeeb B> AuthorDate: 2024-09-24 21:17:56 +0000 B> Commit: Bjoern A. Zeeb B> CommitDate: 2024-09-24 21:17:56 +0000 B> B> Merge remote-tracking branch 'freebsd/vendor/Linux/rtw89' B> B> Sponsored by: The FreeBSD Foundation What happened? These merges don't bring anything. -- Gleb Smirnoff From nobody Tue Sep 24 21:41:42 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 4XCtc43t9Xz5W6fX for ; Tue, 24 Sep 2024 21:41:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XCtc35dQlz48Rl for ; Tue, 24 Sep 2024 21:41:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-7db908c9c83so3396981a12.2 for ; Tue, 24 Sep 2024 14:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1727214114; x=1727818914; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ED/D7NjL74msCvAyM32EHYNJaKozLRX3YoyPCNRkQpg=; b=leDCmi7Kwa9cA10ZxQP+DRSGox4z+GvKoeuCqGrscUbG6CLHB5pae95W6fzJDQtuGU 9QlSSftXqIDcQdRTkezcnJ3vD9YgZgDkMaXHimSb6f3kJAYbKq7a0iaHGkyI3ACtoqZ9 KyRMQH3YvF1gUdGvwBvDOQIKuArLk5ArOidUf3CcJW1bLyY6TwTwprIBoNd2tinN3INC X3YB+1arURnI9mlxuzrQMQ4V1i2wYnzgSmE/OsK4btqevgW8xvAyyFuc8sFqaVUA0uRs qbOqQ06eS/Ovb/zI0arQAvAPDHlLOilEXGeGYu3lFi+W74/pibX0wKdgYWik6DTUlJoL R1/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727214114; x=1727818914; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ED/D7NjL74msCvAyM32EHYNJaKozLRX3YoyPCNRkQpg=; b=kRD4YHciGDw48VaDO1t1bnlUaks0MLHJzhngcR9OdwotFkEW4TTpNjhWB9jmdBzq7v XFM4aKNUHltHMYmbupxi0XDoMp3zS13+tc8HzeFzXaSefYqDQ5Kv5k/A9mBrQIF1wzHH ft4Y5lQMH1Vm3J9B1Ds3HedHTLwPlM1uCfm6KrJ0p0EoU8CwZm1LdAxsY3I5d+8SrCxC xDPgSI1acCHNoJrvxReQbGbjzxp2CK3DXDtGpQ4MqXMuP/cRmZaicCa9QO/CfXVjng1Q pM9HROA1x3atYLhgeChLfn+IBYliSLFnkDbTQU2ERmOQFRmI9h2qdnBnolt3ylsOHcTt VgJQ== X-Forwarded-Encrypted: i=1; AJvYcCVsQnEVWG1r4SCsZsjq0gdTufqec24sXyaREM6wZ/Pe/wdYtA/Mal5gEyGZcs/JWEJvHjeT3AiIfhceVUS5To2UWmY7@freebsd.org X-Gm-Message-State: AOJu0Yy9Fs+iECuqvyy2nLpRWoi6to8c42r9yuIxcIafyDtp/tfoiBRY WkUV9sueK/gnTNex+J5uA5u4+P8PI04nwjWffmlzylAynILElli247ouzstJRozBVPI8j1bFDtp Moue/ox+eQOeN9LPWrXHb5ZVwGtam2E7JeWEI+w== X-Google-Smtp-Source: AGHT+IGfubi79PHvyW9hSFK81C1qQvUiD9m/lZLbaMH1QRmkcpI0yFLKcYpYeiIDOKD/7gKsf3IS260D2MnDa/O30to= X-Received: by 2002:a17:90b:5205:b0:2c9:61ad:dcd9 with SMTP id 98e67ed59e1d1-2e06afb8f0dmr548978a91.27.1727214114509; Tue, 24 Sep 2024 14:41:54 -0700 (PDT) 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 References: <202409242119.48OLJa0A003051@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 24 Sep 2024 15:41:42 -0600 Message-ID: Subject: Re: git: e3b12ef6f74e - main - Merge remote-tracking branch 'freebsd/vendor/Linux/rtw89' To: Gleb Smirnoff Cc: "Bjoern A. Zeeb" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000bf37e10622e45f52" X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XCtc35dQlz48Rl X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated --000000000000bf37e10622e45f52 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 24, 2024 at 3:40=E2=80=AFPM Gleb Smirnoff = wrote: > On Tue, Sep 24, 2024 at 09:19:36PM +0000, Bjoern A. Zeeb wrote: > B> The branch main has been updated by bz: > B> > B> URL: > https://cgit.FreeBSD.org/src/commit/?id=3De3b12ef6f74e72e8250bcf55e5bcdfc= 029857913 > B> > B> commit e3b12ef6f74e72e8250bcf55e5bcdfc029857913 > B> Merge: 3c0de76f06ef 6224ff21f3ff > B> Author: Bjoern A. Zeeb > B> AuthorDate: 2024-09-24 21:17:56 +0000 > B> Commit: Bjoern A. Zeeb > B> CommitDate: 2024-09-24 21:17:56 +0000 > B> > B> Merge remote-tracking branch 'freebsd/vendor/Linux/rtw89' > B> > B> Sponsored by: The FreeBSD Foundation > > What happened? These merges don't bring anything. > This is bootstrapping the vendor branches for software that previously was added to the tree w/o a vendor branch. Warner --000000000000bf37e10622e45f52 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Sep 24, 2024 at 3:40=E2=80=AF= PM Gleb Smirnoff <glebius@freebsd= .org> wrote:
On Tue, Sep 24, 2024 at 09:19:36PM +0000, Bjoern A. Zeeb wrote:
B> The branch main has been updated by bz:
B>
B> URL: https:/= /cgit.FreeBSD.org/src/commit/?id=3De3b12ef6f74e72e8250bcf55e5bcdfc029857913=
B>
B> commit e3b12ef6f74e72e8250bcf55e5bcdfc029857913
B> Merge: 3c0de76f06ef 6224ff21f3ff
B> Author:=C2=A0 =C2=A0 =C2=A0Bjoern A. Zeeb <bz@FreeBSD.org>
B> AuthorDate: 2024-09-24 21:17:56 +0000
B> Commit:=C2=A0 =C2=A0 =C2=A0Bjoern A. Zeeb <bz@FreeBSD.org>
B> CommitDate: 2024-09-24 21:17:56 +0000
B>
B>=C2=A0 =C2=A0 =C2=A0Merge remote-tracking branch 'freebsd/vendor/L= inux/rtw89'
B>=C2=A0 =C2=A0 =C2=A0
B>=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0The FreeBSD Foundation
What happened? These merges don't bring anything.
=
This is bootstrapping the vendor branches for software that = previously was added
to the tree w/o a vendor branch.
<= br>
Warner
--000000000000bf37e10622e45f52-- From nobody Tue Sep 24 21:43:45 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 4XCtfB1jfYz5W70H; Tue, 24 Sep 2024 21:43:46 +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 4XCtfB1402z49L5; Tue, 24 Sep 2024 21:43:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727214226; 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=geI6gIIkIoCkdRbHakT/9KgvZC0D4qhdFgA0cOn054w=; b=Ce+cDX5vAxDKjck7hpGDoN58QGpluEMWCNFbMoS8usvALoDrtsy8+subHKqa24IOmEEQLA POOUbrDZI7hJ7oVFbnB7WHzwMUnFQIdJPOwiUMtW80gpWzowEaULV/T5qQvrC4tSsMZB8j 7rvQ0FPxRAKZmwZXxecwvn99AJkuNxSvLRAo6aA1+ooDc+FyFGI2nMH+SSTtnjJ43CVqu2 75V+Nr8Ikp2PLJbjBrXUkDrGIf2RXq0j3jOSfQQ7Q4H6Xhdaa5NVt58u9ZKGiP9XSdY3kJ 7k1oIvIGFEm+j50G/W6itxyJ1WZzVKYnKo3BA7VC+6J864UkGPE29eWvy8TdCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727214226; a=rsa-sha256; cv=none; b=VFDz+mUVCY+xVqwe8hxOzunS5CE19AouJZ2Gknp1cU71htHodr6kRYoZ4pOHZbpVWDwne7 fX2fB4jPOX+n+9ilZCJ95gVbDU8Y7CQvKgC2/L8JbI+9ED+U2aFEdHwSNT5Mr04WpsXM5h WOs+Kq+QcxZqqDfS1Pzac1eOkmg9/ABbqi91FzqbOjmV+sZaZiV2fAlR0ltn+6bT5z3gQ9 Y6k143YhB/rmfosnKgwR76XrGs/gBNg2K5lnARHt7LOnYGXqz2iNoW3JQ/p8OR6Np0iMmx dLa/DzQxbsxN3e6MFqnopWzqQzxOxc2Q3Cj8KtP4tCcqSj5kxQH1RIAlhnwlkA== 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=1727214226; 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=geI6gIIkIoCkdRbHakT/9KgvZC0D4qhdFgA0cOn054w=; b=FKRSgZx4+Ukl4pTby+jN2fKlNgTbbZZN/44XSH5xqNwDT3sb7pRcwcBM8McUWBj6RimoO7 iv/wTWM1zYauRFL02qVT7MZQMoH590C3aTyt41Yi2cKSrF6AwK6qWrIsVxQ3k2RcsnUeSL mr9K9kFqe2q2PrZ3xp6vcTXX0DEpKQv8Smfe9f0r5ZypWQwN06uacRrNQFzMSkeeF4mMEM o0tuSsloxUB2G6Ks8ojKfgvePmDXBmZRrYge5iQS2OvaCQKgd53gUFfhR4DX/aj6zf6UA2 NgnQISYXS5saipBJKIV37yXIwcbn3Mr0q3+1tmdpg7GnYbEJ4N3D05ZBolEktA== 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 4XCtfB0gNGzm1m; Tue, 24 Sep 2024 21:43:46 +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 48OLhjSh053748; Tue, 24 Sep 2024 21:43:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OLhj4f053745; Tue, 24 Sep 2024 21:43:45 GMT (envelope-from git) Date: Tue, 24 Sep 2024 21:43:45 GMT Message-Id: <202409242143.48OLhj4f053745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: a00c3a94bf64 - main - tcp: remove remnants of 20+ year old disabled code from d912c694ee00 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a00c3a94bf6436f1c412cd8fe66ef224621dab11 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a00c3a94bf6436f1c412cd8fe66ef224621dab11 commit a00c3a94bf6436f1c412cd8fe66ef224621dab11 Author: Gleb Smirnoff AuthorDate: 2024-09-24 21:36:10 +0000 Commit: Gleb Smirnoff CommitDate: 2024-09-24 21:36:10 +0000 tcp: remove remnants of 20+ year old disabled code from d912c694ee00 Fixes: 90ad2dc28747a3a5036d68ccc87d2352459f5cb1 --- sys/netinet/tcp.h | 2 -- sys/netinet/tcp_output.c | 3 --- 2 files changed, 5 deletions(-) diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index f789898e5785..794bfc62eca5 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -166,8 +166,6 @@ __tcp_set_flags(struct tcphdr *th, uint16_t flags) #define TCP_MAX_WINSHIFT 14 /* maximum window shift */ -#define TCP_MAXBURST 4 /* maximum segments in a burst */ - #define TCP_MAXHLEN (0xf<<2) /* max length of header in bytes */ #define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr)) /* max space left for options */ diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 080dabf3232f..fe1f15c26338 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -211,9 +211,6 @@ tcp_default_output(struct tcpcb *tp) struct tcp_log_buffer *lgb; unsigned int wanted_cookie = 0; unsigned int dont_sendalot = 0; -#if 0 - int maxburst = TCP_MAXBURST; -#endif #ifdef INET6 struct ip6_hdr *ip6 = NULL; const bool isipv6 = (inp->inp_vflag & INP_IPV6) != 0; From nobody Tue Sep 24 21:48:05 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 4XCtlR0BdRz5W716 for ; Tue, 24 Sep 2024 21:48:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XCtlQ2nvJz49pJ for ; Tue, 24 Sep 2024 21:48:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-7db12af2f31so4979549a12.1 for ; Tue, 24 Sep 2024 14:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1727214497; x=1727819297; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=W4XE3t3y8IBskp5t2KNEoJWC1nC9Hvd30JbhBuV7nfg=; b=FW48GBUYVxoZchT+34NPWrAsCTKAMUYyKzdFfMiYAwQ7wZ6wZAFU8Gv906JLRJIKTX HTqJxfwIAr4O7Gwhh4GJQ2EGv20AHTR+ky4g9mbYTn2A09Xz22zEjIJFLim+HfCR8UOr TRrMMNX8J7mGnikWV9RrBEGVBO/a3LLhQ9PhK3GzlktXNEOR/gH1KuFHJE7lkjs/Auho 2OhbrWYm6cvg4baqu07p+oLey176q1B0f4Ew6anwEdCxgHsqExTJMwnZ2IH6RGWnoUt/ vjpdQoVySL3tJD3AA5XdMT/3TkaIZ+eq9YCPRKjNyzkjE8eYIBpBc8FAviy+avErx9hC 5lAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727214497; x=1727819297; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=W4XE3t3y8IBskp5t2KNEoJWC1nC9Hvd30JbhBuV7nfg=; b=r+rh0Ohtn5UKXXx0I3eR2hwSGea0DIxVxCYllZ4mVqw3qZ2TwhOrwoA16eI7Vx1ox6 MXv1/hc4t36J5xVcRaaXT8+vMA2m9uhHe1eytKxWt6t7QD/AuCriA1yXC+AKHbGu1zzN ly54TGlL2FpLLqEJ1bTmolkJi7hzhPtiyM1AQbAu8vdQfvqDlIYg8halkDxe+aTeHfJC RkWcrgCIzNz/4xmgDf+EkAgnuR+3O0nkZXd+sqvM/rPB98m9hOPgCWKwI5i6JLP27oQM eNhuP9VILGEZ8hvMBXa4VhtPmvpKQmqwagaE16RO2SgCILs22wDh4UH0ZpZOAlhLOzCs tC/Q== X-Forwarded-Encrypted: i=1; AJvYcCUFaNfn2j2/ba5LjgVeMM+ADOPbwOdeuovFn9izuWfd3bnm+SShgekqGmKDATylUjBbuaaJuWnWq3m3VD71jnWbki6C@freebsd.org X-Gm-Message-State: AOJu0Yw1NDwuFaOBQYOXAiZzU22iXVStemPi1T5UjozDuDjg15H6Ay89 IT6kE0pPPMhsQ2KmsncFdXpWZlF0fYJFVmywpfkv+G3e53W7011gfBaN8kpz663UkaCdUIXXLUb 8gt04EPlgcjvYWdPVdQkGyyxRL1VxuIjvkvI8TQ== X-Google-Smtp-Source: AGHT+IHnfQDRPQYDseDuSKxLQUqWSwhYHNhmK/lFAaUrzVVABxoPqbp4l//HmhR/Ca6y6aUW2uOiCP/Uf2ikHP5M92M= X-Received: by 2002:a17:90a:9382:b0:2d8:8d34:5b8 with SMTP id 98e67ed59e1d1-2e06ae5e28amr737110a91.10.1727214496821; Tue, 24 Sep 2024 14:48:16 -0700 (PDT) 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 References: <202409242119.48OLJOws002720@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Tue, 24 Sep 2024 15:48:05 -0600 Message-ID: Subject: Re: git: 413c5e9082a7 - main - Merge remote-tracking branch 'freebsd/vendor/Linux/ath-common' To: Jessica Clarke Cc: "Bjoern A. Zeeb" , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000088d00a0622e4765b" X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4XCtlQ2nvJz49pJ X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated --00000000000088d00a0622e4765b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 24, 2024 at 3:33=E2=80=AFPM Jessica Clarke = wrote: > On 24 Sep 2024, at 22:19, Bjoern A. Zeeb wrote: > > > > The branch main has been updated by bz: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D413c5e9082a7d1d25fd3a95f0e77a94= 9621f1433 > > > > commit 413c5e9082a7d1d25fd3a95f0e77a949621f1433 > > Merge: 604919c47fa4 9c6b6723ca84 > > Author: Bjoern A. Zeeb > > AuthorDate: 2024-09-24 21:06:19 +0000 > > Commit: Bjoern A. Zeeb > > CommitDate: 2024-09-24 21:06:19 +0000 > > > > Merge remote-tracking branch 'freebsd/vendor/Linux/ath-common' > > > > Sponsored by: The FreeBSD Foundation > > Hi Bjoern, > This slew of merge commits has zero context for what they=E2=80=99re actu= ally > importing beyond the branch name, which goes against the documentation > for how to do vendor imports: > > > Include details about the changes being merged in the merge commit > message. > -- > https://docs.freebsd.org/en/articles/committers-guide/#_updating_the_free= bsd_source_tree > > This is unhelpful for anyone wanting to understand what you=E2=80=99re do= ing. > Agreed. However, I looked at these commits. This is bootstrapping vendor branches for software that had been directly added to the tree before. I should have had Bjoern mention this in these merge commits, but it didn't occur to me until after the commit. Warner --00000000000088d00a0622e4765b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


--00000000000088d00a0622e4765b-- From nobody Tue Sep 24 22:29:10 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 4XCvfh3Hhqz5W9Sn; Tue, 24 Sep 2024 22:29:16 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XCvfh2mlqz4F0S; Tue, 24 Sep 2024 22:29:16 +0000 (UTC) (envelope-from bz@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727216956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NrkHy59DwMCwMaKg2fWzxZZ/Br8qncskGCuj2PnY++4=; b=g9KRbG++Pe/RC1oo91J06pnZGBpy7fxO6v9/5tGICFBCmcwLy6biOi73XwqzBOnSe4G8AO iWcAb7Bq6qBwP87ZpWq8CUnCIozbvDpKOEfC56dsqrKmMK/XjeaNVBLgASp6jOlBuaKXis FNX2WFRYHwzSBXpRhRKFEhTM/gNhtRO742t8hK4v3iTQT0pv/Y/GegCm1FQEo2g9aiDzOO dXsxbk86GJh2LHdgBaIUJx/5lFL1JoIwSApgtbD8mcR2s+339TrZBGLY/SHPIO+JxR1AkU x7suNqGLWNLIL7Va0v9iduJTktjZi2ILUV5jByd8uBLB6Kx4Pt4+ANTE14EISQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727216956; a=rsa-sha256; cv=none; b=acxbaTPUTT2PpoLHj+2hZr92OiBkj2pZID8InraYN3dmq8hav6Hy7SEDj3ZohKaAUR+pBC puI8qH3uvzr3YEmDhOVE7tKxtULxHpA+2IFESQG7byqOBjJyZvKgUAzfWsy+qytcfFkahq 14m4pOhSyONiArU79gILuk1Q9f//HatLW91BHE3z343e9MG88jUrP+NViKJrENOCtBVvNt FHZw5ovbAzjuodyC1Eq1w+QKX94uADNOjVWHr1WqYU5VchVLnben9E//RmnXCNTCSbSnWH I1j+1Ynr8yp3HLJHFRe6YU6+zFYwxxFZf+sUWa6YLc7itThc3/TUR3fx9djuAg== 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=1727216956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NrkHy59DwMCwMaKg2fWzxZZ/Br8qncskGCuj2PnY++4=; b=pax4qIrUn+GtqAQHBF5q+szrGGYsjqDn5ME/UB0YhTnVtILFZHr9uENCW+rkD3UQA0oi/d riCXbgKv+7L7+cgGRM2rR5cs10O0yVaP3NbJq4ppyDoK8jrqcsOCheLvEaIlDyF1Kjrknk EB0YLrTC9Ge/NDqnlOLSWP2NLupUQITaQMYjuh5Wk0mk7EsgcJzptunVrpsHInvZY6YaXS zxfNl51TKomUDPixubZqmSIg8mC8efDUjLbWAS1b+nXTKMzt7aocaot6YrrW/DPgQL5f0f /9taVK17fK3icV5GYePnJjGe2SzslEDr0L6r8aq/QBW2NT14fBzCC4pYGfhLvQ== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (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 ECDSA (P-256) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E5" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XCvfh1QdkzTcq; Tue, 24 Sep 2024 22:29:16 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 63C50A64806; Tue, 24 Sep 2024 22:29:08 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (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) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D872C2D029D8; Tue, 24 Sep 2024 22:29:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id iq36zNVNZvv2; Tue, 24 Sep 2024 22:29:10 +0000 (UTC) Received: from strong-iwl0.sbone.de (strong-iwl0.sbone.de [IPv6:fde9:577b:c1a9:4902:b66b:fcff:fef3:e3d2]) (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) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id E21E32D029D2; Tue, 24 Sep 2024 22:29:10 +0000 (UTC) Date: Tue, 24 Sep 2024 22:29:10 +0000 (UTC) From: "Bjoern A. Zeeb" To: "src-committers@freebsd.org" cc: "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 413c5e9082a7 - main - Merge remote-tracking branch 'freebsd/vendor/Linux/ath-common' In-Reply-To: Message-ID: References: <202409242119.48OLJOws002720@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 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: multipart/mixed; BOUNDARY="1098556516-1115143918-1727216662=:5181" Content-ID: <177po972-2q66-430n-n1q9-71p9332o2q8p@mnoonqbm.arg> This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1098556516-1115143918-1727216662=:5181 Content-Type: text/plain; CHARSET=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT Content-ID: On Tue, 24 Sep 2024, Warner Losh wrote: > On Tue, Sep 24, 2024 at 3:33 PM Jessica Clarke wrote: > >> On 24 Sep 2024, at 22:19, Bjoern A. Zeeb wrote: >>> >>> The branch main has been updated by bz: >>> >>> URL: >> https://cgit.FreeBSD.org/src/commit/?id=413c5e9082a7d1d25fd3a95f0e77a949621f1433 >>> >>> commit 413c5e9082a7d1d25fd3a95f0e77a949621f1433 >>> Merge: 604919c47fa4 9c6b6723ca84 >>> Author: Bjoern A. Zeeb >>> AuthorDate: 2024-09-24 21:06:19 +0000 >>> Commit: Bjoern A. Zeeb >>> CommitDate: 2024-09-24 21:06:19 +0000 >>> >>> Merge remote-tracking branch 'freebsd/vendor/Linux/ath-common' >>> >>> Sponsored by: The FreeBSD Foundation >> >> Hi Bjoern, >> This slew of merge commits has zero context for what they’re actually >> importing beyond the branch name, which goes against the documentation >> for how to do vendor imports: >> >>> Include details about the changes being merged in the merge commit >> message. >> -- >> https://docs.freebsd.org/en/articles/committers-guide/#_updating_the_freebsd_source_tree >> >> This is unhelpful for anyone wanting to understand what you’re doing. >> > > Agreed. However, I looked at these commits. This is bootstrapping vendor > branches for software > that had been directly added to the tree before. I should have had Bjoern > mention this in these > merge commits, but it didn't occur to me until after the commit. It hadn't to me either given you and Ed had explained all this to me and cleaered my other concerns and given they were "empty" not actually "adding" anything. So here's the summary as I understand it: Multiple versions of the driver code had landed in freebsd/main before we created the vendor branches. We added the full import history to the vendor branches which was not linked to freebsd/main---and isn't apart from the current version in main now after these empty merges. These records of "no-change merges" finally add related history between the vendor branches and main to alllow us to use standard procedure for the vendor branches (subtree merges) in the future. This was done using what I'd call "git magic" provided by Ed no one else will hopefully ever need again. HTH. -- Bjoern A. Zeeb r15:7 --1098556516-1115143918-1727216662=:5181-- From nobody Tue Sep 24 22:53:13 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 4XCwBK4yghz5WC4d; Tue, 24 Sep 2024 22:53:13 +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 4XCwBK4Nzgz4GW3; Tue, 24 Sep 2024 22:53:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727218393; 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=jZLXrUi/dOIWic/x0lsSTQeuOTI88MD1gWnK3s0uG7I=; b=bQFGdVrrfPN5ICgTG4JNz1oMLTZzccUJE7cGaj69KQErxIXbw5oa142dbNNv43+4Qn7Wmr ZFxpkRktW6e7R21cZQCNluYTSpPGvPFaKkdzbM1B5V0OtDveaVygQwjU8r1KOCO8exLFhP vn9rxWrk+yQvrY0Utf7BM+OeuXRk/QK6fDTFoT/CMky3tov7eFi8fkjHa+Qmw7+R6k5YB5 DF32oD8jBoTqvmE3qO9ourMpbF1L566SVFLnXpb+Qr5bqRu3aKOLx15sOy35UJI+4S9uOP Fzn0sOOxT6KVMdTG7QFO3SO0E1wxBvp7P6DuwuA1a7cSWM2dYp12F9jHfJe0LA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727218393; a=rsa-sha256; cv=none; b=Py62jUzJAV2fCUQYZwz/rYtux6b3LUMA5FWBVTTq3uAzjg4KM3aiO+JNS+NWu303CLO76m CWzEbLiwZ7hjU4bowKr1Uwdioxkv9vzY1j3XFjabNDLcf055uHzTnFD0kX7cDdYnoOmP3T oViiMk/jM+i54Fc2YRqXkSg7Nbd93KiOh2b5DEk5u+L+GL01V/Wg8gmHPCeN/XWBPpZqvr tXZDPyN8nVUtoJ9pe801pokH9TjZX7sghka5img/PR9+XWy7SRIa7Qd1tMn9dS+HoidULE lKB1OIX7Z9h9rczKSmPopxCHgjjLFN/xWAq3S8uXR+ckUzTMZrtGoqRboYV7Kg== 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=1727218393; 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=jZLXrUi/dOIWic/x0lsSTQeuOTI88MD1gWnK3s0uG7I=; b=uTK7cSwhyFSB8MU6p1QSGbTWg9M1qN5ogCJw3PpwpIBjlTvbTNCieot2D8ZEK5GBDHVYZ2 pNvihVFLD5TVn/KCc09bC5/fymY7M4lpdxxXk5fDvGlQJ7izpGmG4Xb1ADIIAFamtc5Qnt 0YCN0rXf8CWoyakOMIQsnLwq63EfYVWVCHhE6OnJBKmETSNR3e97lavW4ShYBeKRowLM2V mDxA849Gp+mVtD5TZYhYXFKRoLl8DexkmYldTZzRznQuEYZ3iIWVo8dg8yO8ic2pH4Pmrs sql0Uf2oyZgRSI1qt1ui4sVQn+fTBhxqqfDEBh7tffZw2eekU4/pJIKolpQd5A== 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 4XCwBK40DJznXF; Tue, 24 Sep 2024 22:53:13 +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 48OMrD4c072485; Tue, 24 Sep 2024 22:53:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OMrDh7072482; Tue, 24 Sep 2024 22:53:13 GMT (envelope-from git) Date: Tue, 24 Sep 2024 22:53:13 GMT Message-Id: <202409242253.48OMrDh7072482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 867aaad5c2bf - stable/13 - bhyve: validate corb->wp to avoid infinite loop 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 867aaad5c2bfdd8326fc805964e711ccfbb18d1e Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=867aaad5c2bfdd8326fc805964e711ccfbb18d1e commit 867aaad5c2bfdd8326fc805964e711ccfbb18d1e Author: Ed Maste AuthorDate: 2024-09-19 18:57:42 +0000 Commit: Ed Maste CommitDate: 2024-09-24 17:31:09 +0000 bhyve: validate corb->wp to avoid infinite loop Guests must set HDAC_CORBWP less than corb->size. Treat invalid values as an error rather than entering an infinite loop. Reported by: Synacktiv Reviewed by: markj Security: HYP-12 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46134 (cherry picked from commit a305f44d1404fbf386bb2b50ab7233ce9eabe0bb) (cherry picked from commit 6a645bb3535cb73b1f20db652c9e3893f26a986e) --- usr.sbin/bhyve/pci_hda.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/bhyve/pci_hda.c b/usr.sbin/bhyve/pci_hda.c index 7d824d7a1fd8..fd47abebaa42 100644 --- a/usr.sbin/bhyve/pci_hda.c +++ b/usr.sbin/bhyve/pci_hda.c @@ -787,6 +787,11 @@ hda_corb_run(struct hda_softc *sc) int err; corb->wp = hda_get_reg_by_offset(sc, HDAC_CORBWP); + if (corb->wp >= corb->size) { + DPRINTF("Invalid HDAC_CORBWP %u >= size %u", corb->wp, + corb->size); + return (-1); + } while (corb->rp != corb->wp && corb->run) { corb->rp++; From nobody Tue Sep 24 22:58:54 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 4XCwJt56Wgz5WC88; Tue, 24 Sep 2024 22:58:54 +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 4XCwJt3hCxz4HKQ; Tue, 24 Sep 2024 22:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727218734; 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=W9tz3en01QB4CMDC3Pr+jmul2FrI7CUBwKuAFV7GOME=; b=N/8xuBptS5ePoM+f2Pn9SxTxdBVoiDVW0DQTV5hezzyLJqj3FfZhu0Y4SHfqYjQcNa1zuT xGjVi2HD86JlbwDVJ0BVAm9ljKeEA84hWf0zCcHDPJ7TKjnxOigqSKWrLCnd3ukyVTOIo5 xRdgXPMWpfb4Ea56hr+KO6tbr9LZEreHLbdNbIS0m7gS4A+WfaQRwLqZHHer7RkBI7xR/h vNoH7EKxjPOKdjaxWvGaxFW6lKsSmeoYffz4z61Wt3qPvYf3CCKlc92aIDZyWpZp+5Ttjv 2kK4xFp436crxDPW8GbbHloxbfF1aclHeZhYaTAUlhazTKCskNdG6YYej+Pf0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727218734; a=rsa-sha256; cv=none; b=gzP/gkknpCcL8xozLmzzrmdIsGD3BWRHpSUYDgyb0979r4P+5IVoTUnprKnRImLHWl3xXz hbq7Y51oIzyJsoHpRPMTi9BbkNBfhklwa3UfdQMuRFDNZ5z/+ReWdmUVW1xgIQYZyrDrcf ePGLBmixcXtJWIS54AkCtZgrLi6XmJSpKZpasWVpM9kWWEvGNX006dg/5eiNxdmm+XDIOQ +r1v+IntmSbEZ9o/mgEvAaznB8Ttu2m35S8SGccj+C7iRtZyVt9IPz8FOfNHNLjN8ZIgka wfwjvwu2klMpPZpy0lwx9px4YR3yC/LkVvwlMEJKZr7HMf7bkuvg9eURmsKwfQ== 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=1727218734; 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=W9tz3en01QB4CMDC3Pr+jmul2FrI7CUBwKuAFV7GOME=; b=TmxN+YMSw0HyeLKpWqWh3A/fHF42VP6svavywgGTZnwXb8hI9t4LiY5t3g+Eh3Nin8m7zI y/ikOs9zojgLXasZCo0oYVw9HMtYb8KRcZX2BfdWr6QehzUNTkr/HHdGd/kQHKHjruyfhn Om7g68AUOjGbnDtrkfgMdqDw1hpX5JD0bOKXKnXSHOEAd/VGqMYbOCQwv8S+N7RgGUaJQd 3Z+JmI98J4bav6E9azRWkWu9dDAZN8On1UHThtGQTqHC7PLiTOB0Wb8iGNCNGDgXj9felm tcXvMbMC/r/qD+jQAVq6y7Gkn7SS9uDYdLpodm4XJUt0K1AnyAa23cfyS7gcyw== 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 4XCwJt3GnHznlH; Tue, 24 Sep 2024 22:58:54 +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 48OMws92073681; Tue, 24 Sep 2024 22:58:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48OMwspv073678; Tue, 24 Sep 2024 22:58:54 GMT (envelope-from git) Date: Tue, 24 Sep 2024 22:58:54 GMT Message-Id: <202409242258.48OMwspv073678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 5b8f97d8db82 - main - usb: change LIST to SLIST to avoid LinuxKPI conflicts 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b8f97d8db82e031c409d29313939423b7aac2cb Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5b8f97d8db82e031c409d29313939423b7aac2cb commit 5b8f97d8db82e031c409d29313939423b7aac2cb Author: Bjoern A. Zeeb AuthorDate: 2024-09-04 19:21:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-24 22:53:28 +0000 usb: change LIST to SLIST to avoid LinuxKPI conflicts In order to better integrate modern LinuxKPI USB this tries to reduce a contention point of "LIST". Given there is no need to use a LIST here change it to SLIST to avoid conflicts. It is a workaround which does not solve the actual problem (overlapping namespaces) but it helps us a lot for now. Sponsored by: The FreeBSD Foundation X-MFC? unclear Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46534 --- sys/dev/usb/controller/usb_controller.c | 6 +++--- sys/dev/usb/usb_bus.h | 2 +- sys/dev/usb/usb_dev.h | 2 +- sys/dev/usb/usb_device.c | 14 +++++++------- sys/dev/usb/usb_device.h | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/dev/usb/controller/usb_controller.c b/sys/dev/usb/controller/usb_controller.c index 838bd6bf7621..d717ad56adea 100644 --- a/sys/dev/usb/controller/usb_controller.c +++ b/sys/dev/usb/controller/usb_controller.c @@ -653,8 +653,8 @@ usb_bus_cleanup(struct usb_proc_msg *pm) bus = ((struct usb_bus_msg *)pm)->bus; - while ((pd = LIST_FIRST(&bus->pd_cleanup_list)) != NULL) { - LIST_REMOVE(pd, pd_next); + while ((pd = SLIST_FIRST(&bus->pd_cleanup_list)) != NULL) { + SLIST_REMOVE(&bus->pd_cleanup_list, pd, usb_fs_privdata, pd_next); USB_BUS_UNLOCK(bus); usb_destroy_dev_sync(pd); @@ -847,7 +847,7 @@ usb_attach_sub(device_t dev, struct usb_bus *bus) bus->shutdown_msg[1].bus = bus; #if USB_HAVE_UGEN - LIST_INIT(&bus->pd_cleanup_list); + SLIST_INIT(&bus->pd_cleanup_list); bus->cleanup_msg[0].hdr.pm_callback = &usb_bus_cleanup; bus->cleanup_msg[0].bus = bus; bus->cleanup_msg[1].hdr.pm_callback = &usb_bus_cleanup; diff --git a/sys/dev/usb/usb_bus.h b/sys/dev/usb/usb_bus.h index b9197d3cd84a..ad7b661c2ac0 100644 --- a/sys/dev/usb/usb_bus.h +++ b/sys/dev/usb/usb_bus.h @@ -86,7 +86,7 @@ struct usb_bus { struct usb_bus_msg shutdown_msg[2]; #if USB_HAVE_UGEN struct usb_bus_msg cleanup_msg[2]; - LIST_HEAD(,usb_fs_privdata) pd_cleanup_list; + SLIST_HEAD(,usb_fs_privdata) pd_cleanup_list; #endif /* * This mutex protects the USB hardware: diff --git a/sys/dev/usb/usb_dev.h b/sys/dev/usb/usb_dev.h index 08ceb2555942..381fa1654c95 100644 --- a/sys/dev/usb/usb_dev.h +++ b/sys/dev/usb/usb_dev.h @@ -96,7 +96,7 @@ struct usb_fs_privdata { int fifo_index; struct cdev *cdev; - LIST_ENTRY(usb_fs_privdata) pd_next; + SLIST_ENTRY(usb_fs_privdata) pd_next; }; /* diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index dd571fcef299..0f3c6a959ad2 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -1880,7 +1880,7 @@ usb_alloc_device(device_t parent_dev, struct usb_bus *bus, snprintf(udev->ugen_name, sizeof(udev->ugen_name), USB_GENERIC_NAME "%u.%u", device_get_unit(bus->bdev), device_index); - LIST_INIT(&udev->pd_list); + SLIST_INIT(&udev->pd_list); /* Create the control endpoint device */ udev->ctrl_dev = usb_make_dev(udev, NULL, 0, 0, @@ -2190,7 +2190,7 @@ usb_destroy_dev(struct usb_fs_privdata *pd) delist_dev(pd->cdev); USB_BUS_LOCK(bus); - LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); + SLIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); /* get cleanup going */ usb_proc_msignal(USB_BUS_EXPLORE_PROC(bus), &bus->cleanup_msg[0], &bus->cleanup_msg[1]); @@ -2207,7 +2207,7 @@ usb_cdev_create(struct usb_device *udev) int inmode, outmode, inmask, outmask, mode; uint8_t ep; - KASSERT(LIST_FIRST(&udev->pd_list) == NULL, ("stale cdev entries")); + KASSERT(SLIST_FIRST(&udev->pd_list) == NULL, ("stale cdev entries")); DPRINTFN(2, "Creating device nodes\n"); @@ -2254,7 +2254,7 @@ usb_cdev_create(struct usb_device *udev) mode, UID_ROOT, GID_OPERATOR, 0600); if (pd != NULL) - LIST_INSERT_HEAD(&udev->pd_list, pd, pd_next); + SLIST_INSERT_HEAD(&udev->pd_list, pd, pd_next); } } @@ -2265,10 +2265,10 @@ usb_cdev_free(struct usb_device *udev) DPRINTFN(2, "Freeing device nodes\n"); - while ((pd = LIST_FIRST(&udev->pd_list)) != NULL) { + while ((pd = SLIST_FIRST(&udev->pd_list)) != NULL) { KASSERT(pd->cdev->si_drv1 == pd, ("privdata corrupt")); - LIST_REMOVE(pd, pd_next); + SLIST_REMOVE(&udev->pd_list, pd, usb_fs_privdata, pd_next); usb_destroy_dev(pd); } @@ -2358,7 +2358,7 @@ usb_free_device(struct usb_device *udev, uint8_t flag) mtx_destroy(&udev->device_mtx); #if USB_HAVE_UGEN - KASSERT(LIST_FIRST(&udev->pd_list) == NULL, ("leaked cdev entries")); + KASSERT(SLIST_FIRST(&udev->pd_list) == NULL, ("leaked cdev entries")); #endif /* Uninitialise device */ diff --git a/sys/dev/usb/usb_device.h b/sys/dev/usb/usb_device.h index 3fc5efb049fc..87596cc1d2bd 100644 --- a/sys/dev/usb/usb_device.h +++ b/sys/dev/usb/usb_device.h @@ -225,7 +225,7 @@ struct usb_device { struct usb_fifo *fifo[USB_FIFO_MAX]; struct usb_symlink *ugen_symlink; /* our generic symlink */ struct usb_fs_privdata *ctrl_dev; /* Control Endpoint 0 device node */ - LIST_HEAD(,usb_fs_privdata) pd_list; + SLIST_HEAD(,usb_fs_privdata) pd_list; char ugen_name[20]; /* name of ugenX.X device */ #endif usb_ticks_t plugtime; /* copy of "ticks" */ From nobody Tue Sep 24 23:53:08 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 4XCxWS52bQz5WGNN; Tue, 24 Sep 2024 23:53:08 +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 4XCxWS4XD7z4LLm; Tue, 24 Sep 2024 23:53:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727221988; 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=RgUlz/2+f9SOA9hZ2bhPT7J745FbybPDbL0TZGd5E9w=; b=uNMEwfKiV7AMLr/KbQQYiK/K33URJXlnYNNSMT2EhxMjeA8lrIc/Gbw4gM9hztBq4GojRG z/hn3ERn/6Eh3lHOkRXhX/5GyylDesrqXe10iM+ejLT2sVVejbDDYXiCwhsZEWwEFN0TqS zD1WTEJc3WlTkc+nUHJvcxRT+2UX5uitRLN1DI5NldLzfpNi/jOsxFuUs3gCFNK/JSG7Nn tf8deYBwmXUX2UL2UJBTCwYIBVtO8HsP9Jup0rEl050mNMctA/yJ9T0ZYpyJ15R+b8KVXj ILrgIbIFNFX+PUgZr93p4LsyzzJMycvVrnpO80c4QgLNI8vIqCpGuTaBXeFPmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727221988; a=rsa-sha256; cv=none; b=bUL6Y9b90V4ViOswvS6nwlhy0+Xw+oHBV9OhH2XUTx+LKWw9sD5J15V0NBLeHzbbxL2GfS XFSpxTNkgwapcXx97YH1Qg7Hs+BvtCkZ/8fHCcsqsQab2JEvJKx7o2oVJB8U94HHYun8zp O6FR44i/ljJeXggskN3fI7y9Hd2KyIu712sQfvL9mrWm4zuLdB2a1uOjL/H6AHlsunNtJ7 OhV4M//R/fe+3Dima1L9u/hkw0iSN43Cbgj1/wls9f/cv4c+kQTUSaO6VQr2j8/Z7OpzIN NbYM4RvWXNSDQ8LtQFRLRsxVMQKlxeUUFYyApKGrEJdU22BfgjeYYcYnlBOvQA== 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=1727221988; 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=RgUlz/2+f9SOA9hZ2bhPT7J745FbybPDbL0TZGd5E9w=; b=LH00L9ucpnXAkOutlo7OISdlXeMF3/oTzhv6/EIPiOLjc3D0mtihTU8MCyR37R3rCri8NK vj6aelap/8sIUz61BjZV5ir2eyO6yvIxxfjbTVo87edr+L6uQrCtApHN6F55c9p2TBaRTt roBk7AmWMYG0aT2H2/Pvvaa34Rc11E5DpAayCZxGzfj7qoMMmns822ZzegUuoeQMAvB3Sf FfCMJ5zEuYrsvS82c17ktdCL8uzbRmcaFJNTghW1+SFrIbxfIhZbx8ERgXCOEKZPvaT6pG TVcsp8duRTUnk28fmBo3NZyKIVX414GraIbADNdeHVSexp4Q5Z/RdUIZ0VHf1Q== 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 4XCxWS47NFzpq0; Tue, 24 Sep 2024 23:53:08 +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 48ONr805074368; Tue, 24 Sep 2024 23:53:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48ONr8xI074366; Tue, 24 Sep 2024 23:53:08 GMT (envelope-from git) Date: Tue, 24 Sep 2024 23:53:08 GMT Message-Id: <202409242353.48ONr8xI074366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: ee3da604dd01 - main - cxgbe(4): Clobber all tracer state on stop and redo only traceq on restart. 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee3da604dd016439850dae77366796313e60f0e0 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=ee3da604dd016439850dae77366796313e60f0e0 commit ee3da604dd016439850dae77366796313e60f0e0 Author: Navdeep Parhar AuthorDate: 2024-09-24 23:28:29 +0000 Commit: Navdeep Parhar CommitDate: 2024-09-24 23:52:22 +0000 cxgbe(4): Clobber all tracer state on stop and redo only traceq on restart. Tracers have to be recreated after a restart but that's okay given that they are used for debugging only. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 4412e1ab95fb..307b9c27111a 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2095,6 +2095,8 @@ stop_lld(struct adapter *sc) if (pi->flags & HAS_TRACEQ) { pi->flags &= ~HAS_TRACEQ; sc->traceq = -1; + sc->tracer_valid = 0; + sc->tracer_enabled = 0; } } if (sc->flags & FULL_INIT_DONE) { @@ -2411,6 +2413,15 @@ restart_lld(struct adapter *sc) "interface: %d\n", rc); goto done; } + if (sc->traceq < 0 && IS_MAIN_VI(vi)) { + sc->traceq = sc->sge.rxq[vi->first_rxq].iq.abs_id; + t4_write_reg(sc, is_t4(sc) ? + A_MPS_TRC_RSS_CONTROL : + A_MPS_T5_TRC_RSS_CONTROL, + V_RSSCONTROL(pi->tx_chan) | + V_QUEUENUMBER(sc->traceq)); + pi->flags |= HAS_TRACEQ; + } ifp = vi->ifp; if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) From nobody Wed Sep 25 07:13:47 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 4XD7Hv4xHNz5WlbY; Wed, 25 Sep 2024 07:13:47 +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 4XD7Hv4PMQz4GkJ; Wed, 25 Sep 2024 07:13:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727248427; 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=c0Hd/OoUoAJQoBLA1kIYiyqXE/nL4btkTWsbx6rjpN0=; b=bL2wMTM1ciyMlvfkZ7re63S2DCGyqZIkkXv8+8KgcO/yu8e/FLR1IccSTAXbxQ/f8O5QFo PZ7wU9AT0lNmiX3ldc+0sbplJ2OhA//uPy3ffApM/wLxf/+sfBrEHggH4jGivJiHxsitmj 7a3PPDt7Xa9nPJffS6J2rbcoSFdQPOVWLAm979rNERfMbbqbdxTouRWjDyVnb+n4kx7QfK CHC+CILe4vxYY1ZUGL6oUToq6oZcVmuh6StaXzLip6QbKQJW7gzKO3Y8bkuX+4AycrtZlo Y+DG5ozBc7Ej5RYrs+uyK6UAU8LkQL365Xqa/er/B2aSxi8CUMUZjwGLVBoTtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727248427; a=rsa-sha256; cv=none; b=w90/hXtH0Xn2gFEW/POaGYDNEc1akLBU/XhaNSTjlUWn+Yb+k7SsHl5fnB8ls6oyh+70iz o9m88/hm2XY32zvJMaWxK0NolbmP1YuPvlBnuz0bJjbjqoLGBXUfbZqjr4zqmUJI7it6s+ 55/ds7zkHNq08Lpr5DHeNSdzV3Gw5UpGRhBDCz53X1LzrJzZEYqRAhbkv431ni3m72VKn6 glE9HX2FgvFvxFBm63CsAPk8T8ntnBGFcBhx2RbuYdQn2n1G/4CuwFnpPP8jQdViqR1OXk LV3yDxWKH5j5RXZiV4S9lSyBpQ22E1MgUlWUpYmHTNTGXqMze7sy+s4EMQRykA== 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=1727248427; 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=c0Hd/OoUoAJQoBLA1kIYiyqXE/nL4btkTWsbx6rjpN0=; b=XT47eXvQ+Ee+fGyz9nuq0WgsYGFCjCZLgKli9a0q8Y++XwbhYIopLbobwsDtD5XjOf9sbs hPBa2+IthAj76Z1MfPPPIcwwZ/BefIdFCj5YTG1GOtWtxofbhy7yq/Cr4z/KuZWQthC6Dx eXZ2b1tlv/EdHt+2R9CWJ633KPTt1RVsgVPYdKh5ziELvse7ivfdOd3NzPd1x/F3EoUZZd Qe/et9mDUElp7GYz3vVPqaWl0CEcDf8Gth+sXA78tBeN0aGGs1woFwkg2srk5AsD60V5WD iPFFEfaUlGMOeStt5GL0HonAq3vTC/mkN2hmCPeZj1J3tgXdxVYmwbxwY0fnXA== 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 4XD7Hv40Yhz12m9; Wed, 25 Sep 2024 07:13:47 +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 48P7Dl9X028713; Wed, 25 Sep 2024 07:13:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48P7Dl8t028710; Wed, 25 Sep 2024 07:13:47 GMT (envelope-from git) Date: Wed, 25 Sep 2024 07:13:47 GMT Message-Id: <202409250713.48P7Dl8t028710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c9c2452a2535 - main - unix tests: Skip random_eor_and_waitall unconditionally 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c9c2452a25355db7d89bfc93fd9d50f46690949c Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c9c2452a25355db7d89bfc93fd9d50f46690949c commit c9c2452a25355db7d89bfc93fd9d50f46690949c Author: Mark Johnston AuthorDate: 2024-09-21 12:41:06 +0000 Commit: Mark Johnston CommitDate: 2024-09-25 11:44:14 +0000 unix tests: Skip random_eor_and_waitall unconditionally This test always fails, I don't see any reason to make it conditional on the "CI" test parameter. There is at least one test bug here, we're using the wrong sysctl to obtain the receive buffer size, but fixing that is not sufficient. PR: 279354 Reviewed by: glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46726 --- tests/sys/kern/unix_seqpacket_test.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/sys/kern/unix_seqpacket_test.c b/tests/sys/kern/unix_seqpacket_test.c index ba3de0adb1e9..d142e228b036 100644 --- a/tests/sys/kern/unix_seqpacket_test.c +++ b/tests/sys/kern/unix_seqpacket_test.c @@ -1197,8 +1197,7 @@ ATF_TC_BODY(random_eor_and_waitall, tc) size_t off; int fd[2], eor; - if (atf_tc_get_config_var_as_bool_wd(tc, "ci", false)) - atf_tc_skip("https://bugs.freebsd.org/279354"); + atf_tc_skip("https://bugs.freebsd.org/279354"); arc4random_buf(params.seed, sizeof(params.seed)); printf("Using seed:"); @@ -1210,7 +1209,7 @@ ATF_TC_BODY(random_eor_and_waitall, tc) for (u_int i = 0; i < RANDOM_TESTSIZE / (u_int )sizeof(long); i++) ((long *)params.sendbuf)[i] = nrand48(¶ms.seed[0]); - ATF_REQUIRE(sysctlbyname("net.local.stream.recvspace", + ATF_REQUIRE(sysctlbyname("net.local.seqpacket.recvspace", ¶ms.recvspace, &(size_t){sizeof(u_long)}, NULL, 0) != -1); ATF_REQUIRE((recvbuf = malloc(RANDOM_RECVSIZE * params.recvspace)) != NULL); From nobody Wed Sep 25 09:19:24 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 4XDB4s0Xbsz5XCrH; Wed, 25 Sep 2024 09:19:25 +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 4XDB4r74Pgz4V9L; Wed, 25 Sep 2024 09:19:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727255965; 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=oZRKYpdgcjV6ouo9sQu+vjKQzFqkVS7UlIBrJZGm3WE=; b=KUgNbW7WLqsQ+pn2hWVG/ph1E4+5h2PJO3ALtYLuSl41+NzXIQJDhPmINkSRZVBt6jBbeo DC71ebuPbxPtnsf8okvRCLV1xTlBRUy3wjpz1MXFesW0E7tsrsOsq0slUTpoUiG3lw0ErG uGN8YHCslKEm9qd3Ybb3Yx1AcrS2sbW6ONKbyXAOwhm+Fw2rK3Z3n1CtXMEK1lVfnetHoo Vr5LyN5Xyfa/78oKeeL0tE2SVv/IHo3oXf1nW3u6dAhAOyVU/sxzHRhPzRlveHRmuvnMBH QfQmUlBdf7OzMWy2itazsPxFnihOpe4b6u/q07YMqa/Qytl+hd0wF0+UwOUVsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727255965; a=rsa-sha256; cv=none; b=EFnUPul4ZI7zjgx+Cf+2ZjTX+G4oBxjywpBb+KRpQatyrBx7chSSZlO1zlm1f1MpH/Y6Oq 9is7oygoaCkcBW9ZzqLVGNZImUE9/8o4ABhygyMslxb6V1RgqvYPXGnkSIoDwF6MsashcZ eBMymulfkgJoZH12FBuX9an41j4scx7u8JBjwzfYrSmnAUAWFbUGs13eqIBDtJeQHBGW26 X56v/uyoq0Hc13pGcokk/+HQIwl6oMblFir+QcS0slq3L6cyI8E3vT6WT+0FrcBjiSwfnF x882Ty0OAVrYM6bU1L55Rb2fU9nYEr92QvjhBpbnIMzXq2OcjFzt80EKvdLyTQ== 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=1727255965; 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=oZRKYpdgcjV6ouo9sQu+vjKQzFqkVS7UlIBrJZGm3WE=; b=lJm8j5pohsfxrKfbMhoC0IRLX+hcUCb7Wkj3ZKHGaqEL4jbay6YXD2Zo3TRHYM+mWJ8ix0 EUKyPYrh61N/DTjwa3U6wgi6mm2A6aoZ/sVYAzxQ58aNJnzllM1F03+Gn1Ry9d3s+hCjJk I+3WfR90YqSfxcZiEgqvkUo4ivB4gzagdDxlqhBuHwq2Y+a0k1nIztTwJ+DjMdSsRWbxJq ONB8idpuvaDDRFlcrjHWLltZxrXoCRPgcWCF9HU5FPl9D/fUqwhMY7otvDIAmLB4W/kjpb 8Bl0xoHZE1ZHh9J53OTyh3yhJlQO51PA2hpl9Fn9ehPBTn5tJWfezA6I3GfARQ== 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 4XDB4r6gvvz16Lv; Wed, 25 Sep 2024 09:19: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 48P9JOq9033722; Wed, 25 Sep 2024 09:19:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48P9JO1J033719; Wed, 25 Sep 2024 09:19:24 GMT (envelope-from git) Date: Wed, 25 Sep 2024 09:19:24 GMT Message-Id: <202409250919.48P9JO1J033719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Igor Ostapenko Subject: git: 7b7e39221ec9 - main - pf tests: Speed up divert-to.sh test cases 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: igoro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b7e39221ec9f525a86b26d24d70260e51faa907 Auto-Submitted: auto-generated The branch main has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=7b7e39221ec9f525a86b26d24d70260e51faa907 commit 7b7e39221ec9f525a86b26d24d70260e51faa907 Author: Igor Ostapenko AuthorDate: 2024-09-25 09:18:06 +0000 Commit: Igor Ostapenko CommitDate: 2024-09-25 09:18:06 +0000 pf tests: Speed up divert-to.sh test cases Reviewed by: kp Approved by: kp (mentor) Differential Revision: https://reviews.freebsd.org/D46671 --- tests/sys/netpfil/pf/divert-to.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/netpfil/pf/divert-to.sh b/tests/sys/netpfil/pf/divert-to.sh index c7118c397032..b27d321d7825 100644 --- a/tests/sys/netpfil/pf/divert-to.sh +++ b/tests/sys/netpfil/pf/divert-to.sh @@ -104,7 +104,7 @@ in_div_body() sleep 1 # divapp is expected to "eat" the packet - atf_check -s not-exit:0 -o ignore ping -c1 192.0.2.2 + atf_check -s not-exit:0 -o ignore ping -c1 -t1 192.0.2.2 wait $divapp_pid } @@ -183,7 +183,7 @@ out_div_body() sleep 1 # divapp is expected to "eat" the packet - atf_check -s not-exit:0 -o ignore ping -c1 192.0.2.2 + atf_check -s not-exit:0 -o ignore ping -c1 -t1 192.0.2.2 wait $divapp_pid } From nobody Wed Sep 25 09:37:56 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 4XDBVD5q7gz5XDdH; Wed, 25 Sep 2024 09:37:56 +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 4XDBVD5JFSz4Wsy; Wed, 25 Sep 2024 09:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727257076; 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=qaskU+XS46JKphl3xEXWNRCxvNLg/3qyYu+8G2VjDfo=; b=fQhZYukCwn4ci9ihldBEaax5K2By2i0snW1DGTM639l5yUR+WBwMliIY7FzXTH9///WQnF LKBTI4NHAHvoPBA3i1RpKTycEacRhdvVXh+4pHiICNlBy3JhrJGTgJGaNobY9pwkEfNr42 WRkgJjJLswVo4weqr6ga5AdHbuFBzxYwT+dhj8rma9v/9YRM9ChTm27uvJkDSwDBRVJ0+D mjHsBSmCAFBTfZnWvu39CAsH1AVZYVt4MBoFeZlDCKyZT5Ah5LvWt6yr/jQRowctOXof7Z 6hf3Eh95gY7FQI6tSZUVeRfm8UVgPJouSRl+gzK+Ez48j8GkbUCxdl8GwbnqiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727257076; a=rsa-sha256; cv=none; b=DN2IpRZsxH367A1sUjH9XzKKBnItiDWc/9L21Y0omrQWc3CrUQkHEiW7ITKTz7ZUd44G/S 4/1P1jLYukCThAImu++vdJdGf6iFzsfZ6aG2AbUtqDpQz4gTVNn1kyuk8X7qoNyW2uSfyU pzzM4Bn2jkYCfxCy2tUxl2jQySkhw7NHtdokDHT53jsBH1sgzLhdxjonYE6gz741y7OUJC GfJBr+iozgoUL12L7Qne2uXBALLQGclFImRzrO66PuvIUU2vwSG3RYPqmJK9E3w2o0GTNU jKK769rCHNZeYyLUaGRH1BEYCcBA5KgjtbzHDLJe/crowd24IGe+9L7HGX+UOQ== 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=1727257076; 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=qaskU+XS46JKphl3xEXWNRCxvNLg/3qyYu+8G2VjDfo=; b=HjgnEdtwPBYPMCXK5F0eSwazqitFoclZaTGQsr/1Mx9BoJJ8Phv2wNi/rSW3dmiNHpXaPv 7oySkaxU/mSMjXHXY7aH5R0P3POZeFDucv9RtqAaVfiygT1mrZOrpVKAimxbZiqK8JMJla JV8RaggixrM5jwXb5haxLEj3g4qJp94O03GPodj5nsZBRjiEo157cLwNsgW8NT8l1wv7QZ lZPzlLWSZ0S8VwssUkg2Fh3eJRah6XrZlL3Qw17ikcuA2VfF9iKgwEwnJXUd2aZI7iHuAo EpLMJMUI/YMcOF+VfB7ry272H2IEPj7smlgBAfYra3nKXsFhVlLLBbFYoc/mjw== 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 4XDBVD4kp0z16CW; Wed, 25 Sep 2024 09:37:56 +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 48P9buZ4067259; Wed, 25 Sep 2024 09:37:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48P9buYL067256; Wed, 25 Sep 2024 09:37:56 GMT (envelope-from git) Date: Wed, 25 Sep 2024 09:37:56 GMT Message-Id: <202409250937.48P9buYL067256@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: 930a1e6f3d2d - main - e1000: Delay safe_pause switch until SI_SUB_CLOCKS 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: 930a1e6f3d2dd629774f1b48b1acf7ba482ab659 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=930a1e6f3d2dd629774f1b48b1acf7ba482ab659 commit 930a1e6f3d2dd629774f1b48b1acf7ba482ab659 Author: Joyu Liao AuthorDate: 2024-09-25 09:19:13 +0000 Commit: Kevin Bowling CommitDate: 2024-09-25 09:37:37 +0000 e1000: Delay safe_pause switch until SI_SUB_CLOCKS Based on sysinit_sub_id, SI_SUB_CLOCKS is after SI_SUB_CONFIGURE. SI_SUB_CONFIGURE  = 0x3800000,  /* Configure devices */   At this stage, the variable “cold†will be set to 0. SI_SUB_CLOCKS    = 0x4800000,  /* real-time and stat clocks*/ At this stage, the clock configuration will be done, and the real-time clock can be used. In the e1000 driver, if the API safe_pause_* are called between SI_SUB_CONFIGURE and SI_SUB_CLOCKS stages, it will choose the wrong clock source. The API safe_pause_* uses “cold†the value of which is updated in SI_SUB_CONFIGURE, to decide if the real-time clock source is ready. However, the real-time clock is not ready til the SI_SUB_CLOCKS routines are done. Obtained from: Juniper Networks MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42920 --- sys/dev/e1000/e1000_osdep.c | 10 ++++++++++ sys/dev/e1000/e1000_osdep.h | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/dev/e1000/e1000_osdep.c b/sys/dev/e1000/e1000_osdep.c index 8016ee352068..8b598f18cf12 100644 --- a/sys/dev/e1000/e1000_osdep.c +++ b/sys/dev/e1000/e1000_osdep.c @@ -34,6 +34,16 @@ #include "e1000_api.h" +int e1000_use_pause_delay = 0; + +static void +e1000_enable_pause_delay(void *use_pause_delay) +{ + *((int *)use_pause_delay) = 1; +} + +SYSINIT(enable_pause_delay, SI_SUB_CLOCKS, SI_ORDER_ANY, e1000_enable_pause_delay, &e1000_use_pause_delay); + /* * NOTE: the following routines using the e1000 * naming style are provided to the shared diff --git a/sys/dev/e1000/e1000_osdep.h b/sys/dev/e1000/e1000_osdep.h index bddb97afd8b9..893979025f01 100644 --- a/sys/dev/e1000/e1000_osdep.h +++ b/sys/dev/e1000/e1000_osdep.h @@ -79,9 +79,11 @@ ms_scale(int x) { } } +extern int e1000_use_pause_delay; + static inline void safe_pause_us(int x) { - if (cold) { + if (!e1000_use_pause_delay) { DELAY(x); } else { pause("e1000_delay", max(1, x/(1000000/hz))); @@ -90,7 +92,7 @@ safe_pause_us(int x) { static inline void safe_pause_ms(int x) { - if (cold) { + if (!e1000_use_pause_delay) { DELAY(x*1000); } else { pause("e1000_delay", ms_scale(x)); From nobody Wed Sep 25 10:40:03 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 4XDCsx4fxQz5XJff; Wed, 25 Sep 2024 10:40:05 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDCsx49Kyz4hY0; Wed, 25 Sep 2024 10:40:05 +0000 (UTC) (envelope-from gbe@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727260805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VnfVuseIuo5i7S3CBF+OCdTMPay4cpv4MwYJbHRi5fY=; b=KVCHMxtvaITyYfQbDYw2diQvwPObs/8Y8ORrb4zq0pyRSFbkBnvGLqqPJf3W4ri++HaasM vw41O9ggjys7hnBeSryJItvU2rxRNvYlGZlpptGy2WmRgkPC+Bw2jkj7PPmSLQJHXBxM7m KM6MdTr01qfsC1LUbXhY1uVsZQUN/yYhmwoNGcEKHjJOZMf7QeSFq4OXjnvkC75NglO6Xo 5+WI5Zjk/m1nzWUVE51q9VbDNNF5UsKlDBdqnD6SmAdvMiD3X7KcX84QSCAQWU/FL6WWEJ PlbnzZyP1SMuY0uY98HUWA5uFG2BTwevpD1ZJHSSSoCuU2xN8/2gmhVYggRqvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727260805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VnfVuseIuo5i7S3CBF+OCdTMPay4cpv4MwYJbHRi5fY=; b=PB7UGWmOMagoV2E1a9WjQoJG72SPORS2jXgjMcwzXqyQfPY2jYyE3wI/SXtByVRPkcXfq9 c3pAihcttezy5B2pcx2ZG2tYt4QTpaGL4+pxLxtXPbuebQBAH6TPuFNTSMR+LJVewFkZsy e/PWCIclY0jZ9+DlJIixzivWIGJBexa+VTFbWPwdJGj9q8Bs3EEl5hFmjuzLW1fy/04+e/ SFmLVbnzP9fIIaUpEzrO7tO4weIK5upVWFhYm0pThtjKzOJovzdOqJR1sIvgune+FFWBf3 i+ce6HbPSDdkvEXs6uCAbqjFC7MQUxkFtG1UCLEMNS55EbiGWttC+9dSiO9nwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727260805; a=rsa-sha256; cv=none; b=IlpLu7kZ2k/EWuwUxiOKhMgpfBQ/8t+EEFE6tx4Hpt1n0uKJYo5k/g7wg+58JTRQhpUCri ByfTuVa+aJDW8ffDjRU9qc/2wP7beeJFRbLNT8shf51TBYEISanqq+g+Z/+S9kvFzePhBr GCob0hqUnrrMj5n4W+5utDzxyLItubehpovnnURzILBDZ0G2n3LTDiZpWzknLveA0ovvxB 0FISpNLWIO7+SvzELZlURbSCJC5MhAW6xKfF/j7Lso6VbxqsarcnRGy7D/LWSFDrJyO0OG CGdBxxhY+bCKaEnin6IqV6Zlx/vu6ntGQE6RrvWmZmi7gTs7um8aE8bcgjHJog== Received: from localhost (p200300cb871c2d03658d866ea04c78ac.dip0.t-ipconnect.de [IPv6:2003:cb:871c:2d03:658d:866e:a04c:78ac]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XDCsx1M8kzjhs; Wed, 25 Sep 2024 10:40:05 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Date: Wed, 25 Sep 2024 12:40:03 +0200 From: Gordon Bergling To: Brooks Davis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 044f94adff55 - main - timeout(1): Update STANDARDS section Message-ID: References: <202409241642.48OGgoWH040751@gitrepo.freebsd.org> 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: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Xok2D7IXjPZ1fyqy" Content-Disposition: inline In-Reply-To: X-Url: X-Operating-System: Darwin 23.6.0 arm64 X-Host-Uptime: 12:23 up 8 days, 14:31, 4 users, load averages: 4.00 3.05 2.56 --Xok2D7IXjPZ1fyqy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Brooks, On Tue, Sep 24, 2024 at 05:07:56PM +0000, Brooks Davis wrote: > On Tue, Sep 24, 2024 at 04:42:50PM +0000, Gordon Bergling wrote: > > The branch main has been updated by gbe: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D044f94adff55f13130f03c0c= 170fa879c8febb5b > >=20 > > commit 044f94adff55f13130f03c0c170fa879c8febb5b > > Author: Gordon Bergling > > AuthorDate: 2024-09-24 16:42:18 +0000 > > Commit: Gordon Bergling > > CommitDate: 2024-09-24 16:42:18 +0000 > >=20 > > timeout(1): Update STANDARDS section > > =20 > > Update the STANDARDS section for timeout(1) to > > POSIX 1003.1-2024. > > =20 > > Update mandoc to be able to render the > > new POSIX macro. >=20 > This should not have been a single commit. mandoc should have been > updated first in it's own commit, ideally referencing the upstream commit > or better as a full update of mandoc from upstream. mandoc has not seen a release in a while, but has many single commits in the OpenBSD tree. I wasn't sure about tracking so many individual commits so I just took the one needed for the man page update. Dragonfly and also OpenBSD has a few updates to timeout(1), which I am about to backport for FreeBSD. The man page was the easiest part. I could revert that change, but I hope it can stay that way it is now, so that I can focus and bringing the updates for timeout(1) to phabricator. --Gordon --Xok2D7IXjPZ1fyqy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEYbWI0KY5X7yH/Fy4OQX2V8rP09wFAmbz6IMACgkQOQX2V8rP 09wlmAgAySsXFCo+L1iQiWm4N1UG9RTKlpqQqKSmUE8zEg3Yimcnk5Xd/gnQOT63 JEfrNqzKIrYGz981btpDw5kJXm9MmgVGbJrTJmzfkd+UwnEg3U1LudTTT4A8237b YOMOxfiMqeC52fqqb5ywc397/2skLjCOtaBcxVEVHOZFzSoMpLlJt4ZLciBlLtX3 zZgEY1XLXGW4s92WQ0v+1lf43gRMZd660rTfAfFfpXdVqs9PBhL8nU8I8IcmV7h2 /9QsX0b5rWq3cqNi+VbXOqHIsONy4JcI2CR9Z8tcbReSMBgrNkATsembG/S4B54e uG7eyXdyiQ3HTJGn0ceIIwIRsZixnQ== =4bCM -----END PGP SIGNATURE----- --Xok2D7IXjPZ1fyqy-- From nobody Wed Sep 25 10:44:01 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 4XDCyT36RSz5XJVH; Wed, 25 Sep 2024 10:44:01 +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 4XDCyT2Xkbz4jG9; Wed, 25 Sep 2024 10:44:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727261041; 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=XDpx+9g6eIH52eFqpJ5QwAejC/f9JHZBIdxw3l6nDM4=; b=elJjc6qp+QqQdB0uAq/4f0MIrPiOXT94b/QJcqlrpTK4BzDkLLtPBkajqKJqrnjCrlu0HE 7svAoUgs1GFk0ApoCfyDmy/59cH/LaOJqQdYx75D338HBPerCZj9+jLs39swdq0hJn43TO r1PUjN8qS0uKgkw3Z+O+VdEH1EDtD61iRU2BCtF77Gamuh1UOipHsN5tNfwiqzcAbOvgfV dSEHfCQdJBRL9RGEdJssRaKjp3/xnMrfrmrCQ1/nFGdjF7gkn/PCMte6fBHJit1a5uje6x RfGiCs0vCtKx1HuVMvUY4V7GjLKgFDVPZBimwmBwERpNNwFXFxJGsIeUGyFjAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727261041; 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=XDpx+9g6eIH52eFqpJ5QwAejC/f9JHZBIdxw3l6nDM4=; b=LUpsyYGKcKz+b32IAlp8WGf10F7uFR0WADpRgGE0bIOCwq6fcLitosLgbPxg92ecpYyTbC H/Eq7hOghFwIUTPv7OXaOk7qXudcMVWrJiU7iWl+CngupY8zxYApLq3fPi6JIDdpR3xwKE ZPE39qjcS7o1zgz3pPksHJz5iox/UPbsuwD58TmuyRvU1vk5+3VpdJws4LekTuwrLRW8FD 5/n5uO8JAnPOlsj+5GbGH6ykjhkS5cNkx2NsIc7SFQ9tOZn6ZNqIg8z3VCMgBwnLvyPoKl nV8FjwtaEyRHmhNfAl4ziH/8f6hzBmggu0pluj6AP6m55puXhYkR3nBBMVm8KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727261041; a=rsa-sha256; cv=none; b=PhUnE/MtBYlbsl5bkJVurZkBDlINIqa8gdBlxIoCPaYLJDKvJ1fMe/zhwrhvbY/aly922I RNWOuPZPQ1ZQtgsq67EcilKlGlqk3pMEQSgDIaw9GolO8ut8kIVRryZtTMs3mI1N+HS52+ kn0+h9Q3BqipOwlwKPicBf9fiMKxeQ6p8FySZgB/wEUtQIL2RnHCMsYri1gp2ma/T2vul9 IiG1kC5qar8gN/+O6PXC+IaIWiKQn4A4jCV4DJg/ZuASNHq0FuiSWDWzyNmijaG/k3eh29 tfEaZLGUyyL6c59+5L6OiK2ZFYOMvlI0+OwiAiA3BK5LSN4DKDS3fNrBtu0S9w== 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 4XDCyT27tdz1822; Wed, 25 Sep 2024 10:44:01 +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 48PAi131085268; Wed, 25 Sep 2024 10:44:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PAi1dB085265; Wed, 25 Sep 2024 10:44:01 GMT (envelope-from git) Date: Wed, 25 Sep 2024 10:44:01 GMT Message-Id: <202409251044.48PAi1dB085265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 6aeaadf68def - main - pf tests: Remove nargs from single arguments 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6aeaadf68def9bb6355c7462c5527574698367df Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6aeaadf68def9bb6355c7462c5527574698367df commit 6aeaadf68def9bb6355c7462c5527574698367df Author: Kajetan Staszkiewicz AuthorDate: 2024-09-25 08:35:33 +0000 Commit: Kristof Provost CommitDate: 2024-09-25 10:43:27 +0000 pf tests: Remove nargs from single arguments Using nargs=1 causes arguments to produce lists from which we must then get the real value. The same applies to defaults, the must be provided as arrays too. Remove nargs=1 so that values and defaults can be accessed directly. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D46772 --- tests/sys/netpfil/common/pft_ping.py | 73 ++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 40 deletions(-) diff --git a/tests/sys/netpfil/common/pft_ping.py b/tests/sys/netpfil/common/pft_ping.py index a24a1e00150a..21b08c75a7da 100644 --- a/tests/sys/netpfil/common/pft_ping.py +++ b/tests/sys/netpfil/common/pft_ping.py @@ -408,17 +408,15 @@ def parse_args(): description="Ping test tool") # Parameters of sent ping request - parser.add_argument('--sendif', nargs=1, - required=True, + parser.add_argument('--sendif', required=True, help='The interface through which the packet(s) will be sent') - parser.add_argument('--to', nargs=1, - required=True, + parser.add_argument('--to', required=True, help='The destination IP address for the ping request') parser.add_argument('--ping-type', choices=('icmp', 'tcpsyn'), help='Type of ping: ICMP (default) or TCP SYN', default='icmp') - parser.add_argument('--fromaddr', nargs=1, + parser.add_argument('--fromaddr', help='The source IP address for the ping request') # Where to look for packets to analyze. @@ -431,36 +429,36 @@ def parse_args(): # Packet settings parser_send = parser.add_argument_group('Values set in transmitted packets') - parser_send.add_argument('--send-flags', nargs=1, type=str, + parser_send.add_argument('--send-flags', type=str, help='IPv4 fragmentation flags') - parser_send.add_argument('--send-frag-length', nargs=1, type=int, - help='Force IP fragmentation with given fragment length') - parser_send.add_argument('--send-hlim', nargs=1, type=int, + parser_send.add_argument('--send-frag-length', type=int, + help='Force IP fragmentation with given fragment length') + parser_send.add_argument('--send-hlim', type=int, help='IPv6 Hop Limit or IPv4 Time To Live') - parser_send.add_argument('--send-mss', nargs=1, type=int, + parser_send.add_argument('--send-mss', type=int, help='TCP Maximum Segment Size') - parser_send.add_argument('--send-seq', nargs=1, type=int, + parser_send.add_argument('--send-seq', type=int, help='TCP sequence number') - parser_send.add_argument('--send-length', nargs=1, type=int, - default=[len(PAYLOAD_MAGIC)], help='ICMP Echo Request payload size') - parser_send.add_argument('--send-tc', nargs=1, type=int, + parser_send.add_argument('--send-length', type=int, default=len(PAYLOAD_MAGIC), + help='ICMP Echo Request payload size') + parser_send.add_argument('--send-tc', type=int, help='IPv6 Traffic Class or IPv4 DiffServ / ToS') parser_send.add_argument('--send-tcpopt-unaligned', action='store_true', - help='Include unaligned TCP options') + help='Include unaligned TCP options') parser_send.add_argument('--send-nop', action='store_true', - help='Include a NOP IPv4 option') + help='Include a NOP IPv4 option') # Expectations parser_expect = parser.add_argument_group('Values expected in sniffed packets') - parser_expect.add_argument('--expect-flags', nargs=1, type=str, + parser_expect.add_argument('--expect-flags', type=str, help='IPv4 fragmentation flags') - parser_expect.add_argument('--expect-hlim', nargs=1, type=int, + parser_expect.add_argument('--expect-hlim', type=int, help='IPv6 Hop Limit or IPv4 Time To Live') - parser_expect.add_argument('--expect-mss', nargs=1, type=int, + parser_expect.add_argument('--expect-mss', type=int, help='TCP Maximum Segment Size') - parser_send.add_argument('--expect-seq', nargs=1, type=int, + parser_send.add_argument('--expect-seq', type=int, help='TCP sequence number') - parser_expect.add_argument('--expect-tc', nargs=1, type=int, + parser_expect.add_argument('--expect-tc', type=int, help='IPv6 Traffic Class or IPv4 DiffServ / ToS') parser.add_argument('-v', '--verbose', action='store_true', @@ -478,31 +476,26 @@ def main(): if args.verbose: LOGGER.setLevel(logging.DEBUG) - # Dig out real values of program arguments - send_if = args.sendif[0] - reply_ifs = args.replyif - recv_ifs = args.recvif - dst_address = args.to[0] - - # Standardize parameters which have nargs=1. + # Split parameters into send and expect parameters. Parameters might be + # missing from the command line, always fill the dictionaries with None. send_params = {} expect_params = {} for param_name in ('flags', 'hlim', 'length', 'mss', 'seq', 'tc', 'frag_length'): param_arg = vars(args).get(f'send_{param_name}') - send_params[param_name] = param_arg[0] if param_arg else None + send_params[param_name] = param_arg if param_arg else None param_arg = vars(args).get(f'expect_{param_name}') - expect_params[param_name] = param_arg[0] if param_arg else None + expect_params[param_name] = param_arg if param_arg else None expect_params['length'] = send_params['length'] send_params['tcpopt_unaligned'] = args.send_tcpopt_unaligned send_params['nop'] = args.send_nop - send_params['src_address'] = args.fromaddr[0] if args.fromaddr else None + send_params['src_address'] = args.fromaddr if args.fromaddr else None # We may not have a default route. Tell scapy where to start looking for routes - sp.conf.iface6 = send_if + sp.conf.iface6 = args.sendif # Configuration sanity checking. - if not (reply_ifs or recv_ifs): + if not (args.replyif or args.recvif): raise Exception('With no reply or recv interface specified no traffic ' 'can be sniffed and verified!' ) @@ -514,22 +507,22 @@ def main(): else: defrag = False - if recv_ifs: + if args.recvif: sniffer_params = copy(expect_params) sniffer_params['src_address'] = None - sniffer_params['dst_address'] = dst_address - for iface in recv_ifs: + sniffer_params['dst_address'] = args.to + for iface in args.recvif: LOGGER.debug(f'Installing receive sniffer on {iface}') sniffers.append( setup_sniffer(iface, args.ping_type, 'request', sniffer_params, defrag, )) - if reply_ifs: + if args.replyif: sniffer_params = copy(expect_params) - sniffer_params['src_address'] = dst_address + sniffer_params['src_address'] = args.to sniffer_params['dst_address'] = None - for iface in reply_ifs: + for iface in args.replyif: LOGGER.debug(f'Installing reply sniffer on {iface}') sniffers.append( setup_sniffer(iface, args.ping_type, 'reply', @@ -538,7 +531,7 @@ def main(): LOGGER.debug(f'Installed {len(sniffers)} sniffers') - send_ping(dst_address, send_if, args.ping_type, send_params) + send_ping(args.to, args.sendif, args.ping_type, send_params) err = 0 sniffer_num = 0 From nobody Wed Sep 25 12:34:26 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 4XDGPt5qfHz5XQcT; Wed, 25 Sep 2024 12:34:26 +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 4XDGPt58Msz4vTw; Wed, 25 Sep 2024 12:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727267666; 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=xHiNIzuSznN62dUTkEXbjedp58FESY54nyYZdKzBdNk=; b=g8JpCB0jc/OWMPRFVvuNCgo39+KO0MgK2m6/eQ7iuz4ip6Rj6WPEJEYm8ZxtyA1frrPdVf 4qG39XqeIvWRmY5nl2uECIaVcX3VZithVaCJDFjzuCGjZQj7EjTUiPGJrdzK+iceQdS0hp IvfuRL4HIZ5Z5kZuZQX0EmLvKPnrXzDzSKS20NhrKuxSBlLX5i1osXDC6hIOMriO32guDs SXKpz8CRs39T0dU2pmVdtSsEs/H9XGkG0Kcx34E6TxAYbgKkg/mjle4UGzHoTZbxkiBHc3 CCfzEjg3lgNUN1e9gXso+aE3U/JJTu6CrMVpYf4q1YU8QUjNpDEtetG0LNRojw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727267666; 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=xHiNIzuSznN62dUTkEXbjedp58FESY54nyYZdKzBdNk=; b=Ke9Pd5/6dhFR45J+d9DQiJxgmpisne/pjjVNmTnR3AuLwFQETD+TM1qwJ856aHHEAjRNgx KJ2LGgtlmlkZt8aSC3g/dYYCCGcOTrot9nE/z+C4yHyn5rqaaAs6VIeDPa4oGDUUrEV+i2 WtzXl79ZmZPi7LWgaZ2HfZdBaa7XwEzz8QMQf/Y26T+z/MNnwASxqgb7AkjAOcAfW24svp lV2qYvJvLnXUiVBBmw2usrq0+k7tT0uzwtwVAtpLeqKtay7EswoIWh8igWKJdP8MBcJnoE oNt7WEaD0PvCN3qbKMOAU6RDFF8XhJxKk//zmMTBw4MIPNGKVr24h8pphNMFLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727267666; a=rsa-sha256; cv=none; b=dmIuyzbOXobl3t1QkSbIP2O8nT1oMbuhg9yb9FmY+Om7KfKBkwKLeKPYPGTyXxkO6mFpuj Pp6nGKmbHUCJMnH+vJzVicAY8CRMK1VZTpAJoHAAd+UUr27idoSZgaXaMD3TVo2SGUIelF 5w3qMhc9+RWqD4sOKRRemMnNYaAIFmFKh7Yv6Ip8wliFq2dsMW7fgkUDn1VSc4exWukI/c tIWuyLl+oD0dand9AYSPbNX4oaH2Pn5Bs+3eMVnD28qp70IP11XAZI5mbWQqBB78WFveGN HXLCftilOFznpq6yRM3wCeYF0X9uBBrknHWRKciamOijkic8yiIEFb9JW2/9cQ== 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 4XDGPt4KBlz1CRL; Wed, 25 Sep 2024 12:34:26 +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 48PCYQba071582; Wed, 25 Sep 2024 12:34:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PCYQ8L071579; Wed, 25 Sep 2024 12:34:26 GMT (envelope-from git) Date: Wed, 25 Sep 2024 12:34:26 GMT Message-Id: <202409251234.48PCYQ8L071579@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 4f9e688708f1 - main - pf: merge pf_scrub_ip() and pf_scrub_ip6() 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f9e688708f1bead81954c429f7eca5109ee454b Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4f9e688708f1bead81954c429f7eca5109ee454b commit 4f9e688708f1bead81954c429f7eca5109ee454b Author: Kristof Provost AuthorDate: 2024-09-06 11:32:53 +0000 Commit: Kristof Provost CommitDate: 2024-09-25 10:44:18 +0000 pf: merge pf_scrub_ip() and pf_scrub_ip6() Merge pf_scrub_ip() and pf_scrub_ip6() into a single function. Call pf_scrub with the right arugments in the rule case so that match rules will work as expected. OK henning@ Obtained from: OpenBSD, claudio , 48c45e6969 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46597 --- sys/net/pfvar.h | 9 +++----- sys/netpfil/pf/pf.c | 4 ++-- sys/netpfil/pf/pf_norm.c | 60 +++++++++++++++++++++++++----------------------- 3 files changed, 36 insertions(+), 37 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 0dfa58979f16..61752a146b57 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2642,12 +2642,9 @@ void pf_rule_to_actions(struct pf_krule *, struct pf_rule_actions *); int pf_normalize_mss(struct mbuf *m, int off, struct pf_pdesc *pd); -#ifdef INET -void pf_scrub_ip(struct mbuf *, struct pf_pdesc *); -#endif /* INET */ -#ifdef INET6 -void pf_scrub_ip6(struct mbuf *, struct pf_pdesc *); -#endif /* INET6 */ +#if defined(INET) || defined(INET6) +void pf_scrub(struct mbuf *, struct pf_pdesc *); +#endif struct pfi_kkif *pf_kkif_create(int); void pf_kkif_free(struct pfi_kkif *); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index d4adf1363cdf..456fdd0aa9bd 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9221,7 +9221,7 @@ done: REASON_SET(&reason, PFRES_MEMORY); } - pf_scrub_ip(m, &pd); + pf_scrub(m, &pd); if (pd.proto == IPPROTO_TCP && pd.act.max_mss) pf_normalize_mss(m, off, &pd); @@ -9676,7 +9676,7 @@ done: REASON_SET(&reason, PFRES_MEMORY); } - pf_scrub_ip6(m, &pd); + pf_scrub(m, &pd); if (pd.proto == IPPROTO_TCP && pd.act.max_mss) pf_normalize_mss(m, off, &pd); diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 284660767224..926529330619 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -2267,14 +2267,20 @@ sctp_drop: return (PF_DROP); } -#ifdef INET +#if defined(INET) || defined(INET6) void -pf_scrub_ip(struct mbuf *m, struct pf_pdesc *pd) +pf_scrub(struct mbuf *m, struct pf_pdesc *pd) { + struct ip *h = mtod(m, struct ip *); +#ifdef INET6 + struct ip6_hdr *h6 = mtod(m, struct ip6_hdr *); +#endif /* Clear IP_DF if no-df was requested */ - if (pd->act.flags & PFSTATE_NODF && h->ip_off & htons(IP_DF)) { + if (pd->af == AF_INET && pd->act.flags & PFSTATE_NODF && + h->ip_off & htons(IP_DF)) + { u_int16_t ip_off = h->ip_off; h->ip_off &= htons(~IP_DF); @@ -2282,48 +2288,44 @@ pf_scrub_ip(struct mbuf *m, struct pf_pdesc *pd) } /* Enforce a minimum ttl, may cause endless packet loops */ - if (pd->act.min_ttl && h->ip_ttl < pd->act.min_ttl) { + if (pd->af == AF_INET && pd->act.min_ttl && + h->ip_ttl < pd->act.min_ttl) { u_int16_t ip_ttl = h->ip_ttl; h->ip_ttl = pd->act.min_ttl; h->ip_sum = pf_cksum_fixup(h->ip_sum, ip_ttl, h->ip_ttl, 0); } - +#ifdef INET6 + /* Enforce a minimum ttl, may cause endless packet loops */ + if (pd->af == AF_INET6 && pd->act.min_ttl && + h6->ip6_hlim < pd->act.min_ttl) + h6->ip6_hlim = pd->act.min_ttl; +#endif /* Enforce tos */ if (pd->act.flags & PFSTATE_SETTOS) { - u_int16_t ov, nv; + if (pd->af == AF_INET) { + u_int16_t ov, nv; - ov = *(u_int16_t *)h; - h->ip_tos = pd->act.set_tos | (h->ip_tos & IPTOS_ECN_MASK); - nv = *(u_int16_t *)h; + ov = *(u_int16_t *)h; + h->ip_tos = pd->act.set_tos | (h->ip_tos & IPTOS_ECN_MASK); + nv = *(u_int16_t *)h; - h->ip_sum = pf_cksum_fixup(h->ip_sum, ov, nv, 0); + h->ip_sum = pf_cksum_fixup(h->ip_sum, ov, nv, 0); +#ifdef INET6 + } else if (pd->af == AF_INET6) { + h6->ip6_flow &= IPV6_FLOWLABEL_MASK | IPV6_VERSION_MASK; + h6->ip6_flow |= htonl((pd->act.set_tos | IPV6_ECN(h6)) << 20); +#endif + } } /* random-id, but not for fragments */ - if (pd->act.flags & PFSTATE_RANDOMID && !(h->ip_off & ~htons(IP_DF))) { + if (pd->af == AF_INET && + pd->act.flags & PFSTATE_RANDOMID && !(h->ip_off & ~htons(IP_DF))) { uint16_t ip_id = h->ip_id; ip_fillid(h); h->ip_sum = pf_cksum_fixup(h->ip_sum, ip_id, h->ip_id, 0); } } -#endif /* INET */ - -#ifdef INET6 -void -pf_scrub_ip6(struct mbuf *m, struct pf_pdesc *pd) -{ - struct ip6_hdr *h = mtod(m, struct ip6_hdr *); - - /* Enforce a minimum ttl, may cause endless packet loops */ - if (pd->act.min_ttl && h->ip6_hlim < pd->act.min_ttl) - h->ip6_hlim = pd->act.min_ttl; - - /* Enforce tos. Set traffic class bits */ - if (pd->act.flags & PFSTATE_SETTOS) { - h->ip6_flow &= IPV6_FLOWLABEL_MASK | IPV6_VERSION_MASK; - h->ip6_flow |= htonl((pd->act.set_tos | IPV6_ECN(h)) << 20); - } -} #endif From nobody Wed Sep 25 12:34:27 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 4XDGPv6BlPz5XQ8t; Wed, 25 Sep 2024 12:34:27 +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 4XDGPv5YMrz4vTx; Wed, 25 Sep 2024 12:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727267667; 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=wKQRqdsaQZl0D0dvGO80jmG/se8GNcI0B2Tvu+dr7Pw=; b=OkCQ4JHy6Resb9sOG1MI2hlHU18v2PLkfpL+TYYsR4tJ6OPHi5534xM5OUIOnrTw7UM3/I 91bGT+yw4joBsmvKqzv82DrJ36qtVTehIOvhcNtcMFgDB521K/0Q1yAkgwFEDthSGxKhff m7Scc20q4id3qzW8/sb4yJZFAGqUdHi5pljglH74wAohz1CM/4KyZTolxtrLdsZa3TOHO5 ZFD+Y8CqXHJmMaee0ViUNASZ3go0nWaEA0o11jTi+ioht6fsWB6WMAb0A9ev1eSdvsZkMv yeMHk7QvOpOgeXQsACLdhVQnopFUzWBWqF9icQr5wxlsR12Ye0PbPvmaxQMRrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727267667; 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=wKQRqdsaQZl0D0dvGO80jmG/se8GNcI0B2Tvu+dr7Pw=; b=hepnbbBWCZanUtOgbMuHpfNaMB+Xn3Cw2EDp2G1R3lqsKVT2n5V4a1Un0JGxUfv81OIALh UdEgyWKXxIQL6qbBxp6vewj3Wvm2RtuJrYFwQaj8pDmFTk/HWiCXC213wbUaWwyRej+EYn O5b+JMWZQP0Xk3uB/FOCc5nLS/XJL/wJMYPJ0rWzjBmoh7XTF764HK2g5RO91UVLX2kyDx sQpSNdnMeKrkman8zcdHbAk8bExW8l21nW8zXtu/BD+LoUUK4seLacNnZFtepafMBkVgi5 34UZ4Ke9SBkxN5jCwQRPs+BM4c+EWXhmQDvCUhHz9c0fDAwoHma7cSHquFMUeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727267667; a=rsa-sha256; cv=none; b=Q1I7pboUAfJPwlDGmhU338hjnpzu1mLMLU1ex8QVjeSTgK3SKqKGrpMelEg/OjFaVWauqm OOABMBtbkVLEkKrTVbFR6yR0b/jYXU5if+Fb/9vTdzK5D3yg4r4DTYvOApkE6ajSV4qNFz lnl8T3KxYS1YEYbsqCD1VH+ifDtnZuIjJCPbWlX4WIsWP7lMfwapictBt+9MtNP36S3MHQ 41N2RPx9WK5p0yt/DfTaJO4dWH1WJ7ah6gU7I5z/iR53zq8ZJ/K7WR+pvoob2Yq/dznH5W 3htMEkjmehHoVW1h7xLNWrZxsNH9KWHwF5Dr72ijp8VCEJlZqFOEUh4+Ir9sxQ== 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 4XDGPv58cqz1CRM; Wed, 25 Sep 2024 12:34:27 +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 48PCYRuq071633; Wed, 25 Sep 2024 12:34:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PCYR0q071630; Wed, 25 Sep 2024 12:34:27 GMT (envelope-from git) Date: Wed, 25 Sep 2024 12:34:27 GMT Message-Id: <202409251234.48PCYR0q071630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: dd04fa71a8cb - main - pf: remove unused argument 'h' from various function 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd04fa71a8cbd43047c41453b54c2224bf40ddb9 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=dd04fa71a8cbd43047c41453b54c2224bf40ddb9 commit dd04fa71a8cbd43047c41453b54c2224bf40ddb9 Author: Kristof Provost AuthorDate: 2024-09-06 14:24:38 +0000 Commit: Kristof Provost CommitDate: 2024-09-25 10:44:22 +0000 pf: remove unused argument 'h' from various function Reviewed by: zlei Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46598 --- sys/net/pfvar.h | 4 ++-- sys/netpfil/pf/pf.c | 52 ++++++++++++++++++++++++------------------------ sys/netpfil/pf/pf_norm.c | 4 ++-- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 61752a146b57..9ad079f9f95b 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2405,7 +2405,7 @@ int pf_match_port(u_int8_t, u_int16_t, u_int16_t, u_int16_t); void pf_normalize_init(void); void pf_normalize_cleanup(void); -int pf_normalize_tcp(struct pfi_kkif *, struct mbuf *, int, int, void *, +int pf_normalize_tcp(struct pfi_kkif *, struct mbuf *, int, int, struct pf_pdesc *); void pf_normalize_tcp_cleanup(struct pf_kstate *); int pf_normalize_tcp_init(struct mbuf *, int, struct pf_pdesc *, @@ -2416,7 +2416,7 @@ int pf_normalize_tcp_stateful(struct mbuf *, int, struct pf_pdesc *, int pf_normalize_sctp_init(struct mbuf *, int, struct pf_pdesc *, struct pf_state_peer *, struct pf_state_peer *); int pf_normalize_sctp(int, struct pfi_kkif *, struct mbuf *, int, - int, void *, struct pf_pdesc *); + int, struct pf_pdesc *); u_int32_t pf_state_expires(const struct pf_kstate *); void pf_purge_expired_fragments(void); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 456fdd0aa9bd..e65d848d7cc9 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -336,7 +336,7 @@ static int pf_state_key_addr_setup(struct pf_pdesc *, struct mbuf *, int, struct pf_state_key_cmp *, int, struct pf_addr *, int, struct pf_addr *, int); static int pf_test_fragment(struct pf_krule **, struct pfi_kkif *, - struct mbuf *, void *, struct pf_pdesc *, + struct mbuf *, struct pf_pdesc *, struct pf_krule **, struct pf_kruleset **); static int pf_tcp_track_full(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, @@ -345,23 +345,23 @@ static int pf_tcp_track_sloppy(struct pf_kstate **, struct pf_pdesc *, u_short *); static int pf_test_state_tcp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, - void *, struct pf_pdesc *, u_short *); + struct pf_pdesc *, u_short *); static int pf_test_state_udp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, - void *, struct pf_pdesc *); + struct pf_pdesc *); int pf_icmp_state_lookup(struct pf_state_key_cmp *, struct pf_pdesc *, struct pf_kstate **, struct mbuf *, int, int, struct pfi_kkif *, u_int16_t, u_int16_t, int, int *, int, int); static int pf_test_state_icmp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, - void *, struct pf_pdesc *, u_short *); + struct pf_pdesc *, u_short *); static void pf_sctp_multihome_detach_addr(const struct pf_kstate *); static void pf_sctp_multihome_delayed(struct pf_pdesc *, int, struct pfi_kkif *, struct pf_kstate *, int); static int pf_test_state_sctp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, - void *, struct pf_pdesc *, u_short *); + struct pf_pdesc *, u_short *); static int pf_test_state_other(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, struct pf_pdesc *); static u_int16_t pf_calc_mss(struct pf_addr *, sa_family_t, @@ -5586,7 +5586,7 @@ drop: static int pf_test_fragment(struct pf_krule **rm, struct pfi_kkif *kif, - struct mbuf *m, void *h, struct pf_pdesc *pd, struct pf_krule **am, + struct mbuf *m, struct pf_pdesc *pd, struct pf_krule **am, struct pf_kruleset **rsm) { struct pf_krule *r, *a = NULL; @@ -6235,7 +6235,7 @@ pf_synproxy(struct pf_pdesc *pd, struct pf_kstate **state, u_short *reason) static int pf_test_state_tcp(struct pf_kstate **state, struct pfi_kkif *kif, - struct mbuf *m, int off, void *h, struct pf_pdesc *pd, + struct mbuf *m, int off, struct pf_pdesc *pd, u_short *reason) { struct pf_state_key_cmp key; @@ -6326,7 +6326,7 @@ pf_test_state_tcp(struct pf_kstate **state, struct pfi_kkif *kif, static int pf_test_state_udp(struct pf_kstate **state, struct pfi_kkif *kif, - struct mbuf *m, int off, void *h, struct pf_pdesc *pd) + struct mbuf *m, int off, struct pf_pdesc *pd) { struct pf_state_peer *src, *dst; struct pf_state_key_cmp key; @@ -6398,7 +6398,7 @@ pf_test_state_udp(struct pf_kstate **state, struct pfi_kkif *kif, static int pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, - struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason) + struct mbuf *m, int off, struct pf_pdesc *pd, u_short *reason) { struct pf_state_key_cmp key; struct pf_state_peer *src, *dst; @@ -6976,7 +6976,7 @@ pf_icmp_state_lookup(struct pf_state_key_cmp *key, struct pf_pdesc *pd, static int pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, - struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason) + struct mbuf *m, int off, struct pf_pdesc *pd, u_short *reason) { struct pf_addr *saddr = pd->src, *daddr = pd->dst; u_int16_t *icmpsum, virtual_id, virtual_type; @@ -8692,7 +8692,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf *m, *action = PF_DROP; else *action = pf_test_fragment(r, kif, - m, h, pd, a, ruleset); + m, pd, a, ruleset); if (*action == PF_DROP) REASON_SET(reason, PFRES_FRAG); return (-1); @@ -9063,7 +9063,7 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, /* handle fragments that didn't get reassembled by normalization */ if (h->ip_off & htons(IP_MF | IP_OFFMASK)) { - action = pf_test_fragment(&r, kif, m, h, &pd, &a, &ruleset); + action = pf_test_fragment(&r, kif, m, &pd, &a, &ruleset); goto done; } @@ -9080,10 +9080,10 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, if ((pd.hdr.tcp.th_flags & TH_ACK) && pd.p_len == 0) use_2nd_queue = 1; - action = pf_normalize_tcp(kif, m, 0, off, h, &pd); + action = pf_normalize_tcp(kif, m, 0, off, &pd); if (action == PF_DROP) goto done; - action = pf_test_state_tcp(&s, kif, m, off, h, &pd, &reason); + action = pf_test_state_tcp(&s, kif, m, off, &pd, &reason); if (action == PF_PASS) { if (V_pfsync_update_state_ptr != NULL) V_pfsync_update_state_ptr(s); @@ -9110,7 +9110,7 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, if (action != PF_PASS) break; - action = pf_test_state_tcp(&s, kif, m, off, h, + action = pf_test_state_tcp(&s, kif, m, off, &pd, &reason); if (action != PF_PASS || s == NULL) { action = PF_DROP; @@ -9131,7 +9131,7 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, } case IPPROTO_UDP: { - action = pf_test_state_udp(&s, kif, m, off, h, &pd); + action = pf_test_state_udp(&s, kif, m, off, &pd); if (action == PF_PASS) { if (V_pfsync_update_state_ptr != NULL) V_pfsync_update_state_ptr(s); @@ -9144,10 +9144,10 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, } case IPPROTO_SCTP: { - action = pf_normalize_sctp(dir, kif, m, 0, off, h, &pd); + action = pf_normalize_sctp(dir, kif, m, 0, off, &pd); if (action == PF_DROP) goto done; - action = pf_test_state_sctp(&s, kif, m, off, h, &pd, + action = pf_test_state_sctp(&s, kif, m, off, &pd, &reason); if (action == PF_PASS) { if (V_pfsync_update_state_ptr != NULL) @@ -9162,7 +9162,7 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, } case IPPROTO_ICMP: { - action = pf_test_state_icmp(&s, kif, m, off, h, &pd, &reason); + action = pf_test_state_icmp(&s, kif, m, off, &pd, &reason); if (action == PF_PASS) { if (V_pfsync_update_state_ptr != NULL) V_pfsync_update_state_ptr(s); @@ -9528,10 +9528,10 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb if ((pd.hdr.tcp.th_flags & TH_ACK) && pd.p_len == 0) use_2nd_queue = 1; - action = pf_normalize_tcp(kif, m, 0, off, h, &pd); + action = pf_normalize_tcp(kif, m, 0, off, &pd); if (action == PF_DROP) goto done; - action = pf_test_state_tcp(&s, kif, m, off, h, &pd, &reason); + action = pf_test_state_tcp(&s, kif, m, off, &pd, &reason); if (action == PF_PASS) { if (V_pfsync_update_state_ptr != NULL) V_pfsync_update_state_ptr(s); @@ -9558,7 +9558,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb if (action != PF_PASS) break; - action = pf_test_state_tcp(&s, kif, m, off, h, + action = pf_test_state_tcp(&s, kif, m, off, &pd, &reason); if (action != PF_PASS || s == NULL) { action = PF_DROP; @@ -9580,7 +9580,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb } case IPPROTO_UDP: { - action = pf_test_state_udp(&s, kif, m, off, h, &pd); + action = pf_test_state_udp(&s, kif, m, off, &pd); if (action == PF_PASS) { if (V_pfsync_update_state_ptr != NULL) V_pfsync_update_state_ptr(s); @@ -9593,10 +9593,10 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb } case IPPROTO_SCTP: { - action = pf_normalize_sctp(dir, kif, m, 0, off, h, &pd); + action = pf_normalize_sctp(dir, kif, m, 0, off, &pd); if (action == PF_DROP) goto done; - action = pf_test_state_sctp(&s, kif, m, off, h, &pd, + action = pf_test_state_sctp(&s, kif, m, off, &pd, &reason); if (action == PF_PASS) { if (V_pfsync_update_state_ptr != NULL) @@ -9618,7 +9618,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb } case IPPROTO_ICMPV6: { - action = pf_test_state_icmp(&s, kif, m, off, h, &pd, &reason); + action = pf_test_state_icmp(&s, kif, m, off, &pd, &reason); if (action == PF_PASS) { if (V_pfsync_update_state_ptr != NULL) V_pfsync_update_state_ptr(s); diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 926529330619..c4cc482c62f0 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -1385,7 +1385,7 @@ again: int pf_normalize_tcp(struct pfi_kkif *kif, struct mbuf *m, int ipoff, - int off, void *h, struct pf_pdesc *pd) + int off, struct pf_pdesc *pd) { struct pf_krule *r, *rm = NULL; struct tcphdr *th = &pd->hdr.tcp; @@ -2193,7 +2193,7 @@ pf_scan_sctp(struct mbuf *m, int off, struct pf_pdesc *pd, int pf_normalize_sctp(int dir, struct pfi_kkif *kif, struct mbuf *m, int ipoff, - int off, void *h, struct pf_pdesc *pd) + int off, struct pf_pdesc *pd) { struct pf_krule *r, *rm = NULL; struct sctphdr *sh = &pd->hdr.sctp; From nobody Wed Sep 25 12:34:28 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 4XDGPx32Sfz5XQLC; Wed, 25 Sep 2024 12:34:29 +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 4XDGPw6qDwz4vlc; Wed, 25 Sep 2024 12:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727267669; 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=qcSbMfKsRkSL6qT9FRB5kEzPBpL1Rc5wsVpCTO+mICo=; b=hZEUpESpxNwF4Ub86tYXJMrWJD1MNyorfSYqDj7nW2+4Gj4k8mtwGChA5tKijLMFbAP+a/ dYe+1gZ6241mNhYDfLnaMEocmqxhWMcxGAPKyVumf+qqkVowaZu66vXPqLi67qkJmETEZ3 g+POLQmX3uoVk60t4+UgpYXGKAmtj04bFATNpgLf9ITUqxmYFlYLquzkJHOXL2TFtDYcta Y6RNVOPJXrg3j4dQb967Hl7v5DYHPTVCvk47sJgQyFWnkgJE3z17Uuq2L30551vmk3744X Mgnz8v9Ch83xV4sxCYaLDy+FjuN6G63Jwb7QcRbiksXHa8Uw5JKcBVIkv21wfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727267669; 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=qcSbMfKsRkSL6qT9FRB5kEzPBpL1Rc5wsVpCTO+mICo=; b=ABBzQiy34+CalM8ilr8/P90ziDqpXSD7rVlHavsGCMS1IbWkFDUEC/FSCb6cB3v8EXhUxr DHEEz7CUFmgdTmZ9LQH6xErRG0rTF+BKBdj9Af1zHmdx3i3k3ZyLOswj4TUuB8MBEAwhrs W7aOTcs6vLVw9+Oe/FhSV+m7LyBSvQWvJ5gNHzCPQhvvVAavnRTW6vgjwiPcityYxHQsBD KtIhvQag8qNxgleDwHmBec10iCHu0kCjhGHFwEb1e+nGWqOGmKTho219DSYQ4jWKpJaHQy eOKV/F1OQE3+NlidIEqhtQQTNG0DHfcrXW52ocCmR7E0WFh7fr2Lr5zdoigRhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727267669; a=rsa-sha256; cv=none; b=xAuHQENbgTxpdPzckkE7J2Abxmbe+C21fzjv5lgddURel5PTqUnBQNVOrWcf18lCwEJ6Yo EL0LM47xOcEfbqAQpL1RLCFGtoegYQY80/ij0bm/fKFHlgKiBQMgsSoQW7sKeG1sQ3EpCo d/omIUWcDR59EcS5BOat4cigJ3MqplerIv+qp2zopl4n6kzfY1EvmqyknYZPxQ7iFnuQ87 CC1nzJQf332Sf0sGg/70PViN247j/e7zsxGg/SYSibx28+wXrEMizqNEKeK1E+1DLdPLdR v0FzwlC6oq4XLFlKsAj68TVymzYRYJHTdTB+ROr+RAkTnmyoORtR6NDahDZ0Wg== 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 4XDGPw6DY4z1CX3; Wed, 25 Sep 2024 12:34:28 +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 48PCYS5g071686; Wed, 25 Sep 2024 12:34:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PCYSaM071683; Wed, 25 Sep 2024 12:34:28 GMT (envelope-from git) Date: Wed, 25 Sep 2024 12:34:28 GMT Message-Id: <202409251234.48PCYSaM071683@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 905db4aa8877 - main - pf: dedupe layer 4 protocol code in pf_setup_pdesc() 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 905db4aa88775865097714c170f4503da385747c Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=905db4aa88775865097714c170f4503da385747c commit 905db4aa88775865097714c170f4503da385747c Author: Kristof Provost AuthorDate: 2024-09-10 18:17:13 +0000 Commit: Kristof Provost CommitDate: 2024-09-25 10:44:30 +0000 pf: dedupe layer 4 protocol code in pf_setup_pdesc() In pf_setup_pdesc() the code for analysing TCP and UDP headers was the same for v4 and v6. Deduplicate by moving the protocol switch after the address family switch. ok henning@ claudio@ Obtained from: OpenBSD, bluhm , 72cf18cc6e Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46647 --- sys/netpfil/pf/pf.c | 255 ++++++++++++++++++++-------------------------------- 1 file changed, 97 insertions(+), 158 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index e65d848d7cc9..215f2655d9d4 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8590,78 +8590,6 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf *m, if (h->ip_off & htons(IP_MF | IP_OFFMASK)) return (0); - switch (h->ip_p) { - case IPPROTO_TCP: { - struct tcphdr *th = &pd->hdr.tcp; - - if (!pf_pull_hdr(m, *off, th, sizeof(*th), action, - reason, AF_INET)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - *hdrlen = sizeof(*th); - pd->p_len = pd->tot_len - *off - (th->th_off << 2); - pd->sport = &th->th_sport; - pd->dport = &th->th_dport; - break; - } - case IPPROTO_UDP: { - struct udphdr *uh = &pd->hdr.udp; - - if (!pf_pull_hdr(m, *off, uh, sizeof(*uh), action, - reason, AF_INET)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - *hdrlen = sizeof(*uh); - if (uh->uh_dport == 0 || - ntohs(uh->uh_ulen) > m->m_pkthdr.len - *off || - ntohs(uh->uh_ulen) < sizeof(struct udphdr)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - pd->sport = &uh->uh_sport; - pd->dport = &uh->uh_dport; - break; - } - case IPPROTO_SCTP: { - if (!pf_pull_hdr(m, *off, &pd->hdr.sctp, sizeof(pd->hdr.sctp), - action, reason, AF_INET)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - *hdrlen = sizeof(pd->hdr.sctp); - pd->p_len = pd->tot_len - *off; - - pd->sport = &pd->hdr.sctp.src_port; - pd->dport = &pd->hdr.sctp.dest_port; - if (pd->hdr.sctp.src_port == 0 || pd->hdr.sctp.dest_port == 0) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - if (pf_scan_sctp(m, *off, pd, kif) != PF_PASS) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - break; - } - case IPPROTO_ICMP: { - if (!pf_pull_hdr(m, *off, &pd->hdr.icmp, ICMP_MINLEN, - action, reason, AF_INET)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - *hdrlen = ICMP_MINLEN; - break; - } - } break; } #endif @@ -8750,103 +8678,114 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf *m, } } while (!terminal); - switch (pd->proto) { - case IPPROTO_TCP: { - struct tcphdr *th = &pd->hdr.tcp; + break; + } +#endif + default: + panic("pf_setup_pdesc called with illegal af %u", af); + } - if (!pf_pull_hdr(m, *off, th, sizeof(*th), action, - reason, AF_INET6)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - *hdrlen = sizeof(*th); - pd->p_len = pd->tot_len - *off - (th->th_off << 2); - pd->sport = &th->th_sport; - pd->dport = &th->th_dport; - break; + switch (pd->proto) { + case IPPROTO_TCP: { + struct tcphdr *th = &pd->hdr.tcp; + + if (!pf_pull_hdr(m, *off, th, sizeof(*th), action, + reason, af)) { + *action = PF_DROP; + REASON_SET(reason, PFRES_SHORT); + return (-1); } - case IPPROTO_UDP: { - struct udphdr *uh = &pd->hdr.udp; + *hdrlen = sizeof(*th); + pd->p_len = pd->tot_len - *off - (th->th_off << 2); + pd->sport = &th->th_sport; + pd->dport = &th->th_dport; + break; + } + case IPPROTO_UDP: { + struct udphdr *uh = &pd->hdr.udp; - if (!pf_pull_hdr(m, *off, uh, sizeof(*uh), action, - reason, AF_INET6)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - *hdrlen = sizeof(*uh); - if (uh->uh_dport == 0 || - ntohs(uh->uh_ulen) > m->m_pkthdr.len - *off || - ntohs(uh->uh_ulen) < sizeof(struct udphdr)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - pd->sport = &uh->uh_sport; - pd->dport = &uh->uh_dport; - break; + if (!pf_pull_hdr(m, *off, uh, sizeof(*uh), action, + reason, af)) { + *action = PF_DROP; + REASON_SET(reason, PFRES_SHORT); + return (-1); } - case IPPROTO_SCTP: { - if (!pf_pull_hdr(m, *off, &pd->hdr.sctp, sizeof(pd->hdr.sctp), - action, reason, AF_INET6)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - *hdrlen = sizeof(pd->hdr.sctp); - pd->p_len = pd->tot_len - *off; - - pd->sport = &pd->hdr.sctp.src_port; - pd->dport = &pd->hdr.sctp.dest_port; - if (pd->hdr.sctp.src_port == 0 || pd->hdr.sctp.dest_port == 0) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - if (pf_scan_sctp(m, *off, pd, kif) != PF_PASS) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - break; + *hdrlen = sizeof(*uh); + if (uh->uh_dport == 0 || + ntohs(uh->uh_ulen) > m->m_pkthdr.len - *off || + ntohs(uh->uh_ulen) < sizeof(struct udphdr)) { + *action = PF_DROP; + REASON_SET(reason, PFRES_SHORT); + return (-1); } - case IPPROTO_ICMPV6: { - size_t icmp_hlen = sizeof(struct icmp6_hdr); + pd->sport = &uh->uh_sport; + pd->dport = &uh->uh_dport; + break; + } + case IPPROTO_SCTP: { + if (!pf_pull_hdr(m, *off, &pd->hdr.sctp, sizeof(pd->hdr.sctp), + action, reason, af)) { + *action = PF_DROP; + REASON_SET(reason, PFRES_SHORT); + return (-1); + } + *hdrlen = sizeof(pd->hdr.sctp); + pd->p_len = pd->tot_len - *off; - if (!pf_pull_hdr(m, *off, &pd->hdr.icmp6, icmp_hlen, - action, reason, AF_INET6)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - /* ICMP headers we look further into to match state */ - switch (pd->hdr.icmp6.icmp6_type) { - case MLD_LISTENER_QUERY: - case MLD_LISTENER_REPORT: - icmp_hlen = sizeof(struct mld_hdr); - break; - case ND_NEIGHBOR_SOLICIT: - case ND_NEIGHBOR_ADVERT: - icmp_hlen = sizeof(struct nd_neighbor_solicit); - break; - } - if (icmp_hlen > sizeof(struct icmp6_hdr) && - !pf_pull_hdr(m, *off, &pd->hdr.icmp6, icmp_hlen, - action, reason, AF_INET6)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } - *hdrlen = icmp_hlen; + pd->sport = &pd->hdr.sctp.src_port; + pd->dport = &pd->hdr.sctp.dest_port; + if (pd->hdr.sctp.src_port == 0 || pd->hdr.sctp.dest_port == 0) { + *action = PF_DROP; + REASON_SET(reason, PFRES_SHORT); + return (-1); + } + if (pf_scan_sctp(m, *off, pd, kif) != PF_PASS) { + *action = PF_DROP; + REASON_SET(reason, PFRES_SHORT); + return (-1); + } + break; + } + case IPPROTO_ICMP: { + if (!pf_pull_hdr(m, *off, &pd->hdr.icmp, ICMP_MINLEN, + action, reason, af)) { + *action = PF_DROP; + REASON_SET(reason, PFRES_SHORT); + return (-1); + } + *hdrlen = ICMP_MINLEN; + break; + } + case IPPROTO_ICMPV6: { + size_t icmp_hlen = sizeof(struct icmp6_hdr); + + if (!pf_pull_hdr(m, *off, &pd->hdr.icmp6, icmp_hlen, + action, reason, af)) { + *action = PF_DROP; + REASON_SET(reason, PFRES_SHORT); + return (-1); + } + /* ICMP headers we look further into to match state */ + switch (pd->hdr.icmp6.icmp6_type) { + case MLD_LISTENER_QUERY: + case MLD_LISTENER_REPORT: + icmp_hlen = sizeof(struct mld_hdr); + break; + case ND_NEIGHBOR_SOLICIT: + case ND_NEIGHBOR_ADVERT: + icmp_hlen = sizeof(struct nd_neighbor_solicit); break; } + if (icmp_hlen > sizeof(struct icmp6_hdr) && + !pf_pull_hdr(m, *off, &pd->hdr.icmp6, icmp_hlen, + action, reason, af)) { + *action = PF_DROP; + REASON_SET(reason, PFRES_SHORT); + return (-1); } + *hdrlen = icmp_hlen; break; } -#endif - default: - panic("pf_setup_pdesc called with illegal af %u", af); } return (0); } From nobody Wed Sep 25 12:34:29 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 4XDGPy26W9z5XQZp; Wed, 25 Sep 2024 12:34:30 +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 4XDGPy0XkZz4vrS; Wed, 25 Sep 2024 12:34:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727267670; 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=KPqLjEwDW4a/PPGtcwTXx8V7YpEJ7AfbMVlpAJmcSGc=; b=c7Q5j7xoN3e5kzbLD1ajzEYuV8vMVvaEsFTh3gTHgM7AKfiKZkEGW6rZ5GQlb5f3iL3k/n 8OEDfo3pAOgYX0kisyUrFHk5tRHsQXasS3vgmRoSir9kJQszutvQQ3iaEbznHw4g7xP6Ok PeEcLO1oDccOVaoQLwSoOSCi7nHw/c8VAtJqpuGjYhSMjqWb2ooS87Hedh0jBDmEa2+Ql9 ZdMhZfG9NQ9rRDEaFGIwVXDbHLXOR6I7HiulFuBg1ORLA7t7SgoThsqaVFZZPcpFadqGY3 IN2iGlbiqKCk34ZIOqtJL3f5ozuvlHtpfTsyQFocDMEImYLS8xFvNJlcZkHR/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727267670; 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=KPqLjEwDW4a/PPGtcwTXx8V7YpEJ7AfbMVlpAJmcSGc=; b=ozjBXfpA8bZcLKBS3xVjQju/Aqme1ZJMfvYp41YPSGGYh2PLUxyGTgnh+pLm0eBFL3gxi/ XjLNGpKTHidYqhSaNztHDJU1vjn809CAYGVzXCMRvs79RblfdUM69zGTNbOYdMeZ+bMrs+ vP8++cI4kXuCRzHJ88emg9bDvf0UqLBgLom0ddwO0rdBVLSuA0gZckdp+F4CNrhF6yZ5tR rpH+YBSEQe633mgedUwE2okASPkaZnG1HDNJa5xmcXKkBXWpBpw4j3F4SHwaXAMQEq+nxF vhcOzacCQxrmN9oAQL3vOih/+y8ECXM9rwyB5a7WzIdVoxxjNs8vflg8uOpkEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727267670; a=rsa-sha256; cv=none; b=YMILcYITIdKts//dDrywWM6K6t/u+Rxk6/AmJQJ1F1wXZ2Bk+Zs2DhDhbyYOhivxuUcBP4 eDavcAcYnZZtMmIidJR41XGcgQqMStH0gkFQeeQPacnr43FFhxpjCkw6oS35MccIiR9Vr5 SdpCg0mIrNP2M/6swqjEWKVHyzPG/AhdK4DrkeuYUnR9pZFUzKm9hQDH/yRBIfTfWFntS6 NaG5Z1GHeVcl4huStEMQX37X7KlwFVsGlMRs37+uJpmX0G1utRQ4KPZKUFQUKNicFW0nfW v+QdUJtegVcmYMR83e1WpsI/7vJL9O1TMlfPRO3Sei1rD9YzwbevuNsWSLknAw== 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 4XDGPy06l3z1CX4; Wed, 25 Sep 2024 12:34:30 +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 48PCYTDi071725; Wed, 25 Sep 2024 12:34:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PCYTwC071722; Wed, 25 Sep 2024 12:34:29 GMT (envelope-from git) Date: Wed, 25 Sep 2024 12:34:29 GMT Message-Id: <202409251234.48PCYTwC071722@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 6d51791d2832 - main - pf: remove pointless CURVNET_SET 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d51791d2832fb428b99d4c0ab22b392980bd27b Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6d51791d2832fb428b99d4c0ab22b392980bd27b commit 6d51791d2832fb428b99d4c0ab22b392980bd27b Author: Kristof Provost AuthorDate: 2024-09-11 07:13:21 +0000 Commit: Kristof Provost CommitDate: 2024-09-25 10:44:34 +0000 pf: remove pointless CURVNET_SET We're already in the correct vnet when the pfil hook is called. Remove the pointless set/restore. Reviewed by: glebius, zlei Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46648 --- sys/netpfil/pf/pf_ioctl.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index e205c5ca0c38..dcdab6029558 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -6442,6 +6442,8 @@ pf_eth_check_in(struct mbuf **m, struct ifnet *ifp, int flags, { int chk; + CURVNET_ASSERT_SET(); + chk = pf_test_eth(PF_IN, flags, ifp, m, inp); return (pf_check_return(chk, m)); @@ -6453,6 +6455,8 @@ pf_eth_check_out(struct mbuf **m, struct ifnet *ifp, int flags, { int chk; + CURVNET_ASSERT_SET(); + chk = pf_test_eth(PF_OUT, flags, ifp, m, inp); return (pf_check_return(chk, m)); @@ -6465,6 +6469,8 @@ pf_check_in(struct mbuf **m, struct ifnet *ifp, int flags, { int chk; + CURVNET_ASSERT_SET(); + chk = pf_test(PF_IN, flags, ifp, m, inp, NULL); return (pf_check_return(chk, m)); @@ -6476,6 +6482,8 @@ pf_check_out(struct mbuf **m, struct ifnet *ifp, int flags, { int chk; + CURVNET_ASSERT_SET(); + chk = pf_test(PF_OUT, flags, ifp, m, inp, NULL); return (pf_check_return(chk, m)); @@ -6489,15 +6497,15 @@ pf_check6_in(struct mbuf **m, struct ifnet *ifp, int flags, { int chk; + CURVNET_ASSERT_SET(); + /* * In case of loopback traffic IPv6 uses the real interface in * order to support scoped addresses. In order to support stateful * filtering we have change this to lo0 as it is the case in IPv4. */ - CURVNET_SET(ifp->if_vnet); chk = pf_test6(PF_IN, flags, (*m)->m_flags & M_LOOP ? V_loif : ifp, m, inp, NULL); - CURVNET_RESTORE(); return (pf_check_return(chk, m)); } @@ -6508,9 +6516,9 @@ pf_check6_out(struct mbuf **m, struct ifnet *ifp, int flags, { int chk; - CURVNET_SET(ifp->if_vnet); + CURVNET_ASSERT_SET(); + chk = pf_test6(PF_OUT, flags, ifp, m, inp, NULL); - CURVNET_RESTORE(); return (pf_check_return(chk, m)); } From nobody Wed Sep 25 12: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 4XDGPz45nVz5XQgB; Wed, 25 Sep 2024 12:34:31 +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 4XDGPz2PMgz3wbf; Wed, 25 Sep 2024 12:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727267671; 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=LgQO8dEUh+95YJVozSQV9eb+mZOIkEE2uE9h9Fh7PAc=; b=L0rtwEUsmDwWtdFiflKKHgBbYITf2hOYdoZHp0hPjwa9LV00+bTaUxQP3OZ8Z24+cufpKL 22T3hAvllIaUm0KiXka+IIC4iEbdMXI2UIDQlvSuDTKqu//e/P8splpc5pTmLptHcdISs4 ddw/fdpQ6WVUlqWWWYmmBGy8NSnjh+vaHre7mrW1vib9iFBWcm/mVC6ifXtdM02ABobvl1 io3wqNdLsyKuoPTmFlih9eDGoO5NVTEaarFzo/hzdrxyvRhG4O+700YbjiEoXgy7nXkUy8 Na4Ps8LywNFbhg3x3swxLdNybg3tV/JQTNDbEP7lRLgRCmgTlRMALoniQjeHrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727267671; 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=LgQO8dEUh+95YJVozSQV9eb+mZOIkEE2uE9h9Fh7PAc=; b=xLxhAqyy6nobKlEzw9cNNnGmGo2s2xhf3CwQXD0d9VX92AUGTKgP5EyLbnvuWlJD2mNF40 MdaojZnEB/t+P1z4AQE9MXVXLB4hraFqeU0uHVMi5vlaf8AIFLhYyv+cZIK5xDe/Xsx8K1 hm0xaRGDeNDckDV0gDbc0Kjw8f1ImsrFQI7depgiVafDrdYL/uzpII9XxpK+nX/+EWeeIm Z0CARTeaH9yFHbzHfFFYbJb3xg+Q9qC4JzMZu0DrEA+Janr9WY84VtTGrRgsgKur7OhlcM 1SC+2MnfOrgTUDHypSDAtO6wf/TqUlVzKSTevAy5I/vX2jMviLiGaFphcwIG5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727267671; a=rsa-sha256; cv=none; b=I4jUiTRVuI8bCsY3kUF8pbG0NSeVndeR/xf2xlh1ombU7EI2yoJwrrFNMVlFPu/U+MfuER DxU+VxH1yvetGYZaffkVUkpxNCEdC1zhKxBcSJ95YvW1oOeooyEfh2BMRgZR0eYpEy+k6s 9p4kV++BFVeEKVKeoaeA39nl26cMJHtjkZjtWmZTFNKaajmCPkWI3e+LDji/6UqI4RtnN6 f9kO7+vIjRXGsAvA1FgcL0xQ4v05OOqqg6m8FkgHJvF9FiSVTTu1FOxdK9DBp0CEhQ2sxP ZdcGS/blZmgKDW+UiI4MAmx0Vn6jnf5JZJve+G814fVS9r3/YUEJz4sGBkqUGg== 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 4XDGPz0xF2z1CP2; Wed, 25 Sep 2024 12:34:31 +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 48PCYVxO071780; Wed, 25 Sep 2024 12: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 48PCYVt6071777; Wed, 25 Sep 2024 12:34:31 GMT (envelope-from git) Date: Wed, 25 Sep 2024 12:34:31 GMT Message-Id: <202409251234.48PCYVt6071777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 85ea6992935c - main - pf tests: Make TCP port numbers configurable 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 85ea6992935ced034dea1c88755542c1b4969368 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=85ea6992935ced034dea1c88755542c1b4969368 commit 85ea6992935ced034dea1c88755542c1b4969368 Author: Kajetan Staszkiewicz AuthorDate: 2024-09-25 10:46:37 +0000 Commit: Kristof Provost CommitDate: 2024-09-25 10:46:48 +0000 pf tests: Make TCP port numbers configurable This will be useful for state maximums testing. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D46773 --- tests/sys/netpfil/common/pft_ping.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/sys/netpfil/common/pft_ping.py b/tests/sys/netpfil/common/pft_ping.py index 21b08c75a7da..befe757406be 100644 --- a/tests/sys/netpfil/common/pft_ping.py +++ b/tests/sys/netpfil/common/pft_ping.py @@ -123,7 +123,10 @@ def send_tcp_syn(dst_address, sendif, send_params): ip = prepare_ipv6(dst_address, send_params) else: ip = prepare_ipv4(dst_address, send_params) - tcp = sp.TCP(dport=666, flags='S', options=opts, seq=seq) + tcp = sp.TCP( + sport=send_params.get('sport'), dport=send_params.get('dport'), + flags='S', options=opts, seq=seq, + ) req = ether / ip / tcp sp.sendp(req, iface=sendif, verbose=False) @@ -439,6 +442,10 @@ def parse_args(): help='TCP Maximum Segment Size') parser_send.add_argument('--send-seq', type=int, help='TCP sequence number') + parser_send.add_argument('--send-sport', type=int, + help='TCP source port') + parser_send.add_argument('--send-dport', type=int, default=666, + help='TCP destination port') parser_send.add_argument('--send-length', type=int, default=len(PAYLOAD_MAGIC), help='ICMP Echo Request payload size') parser_send.add_argument('--send-tc', type=int, @@ -480,7 +487,10 @@ def main(): # missing from the command line, always fill the dictionaries with None. send_params = {} expect_params = {} - for param_name in ('flags', 'hlim', 'length', 'mss', 'seq', 'tc', 'frag_length'): + for param_name in ( + 'flags', 'hlim', 'length', 'mss', 'seq', 'tc', 'frag_length', + 'sport', 'dport', + ): param_arg = vars(args).get(f'send_{param_name}') send_params[param_name] = param_arg if param_arg else None param_arg = vars(args).get(f'expect_{param_name}') From nobody Wed Sep 25 13:58:44 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 4XDJHB1YcXz5XW9V; Wed, 25 Sep 2024 13:58:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDJHB0RLtz47QX; Wed, 25 Sep 2024 13:58:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727272726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ofbVuE+VIGNbRIUaXqaKsI9zcEQRtnGRQ1z06fmVjY0=; b=E+evtcATFrQIN9/5xPFpBl8S5PLmYCZzztP4T95ZK1ccmDsvctmUy3RDDOSrEM1HLOxiDZ Zh91VBBQkKiNFtJILbUD9CYaEJ4gyFw0OYWOqaXUhBDwaNBcPmJgKCebHuNjW0qQIZf5yf Ka8JVRVyFsY83qQr75iCSu2sdFLNk8bpQCRjwI/zrmn63sAT8z09kwZwFS42lvAMOeNnru az7JvRU2W2dW7Gj09ZXwqcZP8bMSev7vG7ud1tBRolrXy8aQCrgT4kkEUjqMPKhCO0PRl9 Q6ulHP0nJDU0OpAyiSui96bIqhp51YML2WCkZXUhWXVKC4cTNuokOQvATd6lPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727272726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ofbVuE+VIGNbRIUaXqaKsI9zcEQRtnGRQ1z06fmVjY0=; b=rpJpMimtkdiIBElaSN2NglxJ4yjrIuYKQoYpFq5Bo0C7B3WE8xwAjB6aHpBbF9uKbqs7Z8 PPfdkMA8pZ24CjixApluIeO/06s70S5aviuWacHvXrir/xx8gVeYm7PHyrCRqoSUDAg1lH liNLSLV2njYcncyM1xjHpLZjSRmzh2cOufk+dXSLRT4p3J+K4ahd/NCw6EBQc5ZQ3Hd+B/ 0x4mEQ2mqUgjDmkg1mdtUIWmza3Hq44sYgMtezWOPT03cHdvCyOeUgTU7NbDDwXQxIcJuO CPOeWQ757HxW43IKwXZVI/3tk11aOmOXL5Vvzy/PPBWhnZCQd/WtubGfavp40A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727272726; a=rsa-sha256; cv=none; b=q6EHSqNez5HI7HY7sV/VdEPxrmZCx5SUVCEecsXhqIf0YZhoViUVicm/ceYfaysS+oCEUo SUTeAQkBWGLfiUiHtYgOQf9/+GUsPQ/ryz4dNZ3XXQ0QjPkj89wJzpBcplZzI3HQWp9vw0 7HjJlVem06rVZS2E2WIBTj5hc7Vx3U0QBBbU1w7rI96lXWgFszsf+P8d0rbWysQcGs+kcI 4r/pyf8f88BKiMh9bDUpV+sXI+wtRg9PNET74hM6P60WAiDqxFkbxR9mPUX3Z+tGFoYdEH 4GSDZnqcaTw1kKyUZ+iadW+moxiLDizuL5Rp5LytvaBkuTfyoFZOzS7DVx5iMg== Received: from [IPV6:2601:5c0:4200:b830:7d5c:2819:6552:855e] (unknown [IPv6:2601:5c0:4200:b830:7d5c:2819:6552:855e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XDJH955Z6z12qY; Wed, 25 Sep 2024 13:58:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Wed, 25 Sep 2024 09:58:44 -0400 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 User-Agent: Mozilla Thunderbird Subject: Re: git: f08247fd888e - main - Assert that mbufs are writable if we write to them Content-Language: en-US To: Drew Gallatin , Kristof Provost , Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202409111118.48BBIQ2h065089@gitrepo.freebsd.org> <2b1955e2-fbf1-41cb-b256-a9a257b16a83@FreeBSD.org> <1f61b6de-0fe2-4343-b4ad-f0866785a4bc@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/13/24 11:45, Drew Gallatin wrote: > I think you also need to remove M_EXTPG from M_WRITABLE(). Attached a trivial, untested patch. Yes, I came back to testing this yesterday and ran into that as well. However, as part of this I also tried to audit all the calls to M_WRITABLE and most of them are assuming they can use mtod() to get a pointer. I think what might be a better approach is to add a new M_WRITABLE_EXTPG() variant that doesn't check M_EXTPG and leave M_WRITABLE as-is. Places like m_copyback that are M_EXTPG aware would use the new macro. This still requires the patch to not set M_RDONLY in all M_EXTPG mbufs. The other thing we might want to do though is set M_RDONLY on encrypted data after KTLS has encrypted it as there is no good reason to modify encrypted data. > Drew > > On Thu, Sep 12, 2024, at 5:40 AM, John Baldwin wrote: >> On 9/12/24 05:03, John Baldwin wrote: >>> I think part of the motivation for marking M_EXTPG as read-only is that you can't "write" >>> to m_data via mtod() or the like. That said, M_EXTPG aren't really read-only. It >>> depends on the backing store. M_EXTPG were first merged into FreeBSD prior to KTLS to >>> support sendfile, and in that case, they should be M_RDONLY because they alias pages >>> from the file's VM object. However, M_EXTPG mbufs allocated via functions like >>> m_uiotombuf_nomap should not be M_RDONLY. I think this originated in the original >>> import of KTLS which doesn't push setting M_RDONLY out to the callers of mb_alloc_extpgs, >>> and a few other places that hardcode M_RDONLY with M_EXTPG (_mb_unmapped_to_ext should >>> preserve M_RDONLY from the original mbuf instead of forcing M_RDONLY). >>> >>> I can take a stab at a patch but won't have time to really test it until after Euro. >> >> Patch available below. Compile tested but not run-tested: >> >> https://github.com/freebsd/freebsd-src/compare/main...bsdjhb:freebsd:m_extpg_rdonly >> >>> On 9/11/24 16:56, Drew Gallatin wrote: >>>> M_EXTPGS mbufs are marked read-only because they refer to external data. The original crypto code, (before kTLS was converted to OCF), used to just build an iovec using PHYS_TO_DMAP() on the page array. I think this case was missed during the conversion to OCF. >>>> >>>> I'm not sure what the best thing to do is, as they should be read only, except this one specific case.... I'd be tempted to just nerf the KASSERT for EXTPGS. >>>> >>>> On Wed, Sep 11, 2024, at 11:02 AM, Kristof Provost wrote: >>>>> On 11 Sep 2024, at 16:45, Mark Johnston wrote: >>>>>> On Wed, Sep 11, 2024 at 11:18:26AM +0000, Kristof Provost wrote: >>>>>>> The branch main has been updated by kp: >>>>>>> >>>>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=f08247fd888e6f7db0ecf2aaa39377144ac40b4c >>>>>>> >>>>>>> commit f08247fd888e6f7db0ecf2aaa39377144ac40b4c >>>>>>> Author: Kristof Provost >>>>>>> AuthorDate: 2024-09-10 20:15:31 +0000 >>>>>>> Commit: Kristof Provost >>>>>>> CommitDate: 2024-09-11 11:17:48 +0000 >>>>>>> >>>>>>> Assert that mbufs are writable if we write to them >>>>>>> >>>>>>> m_copyback() modifies the mbuf, so it must be a writable mbuf. >>>>>> >>>>>> This change still triggers a panic for me when running KTLS tests. I >>>>>> note that EXTPG mbufs always have M_RDONLY set, but I'm not quite sure >>>>>> why. I suspect such mbufs need special handling with respect to the new >>>>>> assertion. >>>>>> >>>>>> syzbot also triggered this panic: >>>>>> https://syzkaller.appspot.com/bug?extid=58c918369f9dc323409d >>>>>> >>>>> Yeah, I saw that one before I went out for a bike ride. >>>>> >>>>> Clearly something is wrong. Either ktls is using read-only buffers or the M_WRITABLE() macro isn’t quite smart enough to spot this specific case. >>>>> >>>>> I’m not familiar enough with ktls to easily tell which. >>>>> >>>>> I’ll back this assertion change out for now, so we’re not panicing test machines while we figure this out. >>>>> >>>>> Best regards, >>>>> Kristof >>>>> >>>> >>> >> >> -- >> John Baldwin >> >> > -- John Baldwin From nobody Wed Sep 25 14:02:22 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 4XDJMM0XSNz5XW7k; Wed, 25 Sep 2024 14:02:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDJMM03tzz492g; Wed, 25 Sep 2024 14:02:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727272943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7rsCOFFpN1b+sP0l0FMmt653WWTb3CXduVFeboZNMWU=; b=xl7sUVqLMqcjC0qu1SRZtkKSCHcs6QobOrd0vc1B2ADlVTPKUO7A94+NxSTn3koPnjJrt9 zCvx1/DZ73lrd+qGRgfSEMtsc1OsQdU8YynGQQnq1WcHPRntgCbfoYj0UcHkEqZuSOpV67 50iLrNjAmF8KQQymCYStPC3uSLFDbkK9FBkuSDyqq3hga7MclP/Vy2dv2gZqu5qOJi6ZhX 2eW9kqSLPpmyQWdRw3r7dpbq9teGXC4aTTy9xvTAf4etG4B6cRuitZuF2O25D2jDxAgsl+ ZV/FI8L6YHYYnzCW69DjK9YZpA2P1zFSo+XPW6d4PBfIvTV+vMWLktz7ViwwEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727272943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7rsCOFFpN1b+sP0l0FMmt653WWTb3CXduVFeboZNMWU=; b=mZcijuwXnbh84Z0Hlf/PIe+/SlUzC3SkMj7FQJckamqHdIf0+y5Z8xVCtsQrSl/D+vLoVS OB2UTlx08ZU0hgWdBJEqdVOCvTupM3lztOL4uSk3wU7NLpr+a9CrQhx5fb0pdQ0bnaIQse +HApkcwCa27qmfEQmdwzNbHoURA4tVMuBUP7fcv7kvgvIyO6N97DsDdqF51ZsdjF2hL8yb 5+CV1+o0x7Q1MoXiu3DqfvKoLJxuYPAiG80mIo3vZPuoT94mxNk+rYheULy5Bep4Vzh69r 6mhKX3+7bMsMLA3Zd1f9yn81Zx8n5bxVlRUlUyaEDYDhj5U8LfGqA+rz06FjZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727272943; a=rsa-sha256; cv=none; b=BY/9Rv0WUrv/fTCXwoFA23wB+pDFAmNSUlhI7y70ZWRnVpnmkShz864BLaNi0hTGZogao4 LyuFNQQgTUqg6SNap/mECIUDv/pmtn2ZnIYDTkI+mreZJ29d6SHhIAX6nq6WYDNx8qdmnu i0T5OxoX0L/0pj7vya9Jo2/EnCuGXfCALx5Ujxt7HKBHdRP2mOfGjEMzk5UTkxmyf4XvHY VzKmDesvUE16UlnCBN3nfdEgObDiBv5sGgRRIysJ5XNDbnei7sHix8P8htJZUu0MsgCqfc g1nlEIQ6q8A28vyIOdhSvyT9PPYWWIg4IN/3vUT5taHfRwSy6DbngFoLZnr6Kw== Received: from [IPV6:2601:5c0:4200:b830:7d5c:2819:6552:855e] (unknown [IPv6:2601:5c0:4200:b830:7d5c:2819:6552:855e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XDJML5Dzmz13H2; Wed, 25 Sep 2024 14:02:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <88935da3-253c-4145-b958-f7137485ee31@FreeBSD.org> Date: Wed, 25 Sep 2024 10:02:22 -0400 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 User-Agent: Mozilla Thunderbird Subject: Re: git: a52b30ff98cd - main - sys_pipe: consistently use cr_ruidinfo for accounting of pipebuf Content-Language: en-US To: Konstantin Belousov , =?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202409202109.48KL9RZ1078677@gitrepo.freebsd.org> <867cb5z2c3.fsf@ltc.des.dev> <86y13lx7l5.fsf@ltc.des.dev> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/21/24 16:51, Konstantin Belousov wrote: > On Sat, Sep 21, 2024 at 07:03:18PM +0200, Dag-Erling Smørgrav wrote: >> Konstantin Belousov writes: >>> Dag-Erling Smørgrav writes: >>>> Konstantin Belousov writes: >>>>> commit a52b30ff98cdab82af140285fa7fcdf1036fef27 >>>>> >>>>> sys_pipe: consistently use cr_ruidinfo for accounting of pipebuf >>>>> >>>>> Tested by: yasu >>>>> Sponsored by: The FreeBSD Foundation >>>> > MFC after: 1 week >>>> This appears to be the opposite of the patch which you posted on >>>> -current and which yasu@ tested [...] >>> Before committing anything, I did a self-review and remembered that I >>> have did a lot of considerations when implementing swap accounting and >>> decided that ruid is the right target for charge. >>> >>> Besides stating the obvious fact above, what do you expect me to answer/ >>> react to your mail? >> >> My point is that the commit message claims the patch was tested by yasu@ >> when in fact it wasn't. If you're convinced that this is the correct >> solution then that's fine, and it does appear to work, but don't claim >> that it's been tested by others when it hasn't. > > The main part of the patch was to ensure consistency in updates: it must > be either always uidinfo, or always ruidinfo. Which one specifically > would affect the limit's semantic, but not the buggy behavior you reported. In similar situations with reviews I've sometimes added a "(earlier version)" suffix after the annotation, e.g.: Reviewed by: foo (earlier version) Using a similar annotation here might have been clearer. -- John Baldwin From nobody Wed Sep 25 14:09:08 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 4XDJW90dG2z5XWNV; Wed, 25 Sep 2024 14:09:09 +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 4XDJW85y3kz4BtD; Wed, 25 Sep 2024 14:09:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727273348; 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=FPAa8l3oORb0ali3i0vuc/8tdzVbb+FIi44zBOuMgGA=; b=b+2FEpJb2el5LL9Nfr1W5MKLkW6jUPe+gJnHsKnIqDlB3qTFHK5JWvBqflHCLRZmacV3fv ZRYC17D/8KdY8vfw3mkfRyGo/LusdkkebDEU6/T/fM7ihCHGtlzif0IXPVK+fIHRL1+mpf runibcW9yv0CQw+3+Unv/Vf8fy9fzPyjzY7Onv1Nz9PxFtSwSkPExNo50dAUiAEgCafMzh FxSYTf5vrPHBPdra69UrGxAR5b7ukn9WoHelUrFLDdeEkDOXr9y8SDbouFXWr4MvgRdngX f5pvsajndh40Nu5aoGyzOmoNgq5Cvc45qLmOJJkxRTiB3u9u0LvIfLpfstoxAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727273348; 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=FPAa8l3oORb0ali3i0vuc/8tdzVbb+FIi44zBOuMgGA=; b=GmKPRLBdR4C65/XC32p5BEver/lhWSBRPQ/E/vuhPTtLE7GuiA1ugGRRWeNTWG+MqeWt+J 3qAvAAl8yAbyIW6VhpvJPIqwcKqBxvgwUt2PUnbeVVJ06XUj+tPcEuQq5X0/3PKS0Qi5rq cSSKOJEWymyixtXak1Fo2v7Bd0G6KDCxAoC6o59PKwcBR6KPn/vHSehxsmgaeWGlmu7LCP LZjz2H4LwB0UKIlQ0fVKN0Bd7gtL0iqJsLZYABFPZhaf3ExcwpTWDzTup0EY3EdSYer3CB UglTnX0IKSpaQW8iEp5mTVhIO0UKLaQfKmdSpjenKlFn1Cilockm5pz7nr9WoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727273348; a=rsa-sha256; cv=none; b=AxNbzmEmmtVlyrWTGahY30FhxHKBRc1BmkIzG0jAJwy+4qW18qLwhiWsGKl77Qd7BgffbZ xL0FLHZr85r0Bzu4El1DC1SJoWWAm+HKvckbEcuaECq9ZCM17iy0dDi46jLz0qzlDxjrwI 18nyX/AEegKtbrPdm17TsicU+cjt42x1fLfmx3Z6z9IBhapkCNDqZOmSJQm+Q6d/lxQhXK xaJHvY7jYawOnEhiMwJXoYtzlzDg3BFuMIW0pfk875SdBMAz7d5M+euU0ck4xqhFqaWJEv 5iuLSEeYfKaGGpSlb3UawSNbUL+xz53eBepn5/IQCr5VptaA9LWeLNxA8pfElg== 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 4XDJW85Y7zzGGN; Wed, 25 Sep 2024 14:09:08 +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 48PE98Qm025719; Wed, 25 Sep 2024 14:09:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PE98fW025716; Wed, 25 Sep 2024 14:09:08 GMT (envelope-from git) Date: Wed, 25 Sep 2024 14:09:08 GMT Message-Id: <202409251409.48PE98fW025716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: c7a33fe37d76 - main - ntp: Improve descriptions in man pages 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: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7a33fe37d7688cb21c743f68256680e003210ad Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c7a33fe37d7688cb21c743f68256680e003210ad commit c7a33fe37d7688cb21c743f68256680e003210ad Author: Alexander Ziaee AuthorDate: 2024-08-05 19:37:42 +0000 Commit: Cy Schubert CommitDate: 2024-09-25 12:40:17 +0000 ntp: Improve descriptions in man pages + ntpd added to ntp.conf(5) description (search keywords) + expand NTP so these pages are shown when `apropos time` + "standard" => "reference" for increased consistency - removed redundant or duplicated search keywords ntp.org bug: https://bugs.ntp.org/show_bug.cgi?id=3936 MFC after: 3 days Reviewed by: Harlan Stenn Reviewed by: Cy Schubert --- contrib/ntp/ntpd/ntp.conf.def | 2 +- contrib/ntp/ntpd/ntp.keys.def | 2 +- contrib/ntp/ntpd/ntpd-opts.def | 2 +- contrib/ntp/ntpq/ntpq-opts.def | 2 +- contrib/ntp/sntp/sntp-opts.def | 2 +- contrib/ntp/util/ntp-keygen-opts.def | 2 +- usr.sbin/ntp/doc/ntp-keygen.8 | 2 +- usr.sbin/ntp/doc/ntp.conf.5 | 2 +- usr.sbin/ntp/doc/ntp.keys.5 | 2 +- usr.sbin/ntp/doc/ntpd.8 | 2 +- usr.sbin/ntp/doc/ntpq.8 | 2 +- usr.sbin/ntp/doc/sntp.8 | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/ntp/ntpd/ntp.conf.def b/contrib/ntp/ntpd/ntp.conf.def index 444e3b35e351..aba3c25ab464 100644 --- a/contrib/ntp/ntpd/ntp.conf.def +++ b/contrib/ntp/ntpd/ntp.conf.def @@ -9,7 +9,7 @@ autogen definitions options; // file name. prog-name = "ntp.conf"; file-path = "/etc/ntp.conf"; -prog-title = "Network Time Protocol (NTP) daemon configuration file format"; +prog-title = "Network Time Protocol daemon (ntpd) configuration format"; /* explain: Additional information whenever the usage routine is invoked */ explain = <<- _END_EXPLAIN diff --git a/contrib/ntp/ntpd/ntp.keys.def b/contrib/ntp/ntpd/ntp.keys.def index e73ce4d06a1b..b0c9717e5906 100644 --- a/contrib/ntp/ntpd/ntp.keys.def +++ b/contrib/ntp/ntpd/ntp.keys.def @@ -10,7 +10,7 @@ autogen definitions options; // file name. prog-name = "ntp.keys"; file-path = "/etc/ntp.keys"; -prog-title = "NTP symmetric key file format"; +prog-title = "Network Time Protocol symmetric key format"; /* explain: Additional information whenever the usage routine is invoked */ explain = <<- _END_EXPLAIN diff --git a/contrib/ntp/ntpd/ntpd-opts.def b/contrib/ntp/ntpd/ntpd-opts.def index 00d35115dc43..6d4952a637c2 100644 --- a/contrib/ntp/ntpd/ntpd-opts.def +++ b/contrib/ntp/ntpd/ntpd-opts.def @@ -5,7 +5,7 @@ autogen definitions options; #include copyright.def prog-name = "ntpd"; -prog-title = "NTP daemon program"; +prog-title = "set clock via Network Time Protocol daemon"; argument = "[ ... ]"; #include ntpdbase-opts.def diff --git a/contrib/ntp/ntpq/ntpq-opts.def b/contrib/ntp/ntpq/ntpq-opts.def index 85655a9d66cc..1189e81efe40 100644 --- a/contrib/ntp/ntpq/ntpq-opts.def +++ b/contrib/ntp/ntpq/ntpq-opts.def @@ -7,7 +7,7 @@ autogen definitions options; #include autogen-version.def prog-name = "ntpq"; -prog-title = "standard NTP query program"; +prog-title = "query Network Time Protocol servers"; argument = '[ host ...]'; flag = { diff --git a/contrib/ntp/sntp/sntp-opts.def b/contrib/ntp/sntp/sntp-opts.def index 7664b1bf08b9..d468b6ef8bf5 100644 --- a/contrib/ntp/sntp/sntp-opts.def +++ b/contrib/ntp/sntp/sntp-opts.def @@ -6,7 +6,7 @@ autogen definitions options; #include copyright.def prog-name = "sntp"; -prog-title = "standard Simple Network Time Protocol client program"; +prog-title = "reference Simple Network Time Protocol client"; argument = '[ hostname-or-IP ...]'; #include homerc.def diff --git a/contrib/ntp/util/ntp-keygen-opts.def b/contrib/ntp/util/ntp-keygen-opts.def index 632dbbec778d..5c06bded15fd 100644 --- a/contrib/ntp/util/ntp-keygen-opts.def +++ b/contrib/ntp/util/ntp-keygen-opts.def @@ -7,7 +7,7 @@ autogen definitions options; #include autogen-version.def prog-name = "ntp-keygen"; -prog-title = "Create a NTP host key"; +prog-title = "create a Network Time Protocol host key"; package = ntp; include = '#include '; diff --git a/usr.sbin/ntp/doc/ntp-keygen.8 b/usr.sbin/ntp/doc/ntp-keygen.8 index ad7b844d27de..3e8ffd9dbf58 100644 --- a/usr.sbin/ntp/doc/ntp-keygen.8 +++ b/usr.sbin/ntp/doc/ntp-keygen.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntp-keygen -.Nd Create a NTP host key +.Nd create a Network Time Protocol host key .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options diff --git a/usr.sbin/ntp/doc/ntp.conf.5 b/usr.sbin/ntp/doc/ntp.conf.5 index 9e23a2294c48..71fb7c668db2 100644 --- a/usr.sbin/ntp/doc/ntp.conf.5 +++ b/usr.sbin/ntp/doc/ntp.conf.5 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntp.conf -.Nd Network Time Protocol (NTP) daemon configuration file format +.Nd Network Time Protocol daemon (ntpd) configuration format .Sh SYNOPSIS .Nm .Op Fl \-option\-name diff --git a/usr.sbin/ntp/doc/ntp.keys.5 b/usr.sbin/ntp/doc/ntp.keys.5 index d235f3b5f7dd..6bec2880163e 100644 --- a/usr.sbin/ntp/doc/ntp.keys.5 +++ b/usr.sbin/ntp/doc/ntp.keys.5 @@ -12,7 +12,7 @@ .Sh NAME .Nm ntp.keys -.Nd NTP symmetric key file format +.Nd Network Time Protocol symmetric key format .Sh SYNOPSIS .Nm .Op Fl \-option\-name diff --git a/usr.sbin/ntp/doc/ntpd.8 b/usr.sbin/ntp/doc/ntpd.8 index 74bc07793048..83beac3632a9 100644 --- a/usr.sbin/ntp/doc/ntpd.8 +++ b/usr.sbin/ntp/doc/ntpd.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntpd -.Nd NTP daemon program +.Nd set clock via Network Time Protocol daemon .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options diff --git a/usr.sbin/ntp/doc/ntpq.8 b/usr.sbin/ntp/doc/ntpq.8 index e6c66ed71d97..21f15926a0ab 100644 --- a/usr.sbin/ntp/doc/ntpq.8 +++ b/usr.sbin/ntp/doc/ntpq.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm ntpq -.Nd standard NTP query program +.Nd query Network Time Protocol servers .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options diff --git a/usr.sbin/ntp/doc/sntp.8 b/usr.sbin/ntp/doc/sntp.8 index 94c3c2816035..4509b6efa222 100644 --- a/usr.sbin/ntp/doc/sntp.8 +++ b/usr.sbin/ntp/doc/sntp.8 @@ -8,7 +8,7 @@ .\" and the template file agmdoc-cmd.tpl .Sh NAME .Nm sntp -.Nd standard Simple Network Time Protocol client program +.Nd reference Simple Network Time Protocol client .Sh SYNOPSIS .Nm .\" Mixture of short (flag) options and long options From nobody Wed Sep 25 14:20:45 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 4XDJmY1zZwz5XWxs; Wed, 25 Sep 2024 14:20:45 +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 4XDJmY1R4Rz4F55; Wed, 25 Sep 2024 14:20:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727274045; 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=r5QEKVgNx+J6mLfrp6/NIGFKc0It8pK7TincangCw2g=; b=EE/722fmD5s1jEwJHO8cwUvYD9TwjJGPvx8uGVJGb4h+UUx/E8VLODpi+ez/XKgsf30DEY H6tgT7fg85JCfC1oGP7anO5BCEjxUUui7pFtL6bFGbvQP3NYNGYkRNx79xHXmNRvizJzVd HwyFmZs+Mx/DUjeM5l9jHwSpPK46XJZKOM6ooB+DVPBPyOIC8LohqFXb093o6F9/OzU12D nhopQsHL7AZZc1GVhvA1Chq4xoGBHvHJdqOqodizr/uEkcYxw1gCIR8Zognp5xLf7kDqIl ERJTh+baGSwQSZ23Mxl0/cXqlbdf8uALCkMZDqONwY6pd/W7/0N+UAQHVTEqAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727274045; 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=r5QEKVgNx+J6mLfrp6/NIGFKc0It8pK7TincangCw2g=; b=EDVhhIFJoGtp6YtedARJn8ij0x4chQ/tTcvyaGk4P4BxnAQ2z3KMrqvJkuVTpQBg5Wn83H mErpoIvU5AtrOEJmudgKwUmTEgnjg8+Xb8B4mwray2Y8hAODoLB2rmwm5e2+r0n+EyDkGU hKbD5Nc/oDbeDtVWRGr/XJZDTodb1VYFb3zbmGxcFcfa5e5fdy7Y7RjIlpj6mJF3cye712 1VZurtFEBP8ZCygKryl9i8urHf2GpRVVri4aDyvafD/oePeAkOKZYsRWZ31CGpAwNAskzt kry0Im7B9FahMA02wFXDxSdNAhIM+SAhTo6JXAqP2ZbQG8H77ey1T5G4K4q1Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727274045; a=rsa-sha256; cv=none; b=MqTHN5u8yeNttZXvVTQqYnNbNzqmKmKy2CdSoEcuxnhO4Hj2WK+f4DLJtW9oMmlzHP069y y0xulKBsVDg7z9BUnxg/lcWoS11oy16QBDtaedKmW/bsxF1JjVX4ksPjI47M2lh7fZi21M Q7T7bLUiVscswq+fmvx9n1fAslxPFr8nmSXNC5S4nDirqVcpl/JEpTOOjkmGwp0dwSOa61 GaksJ7sotRZ4wXGDzFHbz33SBTBXYLzY+kapNMEhkiRO2Gk28ccnzxMWfmWgQBktz5uokT al6cF+k4G/J5e7hQHQUeGYhioCeyRL+8JonrUSbwo+GLfeWz/rjn11TA8DE+Pg== 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 4XDJmY0vngzGFF; Wed, 25 Sep 2024 14:20:45 +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 48PEKjdH052607; Wed, 25 Sep 2024 14:20:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PEKj7i052604; Wed, 25 Sep 2024 14:20:45 GMT (envelope-from git) Date: Wed, 25 Sep 2024 14:20:45 GMT Message-Id: <202409251420.48PEKj7i052604@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 0063ef79f9e6 - main - ctl_report_supported_opcodes: Rename invalid label to invalid_options 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0063ef79f9e6b9ad47969af3b94ae63e7888852c Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0063ef79f9e6b9ad47969af3b94ae63e7888852c commit 0063ef79f9e6b9ad47969af3b94ae63e7888852c Author: John Baldwin AuthorDate: 2024-09-25 14:20:22 +0000 Commit: John Baldwin CommitDate: 2024-09-25 14:20:22 +0000 ctl_report_supported_opcodes: Rename invalid label to invalid_options This error handling is specific to an invalid value in the REPORTING OPTIONS field of a REPORT SUPPORTED OPERATION CODES command. While here, reuse the label for another case. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D46775 --- sys/cam/ctl/ctl.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 1505e0886f57..b1367cd79fab 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -7456,33 +7456,26 @@ ctl_report_supported_opcodes(struct ctl_scsiio *ctsio) break; case RSO_OPTIONS_OC: if (ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) { - ctl_set_invalid_field(/*ctsio*/ ctsio, - /*sks_valid*/ 1, - /*command*/ 1, - /*field*/ 2, - /*bit_valid*/ 1, - /*bit*/ 2); - ctl_done((union ctl_io *)ctsio); - return (CTL_RETVAL_COMPLETE); + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_SA: if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) == 0 || service_action >= 32) { - goto invalid; + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; case RSO_OPTIONS_OC_ASA: if ((ctl_cmd_table[opcode].flags & CTL_CMD_FLAG_SA5) != 0 && service_action >= 32) { - goto invalid; + goto invalid_options; } total_len = sizeof(struct scsi_report_supported_opcodes_one) + 32; break; default: -invalid: +invalid_options: ctl_set_invalid_field(/*ctsio*/ ctsio, /*sks_valid*/ 1, /*command*/ 1, From nobody Wed Sep 25 14:21:35 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 4XDJnW3mrfz5XXCQ; Wed, 25 Sep 2024 14:21:35 +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 4XDJnW3LK4z4Fnk; Wed, 25 Sep 2024 14:21:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727274095; 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=wkiRFreVUFCqQm1yhy9C1vPTEbMgFlk919hGWDuF5IQ=; b=bjlm5eRJNnQXinlZT+L6ciVp2brvEmY3hc6nIoFetWKKoe0OvpWAA0FEWPo8MWZ0H073WI 1Z7b760CVaoj9XfdPkntPAJzLoQiFBQ9Ap03ifL94SKCd/Eq6Xrqkwlm2wAVYtJuwCVo18 YGJnCnhPOxCU+gu3aEI6o7N4D8+O8YCWH7IxdLBGvUYHUQo8KELe3G78oPaYaRDKB1Vn/i x7mN1LM7z8QOjgEMgMFEEvVGHVmjwOTdM71YGtyJmcyU2kgQ5673ogciUyfaPt5lDiWG7g SU+MxLoCGSLdRQ07WVqtu9WfoTavAePYsH6LgXwHCgzQue8gwRecAraOBHCFew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727274095; 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=wkiRFreVUFCqQm1yhy9C1vPTEbMgFlk919hGWDuF5IQ=; b=orG5GmgjNfPirpmXI9SbusgMC/HHnmUJwgbm1Cm6xh+lgA4mUyYJqY1xnM51x+BV+Dpt7K kK6ZM6M8JWEpmc/AWmsh2EeD4Qoy6/T2PrWxm2hzr2Eqyatw/HErfTTBkqCh8kJAgFmHLg T77ZjsrwKc8coSuvdsda/qArWq/W9cL2LLwj9NTuXYXuRo8UYv0QRp+7+WHatXwBLR3V8I rb7aIZloho3ESSOBE9SuGlLPjnVk+BYFIOotJxnO7Ai8VEKMtr78XgJQNiSRhDo/z9sVK3 73ISJqH+YvqF1AcUMxG6fa3t1+Vt9dRK31W4nvvlsHz7U0PLi7Q4Gr7Fzz9Dvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727274095; a=rsa-sha256; cv=none; b=OZ4xrFRylxBd2xpn0Ot+g0eb+35WjTTPNty8RZpORC2IyFrM2Wd9WgG4Fcl8tE5yZt5+ZW Xn1gFnMZrzVBvCLgRcnzD6uAo/M630Rh79b7UKV5b4n2g1PCUWt+2pYpJ/VdBAuKeybcCM Ze3WxqDI0hspFG0dcGcCxVXSAgOscUp2eWYtyyCWZwFA4VkUE3YsP9dtHj9MIzoNyLdtWN UEshsHIEUbqIMQPJfmEQWIlHA3qznRz7ZdLJN1X/fvF9zIoVYW+ZigrnvxYkWfhg6L1uKh us0bwvyXHiL2IKzbTA20xtuHPHRlV0ulTjPUUerbJfhc8VxrQ83FtddtyyoPqQ== 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 4XDJnW2dJMzGN4; Wed, 25 Sep 2024 14:21:35 +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 48PELZnb057305; Wed, 25 Sep 2024 14:21:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PELZU3057302; Wed, 25 Sep 2024 14:21:35 GMT (envelope-from git) Date: Wed, 25 Sep 2024 14:21:35 GMT Message-Id: <202409251421.48PELZU3057302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b1d324d98761 - main - ctl: Move extern for control_softc into 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b1d324d98761a8640aef94c76cbccafc22c8dcc8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b1d324d98761a8640aef94c76cbccafc22c8dcc8 commit b1d324d98761a8640aef94c76cbccafc22c8dcc8 Author: John Baldwin AuthorDate: 2024-09-25 14:21:18 +0000 Commit: John Baldwin CommitDate: 2024-09-25 14:21:18 +0000 ctl: Move extern for control_softc into Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46778 --- sys/cam/ctl/ctl_backend.c | 2 -- sys/cam/ctl/ctl_backend_block.c | 2 -- sys/cam/ctl/ctl_backend_ramdisk.c | 1 - sys/cam/ctl/ctl_frontend.c | 2 -- sys/cam/ctl/ctl_private.h | 1 + sys/dev/nvmf/controller/ctl_frontend_nvmf.c | 2 -- 6 files changed, 1 insertion(+), 9 deletions(-) diff --git a/sys/cam/ctl/ctl_backend.c b/sys/cam/ctl/ctl_backend.c index a2249b5d8f44..c2b5e0f32fcc 100644 --- a/sys/cam/ctl/ctl_backend.c +++ b/sys/cam/ctl/ctl_backend.c @@ -59,8 +59,6 @@ #include #include -extern struct ctl_softc *control_softc; - int ctl_backend_register(struct ctl_backend_driver *be) { diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index 55a5ce0d047a..8c2174249a95 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -225,8 +225,6 @@ struct ctl_be_block_io { void (*beio_cont)(struct ctl_be_block_io *beio); /* to continue processing */ }; -extern struct ctl_softc *control_softc; - static int cbb_num_threads = 32; SYSCTL_NODE(_kern_cam_ctl, OID_AUTO, block, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "CAM Target Layer Block Backend"); diff --git a/sys/cam/ctl/ctl_backend_ramdisk.c b/sys/cam/ctl/ctl_backend_ramdisk.c index 49ed05f54a58..dc73c22bce41 100644 --- a/sys/cam/ctl/ctl_backend_ramdisk.c +++ b/sys/cam/ctl/ctl_backend_ramdisk.c @@ -132,7 +132,6 @@ struct ctl_be_ramdisk_softc { }; static struct ctl_be_ramdisk_softc rd_softc; -extern struct ctl_softc *control_softc; static int ctl_backend_ramdisk_init(void); static int ctl_backend_ramdisk_shutdown(void); diff --git a/sys/cam/ctl/ctl_frontend.c b/sys/cam/ctl/ctl_frontend.c index 1e4d130950c4..6c7796bf0c82 100644 --- a/sys/cam/ctl/ctl_frontend.c +++ b/sys/cam/ctl/ctl_frontend.c @@ -64,8 +64,6 @@ #include #include -extern struct ctl_softc *control_softc; - int ctl_frontend_register(struct ctl_frontend *fe) { diff --git a/sys/cam/ctl/ctl_private.h b/sys/cam/ctl/ctl_private.h index 821aa0aa681b..f27a8f2d423a 100644 --- a/sys/cam/ctl/ctl_private.h +++ b/sys/cam/ctl/ctl_private.h @@ -426,6 +426,7 @@ struct ctl_softc { #ifdef _KERNEL +extern struct ctl_softc *control_softc; extern const struct ctl_cmd_entry ctl_cmd_table[256]; extern const struct ctl_nvme_cmd_entry nvme_admin_cmd_table[256]; extern const struct ctl_nvme_cmd_entry nvme_nvm_cmd_table[256]; diff --git a/sys/dev/nvmf/controller/ctl_frontend_nvmf.c b/sys/dev/nvmf/controller/ctl_frontend_nvmf.c index bc061947a9a0..3d09ee901886 100644 --- a/sys/dev/nvmf/controller/ctl_frontend_nvmf.c +++ b/sys/dev/nvmf/controller/ctl_frontend_nvmf.c @@ -51,8 +51,6 @@ static int nvmft_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int flag, struct thread *td); static int nvmft_shutdown(void); -extern struct ctl_softc *control_softc; - static struct taskqueue *nvmft_taskq; static TAILQ_HEAD(, nvmft_port) nvmft_ports; static struct sx nvmft_ports_lock; From nobody Wed Sep 25 15:14:26 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 4XDKyW55KJz5XLcF; Wed, 25 Sep 2024 15:14:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDKyW4Gvwz4NFq; Wed, 25 Sep 2024 15:14:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727277267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mjZWp98Gqkbai8fj9xjwOEWnGRBDEoMSB2VpLoytxwk=; b=xs0fwnuZtQTmuEqORe/QO2Fadj8eVRs473w2na6gy9nXQ/vrvnSF/3XgB+ScFshmsbQqky tLGLWg2BSn2+q8aNogzQoQW9uZjYVKN/fehT9OrB/NOWLmnl8cyJeRBoa6BMSSPaSrIsoD dUsM1r5iDBgIj/58cjDSotYhtW4MwLkJjI5oHQYHzVFjRDzHGRx4kGJAO8LCqQBuT089gl jLqGc2cpZih6bOvtr+ev8+kIcDIQlUIXvHpbvfGuCbpspaJJkylviRafu590h/qLIPW+YJ fz/wLUAZ9E4UwjMAz2pBwCInkCkJipyMZqsoeEi1nA/ttkRPhJzKB3E6JuqL6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727277267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mjZWp98Gqkbai8fj9xjwOEWnGRBDEoMSB2VpLoytxwk=; b=w5EFpjdzpmgPO5xKNf7roxab7TWXMwGI+jDGwAFlGoXa39c3x6H3m7KCCBdcXtHdRR62Zv ui8MrDQ90KF/dqvq41slxw7Ml3PsDqfQcv270TIiRz9av1ovMyHA9OSVXkDFiW9woFPo1t PsQu5RW5mucjQc4yVTJWqMEnWcfqDSsyai4Z9SaSVKDsZd31/tNHgDsi4DkXdqUtkBnxhL emV/MougfmwN3yL239OSzablRNSyvR3p8Vxyt7GF7OoiBY6qAr9MiGvRT38vaFqV1pBqA1 gs8KMR35eO/FTr/Ik1xzjlrVEgFMjqbSSfigDRbWNOINJvZEUHBbIt6GemXVNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727277267; a=rsa-sha256; cv=none; b=OFgoPqI4vP4/9grPeppWhrjEHoJpR46S3SaJi0Nptuj19emxjnvo+yzDJR9umfB9m0jx/P hw5mpsMvnI4Ait9VfWkY5TmVJfgdydetueS51qjhKVa8OTtDozuFxmYi1MOllemNwZS+Dz 7B0T7S+fNgvALzX7Sdbjp6kwRWf4VgctUQi1O7FmoiO6WYIa/xryzdCfc7hnXbs26x4VCA uRd1O5fju2hb35HnDDujYdVDbXvbHE8eQZfSQ9dUXDXppPbyH6MFdw3xO/oeWm3o1sXpy4 2nba2/fDepPahB080VYiWHsZXKIlOdRc16trqAlRmBHMu7KS+gyFB6Fso+yfDg== Received: from [IPV6:2601:5c0:4200:b830:7d5c:2819:6552:855e] (unknown [IPv6:2601:5c0:4200:b830:7d5c:2819:6552:855e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XDKyW1rwfz14XW; Wed, 25 Sep 2024 15:14:27 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <84f27dd0-27a3-4fa9-83c2-df2d7ca0ccbd@FreeBSD.org> Date: Wed, 25 Sep 2024 11:14:26 -0400 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 User-Agent: Mozilla Thunderbird Subject: Re: git: f08247fd888e - main - Assert that mbufs are writable if we write to them Content-Language: en-US From: John Baldwin To: Drew Gallatin , Kristof Provost , Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202409111118.48BBIQ2h065089@gitrepo.freebsd.org> <2b1955e2-fbf1-41cb-b256-a9a257b16a83@FreeBSD.org> <1f61b6de-0fe2-4343-b4ad-f0866785a4bc@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/25/24 09:58, John Baldwin wrote: > On 9/13/24 11:45, Drew Gallatin wrote: >> I think you also need to remove M_EXTPG from M_WRITABLE(). Attached a trivial, untested patch. > > Yes, I came back to testing this yesterday and ran into that as well. However, as part of this > I also tried to audit all the calls to M_WRITABLE and most of them are assuming they can use > mtod() to get a pointer. I think what might be a better approach is to add a new > M_WRITABLE_EXTPG() variant that doesn't check M_EXTPG and leave M_WRITABLE as-is. Places > like m_copyback that are M_EXTPG aware would use the new macro. This still requires the > patch to not set M_RDONLY in all M_EXTPG mbufs. The other thing we might want to do though > is set M_RDONLY on encrypted data after KTLS has encrypted it as there is no good reason to > modify encrypted data. I've uploaded a series of reviews starting with https://reviews.freebsd.org/D46783 >> Drew >> >> On Thu, Sep 12, 2024, at 5:40 AM, John Baldwin wrote: >>> On 9/12/24 05:03, John Baldwin wrote: >>>> I think part of the motivation for marking M_EXTPG as read-only is that you can't "write" >>>> to m_data via mtod() or the like. That said, M_EXTPG aren't really read-only. It >>>> depends on the backing store. M_EXTPG were first merged into FreeBSD prior to KTLS to >>>> support sendfile, and in that case, they should be M_RDONLY because they alias pages >>>> from the file's VM object. However, M_EXTPG mbufs allocated via functions like >>>> m_uiotombuf_nomap should not be M_RDONLY. I think this originated in the original >>>> import of KTLS which doesn't push setting M_RDONLY out to the callers of mb_alloc_extpgs, >>>> and a few other places that hardcode M_RDONLY with M_EXTPG (_mb_unmapped_to_ext should >>>> preserve M_RDONLY from the original mbuf instead of forcing M_RDONLY). >>>> >>>> I can take a stab at a patch but won't have time to really test it until after Euro. >>> >>> Patch available below. Compile tested but not run-tested: >>> >>> https://github.com/freebsd/freebsd-src/compare/main...bsdjhb:freebsd:m_extpg_rdonly >>> >>>> On 9/11/24 16:56, Drew Gallatin wrote: >>>>> M_EXTPGS mbufs are marked read-only because they refer to external data. The original crypto code, (before kTLS was converted to OCF), used to just build an iovec using PHYS_TO_DMAP() on the page array. I think this case was missed during the conversion to OCF. >>>>> >>>>> I'm not sure what the best thing to do is, as they should be read only, except this one specific case.... I'd be tempted to just nerf the KASSERT for EXTPGS. >>>>> >>>>> On Wed, Sep 11, 2024, at 11:02 AM, Kristof Provost wrote: >>>>>> On 11 Sep 2024, at 16:45, Mark Johnston wrote: >>>>>>> On Wed, Sep 11, 2024 at 11:18:26AM +0000, Kristof Provost wrote: >>>>>>>> The branch main has been updated by kp: >>>>>>>> >>>>>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=f08247fd888e6f7db0ecf2aaa39377144ac40b4c >>>>>>>> >>>>>>>> commit f08247fd888e6f7db0ecf2aaa39377144ac40b4c >>>>>>>> Author: Kristof Provost >>>>>>>> AuthorDate: 2024-09-10 20:15:31 +0000 >>>>>>>> Commit: Kristof Provost >>>>>>>> CommitDate: 2024-09-11 11:17:48 +0000 >>>>>>>> >>>>>>>> Assert that mbufs are writable if we write to them >>>>>>>> >>>>>>>> m_copyback() modifies the mbuf, so it must be a writable mbuf. >>>>>>> >>>>>>> This change still triggers a panic for me when running KTLS tests. I >>>>>>> note that EXTPG mbufs always have M_RDONLY set, but I'm not quite sure >>>>>>> why. I suspect such mbufs need special handling with respect to the new >>>>>>> assertion. >>>>>>> >>>>>>> syzbot also triggered this panic: >>>>>>> https://syzkaller.appspot.com/bug?extid=58c918369f9dc323409d >>>>>>> >>>>>> Yeah, I saw that one before I went out for a bike ride. >>>>>> >>>>>> Clearly something is wrong. Either ktls is using read-only buffers or the M_WRITABLE() macro isn’t quite smart enough to spot this specific case. >>>>>> >>>>>> I’m not familiar enough with ktls to easily tell which. >>>>>> >>>>>> I’ll back this assertion change out for now, so we’re not panicing test machines while we figure this out. >>>>>> >>>>>> Best regards, >>>>>> Kristof >>>>>> >>>>> >>>> >>> >>> -- >>> John Baldwin >>> >>> >> > -- John Baldwin From nobody Wed Sep 25 15:26:37 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 4XDLDY1zvgz5XM4L; Wed, 25 Sep 2024 15:26:37 +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 4XDLDY1Y5Fz4QWg; Wed, 25 Sep 2024 15:26:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727277997; 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=QZOVeIXDuudh5gaugYljbsR1ypnKdOboz4mE49qJQto=; b=dxsseyHixk7VYA9temPr8RZjeenNvMWX08KwmDBvqPN4YI9IaT8dH5pQjNFmHCerTnH7zN 7xAM5I0klYDWcCqo82/CuRxlBYEY98tftYAGDPqdC0nf1kdMI6hgBGnwJTrc1l0eXzoRsh Chu/x+yU7NJwlqQoZNfLqXteFj5JfAm4qnLsjrEQFdrNK8qFUMunvcVUBQN0esYimh0d// hf7ODgfajNDO5uUVpa4b+PCg53K+Q0clpmYAiBV3db4acrGZWGhWgQmJOvKV/OxgOGwwpJ Nc2EQyUzkFWoXG0DDv/YZVBmY4s8XE2o+z3myPHfcM75e5lQ7eYYWsqGD7tp1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727277997; 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=QZOVeIXDuudh5gaugYljbsR1ypnKdOboz4mE49qJQto=; b=rHEetQppATeSOugry6kv96fyr84pbGT7jcjonmpKKkxPj3p5GTxvMi59b4r84e36d3ccYS tuyAtSVVmcFGOSWAn/SNCEX++6922HzUO+kv78oEV9L9H7c4WFmpMpGD5JkKJWAEsJ4kg+ W6KunnnE4doe+skM/+d00sMZAth3EyiUpAX28TsI9cs0C0AOCZd7M3cmJmitEzDmWhJyJ1 G6c+WmGUxTzUBzZPH4SYJ4BLleuQrYjQcZOg6D5WoBIwgdB2jsHzj7odSpFdp/VFtORTju n3ONTMZjmMCww9H4sAoMowEbJRayk/09CK7U4aXfdW4IOdCDnLiw3rOT/Xdh5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727277997; a=rsa-sha256; cv=none; b=PDbPtFAzQLgwAFcjEU5ONfLsKuhEifJ0glb0myBBwxstRxZbqaUW+mSK8/MUAR8IkHdJIT GLgDOBG71IsVt+H16HjldwNqxpwP1ANvIIJd78zLqjxRbMST8G3Mvp7yLyZWTcp3wvDOfn 2UQ/UuTBPPVcyW+Tr9G8P5nuaCeDGgrLrnzKZx0cH6tAEvO20znkH40CtQSgqgu3HIWbeg R+i/PEcXgXrXMujB84YWVLm7k2i9jcm+4Nts0+WK063ffAamIMkDmOZ6VN6LNlykGRzZBU vncM35VJHuqIUIcZHAYw3fGNN90oJ+cVv9Y88ew5jrhLKylQO7TQo0gWJZxr5A== 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 4XDLDY192VzJKf; Wed, 25 Sep 2024 15:26:37 +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 48PFQb5N061466; Wed, 25 Sep 2024 15:26:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PFQbZD061463; Wed, 25 Sep 2024 15:26:37 GMT (envelope-from git) Date: Wed, 25 Sep 2024 15:26:37 GMT Message-Id: <202409251526.48PFQbZD061463@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 67bd1d072190 - main - pf tests: Add max states test 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67bd1d0721908c8ae386723873e422a3f4156932 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=67bd1d0721908c8ae386723873e422a3f4156932 commit 67bd1d0721908c8ae386723873e422a3f4156932 Author: Kajetan Staszkiewicz AuthorDate: 2024-09-25 12:39:38 +0000 Commit: Kristof Provost CommitDate: 2024-09-25 15:26:17 +0000 pf tests: Add max states test Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D46774 --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/max_states.sh | 61 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 8444c92fb8d5..38548336377a 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -24,6 +24,7 @@ ATF_TESTS_SH+= altq \ macro \ map_e \ match \ + max_states \ mbuf \ modulate \ names \ diff --git a/tests/sys/netpfil/pf/max_states.sh b/tests/sys/netpfil/pf/max_states.sh new file mode 100755 index 000000000000..677d6f473d97 --- /dev/null +++ b/tests/sys/netpfil/pf/max_states.sh @@ -0,0 +1,61 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 Kajetan Staszkiewicz +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/utils.subr + + +max_states_head() +{ + atf_set descr 'Max states per rule' + atf_set require.user root +} + +max_states_body() +{ + setup_router_dummy_ipv6 + + pft_set_rules router \ + "block" \ + "pass quick inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ + "pass in on ${epair_tester}b keep state (max 3)" \ + "pass out on ${epair_server}a keep state" + + # The exact limit is off by 1 + ping_dummy_check_request exit:0 --ping-type=tcpsyn --send-sport=4201 + ping_dummy_check_request exit:0 --ping-type=tcpsyn --send-sport=4202 + ping_dummy_check_request exit:1 --ping-type=tcpsyn --send-sport=4203 +} + +max_states_cleanup() +{ + pft_cleanup +} + + +atf_init_test_cases() +{ + atf_add_test_case "max_states" +} From nobody Wed Sep 25 16:50:21 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 4XDN595lkBz5XS3Q; Wed, 25 Sep 2024 16:50:21 +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 4XDN5957xTz4YG5; Wed, 25 Sep 2024 16:50:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727283021; 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=Y1ItIJ5flIyqPz1PpDWg78S03c1csmxHRSyHXffaReQ=; b=aPYTtT1yz28Aq/MWJ82b9/uzUL/TjyPBvz5/7aGFMcZyl7yvQe7XFoxGi3vAbPCTFnWrQq eHxSw66xXZ3Q0ClzkIEkSnRqa8xYUcHTtHoDqbWeOziFeMZ3EdOVvJlFNLSBwLQjkoQFlD r2WcSjAh6p50q+kOUsqWwNc11+xKUc8nQ/BerfAhKowBBTKf1H/llC7vVOU9D5YObTsUee FSI4f2BqMfYYwSUptCtLHaPtZlt+iFNC4tEqXcCVY4JfmxZT6AamyiC2RvAj1w2qMCUN5x cWdCQk6ABlihO9FXqSqL7f3eru5vFROXc1+IyexhqlErYAKq0HHRBezU74GnDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727283021; 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=Y1ItIJ5flIyqPz1PpDWg78S03c1csmxHRSyHXffaReQ=; b=l4uG579FX6XTQNRLCa1gTedFxpcBpYLZ58WIPh7nL03yPeSVzPI7A4l1pf/uzHMK0XG08N ZS/kRQvm/YewHtCbTLBP++LBt7/Qx8pYRP3BKRHTSZX/erBhtR5B8YzRVBvVFVJOsMkWQV PMPh2mAmgOaFEHeqKYDqAGQ4X2mq/cy4nXcJpD/n9Zvmcd1rHALrzLLQ20VIVnEDVQrp0y HMuBrtYk2ehewxKZBvWIUpzZrT8vt4Fb5yY0XiunqWuucirvYE+g/Wah7a5rHKYdOpsdjF UPQojxrys7Q86fn9Pboovh2qe6vHuL6MnZw1lSQjK9T9ZyxIJ2JGnsP/GcVs/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727283021; a=rsa-sha256; cv=none; b=bmmcZtGZFFBRmq46fJ3lDcC8tSDqltsn0eeX56X+OYMpSoynt3zEatwnQ/Xfu2Aerm8RaK DiP0qwP6afY4IGU3ggiQfT8kUSBIbA0hfpFuZ7K3Zy+DZLU/nmMlDiOw0j4q4cXaclwtMY 8SodFRbt5icLDRWLuxqQ1TvwNp3X4/RBYlFNSoru3z0Q5R+tqY2XmcmvNryiayjfWsXOmf ZBD5xOQzxd3CPv1aUY5fbzrqHfWlEa/gL4ujWUO53yzkLtYlhxkjAp+auFKjU9SR1Lni5/ nsqJjACANZMvduVB6+LMRwsHgQbK9HF0LAVEJUYNpuiZjk2zG0/bb0ZkL3BwyQ== 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 4XDN594QjQzLCZ; Wed, 25 Sep 2024 16:50:21 +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 48PGoL9q004754; Wed, 25 Sep 2024 16:50:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PGoLCA004751; Wed, 25 Sep 2024 16:50:21 GMT (envelope-from git) Date: Wed, 25 Sep 2024 16:50:21 GMT Message-Id: <202409251650.48PGoLCA004751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d01a9cceefbc - stable/14 - Add some AMD device IDs. 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d01a9cceefbc072aef212c640d8558768853545e Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d01a9cceefbc072aef212c640d8558768853545e commit d01a9cceefbc072aef212c640d8558768853545e Author: Dmitry Luhtionov AuthorDate: 2024-06-07 15:00:09 +0000 Commit: Ed Maste CommitDate: 2024-09-25 13:17:26 +0000 Add some AMD device IDs. (cherry picked from commit 4cc4b5e2b5f85f136169069559108ed7fff351f9) --- sys/dev/ahci/ahci_pci.c | 3 +++ sys/dev/sound/pci/hda/hdac.c | 1 + sys/dev/sound/pci/hda/hdac.h | 1 + sys/dev/usb/controller/xhci_pci.c | 3 +++ 4 files changed, 8 insertions(+) diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 3d4a7d7c7400..7451cc387011 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -73,6 +73,9 @@ static const struct { {0x43b61022, 0x00, "AMD X399", 0}, {0x43b51022, 0x00, "AMD 300 Series", 0}, /* X370 */ {0x43b71022, 0x00, "AMD 300 Series", 0}, /* B350 */ + {0x43c81022, 0x00, "AMD 400 Series", 0}, /* B450 */ + {0x43eb1022, 0x00, "AMD 500 Series", 0}, + {0x43f61022, 0x00, "AMD 600 Series", 0}, /* X670 */ {0x78001022, 0x00, "AMD Hudson-2", 0}, {0x78011022, 0x00, "AMD Hudson-2", 0}, {0x78021022, 0x00, "AMD Hudson-2", 0}, diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 64243e9d6227..336602b6bbf4 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -194,6 +194,7 @@ static const struct { { HDA_ATI_RV940, "ATI RV940", 0, 0 }, { HDA_ATI_RV970, "ATI RV970", 0, 0 }, { HDA_ATI_R1000, "ATI R1000", 0, 0 }, + { HDA_ATI_OLAND, "ATI Oland", 0, 0 }, { HDA_ATI_KABINI, "ATI Kabini", 0, 0 }, { HDA_ATI_TRINITY, "ATI Trinity", 0, 0 }, { HDA_AMD_X370, "AMD X370", 0, 0 }, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index abb6148c3369..4b4bd70f800f 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -179,6 +179,7 @@ #define HDA_ATI_RV930 HDA_MODEL_CONSTRUCT(ATI, 0xaa90) #define HDA_ATI_RV910 HDA_MODEL_CONSTRUCT(ATI, 0xaa98) #define HDA_ATI_R1000 HDA_MODEL_CONSTRUCT(ATI, 0xaaa0) +#define HDA_ATI_OLAND HDA_MODEL_CONSTRUCT(ATI, 0xaab0) #define HDA_ATI_KABINI HDA_MODEL_CONSTRUCT(ATI, 0x9840) #define HDA_ATI_TRINITY HDA_MODEL_CONSTRUCT(ATI, 0x9902) #define HDA_ATI_ALL HDA_MODEL_CONSTRUCT(ATI, 0xffff) diff --git a/sys/dev/usb/controller/xhci_pci.c b/sys/dev/usb/controller/xhci_pci.c index 359f14bb1e3c..3afb9fa8c6ef 100644 --- a/sys/dev/usb/controller/xhci_pci.c +++ b/sys/dev/usb/controller/xhci_pci.c @@ -100,6 +100,9 @@ xhci_pci_match(device_t self) return ("AMD Starship USB 3.0 controller"); case 0x149c1022: return ("AMD Matisse USB 3.0 controller"); + case 0x15e01022: + case 0x15e11022: + return ("AMD Raven USB 3.1 controller"); case 0x43ba1022: return ("AMD X399 USB 3.0 controller"); case 0x43b91022: /* X370 */ From nobody Wed Sep 25 16:50:22 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 4XDN5C06Nhz5XRxr; Wed, 25 Sep 2024 16:50:23 +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 4XDN5B5mvBz4YLx; Wed, 25 Sep 2024 16:50:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727283022; 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=guy/uvytq14L0QhfBpnOEB9MpCumtuT14c74lZfbYRg=; b=mIueqCi7iDWapfW/VbzZ8UBIxkcfKWvebRQLmlUAAFzMs9ApEZV8b7LNG5PshsMGoTYXkk tXq5+yX3A9K4VHSNHR9kNdkIUrDMBFLyeMq/YxDg7r5dlB7hqtkL1Qo1nlueK27aT73u4Q mwU3vGe/NnAAGhi09YZlVMQQ3KQVz7id8Uetmsrstojk8mb4jU+lFQ76TU4fniri6uFCo2 ojQl/Secu3NEV0WqtmYO7GoOu5IjtGnTzEbVg4lFxek1RB/6H/WnTjZuF8ipGdDX+BH5Q0 u2G5HpYGQX8o3rRrHKYJJi70yS7yUsjkq6mZk7lsGmEyeWEx1hen4jSRzxc1ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727283022; 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=guy/uvytq14L0QhfBpnOEB9MpCumtuT14c74lZfbYRg=; b=kriDfA2AFljB+SVR0PSp3OeazkYzLlKZOG+1yXlTNTtiu2xw66ZUe5Kz/5tLb0MIQyek33 6d0a6BWD+pawOcemNFB/X28lAS7pQewacABW9daViyUABJDO08lyY265eSwfmJkDotiiG1 8Tbxwno4dgSV9mr1CrsGOpk1cDGfShfRjVGL6VCewoaAhgvRAx/Pf8jkz2b8wWNaTpF4Fv mzeP6NuaiR61y2Pe2bmqy9rBnvXfJfctQerDqGCx9RvLQE5/IMbkofXkaQMyy/XTXxSEZn Ou2tGUDIo1a1T/rWVxDT+w0dMr1o5AA2Ez8zgARY74HxX7Hy3I9K6C2tAecC6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727283022; a=rsa-sha256; cv=none; b=GpyReQZHt7De7dorHUsQohJ0NsxTsnRoNqAmxjG4yNcHht6ksaOAGpj5aMtuiKSf6fyHo1 JzYaFKvuJRSdvrbPjKb5mj+x1qS8ujGEd9Vrm5cXwzr6ptruE5bINtHIwuiy1VugwyFrcx X56yVSsrIQk7gNbA0tqIxbicsYUneJhfcBfHlwZT9tDBVev6jNJ0VDhdnPSWVfXtvpB4bn k2FduKuZetFxtBfnmMBi2ffUmtseraP8hliNHI6di9RLgyuZHXS39U2pLbcpHxLVLJYYAh Ej4jsppjwvqVUrFyIQIyQfHZo/iA67vSiFNkrZdMaink/J8JnHOSTKdC+tD92A== 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 4XDN5B5NL0zLCb; Wed, 25 Sep 2024 16:50:22 +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 48PGoM0C004798; Wed, 25 Sep 2024 16:50:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PGoMtx004794; Wed, 25 Sep 2024 16:50:22 GMT (envelope-from git) Date: Wed, 25 Sep 2024 16:50:22 GMT Message-Id: <202409251650.48PGoMtx004794@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 5754008f8511 - stable/14 - hda: remove duplicate codec defines 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5754008f8511ba95d84a35a1a91ff4e0682dee99 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5754008f8511ba95d84a35a1a91ff4e0682dee99 commit 5754008f8511ba95d84a35a1a91ff4e0682dee99 Author: Pavel Timofeev AuthorDate: 2024-09-22 10:40:36 +0000 Commit: Ed Maste CommitDate: 2024-09-25 13:17:26 +0000 hda: remove duplicate codec defines Reviewed by: emaste Fixes: 35e492f3bd41 ("Update list of Conexant and Realtek codecs.") Differential Revision: https://reviews.freebsd.org/D45965 (cherry picked from commit 4004e1752ec7992eeace7f0318d2ca3fc7ba9e03) --- sys/dev/sound/pci/hda/hdac.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 4b4bd70f800f..5e66e8eaed59 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -586,8 +586,6 @@ #define HDA_CODEC_ALC295 HDA_CODEC_CONSTRUCT(REALTEK, 0x0295) #define HDA_CODEC_ALC298 HDA_CODEC_CONSTRUCT(REALTEK, 0x0298) #define HDA_CODEC_ALC299 HDA_CODEC_CONSTRUCT(REALTEK, 0x0299) -#define HDA_CODEC_ALC292 HDA_CODEC_CONSTRUCT(REALTEK, 0x0292) -#define HDA_CODEC_ALC295 HDA_CODEC_CONSTRUCT(REALTEK, 0x0295) #define HDA_CODEC_ALC300 HDA_CODEC_CONSTRUCT(REALTEK, 0x0300) #define HDA_CODEC_ALC623 HDA_CODEC_CONSTRUCT(REALTEK, 0x0623) #define HDA_CODEC_ALC660 HDA_CODEC_CONSTRUCT(REALTEK, 0x0660) From nobody Wed Sep 25 16:51:06 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 4XDN622Z3Bz5XRmw; Wed, 25 Sep 2024 16:51:06 +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 4XDN621tBDz4Yny; Wed, 25 Sep 2024 16:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727283066; 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=bSBQwOzkPxiGdO0tZwvtxz6H6oowOm3FW+4jFf4hm5k=; b=pq3V5qWE7M6aCVQnscw7hrEI8wrHO/+37J24fyjMJXIuun3C+eooNLcV+DDcR652N7t2oL 1RnUUzo/Yr2bFEj8lQM/LC3Upw61a+KxA89PdoObiJoLqVpTvwO7wH1ZJQkxaI5CWxa/8+ m7qOKYygyigrKPmrOp2YViN01UR15Rt9UPNTWPOL+SDzvSQK1LKcQEjWJN4k+BHCiE37Mb jfvib8z9lle0SP7h3tgTq38t0F2RAwpPvcyydAQa+4UxCc+CHCd7IrtEt1COFzYAWr5M+M SrHXvoyjwHJEZZoa4f8VJWu+EkbUYdHWDq6vI5yJy0AEL04IJY13+fS3DjMvnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727283066; 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=bSBQwOzkPxiGdO0tZwvtxz6H6oowOm3FW+4jFf4hm5k=; b=RDb6E4jE8dIhVeyrKSKH2cLVOPZQMmmahDLtxwWdfsnDVy40+bH2zP5TyvnClxY0MBejyW vA71px10/w/xxKcf13gcCKDSFj80jJesAA/7oUhSKMEj8rYmSLtgmtHcOsMV81pyQVpTjF szJthFKpr7Aqak3J+wHwpwu/tqeZ1EFNmx+/MVUwIUc63ME6fkPBakCHSd9BB3J4kmAU7P OYEjKh/oWksyRijjKLGnGa+B6DTj1eqp4RwDaCdZgP2uRCr7YnEe9/Tfy4qJ3xwYEnAZIf pdLUqYJH8FDQPrAHW+2Xmri63rYPbyhIym3eDX66f010keC/alpfJ4MwCjuV/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727283066; a=rsa-sha256; cv=none; b=UyPtQ8djC+ubxHsoDwXvw5bnwc83koRa4fssiwT84d9vJJultKKD9u/mCWEC5XwSxhXNMO QmdSOU9gIts7CIXFDqUwl2dx2aFuNni0Jcd6hgH/SO92liyvTNy+N/uU6wglrAqKbOiUVm yL7TquG2VGWmt9ZLPkRE5jWrT1Kv/PMIOpl6O808Jh6pl/yVqbLy8wUbzapcoCSWk69MCA pYXmFRI+g92/9f9R/oHe6tQTYeJQdPx3qfb1rTIbtnFYCDp7tb1HePqXMAkqRhBOalMELn /i/wv9u1kNJdCV2su0Ov1W5YurhTdH7VXPxHxJWfhjOOkgVswYoFr5qFPV2wTA== 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 4XDN6219KczKsC; Wed, 25 Sep 2024 16:51:06 +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 48PGp6rU005035; Wed, 25 Sep 2024 16:51:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PGp6dV005032; Wed, 25 Sep 2024 16:51:06 GMT (envelope-from git) Date: Wed, 25 Sep 2024 16:51:06 GMT Message-Id: <202409251651.48PGp6dV005032@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 39f39a96569d - stable/14 - bhyve: simplify slot validation in xHCI emulation 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 39f39a96569dc9f8ca9fc8ee351d3d6edabfb631 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=39f39a96569dc9f8ca9fc8ee351d3d6edabfb631 commit 39f39a96569dc9f8ca9fc8ee351d3d6edabfb631 Author: Pierre Pronchery AuthorDate: 2024-09-18 18:52:04 +0000 Commit: Ed Maste CommitDate: 2024-09-25 16:50:41 +0000 bhyve: simplify slot validation in xHCI emulation This is a follow-up to commit e72d86ad9c62 ("bhyve: improve input validation in pci_xhci") -- introducing a helper for slot validation. Co-authored-by: John Baldwin Reviewed by: markj, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46696 (cherry picked from commit f505f9a842eb3e75e16e6c7c6f67d5b592b1bc65) --- usr.sbin/bhyve/pci_xhci.c | 90 +++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 58 deletions(-) diff --git a/usr.sbin/bhyve/pci_xhci.c b/usr.sbin/bhyve/pci_xhci.c index 77b17d525bdd..43f30c85d85f 100644 --- a/usr.sbin/bhyve/pci_xhci.c +++ b/usr.sbin/bhyve/pci_xhci.c @@ -348,6 +348,7 @@ static void pci_xhci_update_ep_ring(struct pci_xhci_softc *sc, struct pci_xhci_dev_emu *dev, struct pci_xhci_dev_ep *devep, struct xhci_endp_ctx *ep_ctx, uint32_t streamid, uint64_t ringaddr, int ccs); +static int pci_xhci_validate_slot(uint32_t slot); static void pci_xhci_set_evtrb(struct xhci_trb *evtrb, uint64_t port, uint32_t errcode, @@ -849,17 +850,14 @@ pci_xhci_cmd_disable_slot(struct pci_xhci_softc *sc, uint32_t slot) DPRINTF(("pci_xhci disable slot %u", slot)); - cmderr = XHCI_TRB_ERROR_NO_SLOTS; - if (sc->portregs == NULL) + if (sc->portregs == NULL) { + cmderr = XHCI_TRB_ERROR_NO_SLOTS; goto done; + } - if (slot == 0) { - cmderr = XHCI_TRB_ERROR_TRB; - goto done; - } else if (slot > XHCI_MAX_SLOTS) { - cmderr = XHCI_TRB_ERROR_SLOT_NOT_ON; + cmderr = pci_xhci_validate_slot(slot); + if (cmderr != XHCI_TRB_ERROR_SUCCESS) goto done; - } dev = XHCI_SLOTDEV_PTR(sc, slot); if (dev) { @@ -867,7 +865,6 @@ pci_xhci_cmd_disable_slot(struct pci_xhci_softc *sc, uint32_t slot) cmderr = XHCI_TRB_ERROR_SLOT_NOT_ON; } else { dev->dev_slotstate = XHCI_ST_DISABLED; - cmderr = XHCI_TRB_ERROR_SUCCESS; /* TODO: reset events and endpoints */ } } else @@ -886,19 +883,16 @@ pci_xhci_cmd_reset_device(struct pci_xhci_softc *sc, uint32_t slot) uint32_t cmderr; int i; - cmderr = XHCI_TRB_ERROR_NO_SLOTS; - if (sc->portregs == NULL) + if (sc->portregs == NULL) { + cmderr = XHCI_TRB_ERROR_NO_SLOTS; goto done; + } DPRINTF(("pci_xhci reset device slot %u", slot)); - if (slot == 0) { - cmderr = XHCI_TRB_ERROR_TRB; + cmderr = pci_xhci_validate_slot(slot); + if (cmderr != XHCI_TRB_ERROR_SUCCESS) goto done; - } else if (slot > XHCI_MAX_SLOTS) { - cmderr = XHCI_TRB_ERROR_SLOT_NOT_ON; - goto done; - } dev = XHCI_SLOTDEV_PTR(sc, slot); if (!dev || dev->dev_slotstate == XHCI_ST_DISABLED) @@ -928,8 +922,6 @@ pci_xhci_cmd_reset_device(struct pci_xhci_softc *sc, uint32_t slot) ep_ctx->dwEpCtx0 = FIELD_REPLACE( ep_ctx->dwEpCtx0, XHCI_ST_EPCTX_DISABLED, 0x7, 0); } - - cmderr = XHCI_TRB_ERROR_SUCCESS; } pci_xhci_reset_slot(sc, slot); @@ -953,8 +945,6 @@ pci_xhci_cmd_address_device(struct pci_xhci_softc *sc, uint32_t slot, islot_ctx = &input_ctx->ctx_slot; ep0_ctx = &input_ctx->ctx_ep[1]; - cmderr = XHCI_TRB_ERROR_SUCCESS; - DPRINTF(("pci_xhci: address device, input ctl: D 0x%08x A 0x%08x,", input_ctx->ctx_input.dwInCtx0, input_ctx->ctx_input.dwInCtx1)); DPRINTF((" slot %08x %08x %08x %08x", @@ -972,13 +962,9 @@ pci_xhci_cmd_address_device(struct pci_xhci_softc *sc, uint32_t slot, goto done; } - if (slot == 0) { - cmderr = XHCI_TRB_ERROR_TRB; + cmderr = pci_xhci_validate_slot(slot); + if (cmderr != XHCI_TRB_ERROR_SUCCESS) goto done; - } else if (slot > XHCI_MAX_SLOTS) { - cmderr = XHCI_TRB_ERROR_SLOT_NOT_ON; - goto done; - } /* assign address to slot */ dev_ctx = pci_xhci_get_dev_ctx(sc, slot); @@ -1042,17 +1028,11 @@ pci_xhci_cmd_config_ep(struct pci_xhci_softc *sc, uint32_t slot, uint32_t cmderr; int i; - cmderr = XHCI_TRB_ERROR_SUCCESS; - DPRINTF(("pci_xhci config_ep slot %u", slot)); - if (slot == 0) { - cmderr = XHCI_TRB_ERROR_TRB; + cmderr = pci_xhci_validate_slot(slot); + if (cmderr != XHCI_TRB_ERROR_SUCCESS) goto done; - } else if (slot > XHCI_MAX_SLOTS) { - cmderr = XHCI_TRB_ERROR_SLOT_NOT_ON; - goto done; - } dev = XHCI_SLOTDEV_PTR(sc, slot); assert(dev != NULL); @@ -1175,15 +1155,9 @@ pci_xhci_cmd_reset_ep(struct pci_xhci_softc *sc, uint32_t slot, DPRINTF(("pci_xhci: reset ep %u: slot %u", epid, slot)); - cmderr = XHCI_TRB_ERROR_SUCCESS; - - if (slot == 0) { - cmderr = XHCI_TRB_ERROR_TRB; - goto done; - } else if (slot > XHCI_MAX_SLOTS) { - cmderr = XHCI_TRB_ERROR_SLOT_NOT_ON; + cmderr = pci_xhci_validate_slot(slot); + if (cmderr != XHCI_TRB_ERROR_SUCCESS) goto done; - } dev = XHCI_SLOTDEV_PTR(sc, slot); assert(dev != NULL); @@ -1272,15 +1246,9 @@ pci_xhci_cmd_set_tr(struct pci_xhci_softc *sc, uint32_t slot, uint32_t cmderr, epid; uint32_t streamid; - cmderr = XHCI_TRB_ERROR_SUCCESS; - - if (slot == 0) { - cmderr = XHCI_TRB_ERROR_TRB; - goto done; - } else if (slot > XHCI_MAX_SLOTS) { - cmderr = XHCI_TRB_ERROR_SLOT_NOT_ON; + cmderr = pci_xhci_validate_slot(slot); + if (cmderr != XHCI_TRB_ERROR_SUCCESS) goto done; - } dev = XHCI_SLOTDEV_PTR(sc, slot); assert(dev != NULL); @@ -1362,7 +1330,6 @@ pci_xhci_cmd_eval_ctx(struct pci_xhci_softc *sc, uint32_t slot, islot_ctx = &input_ctx->ctx_slot; ep0_ctx = &input_ctx->ctx_ep[1]; - cmderr = XHCI_TRB_ERROR_SUCCESS; DPRINTF(("pci_xhci: eval ctx, input ctl: D 0x%08x A 0x%08x,", input_ctx->ctx_input.dwInCtx0, input_ctx->ctx_input.dwInCtx1)); DPRINTF((" slot %08x %08x %08x %08x", @@ -1380,13 +1347,9 @@ pci_xhci_cmd_eval_ctx(struct pci_xhci_softc *sc, uint32_t slot, goto done; } - if (slot == 0) { - cmderr = XHCI_TRB_ERROR_TRB; - goto done; - } else if (slot > XHCI_MAX_SLOTS) { - cmderr = XHCI_TRB_ERROR_SLOT_NOT_ON; + cmderr = pci_xhci_validate_slot(slot); + if (cmderr != XHCI_TRB_ERROR_SUCCESS) goto done; - } /* assign address to slot; in this emulation, slot_id = address */ dev_ctx = pci_xhci_get_dev_ctx(sc, slot); @@ -1723,6 +1686,17 @@ pci_xhci_update_ep_ring(struct pci_xhci_softc *sc, } } +static int +pci_xhci_validate_slot(uint32_t slot) +{ + if (slot == 0) + return (XHCI_TRB_ERROR_TRB); + else if (slot > XHCI_MAX_SLOTS) + return (XHCI_TRB_ERROR_SLOT_NOT_ON); + else + return (XHCI_TRB_ERROR_SUCCESS); +} + /* * Outstanding transfer still in progress (device NAK'd earlier) so retry * the transfer again to see if it succeeds. From nobody Wed Sep 25 17:15:21 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 4XDNf20ySDz5XSxv; Wed, 25 Sep 2024 17:15:22 +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 4XDNf206WNz4byJ; Wed, 25 Sep 2024 17:15:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727284522; 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=Pk1uOpDvdBIgT+WyQg+MpTA/MD6YTOW3hOIQcjwSeNY=; b=OdzTq4t2U0wHKOsxrZxu3XjliUy4wZDsaeLI2SMK82s1Gr2ZTtsUVuCzMf3g2jGHfeNROX NYl2sTwhI+x1wadSW/sRahNtLnia3PNpXyL4E6NSZCGcgSK6lGU0kloVUgt7md4v7eVY45 4GHysffS5CFe2RAt7iaUfLVuqxtS7JJtwlFedvijXkJY40RVIRz5x3y1ardFIQ5lr0uMie wk3RJvNxHmDjitq/T3Imsoz+2ZIIzWid+Q1D2iim57agLk3Y2A2rlT2fzL39r2q0Hb/rny V5OyN9IlQ+DRfYbuPrUZorztiODqaFK8chOKCm7p6tzpFS4+Guc4/IatHRhEXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727284522; 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=Pk1uOpDvdBIgT+WyQg+MpTA/MD6YTOW3hOIQcjwSeNY=; b=LHIeYjNrbddAjo/yplzOQEwTTXg0TX/ivWIE3j1JLBHvWV/EnO74L/Z8o7dH81SzRRTAfG DUsD/k5Rit1vMmdlwNTOTTrWLAaN5Kd8YzB6mwkYRqwNTUmGvo8+Fe6vw/9FUxvHQMZ0nN F1xfmfjEo9kWTX/XmItXiCVQut5zqfptwGESQsya3vRP8WYfx6rsDYHep2i5vMt/BiMrKH Ua/3AaHWR8lVjb8qwkb4/k0dOt73tbPW8Z067VrkkfoyQ2X1tEjDBBnl6bYSVJZ44CIPok 7lwNtSZDR/fslNYV1l2dkwdHMUBiGngFMbsGZjh9FIapXAHKWxZEhobKU4LH4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727284522; a=rsa-sha256; cv=none; b=m7IaTOuKzhuU2pF1KIj+RWI0xu2DR6XElAT7ST9/VodBmQTtJy2KvGFobQJ7wE3+Ko8NoJ crtxEHbujTs1P1DOtZ7bI6+nMz4y+xTn647y4FS+tU8MVwIc4LH8V0zMFtVKShmrAM5nLp ROIDmaw6XS64ejC5C08iritoWRwt6hwFP9RgE4NkYmxAIP8FHoIBSxQSNAJ+sOxcPKPyYO sE+kdRhxHkqT1cLTif6z+1U06iEh+ie6PwxodaechB/5jYbxdxyYNAmaHdl7XSg1p2AC20 ZqUygiI5Z39pFYmVXNnlYaW/BkL0sX6pXUa1cYMUF2EFHAE8xCr5xqplXukfPA== 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 4XDNf16q9jzLdk; Wed, 25 Sep 2024 17:15:21 +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 48PHFLYL047268; Wed, 25 Sep 2024 17:15:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PHFLuQ047265; Wed, 25 Sep 2024 17:15:21 GMT (envelope-from git) Date: Wed, 25 Sep 2024 17:15:21 GMT Message-Id: <202409251715.48PHFLuQ047265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: cf73401c4f7a - main - diff3: Fix merge mode. 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf73401c4f7af063c91a0c8e4d5b46e08f06db87 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cf73401c4f7af063c91a0c8e4d5b46e08f06db87 commit cf73401c4f7af063c91a0c8e4d5b46e08f06db87 Author: Dag-Erling Smørgrav AuthorDate: 2024-09-25 17:14:32 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-09-25 17:14:55 +0000 diff3: Fix merge mode. This is mostly thj@'s work, with some tweaks and cleanup by me. There are still some cases where our output differs from GNU diff3, but it's much better than before and I'd rather commit what I have now than let it continue to languish in a metaphorical drawer. MFC after 3 weeks Sponsored by: Klara, Inc. Reviewed by: thj Differential Revision: https://reviews.freebsd.org/D46762 --- usr.bin/diff3/diff3.c | 255 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 179 insertions(+), 76 deletions(-) diff --git a/usr.bin/diff3/diff3.c b/usr.bin/diff3/diff3.c index c72ea0747589..f20b1d74678d 100644 --- a/usr.bin/diff3/diff3.c +++ b/usr.bin/diff3/diff3.c @@ -79,7 +79,6 @@ #include #include - /* * "from" is first in range of changed lines; "to" is last+1 * from=to=line after point of insertion for added lines. @@ -90,6 +89,7 @@ struct range { }; struct diff { +#define DIFF_TYPE1 1 #define DIFF_TYPE2 2 #define DIFF_TYPE3 3 int type; @@ -147,6 +147,7 @@ static void keep(int, struct range *); static void merge(int, int); static void prange(struct range *, bool); static void repos(int); +static void separate(const char *); static void edscript(int) __dead2; static void Ascript(int) __dead2; static void mergescript(int) __dead2; @@ -154,7 +155,7 @@ static void increase(void); static void usage(void); static void printrange(FILE *, struct range *); -static const char diff3_version[] = "FreeBSD diff3 20220517"; +static const char diff3_version[] = "FreeBSD diff3 20240925"; enum { DIFFPROG_OPT, @@ -189,49 +190,110 @@ usage(void) "[-L label3] file1 file2 file3\n"); } +static int +strtoi(char *str, char **end) +{ + intmax_t num; + + errno = 0; + num = strtoimax(str, end, 10); + if ((end != NULL && *end == str) || + num < 0 || num > INT_MAX || + errno == EINVAL || errno == ERANGE) + err(1, "error in diff output"); + return (int)num; +} + +/* + * Read diff hunks into the array pointed to by *dd. + * + * The output from `diff foo bar` consists of a series of hunks describing + * an addition (lines in bar not present in foo), change (lines in bar + * different from lines in foo), or deletion (lines in foo not present in + * bar). Each record starts with a line of the form: + * + * a[,b]xc[,d] + * + * where a, b, c, and d are nonnegative integers (b and d are printed only + * if they differ from a and c, respectively), and x is either 'a' for an + * addition, 'c' for a change, or 'd' for a deletion. This is then + * followed by a series of lines (which we ignore) giving the added, + * changed, or deleted text. + * + * For an addition, a == b is the last line in 'foo' before the addition, + * while c through d is the range of lines in 'bar' to be added to 'foo'. + * + * For a change, a through b is the range of lines in 'foo' to be replaced + * and c through d is the range of lines in 'bar' to replace them with. + * + * For a deletion, a through b is the range of lines in 'foo' to remove + * and c == d is the line in 'bar' which corresponds to the last line + * before the deletion. + * + * The observant reader will have noticed that x is not really needed and + * that we can fully describe any hunk using only a, b, c, and d: + * + * - an addition replaces a zero-length range in one file with a + * non-zero-length range from the other + * + * - a change replaces a non-zero-length range in one file with a + * non-zero-length range from the other + * + * - a deletion replaces a non-zero-length range in one file with a + * zero-length range from the other + */ static int readin(int fd, struct diff **dd) { int a, b, c, d; - size_t i; + int i; char kind, *p; FILE *f; f = fdopen(fd, "r"); if (f == NULL) err(2, "fdopen"); - for (i = 0; (p = getchange(f)); i++) { + for (i = 0; (p = getchange(f)) != NULL; i++) { + if ((size_t)i >= szchanges - 1) + increase(); #if DEBUG (*dd)[i].line = strdup(p); #endif /* DEBUG */ - if (i >= szchanges - 1) - increase(); - a = b = (int)strtoimax(p, &p, 10); - if (*p == ',') { - p++; - b = (int)strtoimax(p, &p, 10); - } + a = b = strtoi(p, &p); + if (*p == ',') + b = strtoi(p + 1, &p); kind = *p++; - c = d = (int)strtoimax(p, &p, 10); - if (*p == ',') { - p++; - d = (int)strtoimax(p, &p, 10); - } + c = d = strtoi(p, &p); + if (*p == ',') + d = strtoi(p + 1, &p); + if (*p != '\n') + errx(1, "error in diff output"); if (kind == 'a') a++; - if (kind == 'd') + else if (kind == 'c') + /* nothing */ ; + else if (kind == 'd') c++; + else + errx(1, "error in diff output"); b++; d++; + if (b < a || d < c) + errx(1, "error in diff output"); (*dd)[i].old.from = a; (*dd)[i].old.to = b; (*dd)[i].new.from = c; (*dd)[i].new.to = d; + if (i > 0) { + if ((*dd)[i].old.from < (*dd)[i - 1].old.to || + (*dd)[i].new.from < (*dd)[i - 1].new.to) + errx(1, "diff output out of order"); + } } - if (i) { - (*dd)[i].old.from = (*dd)[i - 1].old.to; - (*dd)[i].new.from = (*dd)[i - 1].new.to; + if (i > 0) { + (*dd)[i].old.from = (*dd)[i].old.to = (*dd)[i - 1].old.to; + (*dd)[i].new.from = (*dd)[i].new.to = (*dd)[i - 1].new.to; } fclose(f); return (i); @@ -264,7 +326,7 @@ getchange(FILE *b) { char *line; - while ((line = get_line(b, NULL))) { + while ((line = get_line(b, NULL)) != NULL) { if (isdigit((unsigned char)line[0])) return (line); } @@ -305,15 +367,23 @@ merge(int m1, int m2) d2 = d23; j = 0; - while (t1 = d1 < d13 + m1, t2 = d2 < d23 + m2, t1 || t2) { + for (;;) { + t1 = (d1 < d13 + m1); + t2 = (d2 < d23 + m2); + if (!t1 && !t2) + break; + /* first file is different from the others */ if (!t2 || (t1 && d1->new.to < d2->new.from)) { /* stuff peculiar to 1st file */ if (eflag == EFLAG_NONE) { - printf("====1\n"); + separate("1"); change(1, &d1->old, false); keep(2, &d1->new); change(3, &d1->new, false); + } else if (eflag == EFLAG_OVERLAP) { + j = edit(d2, dup, j, DIFF_TYPE1); + printdiff(d2); } d1++; continue; @@ -321,7 +391,7 @@ merge(int m1, int m2) /* second file is different from others */ if (!t1 || (t2 && d2->new.to < d1->new.from)) { if (eflag == EFLAG_NONE) { - printf("====2\n"); + separate("2"); keep(1, &d2->new); change(3, &d2->new, false); change(2, &d2->old, false); @@ -359,7 +429,7 @@ merge(int m1, int m2) * dup = 1 means files 1 and 2 identical */ if (eflag == EFLAG_NONE) { - printf("====%s\n", dup ? "3" : ""); + separate(dup ? "3" : ""); change(1, &d1->old, dup); change(2, &d2->old, false); d3 = d1->old.to > d1->old.from ? d1 : d2; @@ -400,6 +470,12 @@ merge(int m1, int m2) edscript(j); } +static void +separate(const char *s) +{ + printf("====%s\n", s); +} + /* * The range of lines rold.from thru rold.to in file i is to be changed. * It is to be printed only if it does not duplicate something to be @@ -555,7 +631,6 @@ printrange(FILE *p, struct range *r) char *line = NULL; size_t len = 0; int i = 1; - ssize_t rlen = 0; /* We haven't been asked to print anything */ if (r->from == r->to) @@ -570,7 +645,7 @@ printrange(FILE *p, struct range *r) * files with lots of ranges. */ fseek(p, 0L, SEEK_SET); - while ((rlen = getline(&line, &len, p)) > 0) { + while (getline(&line, &len, p) > 0) { if (i >= r->from) printf("%s", line); if (++i > r->to - 1) @@ -591,20 +666,31 @@ edscript(int n) old = &de[n].old; delete = (new->from == new->to); - if (!oflag || !overlap[n]) { - prange(old, delete); - } else { - printf("%da\n", old->to - 1); - printf("%s\n", divider); - } - printrange(fp[2], new); - if (!oflag || !overlap[n]) { - if (!delete) + if (de[n].type == DIFF_TYPE1) { + if (delete) + printf("%dd\n", new->from - 1); + else if (old->from == new->from && old->to == new->to) { + printf("%dc\n", old->from); + printrange(fp[2], old); printf(".\n"); + } + continue; } else { - printf("%s %s\n.\n", newmark, f3mark); - printf("%da\n%s %s\n.\n", old->from - 1, - oldmark, f1mark); + if (!oflag || !overlap[n]) { + prange(old, delete); + } else { + printf("%da\n", old->to - 1); + printf("%s\n", divider); + } + printrange(fp[2], new); + if (!oflag || !overlap[n]) { + if (!delete) + printf(".\n"); + } else { + printf("%s %s\n.\n", newmark, f3mark); + printf("%da\n%s %s\n.\n", old->from - 1, + oldmark, f1mark); + } } } if (iflag) @@ -639,10 +725,7 @@ Ascript(int n) prange(old, deletenew); printrange(fp[2], new); } else { - startmark = new->to; - - if (!deletenew) - startmark--; + startmark = new->to - 1; printf("%da\n", startmark); printf("%s %s\n", newmark, f3mark); @@ -711,25 +794,43 @@ mergescript(int i) { struct range r, *new, *old; int n; + bool delete = false; r.from = 1; r.to = 1; - for (n = 1; n < i+1; n++) { + for (n = 1; n <= i; n++) { new = &de[n].new; old = &de[n].old; - /* print any lines leading up to here */ - r.to = old->from; - printrange(fp[0], &r); + /* + * Print any lines leading up to here. If we are merging don't + * print deleted ranges. + */ + delete = (new->from == new->to); + if (de[n].type == DIFF_TYPE1 && delete) + r.to = new->from - 1; + else if (de[n].type == DIFF_TYPE3 && (old->from == old->to)) { + r.from = old->from - 1; + r.to = new->from; + } else + r.to = old->from; - if (de[n].type == DIFF_TYPE2) { + printrange(fp[0], &r); + switch (de[n].type) { + case DIFF_TYPE1: + /* If this isn't a delete print it */ + if (!delete) + printrange(fp[2], new); + break; + case DIFF_TYPE2: printf("%s %s\n", oldmark, f2mark); printrange(fp[1], old); printf("%s\n", divider); printrange(fp[2], new); printf("%s %s\n", newmark, f3mark); - } else if (de[n].type == DIFF_TYPE3) { + break; + case DIFF_TYPE3: if (!oflag || !overlap[n]) { printrange(fp[2], new); } else { @@ -737,20 +838,27 @@ mergescript(int i) printf("%s %s\n", oldmark, f1mark); printrange(fp[0], old); - printf("%s %s\n", orgmark, f2mark); - if (old->from == old->to) { - struct range or; - or.from = old->from - 1; - or.to = new->to; - printrange(fp[1], &or); - } else - printrange(fp[1], old); + if (eflag != EFLAG_OVERLAP) { + printf("%s %s\n", orgmark, f2mark); + if (old->from == old->to) { + struct range or; + or.from = old->from - 1; + or.to = new->to; + printrange(fp[1], &or); + } else { + printrange(fp[1], old); + } + } printf("%s\n", divider); printrange(fp[2], new); printf("%s %s\n", newmark, f3mark); } + break; + default: + printf("Error: Unhandled diff type - exiting\n"); + exit(EXIT_FAILURE); } if (old->from == old->to) @@ -758,6 +866,7 @@ mergescript(int i) else r.from = old->to; } + /* * Print from the final range to the end of 'myfile'. Any deletions or * additions to this file should have been handled by now. @@ -768,21 +877,14 @@ mergescript(int i) */ new = &de[n-1].new; old = &de[n-1].old; - if ((old->from == new->from) && - (old->to == new->to)) + + if (old->from == new->from && old->to == new->to) r.from--; else if (new->from == new->to) r.from = old->from; - /* - * If the range is a 3 way merge then we need to skip a line in the - * trailing output. - */ - if (de[n-1].type == DIFF_TYPE3) - r.from++; - r.to = INT_MAX; - printrange(fp[0], &r); + printrange(fp[2], &r); exit(overlapcnt > 0); } @@ -797,25 +899,25 @@ increase(void) newsz = szchanges == 0 ? 64 : 2 * szchanges; incr = newsz - szchanges; - p = reallocarray(d13, newsz, sizeof(struct diff)); + p = reallocarray(d13, newsz, sizeof(*p)); if (p == NULL) err(1, NULL); - memset(p + szchanges, 0, incr * sizeof(struct diff)); + memset(p + szchanges, 0, incr * sizeof(*p)); d13 = p; - p = reallocarray(d23, newsz, sizeof(struct diff)); + p = reallocarray(d23, newsz, sizeof(*p)); if (p == NULL) err(1, NULL); - memset(p + szchanges, 0, incr * sizeof(struct diff)); + memset(p + szchanges, 0, incr * sizeof(*p)); d23 = p; - p = reallocarray(de, newsz, sizeof(struct diff)); + p = reallocarray(de, newsz, sizeof(*p)); if (p == NULL) err(1, NULL); - memset(p + szchanges, 0, incr * sizeof(struct diff)); + memset(p + szchanges, 0, incr * sizeof(*p)); de = p; - q = reallocarray(overlap, newsz, sizeof(char)); + q = reallocarray(overlap, newsz, 1); if (q == NULL) err(1, NULL); - memset(q + szchanges, 0, incr * sizeof(char)); + memset(q + szchanges, 0, incr * 1); overlap = q; szchanges = newsz; } @@ -919,7 +1021,7 @@ main(int argc, char **argv) if (kq == -1) err(2, "kqueue"); - e = malloc(2 * sizeof(struct kevent)); + e = malloc(2 * sizeof(*e)); if (e == NULL) err(2, "malloc"); @@ -1007,6 +1109,7 @@ main(int argc, char **argv) } nleft -= nke; } + free(e); merge(m, n); return (EXIT_SUCCESS); From nobody Wed Sep 25 17:15:22 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 4XDNf31Qp1z5XTLT; Wed, 25 Sep 2024 17:15:23 +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 4XDNf30kGpz4bbQ; Wed, 25 Sep 2024 17:15:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727284523; 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=YhUiJeRGpweO4E3NAzagit1NDeo/Gw/VwpweyKQy3zM=; b=WkpIvBN2a0n+03TMcG+LTmrNkvgy11hwwq99Tk/g3nIVtxYXLfnG3opeQaPFrq+2VbZ5XS O/YKXLvJKQ+D87Yf4UfK+60i+4VIVSnOvYvUQ11J9g0d+jFiLi9dNYDMK+xKJrxCi8IgCE 3kVztUL/z+Cw0mjaWdZYA+zhIsnVaaba533AojBhATApuBsYttzt8y2Imk4CM7t0IQx1Ni RKr3/MxmwJynBzWB40nu2QeNnWo3mLpv0/PMSwHVEwGwCU2BaM8FWhjR89xXG+AGFjEwZ4 G3O4azSX6yrO2J+Xlx9RV+GtidBxd3BQOdlpNsQAIiXTYN8Smps3TMZwuuZnKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727284523; 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=YhUiJeRGpweO4E3NAzagit1NDeo/Gw/VwpweyKQy3zM=; b=XOUD4eSBTHJmE/P9nl048BBOpQOVddEG17PfKBESnS9mHrfibtpjmxG9C+3wCIZhJELWwT fxvooeeMgL9HPtHHOWaN6/Gq/gQDpaho7yb6B9/QEY5ftryHVM++HUxvl9qGYtpkc3ohnC tW2aKr/inUbiI8/10ZIKt7danET1/R+MN7v7cA3dXgt/bC263r74GsH5t5DtDs3F75gwvv hlLmfAAtJRtgYbEnh35RojkE7Wf7HcTCUn/lsekbSWeXycYcdkulzc8h2LmgLHmQj01sMr cPf9kAGhBIaeTrKjl8ejhSj/QgNL2eyR0kV24zluzlo2btLnH+J9T0iB8noKZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727284523; a=rsa-sha256; cv=none; b=NSfzcSFEUzLoY9E9okgsmIlxZbf6znwrgPGFdumE/Q6qEPUamSFDuEfpORcw1s7JDybvBU i9T626VvK0ldjUNT8n2bBWDLpg2IcsdmgJoZ5+YCzA26fxEdiMDxAxHB2LWtZ9uaoc7R29 HO0iMxVir98fA6SYNY/WtK+ifbk33DUPSqhPDW02G6eAOFjEeWB66DKsfWBJNs4K7fxIWc jMbFIxmJWSc4crgJ4pOwlYPOOZLTNoYrIOqVvWnANp2d4+cg7u4zONRSiBe/ruSp0ag0Ni c1djytlLsO00AnW9Cs7U9pXRKf1mdMva7xtBurHZVE0dqZ0y9xipvavzW8d+yQ== 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 4XDNf30Kq3zLVx; Wed, 25 Sep 2024 17:15:23 +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 48PHFMMJ047315; Wed, 25 Sep 2024 17:15:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PHFMnQ047312; Wed, 25 Sep 2024 17:15:22 GMT (envelope-from git) Date: Wed, 25 Sep 2024 17:15:22 GMT Message-Id: <202409251715.48PHFMnQ047312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d2c2d5f4945a - main - stdio: Disable USE_XPRINTF envar. 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2c2d5f4945a2bf5b03494fb292c9c6a6099241d Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d2c2d5f4945a2bf5b03494fb292c9c6a6099241d commit d2c2d5f4945a2bf5b03494fb292c9c6a6099241d Author: Dag-Erling Smørgrav AuthorDate: 2024-09-25 17:14:36 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-09-25 17:14:55 +0000 stdio: Disable USE_XPRINTF envar. As xprintf has not kept up with our standard printf(3) implementation, it is becoming increasingly dangerous to continue to allow it to take over if USE_XPRINTF is defined. Remove that code, while still allowing applications which know about xprintf to select it. Reviewed by: phk Differential Revision: https://reviews.freebsd.org/D46765 --- lib/libc/stdio/vfprintf.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index 99ed11c6cb1d..785340ab2a24 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -450,8 +450,6 @@ __vfprintf(FILE *fp, locale_t locale, int serrno, const char *fmt0, va_list ap) val = GETARG (int); \ } - if (__use_xprintf == 0 && getenv("USE_XPRINTF")) - __use_xprintf = 1; if (__use_xprintf > 0) return (__xvprintf(fp, fmt0, ap)); From nobody Wed Sep 25 18:43:11 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 4XDQbM5myGz5XZ82 for ; Wed, 25 Sep 2024 18:43:11 +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 4XDQbM5Gdmz4rTB; Wed, 25 Sep 2024 18:43:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727289791; 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=+R+uNvz4TGjzQQbpwqR1Qbq7PbJq5KOj6ch6l0ibOaU=; b=V7ksK24Jcho8Z23NuxIHm2OSEP43Qb5viyYsONfV+xsSTIXKWwBSP0G2XIss9QMjHxKVaY /tT9s/Qlj87kn5YhVkNkSC0vngRo0+4Gui9BCA8Hfz1EbyNJMPhEJL4SP8P1RFSLXzZT/Y exsLWWETXLyj2maos1N4DcE6IbbezLLA1XsivQbEEg1M5fOCTLsOwP7bt5g+Bam0zCqbUJ 9D4lmYeiD+wCiLNd5mkLCvgqaYz57IJA5kdDzQLqQp01LGmfRWIecUomHX4enatOGXSuv1 7Ea8u4MRupq0NuBwGZ1FBAnhA0F2EtfyPzkRhXJrun0vS/uBvN1Xt/77ACu6QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727289791; 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=+R+uNvz4TGjzQQbpwqR1Qbq7PbJq5KOj6ch6l0ibOaU=; b=IMI1eBi9d8aR20v5UCZVThCGrsrpy5egBIIdew+IXwuZ0RSrs2VUajH4Tltamitp6l5uQg DXuoek48FrevBAJKeCn/8ObhC4PwiUuThUgxp6MRZR5CDT6ubMx+awlAdyVooQtnXeWO3m dmG8kwItQyMf703AKUwoAHPqklN8x9aqZ+BJdRcKDpNPMAZmVJWgFtg92d2B3tZsr5jBIM SSDogPL8OBMuFoxi5pCVysd2LxwvxeU8MlZ3xFJ/6gUIa/BWNg76bMe9qnp81XM4x3XXYT A9ctnT1YULVVJjuh0NAs5DxOHgVKFfyaxCPH61ZtG8qi+PE0My76JVWxGKRwqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727289791; a=rsa-sha256; cv=none; b=apEwazaHR8EabndII+f8IpwoRMWmZUStr5+7qj7PjRrfVICzMnQjWeR4bxlD7bUHM6cQfX zVxkWVnc5GyHc95tNuNEkawrzhXsJ/z4mUzI4AJtUG5J6jbiSJW0d7nj+lKD2uJUwphGYd WjxmvyjqBQGT1kuoyHmE9IHNtNDjcRlNB9Js9qoPf9z/BAiLEzFbcMioQtZnF7LQvBwArY h+Kg59l1U7AxNmWDXLCY5cuDbrVO5EXHtK6saqNoHsmw62vPcq5l08VcGf94A4PW9Qg8Y4 CZaIf44fxR4//sbHQXAdmuiEHDnCeolH+QhuBek7jlmLGJjwgWQW2yCYx5i0qg== 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 4XDQbM4tByzP8b; Wed, 25 Sep 2024 18:43:11 +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 48PIhB0D000714; Wed, 25 Sep 2024 18:43:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PIhBFq000713; Wed, 25 Sep 2024 18:43:11 GMT (envelope-from git) Date: Wed, 25 Sep 2024 18:43:11 GMT Message-Id: <202409251843.48PIhBFq000713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Joseph Mingrone Subject: git: a4f6df038f0a - Create tag vendor/tcpdump/4.99.5 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: jrm X-Git-Repository: src X-Git-Refname: refs/tags/vendor/tcpdump/4.99.5 X-Git-Reftype: annotated tag X-Git-Commit: a4f6df038f0acf17b8800b43a85e58a8e33da635 Auto-Submitted: auto-generated The annotated tag vendor/tcpdump/4.99.5 has been created by jrm: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/tcpdump/4.99.5 tag vendor/tcpdump/4.99.5 Tagger: Joseph Mingrone TaggerDate: 2024-09-25 18:39:50 +0000 Tag tcpdump 4.99.5. commit 75d9de99aec2d9f3bdc495c91bbd6d7a2392e2a3 Author: Joseph Mingrone AuthorDate: 2024-09-06 02:11:27 +0000 Commit: Joseph Mingrone CommitDate: 2024-09-06 02:36:15 +0000 Import tcpdump 4.99.5 Sponsored by: The FreeBSD Foundation From nobody Wed Sep 25 20:34:14 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 4XDT3V4YmKz5XgGH; Wed, 25 Sep 2024 20:34:14 +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 4XDT3V3yqTz5686; Wed, 25 Sep 2024 20:34:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727296454; 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=7OGYwGNx8vcgeIFfc3a7nGye5Peyo4Lyovy4yC+ODR0=; b=E4ggzspi94v5DrAImHN2qxkg0cafQ6zDKimAkgA8t+jZQ+LgrzC3XCMQEeVDruTAKrxQCy 49WJijA1RYEkbIsMC3LnnOY1lodKgl3kPKq5ynAKKdGfVgC5d4jpmNdkw1Ars5LooEPKrK Ujtv0bJ3vLWKEW/5aHs63QPr5xz2zn4MynHSBO7xEcWbTMguIHgPxMrAGAtib4VrHMq2h/ 4NS65bRG/FaYZManS9kYhEKBA0Zs1ra9nqVXwQD2AWBa0t3UyFkjvMKpX/+2kRbn1L5+Jm MO5JMGGQcB9gJjkCxBz2vxAVrAIbb7ddW1XJVxCKqFHtoGLw/9aHLFP4r9/mxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727296454; 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=7OGYwGNx8vcgeIFfc3a7nGye5Peyo4Lyovy4yC+ODR0=; b=SSQceWoZV9c/1SER7lAFTl58rqKYjZQtw2EKnjXmlifTuXHZPBB4IxGhezD+YjPlNIr6of VZV2VErJxHyCuLTQWTwAULgMxABeYhdYoVFDG9vl0EHysKzfHhLrFde0a3agnHZ0nJj2wk Gk8Pix/3z08GmsjeID1lL7a0genBQ8TsCILs1NYs+HHGB5qLC4rzkhR81qjydA1zli+wok dy5ITe+LFDxCsD7fcrx8ep4rXC+Yj5ZvZAyjutxpKtRLPPG6gR0w6obrVNxeX3mX6lOJuR LkFJMNssESq6GPspFKQJVheBwTlU890B6mpIO7lGjHT73/x1uVo4rUyUzubmKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727296454; a=rsa-sha256; cv=none; b=j9iR1KgeU8iqW9KiiF7sRPlmGLec6mLgF/Y5Y9MOx6/ZmedLgN9TbJ7BpgfJ/tB6oiK39O NJxuCeB+eiQDtC2VGqtmo+sCLPKKtNAM8IdysA5m/KZ+ptMJqN9Pa3peqeQkOZmejo/uEs oyTjNGJYM7xBOthKbP6WXUHeE4Kix52kqeHpzxBzJLXJESHRjVZF88UaXvxGWTgyvWSrPa OdZzAtWQcmXD9hKDW5+0tw+X6dhUrxETRdWwJ5U9xRznjBGpEQmThgdfHvuTSmlfBessQO di5odYzScgpHbV3LKz5Nxjc1B2elRU4dUErgKov89/lgrTmE4enEF91gD1RG6g== 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 4XDT3V3SCqzS8T; Wed, 25 Sep 2024 20:34:14 +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 48PKYEEv086471; Wed, 25 Sep 2024 20:34:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PKYEJ7086468; Wed, 25 Sep 2024 20:34:14 GMT (envelope-from git) Date: Wed, 25 Sep 2024 20:34:14 GMT Message-Id: <202409252034.48PKYEJ7086468@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: 36a001923836 - main - iflib: Simplify iflib_legacy_setup 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: 36a001923836e280e750b76947b8705fcc47b0b7 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=36a001923836e280e750b76947b8705fcc47b0b7 commit 36a001923836e280e750b76947b8705fcc47b0b7 Author: Krzysztof Galazka AuthorDate: 2024-09-25 20:28:52 +0000 Commit: Kevin Bowling CommitDate: 2024-09-25 20:33:34 +0000 iflib: Simplify iflib_legacy_setup Follow the pattern from iflib_irq_alloc_generic function and use iflib_fast_intr as a handler for RX only interrupts. Also remove some intermediate variables and use consistent way for referencing queue's structures. Signed-off-by: Krzysztof Galazka Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46061 --- sys/net/iflib.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 9df01edc14d6..a2e2c3efa1ad 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -6424,15 +6424,11 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int * device_t dev; struct grouptask *gtask; struct resource *res; - struct taskqgroup *tqg; - void *q; int err, tqrid; bool rx_only; - q = &ctx->ifc_rxqs[0]; - info = &rxq[0].ifr_filter_info; - gtask = &rxq[0].ifr_task; - tqg = qgroup_if_io_tqg; + info = &rxq->ifr_filter_info; + gtask = &rxq->ifr_task; tqrid = *rid; rx_only = (ctx->ifc_sctx->isc_flags & IFLIB_SINGLE_IRQ_RX_ONLY) != 0; @@ -6440,17 +6436,17 @@ iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filter_arg, int * info->ifi_filter = filter; info->ifi_filter_arg = filter_arg; info->ifi_task = gtask; - info->ifi_ctx = rx_only ? ctx : q; + info->ifi_ctx = rxq; dev = ctx->ifc_dev; /* We allocate a single interrupt resource */ - err = _iflib_irq_alloc(ctx, irq, tqrid, rx_only ? iflib_fast_intr_ctx : + err = _iflib_irq_alloc(ctx, irq, tqrid, rx_only ? iflib_fast_intr : iflib_fast_intr_rxtx, NULL, info, name); if (err != 0) return (err); - NET_GROUPTASK_INIT(gtask, 0, _task_fn_rx, q); + NET_GROUPTASK_INIT(gtask, 0, _task_fn_rx, rxq); res = irq->ii_res; - taskqgroup_attach(tqg, gtask, q, dev, res, name); + taskqgroup_attach(qgroup_if_io_tqg, gtask, rxq, dev, res, name); GROUPTASK_INIT(&txq->ift_task, 0, _task_fn_tx, txq); taskqgroup_attach(qgroup_if_io_tqg, &txq->ift_task, txq, dev, res, From nobody Wed Sep 25 20:43:34 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 4XDTGG58G1z5XhM8; Wed, 25 Sep 2024 20:43:34 +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 4XDTGG4fpnz57KC; Wed, 25 Sep 2024 20:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727297014; 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=ouaQ/BzkOhYszB4umkm/NPnK/zmYwaAcfwEJlpF1+g4=; b=j6IhdhZ/tGsOSwmgl9S5oa83S5+7LmlzksCvuPs6MeXPv90tfw2ULVy5Vkmwz8vrNQX0t1 v7wn3bPJsoaMIkMioqCeAkY+ZXdI3x9tazNZu4NoROYeH0XBaOj8HJqM7beeLbJGLT64X7 hGn+sa1Hv+rQAQWmtZ3UC/PhUOkntfW+ve9zqCxo+uz3JO//VknK47NmrVGa7t5UnL1SOg o42Y473d5HB39FAiLaSLlcvX/AMEOveboa+76kVUGrbKDvvB8kYqia4LHu2etDwql/T8A6 DHEH3jTJ59mqLnN7nAxWdRqmBzyc1kFeVNpR7uVzafyu6Ddp51cpdVJ6023AUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727297014; 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=ouaQ/BzkOhYszB4umkm/NPnK/zmYwaAcfwEJlpF1+g4=; b=fFS3Ze2iQNEBK+tr/NfY0aCYjsURTd6JE3QuKu4Vd5c0U8OZTxoJVCDu2ELMazpGm5M6RM 8DxRTMGKFWUV03hd8f3RUHiXs6VMY5ghyU2Xcxxmf/isyPAA1YkZXFLVEANq+Z/VhWZ1wS Gos4zP1SroEF9yziG5AvVwKLOF1HDPO1biaLGfM0+qADa9XqK/z2C0bfPieQcCPeAvKUfF GjpBZjoqybQLjDlRRRiV6zHzElUEhZqiS0QMIQS5lAeeBKQ5zXxPPX163DGA+Pon+84Whn hc17Zhga0N98TTdw+QBdB6WXBCJOxgwZa1YcNmLweRl+NZf0OuwqQ63pWXjveg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727297014; a=rsa-sha256; cv=none; b=dtrYgEffeP1vEzydABKbJ7U8CmQAC2O1nr4xedR3Qd1TjjeQMAhUlc7vdSOY5PcA+ALlYX H43MR5G7V8Hv/kQdK/ZkFZh/zRkFAnsU0Q/4QwE+LoMYM50BTopMV44FKH1PpbDtfPYgga KUUoffdIqhs4WHSNfzBHQ7zphVoxkvYJAp/AiqRG6NQj8OWtxxGVfOfdQTmcgeklcdi+pf cdkSCoue6RTzFva6xKZWT4t7LW9dnkdBOcn9Wbd7vhE1+KgkqaYgBxw/gXqNS8Q5r+QcJo Oe+O8NGpZ7MtTnQkHeLdaB8MeEazt0PKdq0+h5y3zcLTSZps0SU63rmwoKuJHA== 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 4XDTGG4FsKzS9L; Wed, 25 Sep 2024 20:43:34 +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 48PKhYHE003321; Wed, 25 Sep 2024 20:43:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PKhYeD003318; Wed, 25 Sep 2024 20:43:34 GMT (envelope-from git) Date: Wed, 25 Sep 2024 20:43:34 GMT Message-Id: <202409252043.48PKhYeD003318@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 4f4860c9b07c - stable/14 - regex: mixed sets are misidentified as singletons 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4f4860c9b07cc10cb6acbe6fbd71db45e344d2e6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4f4860c9b07cc10cb6acbe6fbd71db45e344d2e6 commit 4f4860c9b07cc10cb6acbe6fbd71db45e344d2e6 Author: Bill Sommerfeld AuthorDate: 2023-12-21 03:46:14 +0000 Commit: Kyle Evans CommitDate: 2024-09-25 20:42:25 +0000 regex: mixed sets are misidentified as singletons Fix "singleton" function used by regcomp() to turn character set matches into exact character matches if a character set has exactly one element. The underlying cset representation is complex; most critically it records"small" characters (codepoint less than either 128 or 256 depending on locale) in a bit vector, and "wide" characters in a secondary array. Unfortunately the "singleton" function uses to identify singleton sets treated a cset as a singleton if either the "small" or the "wide" sets had exactly one element (it would then ignore the other set). The easiest way to demonstrate this bug: $ export LANG=C.UTF-8 $ echo 'a' | grep '[abà]' It should match (and print "a") but instead it doesn't match because the single accented character in the set is misinterpreted as a singleton. PR: 281710 Reviewed by: kevans, yuripv Obtained from: illumos (cherry picked from commit 8f7ed58a15556bf567ff876e1999e4fe4d684e1d) --- lib/libc/regex/regcomp.c | 25 ++++++++++++++++++----- lib/libc/tests/regex/multibyte.sh | 43 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 55f96a2ccbd2..eae4d02657e8 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -1591,17 +1591,32 @@ singleton(cset *cs) { wint_t i, s, n; + /* Exclude the complicated cases we don't want to deal with */ + if (cs->nranges != 0 || cs->ntypes != 0 || cs->icase != 0) + return (OUT); + + if (cs->nwides > 1) + return (OUT); + + /* Count the number of characters present in the bitmap */ for (i = n = 0; i < NC; i++) if (CHIN(cs, i)) { n++; s = i; } - if (n == 1) - return (s); - if (cs->nwides == 1 && cs->nranges == 0 && cs->ntypes == 0 && - cs->icase == 0) + + if (n > 1) + return (OUT); + + if (n == 1) { + if (cs->nwides == 0) + return (s); + else + return (OUT); + } + if (cs->nwides == 1) return (cs->wides[0]); - /* Don't bother handling the other cases. */ + return (OUT); } diff --git a/lib/libc/tests/regex/multibyte.sh b/lib/libc/tests/regex/multibyte.sh index a736352bf0a2..18323f500a2b 100755 --- a/lib/libc/tests/regex/multibyte.sh +++ b/lib/libc/tests/regex/multibyte.sh @@ -1,4 +1,3 @@ - atf_test_case bmpat bmpat_head() { @@ -45,8 +44,50 @@ icase_body() echo $c | atf_check -o "inline:$c\n" sed -ne "/$a/Ip" } +atf_test_case mbset cleanup +mbset_head() +{ + atf_set "descr" "Check multibyte sets matching" +} +mbset_body() +{ + export LC_CTYPE="C.UTF-8" + + # This involved an erroneously implemented optimization which reduces + # single-element sets to an exact match with a single codepoint. + # Match sets record small-codepoint characters in a bitmap and + # large-codepoint characters in an array; the optimization would falsely + # trigger if either the bitmap or the array was a singleton, ignoring + # the members of the other side of the set. + # + # To exercise this, we construct sets which have one member of one side + # and one or more of the other, and verify that all members can be + # found. + printf "a" > mbset; atf_check -o not-empty sed -ne '/[aà]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -ne '/[aà]/p' mbset + printf "a" > mbset; atf_check -o not-empty sed -ne '/[aàá]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -ne '/[aàá]/p' mbset + printf "á" > mbset; atf_check -o not-empty sed -ne '/[aàá]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -ne '/[abà]/p' mbset + printf "a" > mbset; atf_check -o not-empty sed -ne '/[abà]/p' mbset + printf "b" > mbset; atf_check -o not-empty sed -ne '/[abà]/p' mbset + printf "a" > mbset; atf_check -o not-empty sed -Ene '/[aà]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -Ene '/[aà]/p' mbset + printf "a" > mbset; atf_check -o not-empty sed -Ene '/[aàá]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -Ene '/[aàá]/p' mbset + printf "á" > mbset; atf_check -o not-empty sed -Ene '/[aàá]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -Ene '/[abà]/p' mbset + printf "a" > mbset; atf_check -o not-empty sed -Ene '/[abà]/p' mbset + printf "b" > mbset; atf_check -o not-empty sed -Ene '/[abà]/p' mbset +} +mbset_cleanup() +{ + rm -f mbset +} + atf_init_test_cases() { atf_add_test_case bmpat atf_add_test_case icase + atf_add_test_case mbset } From nobody Wed Sep 25 20:43:40 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 4XDTGN3PNCz5Xh7b; Wed, 25 Sep 2024 20:43:40 +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 4XDTGN2wxWz57hF; Wed, 25 Sep 2024 20:43:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727297020; 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=FnISa9ytgg+lV8TNpbUfXZG0FGmnDUx6H/8vFcYHedw=; b=b15GTIcM/sVieR4VODY+nadUZGU6RpxdvdfqJtrFNM1woW2+mptJB/Q8tWASssqORPB8BW zM/3/VhLAhJw84uJ9DdOao2IqgCU3psZEC2jRbkTV/BpTn2mRV4z6a5g+oWVdF1bX4tesk 0SkRoWu5bLmGYK9u+MCkoXfbAAR4KqfVERLmn6OS5OdyLE8LzbeX8r6L9K0n3h9XFIjCq7 TbkBzgYdysjrbt3dXybgoZkDxUDIW3VRdV0CrcuR6JUD37f1Zt4mVZrf4x66L1UfySmvv9 1L2Fl0QHz/qftCZhTwrIY4P9eoYwLiwLnqNpxKy3BzqYBiTnMyn1AZV3wZL8cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727297020; 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=FnISa9ytgg+lV8TNpbUfXZG0FGmnDUx6H/8vFcYHedw=; b=j3kNtMwVnU3p43/NCxi5YYCBwaDzzW/mizzfAn9g77WhNnQjiJn0FuHfnl9TcIM7vuV/On b7EALs4vK0sYduY+Lbt5FJToaQlOfCxduY3atkZVjY1wf+BUZZB3Di5TRVTJQYi8pYR1gX Mgt/+M8CW/5PyDWp7m5HafqAeMS/dkU6kWI276X6ruX+p8G7EWsmpnyT+GlLTcvqxlWV1r hcFQ4B0XEoY6IfmsrsASjXZkOJqlNFKMzxUTuTbjm6hvSjUWDDlhKoVmDOFAzixqm8jGUp CDItp+aM02mPs4fZto1L7CYlZmVBrUY7/xnYgyTcI9JXOg9lvkN5MCeb7enK2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727297020; a=rsa-sha256; cv=none; b=WRwGK2sAhhmcd9wdU4zwhTKvFzG3WG1Q/Oan0m/lTqG4XzDfE+zCjBiR+s05d8n1f+4MO/ PFRHJCEcSTykC5orEMJhPacBAx23nPyvvDz8ZhKMQExDP0vTUsfVH7rBSG4uL3Nwd/OQ/d rpWCzR3CpNDFIJKUjhI1ugxV0lFmVPG/4JLCov/1S0QnmXV+N8585JsgNBmN+j1EyM4Xkm Mx5bb0aEaIkuN8Oqy80Eei/qW+4OOo+LJxtqJWTLjS0O7oSCSgIgnZfiO9Ky5/7Ja8/QwG +4f2EahOs27yCrml+q72c0w896I0FpsyZNhpwsZ66HJ3ievYtVm4Sr3Kdow33A== 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 4XDTGN2Y9JzS9M; Wed, 25 Sep 2024 20:43:40 +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 48PKheeb003478; Wed, 25 Sep 2024 20:43:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PKhett003475; Wed, 25 Sep 2024 20:43:40 GMT (envelope-from git) Date: Wed, 25 Sep 2024 20:43:40 GMT Message-Id: <202409252043.48PKhett003475@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: d96ce6d00070 - stable/13 - regex: mixed sets are misidentified as singletons 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d96ce6d000703f3f57d9214b741e16cc7741d77e Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d96ce6d000703f3f57d9214b741e16cc7741d77e commit d96ce6d000703f3f57d9214b741e16cc7741d77e Author: Bill Sommerfeld AuthorDate: 2023-12-21 03:46:14 +0000 Commit: Kyle Evans CommitDate: 2024-09-25 20:42:28 +0000 regex: mixed sets are misidentified as singletons Fix "singleton" function used by regcomp() to turn character set matches into exact character matches if a character set has exactly one element. The underlying cset representation is complex; most critically it records"small" characters (codepoint less than either 128 or 256 depending on locale) in a bit vector, and "wide" characters in a secondary array. Unfortunately the "singleton" function uses to identify singleton sets treated a cset as a singleton if either the "small" or the "wide" sets had exactly one element (it would then ignore the other set). The easiest way to demonstrate this bug: $ export LANG=C.UTF-8 $ echo 'a' | grep '[abà]' It should match (and print "a") but instead it doesn't match because the single accented character in the set is misinterpreted as a singleton. PR: 281710 Reviewed by: kevans, yuripv Obtained from: illumos (cherry picked from commit 8f7ed58a15556bf567ff876e1999e4fe4d684e1d) --- lib/libc/regex/regcomp.c | 25 ++++++++++++++++++----- lib/libc/tests/regex/multibyte.sh | 43 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 42fa1b99e58e..2897052fa0f8 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -1592,17 +1592,32 @@ singleton(cset *cs) { wint_t i, s, n; + /* Exclude the complicated cases we don't want to deal with */ + if (cs->nranges != 0 || cs->ntypes != 0 || cs->icase != 0) + return (OUT); + + if (cs->nwides > 1) + return (OUT); + + /* Count the number of characters present in the bitmap */ for (i = n = 0; i < NC; i++) if (CHIN(cs, i)) { n++; s = i; } - if (n == 1) - return (s); - if (cs->nwides == 1 && cs->nranges == 0 && cs->ntypes == 0 && - cs->icase == 0) + + if (n > 1) + return (OUT); + + if (n == 1) { + if (cs->nwides == 0) + return (s); + else + return (OUT); + } + if (cs->nwides == 1) return (cs->wides[0]); - /* Don't bother handling the other cases. */ + return (OUT); } diff --git a/lib/libc/tests/regex/multibyte.sh b/lib/libc/tests/regex/multibyte.sh index a736352bf0a2..18323f500a2b 100755 --- a/lib/libc/tests/regex/multibyte.sh +++ b/lib/libc/tests/regex/multibyte.sh @@ -1,4 +1,3 @@ - atf_test_case bmpat bmpat_head() { @@ -45,8 +44,50 @@ icase_body() echo $c | atf_check -o "inline:$c\n" sed -ne "/$a/Ip" } +atf_test_case mbset cleanup +mbset_head() +{ + atf_set "descr" "Check multibyte sets matching" +} +mbset_body() +{ + export LC_CTYPE="C.UTF-8" + + # This involved an erroneously implemented optimization which reduces + # single-element sets to an exact match with a single codepoint. + # Match sets record small-codepoint characters in a bitmap and + # large-codepoint characters in an array; the optimization would falsely + # trigger if either the bitmap or the array was a singleton, ignoring + # the members of the other side of the set. + # + # To exercise this, we construct sets which have one member of one side + # and one or more of the other, and verify that all members can be + # found. + printf "a" > mbset; atf_check -o not-empty sed -ne '/[aà]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -ne '/[aà]/p' mbset + printf "a" > mbset; atf_check -o not-empty sed -ne '/[aàá]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -ne '/[aàá]/p' mbset + printf "á" > mbset; atf_check -o not-empty sed -ne '/[aàá]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -ne '/[abà]/p' mbset + printf "a" > mbset; atf_check -o not-empty sed -ne '/[abà]/p' mbset + printf "b" > mbset; atf_check -o not-empty sed -ne '/[abà]/p' mbset + printf "a" > mbset; atf_check -o not-empty sed -Ene '/[aà]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -Ene '/[aà]/p' mbset + printf "a" > mbset; atf_check -o not-empty sed -Ene '/[aàá]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -Ene '/[aàá]/p' mbset + printf "á" > mbset; atf_check -o not-empty sed -Ene '/[aàá]/p' mbset + printf "à" > mbset; atf_check -o not-empty sed -Ene '/[abà]/p' mbset + printf "a" > mbset; atf_check -o not-empty sed -Ene '/[abà]/p' mbset + printf "b" > mbset; atf_check -o not-empty sed -Ene '/[abà]/p' mbset +} +mbset_cleanup() +{ + rm -f mbset +} + atf_init_test_cases() { atf_add_test_case bmpat atf_add_test_case icase + atf_add_test_case mbset } From nobody Wed Sep 25 22:19:12 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 4XDWNc6f9Pz5XmvN; Wed, 25 Sep 2024 22:19:12 +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 4XDWNc68jDz42lk; Wed, 25 Sep 2024 22:19:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727302752; 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=yaRhOe1USNyvSMsQNAVDESb/MZx2VgPsn5aDl1h4kio=; b=hr8nsdrtTTeKvbgkL40dFyx9WVw/Dq0W77talhP2de0x+7RodYQZNninDPjA6MRC1vRIoP Mk3aFFDyX3w90o0S8BGq+xuslIg80QI8aZH7OvasbZQlPwoLyIKc82aNeYCME1QywyNbwh 7uKcpzOm6WOflhUit6R1u1baFR619lqTJDcG+oLRtzjBvSJqT1IANAIIfh2N+5Rekplzqm sn/zI2IvNvGMynVBG+uStGJYIvxFM4v8pyhmysqKQ4U4Yzk4vK/WQtO9eTePQLXtCtvYGB 7/KbyJ7pZjrzAddSWrXQOhOeNUldhGMJz8npmycSn7kcszShvpiBwN01rIN2Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727302752; 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=yaRhOe1USNyvSMsQNAVDESb/MZx2VgPsn5aDl1h4kio=; b=Lh8hVH153Ba4o+BtsWnbXuidB7ETpiwww0VLQ2lZdSMNcPiSM8ID7riRMedvwzjapkgYZk uOdc8vjdeEBQP4KiBI7u3HETAn2CxcHiE+lvF1NUTE8FsN2FeEVVvGvvtd50SQLDnCqhii PS8ycecsh9N8w77nabtV6c0OWWwLEdPldGshY1kthIMSeMlsqzK2PB1+FPTVQ38gvRaCKK 6GbBudUa0+L2PHLSSzIYv06E8PNLN/oR1GM+dfclLy+D5RXSPWCwQS1VvCbVXVmrstqQce 0CaqOKUOhAkMEiRgKOWX5xgFonvZgfwD4GUhbSTxrKCX1OYV2NwW5hVH4Q4+Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727302752; a=rsa-sha256; cv=none; b=XtmkoTWaYgLjIX68OXnEvCUD6jlfSeN/SbvtOS6cTKwE3KHSAL0OdUJKVP1knCEvly1bg5 9RhR8ZsAxRL376+J9J7jVIP6QYnau56sm2xxYh1uwxI7Za8Mf6US1tJuwC5XAOumrpQrsx MtAA57C3jQMPaJYW5S2sSnnv8JD6vGRBGRVfpm/n5g+5w5QAC/EHWsGI4EMv+fhEiMWn+3 28+ejyGp6ItgzVeQGqmotmxuFmiBi1tq05SpaTLkTcvfGKjlTD+mT9/hQA5mPtNuXZux49 6whwr6cB6C8ZmK4hC59r5UPW+PGNUjKzIOSPPGmMId2CfmKzCkkaSpC2CsyJGg== 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 4XDWNc4sDszWJN; Wed, 25 Sep 2024 22:19:12 +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 48PMJCIS057167; Wed, 25 Sep 2024 22:19:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48PMJCP9057164; Wed, 25 Sep 2024 22:19:12 GMT (envelope-from git) Date: Wed, 25 Sep 2024 22:19:12 GMT Message-Id: <202409252219.48PMJCP9057164@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: 6a4f0c063718 - main - pci_iov: Add a device_printf if out of bus numbers 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: 6a4f0c063718781c5e3eddbeff0da7b89d290d1e Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=6a4f0c063718781c5e3eddbeff0da7b89d290d1e commit 6a4f0c063718781c5e3eddbeff0da7b89d290d1e Author: Val Packett AuthorDate: 2024-09-25 22:17:16 +0000 Commit: Kevin Bowling CommitDate: 2024-09-25 22:17:16 +0000 pci_iov: Add a device_printf if out of bus numbers Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20591 --- sys/dev/pci/pci_iov.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/pci/pci_iov.c b/sys/dev/pci/pci_iov.c index 1f1138b2d336..31bbb74e791f 100644 --- a/sys/dev/pci/pci_iov.c +++ b/sys/dev/pci/pci_iov.c @@ -736,6 +736,7 @@ pci_iov_config(struct cdev *cdev, struct pci_iov_arg *arg) /* We don't yet support allocating extra bus numbers for VFs. */ if (pci_get_bus(dev) != PCI_RID2BUS(last_rid)) { + device_printf(dev, "not enough PCIe bus numbers for VFs\n"); error = ENOSPC; goto out; } From nobody Thu Sep 26 00:49:38 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 4XDZkC32KLz5XxXV; Thu, 26 Sep 2024 00:49:39 +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 4XDZkC2MK2z4Gmv; Thu, 26 Sep 2024 00:49:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727311779; 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=4k5t0h9wxw0OO/tJNV5oWdDzeeBcuYMvDo5/0oASuls=; b=ViD8knIfNfBWq1xNLZ761An9rahiHlTZMLl5xjIF2phoRKx+BeOF1HBGe78PO11yyeituL X2q/fkiA/3NyZ85Tt2tmxQJq5cjaI3vvf+INRzVYNtnIMFu54GochHN/nAO4qrcQ5zR8U6 YR4m7dD4RKrQHkOmklaWOgRvJhK7T2n9y+3Cp7d1VWklAgDgxMLENUJCnTka2BZmz6ldq+ a2Xji1NdO/v2SRFTFIn9RwyDOoG9mKeEGrzd5JvUO8kuNp6qcQ4VsBWBJGOn/RNNrzqKG6 Xt5ol+B7ANQwHIqflBRqv9OuSdgUFknnSN7wVxZtji9dDnXiFYMdwI3PqgZ4rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727311779; 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=4k5t0h9wxw0OO/tJNV5oWdDzeeBcuYMvDo5/0oASuls=; b=XMeKSW+teVRWEjvC1PB+em8whHmlX4zIwcbnb/jCf+88GoBi5U3vldlGTAEU5Sp/6JuMfx HbQzwp+xvWoRhgqs8V77eM4IotFonklQDeZ6jbIDdCHozul7TQX0MGuDCM0JXIZ+il4gPv 8zITsxLRu0wdKQjxqc6fl1nhR6XcJj4sNi0JxQQHrTDd+PxPswDJWRuTSAsHoX3XjDDZvE obWYGguVkcH+ijEnUPKw5AlfFVpgPaUIDETAEzEM+VV6MTzW9u1MyIRg2eimO+FYwrDzBW p5PdvxRNvxLy7w3DGWqFeefbxG93zG8m6JsJoJGb7arPGOhA7RCqa97SakInOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727311779; a=rsa-sha256; cv=none; b=ckQmSSg7UoN6MsK0IP2NsiSjNnf4VdcSvgxjWwaM1NR2gCrE/ERaMgTm+7PbsCJczWc1v/ +8zq4Mi917SMdRXWVCxNXneoHEf7KdbGbRI+/HlAPiKeFiIfjtGeS3vdY+pNOgsm6b53jl AVvpUspUHcvnAp/jhzgW3KPxONHVVqnB3tVZWeqdumq5wBtKiED/DVMfBhNWHjA0dXHeam rrzlxcuC/LLpjPAyWLYJW0/HqHcVYK3SHAAcG+997gs0h7cFgoIWsl18Wy0f/t8pNhs5IH XSKqIl4LGmI3ZRp0uHoNbDdli16030JqN4HH1LaPdxw3VIrzh0HsSbnr6faklw== 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 4XDZkB6pNGzbWK; Thu, 26 Sep 2024 00:49:38 +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 48Q0ncbL010216; Thu, 26 Sep 2024 00:49:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q0nc8Q010213; Thu, 26 Sep 2024 00:49:38 GMT (envelope-from git) Date: Thu, 26 Sep 2024 00:49:38 GMT Message-Id: <202409260049.48Q0nc8Q010213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 8748daf670ee - stable/14 - ure(4): Add ID for LAN port in Thinkpad OneLink+ dock 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8748daf670eec754b5e926d107ca1f347cca6948 Auto-Submitted: auto-generated The branch stable/14 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=8748daf670eec754b5e926d107ca1f347cca6948 commit 8748daf670eec754b5e926d107ca1f347cca6948 Author: Alexander Motin AuthorDate: 2024-09-19 01:55:24 +0000 Commit: Alexander Motin CommitDate: 2024-09-26 00:49:31 +0000 ure(4): Add ID for LAN port in Thinkpad OneLink+ dock That's a pretty old dock for Thinkpad X1 Carbon Gen4 and few others. MFC after: 1 week (cherry picked from commit a1bb5bdb0ab69bc3ce1f6051b6abc0cbaab83faa) --- sys/dev/usb/net/if_ure.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index 26fe17bb072e..55444030869c 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -102,6 +102,7 @@ static const STRUCT_USB_HOST_ID ure_devs[] = { URE_DEV(LENOVO, TBT3LANGEN2, 0), URE_DEV(LENOVO, ONELINK, 0), URE_DEV(LENOVO, RTL8153_04, URE_FLAG_8153), + URE_DEV(LENOVO, ONELINKPLUS, URE_FLAG_8153), URE_DEV(LENOVO, USBCLAN, 0), URE_DEV(LENOVO, USBCLANGEN2, 0), URE_DEV(LENOVO, USBCLANHYBRID, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 39bfd258502b..66695c195492 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -2831,6 +2831,7 @@ product LENOVO ETHERNET 0x7203 USB 2.0 Ethernet product LENOVO RTL8153 0x7205 USB 3.0 Ethernet product LENOVO ONELINK 0x720a USB 3.0 Ethernet product LENOVO RTL8153_04 0x720c USB 3.0 Ethernet +product LENOVO ONELINKPLUS 0x3054 LAN port in Thinkpad OneLink+ dock product LENOVO TBT3LAN 0x3069 LAN port in Thinkpad TB3 dock product LENOVO USBCLAN 0x3062 LAN port in Thinkpad USB-C dock product LENOVO TBT3LANGEN2 0x3082 LAN port in Thinkpad TB3 dock gen2 From nobody Thu Sep 26 00:50:34 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 4XDZlG58J9z5XxGb; Thu, 26 Sep 2024 00:50:34 +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 4XDZlG4cpKz4GmH; Thu, 26 Sep 2024 00:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727311834; 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=Ne68vmF+eULWm4vqDdudTjuX2VRogCH+hQSgS6VWFNA=; b=QpIgTRuQy9bmySWJs6aj3R8PBQoobSPC+ymwTvGm+SLkfRGqsQ8XTc9pR7ZsmkQexBjFU/ uG9YAwqxw2BgDpcNJNOz5Y4saJQ7D4u/kgbCdrEL8f4W+teSJy4gXVeiOJfPo4Mm6z45of O6og+58XAYFPMknTr5CIiXyHKVR1N5fLBh9514HVgEvkO2lunpKRTO+9UXFZcJV6CgdehI b7PEhsfjXYA3O58YFxUAL5hjtbNDgNpWws+s7Y2sHAt1O3pZ/fioZMX9Wm+UfZY3eIuNXR iEXjsSObven5JHeMOGjoVJT8x31L6+l6NlaJ7YSjoMzR6uzXEa0Jw6fH2rzXeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727311834; 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=Ne68vmF+eULWm4vqDdudTjuX2VRogCH+hQSgS6VWFNA=; b=BGf3w/4y2oE6ve7NwxY6pKBx7MismQ/OiTAdWMBAAWzDInY4OaAP938LxBFvAHgXIHYkUd 5CUm/fxD8z9AP3+LbNnESyV/WrRCX10bQgmkrndTotIH9EHBYOuxitsG6DYP0w+y0ObPHp 2QwdAvfKbpmal/RlfPb5zVO17UuA91MwBHI5unaE64ZIQd5dsgxjjN2VUqSsWs3SkKv2kD fu5gcd/RVkksGoClqirgJPAS+HDtEG/btshqR8WM6FTIVY9MuPe70igAEcVyMpy7g14MeC RnJUcnVzr7ZEk2k6ZftsEcMtrkejot9tqtfkebeHsel6Psj6/ICAr3/3Ldn+Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727311834; a=rsa-sha256; cv=none; b=M5GERh7Vf98gQPnu71lAtyJQX8RpqKNaSEIJf952fOl0RRUMLUnxvuw+/GY7r4MqKDIgm1 IEH7JYo6GQyPl55GLOvHAV5ZKqelhUNgDwfZ/kyF2pKSs7znQKXgyLrkFfUPlClITdX01a 1hhKiUpMeF9Xj1YVgS2+DAVPS8GQNU4ytbXHTTYtEnvgCyxDjIhB5MswUQ/NqHlYTGgSJp m1Lxed5UHeVuD5NpZdNyaR/0iygL1Gaanu2ppkBQfMflU7xfGjBX2y3/ewpaOllJwQMp1P AU+5gdqGI1ZhfpD4M1rRtuo5sMnzFnO44iBQJWk7ZrTT//Ve5mMNQF3EuVUIgg== 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 4XDZlG47q5zbCm; Thu, 26 Sep 2024 00:50:34 +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 48Q0oYG1019016; Thu, 26 Sep 2024 00:50:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q0oYYd019013; Thu, 26 Sep 2024 00:50:34 GMT (envelope-from git) Date: Thu, 26 Sep 2024 00:50:34 GMT Message-Id: <202409260050.48Q0oYYd019013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: d89090334a32 - stable/13 - ure(4): Add ID for LAN port in Thinkpad OneLink+ dock 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d89090334a32bf99dd93caf329ce55a024b815e8 Auto-Submitted: auto-generated The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=d89090334a32bf99dd93caf329ce55a024b815e8 commit d89090334a32bf99dd93caf329ce55a024b815e8 Author: Alexander Motin AuthorDate: 2024-09-19 01:55:24 +0000 Commit: Alexander Motin CommitDate: 2024-09-26 00:50:09 +0000 ure(4): Add ID for LAN port in Thinkpad OneLink+ dock That's a pretty old dock for Thinkpad X1 Carbon Gen4 and few others. MFC after: 1 week (cherry picked from commit a1bb5bdb0ab69bc3ce1f6051b6abc0cbaab83faa) --- sys/dev/usb/net/if_ure.c | 1 + sys/dev/usb/usbdevs | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/usb/net/if_ure.c b/sys/dev/usb/net/if_ure.c index 385c19654884..1104798b1c4d 100644 --- a/sys/dev/usb/net/if_ure.c +++ b/sys/dev/usb/net/if_ure.c @@ -102,6 +102,7 @@ static const STRUCT_USB_HOST_ID ure_devs[] = { URE_DEV(LENOVO, TBT3LANGEN2, 0), URE_DEV(LENOVO, ONELINK, 0), URE_DEV(LENOVO, RTL8153_04, URE_FLAG_8153), + URE_DEV(LENOVO, ONELINKPLUS, URE_FLAG_8153), URE_DEV(LENOVO, USBCLAN, 0), URE_DEV(LENOVO, USBCLANGEN2, 0), URE_DEV(LENOVO, USBCLANHYBRID, 0), diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 0ce6092c423e..76270f596295 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -2829,6 +2829,7 @@ product LENOVO ETHERNET 0x7203 USB 2.0 Ethernet product LENOVO RTL8153 0x7205 USB 3.0 Ethernet product LENOVO ONELINK 0x720a USB 3.0 Ethernet product LENOVO RTL8153_04 0x720c USB 3.0 Ethernet +product LENOVO ONELINKPLUS 0x3054 LAN port in Thinkpad OneLink+ dock product LENOVO TBT3LAN 0x3069 LAN port in Thinkpad TB3 dock product LENOVO USBCLAN 0x3062 LAN port in Thinkpad USB-C dock product LENOVO TBT3LANGEN2 0x3082 LAN port in Thinkpad TB3 dock gen2 From nobody Thu Sep 26 01:12:26 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 4XDbDV4vH7z5XyXF; Thu, 26 Sep 2024 01:12:26 +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 4XDbDV4GSZz4Jm7; Thu, 26 Sep 2024 01:12:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727313146; 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=Rd7oYLUz4hqVVa181sz26Y+VyywRvKXOPJwhQDg3kY8=; b=t790uoPYWCkbpOdtAcaByBWsAwLJt7Tttj83wZvhsLuR6plaSp6BVrGEgAiouJH+ytwk3S JN+bRUewKShcUuL7sGILlbJ31cinLLfWVDRWTxMYK/fLsy6c1LMuZxCfCM2oQ+iSjMrYkI uljPoMNfTU4CfR171Oi5d0biV1EiCK+WVn4W0r0sIQJ3Xsq4IYkKFqy/nRDwssN33SCWki uKuKXcVhSLjG2jM/aY2U6Ivz5MJ+m18aLHCs+l4tIZqTmP2jhzFd2uMRWzotnKsZiVr206 YYMI5zCOAk83TrbrXoNB3iK6RqiuUPE/RSX/XqkRgVPdkBNrIjnaDhwo6QYwUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727313146; 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=Rd7oYLUz4hqVVa181sz26Y+VyywRvKXOPJwhQDg3kY8=; b=IHNyLJr9bcU4RMjm86LAoOKbh4zPCnNN5/d1uLELa6GeljiK9A4iZAVBpAAtgV/qGx3Lmu 2PdcZfVKYfIjkbRD9D9yGUvLqLbhqPL6VdWZlLHAHxHEvWxXDiJaUIvx+6Pj1Qr9K9DVOq SBBCapH0ZqUuc1grkNkKqBu8hsFhPQLEIlnTEdYOCfbGyR0T6i4TPSRIaAKjiECdX/m6Hn iAaPODt0ysxf8WOrvCeWU9ocRMGh98IlD92ArqNntNsd2tG1b2qS6eTcnBJ+QCvA7lN1X1 dn9zFDJ2wzsDye8z/nkaws6HDHxwf5CUhzLAGk/jNPjANe9tNPjJfoZJpaxZBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727313146; a=rsa-sha256; cv=none; b=oMAS6tiNYyZ/SFaucZ2wA35CJGsSsM+1H7ot1d0p6gdPV3VC5o5Hht19yyuyjBCieXKyzR D9Umo4DHhjjvgzOLfCAUC9rqA09PjTHUuma2tPRYkTkfGdIEVtO3+tITTVihqwu189QDFT NdOGhXB6WTT/X0a4Sp3iVyL6xijukBCMxnhfsrNw7sp+Ypqt1V8k+JFwgPMYtUas7EYXo/ Ar41NmU9GOUdmX1kssNa5oI/0oblAkwvg5KdkEHlcLoMMZn0bh7qI8jTiiqZTTrSuk/lPS LPLr6ECoycdQuK5sAOMG6gPWd2m3cae6OCkpQeYULMhxQVHZzKz+zJecx6f5HQ== 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 4XDbDV3tlrzc35; Thu, 26 Sep 2024 01:12:26 +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 48Q1CQmw060877; Thu, 26 Sep 2024 01:12:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q1CQB9060874; Thu, 26 Sep 2024 01:12:26 GMT (envelope-from git) Date: Thu, 26 Sep 2024 01:12:26 GMT Message-Id: <202409260112.48Q1CQB9060874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: aec2ae8b57fc - main - nvmf: Always use xpt_done instead of xpt_done_direct 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aec2ae8b57fc638fa3ba9fac9d2067f2049ab613 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=aec2ae8b57fc638fa3ba9fac9d2067f2049ab613 commit aec2ae8b57fc638fa3ba9fac9d2067f2049ab613 Author: John Baldwin AuthorDate: 2024-09-26 01:10:44 +0000 Commit: John Baldwin CommitDate: 2024-09-26 01:10:44 +0000 nvmf: Always use xpt_done instead of xpt_done_direct The last reference on a pending I/O request might be held by an mbuf in the socket buffer. When this mbuf is freed, the I/O request is completed which triggers completion of the CCB. However, this can occur with locks held (e.g. with so_snd locked when the mbuf is freed by sbdrop()) raising a LOR between so_snd and the CAM device lock. Instead, defer CCB completion processing to a thread where locks are not held. Sponsored by: Chelsio Communications --- sys/dev/nvmf/host/nvmf_sim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/nvmf/host/nvmf_sim.c b/sys/dev/nvmf/host/nvmf_sim.c index 4bf68553cb49..8850174edf24 100644 --- a/sys/dev/nvmf/host/nvmf_sim.c +++ b/sys/dev/nvmf/host/nvmf_sim.c @@ -58,7 +58,7 @@ nvmf_ccb_done(union ccb *ccb) xpt_done(ccb); } else { ccb->ccb_h.status = CAM_REQ_CMP; - xpt_done_direct(ccb); + xpt_done(ccb); } } From nobody Thu Sep 26 01:15:24 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 4XDbHw5xZLz5XyZy; Thu, 26 Sep 2024 01:15: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 4XDbHw5Q0qz4K2m; Thu, 26 Sep 2024 01:15:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727313324; 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=NbXMsSHjXOF/oS9g7m764L2i7a2oCCZFlNF9Tu9Vo8A=; b=q9UUbNvj4jaBRwUQxfvcmwYwiRy9fsnD7bdtL+jpX2mVs/RYHRvIpDmEkDZZD3r4f/ReEJ ubnDzudnAenddRtGxqK3zflycPAlQkgenrYm0pJjBudL5+LIt3pKVR/qqn3OxF564ga9qF DPWtrDcoeC8Y1NEVHn3o5RJuSjHDEw9MXyCSEthFrCWwSnohk+0rkK3cQ+10Ut2/ENonUk R9p7wsay4tKCZTtJrXZnTKJ7HwMNzMkbPXGWbQiZqmEuynoQpCxRtxyM+Jm+QYMVHDvmne j+KqqSyANN5Y8D5KLDzboBrZNz/RDlM+ol+w+Xfv9OcJKUONYpaN9FEV+1a3Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727313324; 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=NbXMsSHjXOF/oS9g7m764L2i7a2oCCZFlNF9Tu9Vo8A=; b=mId3Wx8GRjq6AQFN6hIOrQfPxyfnOO7moRsz2hTvL+r/dVSCBiLJ12tvSqL+2xiSW5b6V3 O+gQll8Du8uapx0vjJlJFMrbbgOgZ28mqaz2g9sPzeUq92wUb7x4I3qkgpm/KwEU3PW1vo J0/EBUhDMWJZFVEsnCmJwSb5rKM6jSk4+uOzhOZL8kjOare1PP2T4E6VZv7DluFqdYK0b+ sHkcimgLGV+67FqSt1aQA1qzg/UQ66zyaxVRIbUrxS+ttDoy7iciZoUUIfkE4Ot8soNfyV 6G2CYpEruIrjFqIa2W6xqbSRerw1mAjJV3vKQ9YfBO6761l/FU76R8gxhnNycg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727313324; a=rsa-sha256; cv=none; b=g6QJM34Q8clKH01smerP+XDBkPeZDsGd9AYSISqObCu78ZpvEd/fY3jZH++7sTTfXZ0P1/ Igt3jmisFNv+OBSHtlO2ygv7N/izkwpgcqyzJ96nWWcfuwtN4k/T+MYZTiTQ3EY3HfvvG2 BgKPHRLD9OkFcPnq018KyCNbwlu9S78powXjmWyGCCNwhH2mIymaiRayq0uE1U2pznKnWR GGbcEPskmxVMXB1hJxqnbD0HiHPJ5xyb1N6dKlxNkUbw9rAqQ8JSC9zo6qkE8uIL3ZH8HP ftxvBnsKDmPpqOFWwyRxEoDk1i2s21tpue48RDE8EUytDx+HMMVJrCPJrSU3OQ== 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 4XDbHw51FXzbby; Thu, 26 Sep 2024 01:15: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 48Q1FOv6061330; Thu, 26 Sep 2024 01:15:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q1FOHV061327; Thu, 26 Sep 2024 01:15:24 GMT (envelope-from git) Date: Thu, 26 Sep 2024 01:15:24 GMT Message-Id: <202409260115.48Q1FOHV061327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ef052adf09f2 - main - nvmf: Narrow scope of sim lock in nvmf_sim_io 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef052adf09f25a20e694c3375cc7a0edd4cb0a52 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ef052adf09f25a20e694c3375cc7a0edd4cb0a52 commit ef052adf09f25a20e694c3375cc7a0edd4cb0a52 Author: John Baldwin AuthorDate: 2024-09-26 01:14:06 +0000 Commit: John Baldwin CommitDate: 2024-09-26 01:14:06 +0000 nvmf: Narrow scope of sim lock in nvmf_sim_io nvmf_submit_request() handles races with concurrent queue pair destruction (or the queue pair being destroyed between nvmf_allocate_request and nvmf_submit_request), so the lock is not needed here. This avoids holding the lock across transport-specific logic such as queueing mbufs for PDUs to a socket buffer, etc. Holding the lock across nvmf_allocate_request() ensures that the queue pair pointers in the softc are still valid as shutdown attempts will block on the lock before destroying the queue pairs. Sponsored by: Chelsio Communications --- sys/dev/nvmf/host/nvmf_sim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/nvmf/host/nvmf_sim.c b/sys/dev/nvmf/host/nvmf_sim.c index 8850174edf24..de9e958d8afd 100644 --- a/sys/dev/nvmf/host/nvmf_sim.c +++ b/sys/dev/nvmf/host/nvmf_sim.c @@ -125,8 +125,8 @@ nvmf_sim_io(struct nvmf_softc *sc, union ccb *ccb) qp = sc->admin; req = nvmf_allocate_request(qp, &nvmeio->cmd, nvmf_ccb_complete, ccb, M_NOWAIT); + mtx_unlock(&sc->sim_mtx); if (req == NULL) { - mtx_unlock(&sc->sim_mtx); nvmeio->ccb_h.status = CAM_RESRC_UNAVAIL; xpt_done(ccb); return; @@ -150,7 +150,6 @@ nvmf_sim_io(struct nvmf_softc *sc, union ccb *ccb) ("%s: incoming CCB is not in-progress", __func__)); ccb->ccb_h.status |= CAM_SIM_QUEUED; nvmf_submit_request(req); - mtx_unlock(&sc->sim_mtx); } static void From nobody Thu Sep 26 02:07:41 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 4XDcSF3gnJz5Y2T6; Thu, 26 Sep 2024 02:07: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDcSF36yNz4P4P; Thu, 26 Sep 2024 02:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727316461; 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=Nd9GqNaOWFKuQFW5jDwb0mRx/SUzEkuj99wMzIn9qw0=; b=r7Wh/32+Dn6VRUvpAFBuxy3nK5SDQd/Ae+zxxev9+X7PoMLfXF9cP391jtKl89rxEw3zl6 qqMlvbTwfCp3PWMgPH+ncMWM7IKMr96xmKVC7x8C+3hPgFHW5BdbEnN3hN9Guo+PgeuVSw /tDHvVh1NWIg9n+wpS61yea04XhJJJkrBaw4S5TqG3tnEoRQF4bZD42g49rwdP/xEizdhR GGxpocL/x3HlTKI1wQuvM0eYA4SaVz+a4oVtonksLV+q2mFCQNVZ+2hj3RGILkNQ45Opjp oEPmbI0pFHwJV1an2lCMjp5bDdptRUZb9hcAvgOamGfs4R7P0P0Ohh9iXx1VIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727316461; 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=Nd9GqNaOWFKuQFW5jDwb0mRx/SUzEkuj99wMzIn9qw0=; b=GM923Ax1QKOPHw2Bm4l9S0SenMEyDXW/7Bia2xmD/MkFxc8QSvPt/ggB7QpO0/s62RO2zB eN4k4UqEWhtGA9MlrRO/Z2jDoAbRv2hCkkU6fggfiG81Fq0iVpqfhyGXscIUXrQxk9fgrT +lUyBgKG716Qh/j95qdPJwAcuv+5BN5SioZRF7+11y6rQF0aPibn1NYaR6l8iNwtuvZPJH j4vkoC1rGJb9K52mIuT/HFrAzvJkWPSUgRh/evkOY6p7HImLFPSEpiVyK4aQexHRtu/YDp MNXt7wTFJk9KWl9eH0Sasxe+6+HDJuRXaXKpO/gQQjuiMZMpEv5k35YPbOarQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727316461; a=rsa-sha256; cv=none; b=s6NemQUw4fXSvyjNdv6q0LChN0PGTKW5A7ezo2zpsXeKJg869WXndX0El7JmxM8eDFIBGr aDpgbJ/1KbjPaJrBuVmq8GBj5lO9dn2i3UeCcw9MnilJ/7Lv2p1zsmDWHSriPe4n3wFHV3 zegq/W4be4VDzKtsbXDMxWMqEUj4OEBlMNLQMDT9mSNIj81k9aG12j9jxuWscNpqNayvKa pnbuE8AqkYqddHEeHXNCqEBXBK4eAoYm4tml6g+Ovbh9D88Z0JfkzM5BNaHqaJumVhl6+O NLpcar8U6u7InHRwgjKPGcQ+h905aJSxLVntspGJGZ7hkJbkOf2QB7q+TG+7Mg== 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 4XDcSF2NVlzdKY; Thu, 26 Sep 2024 02:07: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 48Q27fKF045613; Thu, 26 Sep 2024 02:07:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q27fmE045610; Thu, 26 Sep 2024 02:07:41 GMT (envelope-from git) Date: Thu, 26 Sep 2024 02:07:41 GMT Message-Id: <202409260207.48Q27fmE045610@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Greg Lehey Subject: git: b7b7800043e1 - main - Explain the relationship between -p and -Z. 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: grog X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7b7800043e1dbef65aa9116822010f1a6074f0f Auto-Submitted: auto-generated The branch main has been updated by grog: URL: https://cgit.FreeBSD.org/src/commit/?id=b7b7800043e1dbef65aa9116822010f1a6074f0f commit b7b7800043e1dbef65aa9116822010f1a6074f0f Author: Greg Lehey AuthorDate: 2024-09-26 02:07:02 +0000 Commit: Greg Lehey CommitDate: 2024-09-26 02:07:02 +0000 Explain the relationship between -p and -Z. --- usr.sbin/makefs/makefs.8 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index 4601e6278046..fdcb94cc4dd0 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -214,7 +214,9 @@ is a comma separated list of options. Valid file system specific options are detailed below. .It Fl p Deprecated. -See the +Create a sparse file for +.Sy ffs . +This is the same as the preferred .Fl Z flag. .It Fl R Ar roundup-size From nobody Thu Sep 26 03:29:48 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 4XDfH12sXyz5Y6d0; Thu, 26 Sep 2024 03:29:49 +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 4XDfH11CZKz4VmG; Thu, 26 Sep 2024 03:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321389; 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=mMwN9j6TRTURc+1dSJnu6kPAW1/Levp+aYWzuj4rVDs=; b=bh6wN70rbNuiX+Gb2SE8YI5xh/38FHxQre228I8qd564Aq59p+uwadzXrqRu8diE91lXWn 4+2rW8fPrWKE8wgpRNlITjUgVANLTaAvN4LnoC1zjtnkUMLhRwmYE38oyf6y99PYZOAEbJ rqZdXf1nmjv/3G68TgwesEViZiqgmn1ZSbg9GI/EX9FUfMEIUa2Rfor77uS/7/i1LP48fJ n44Np/5jyq8uiAYki2KmgAI29DDroVb1o5ORUAso9yTgchEhn+VcdhABcLKystHefOknFo OPGZSaJvWoObvirs4f7R71DxeKGaU0yNIBYSb71LuEC6S+ugf0XV7XOIcLNEcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321389; 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=mMwN9j6TRTURc+1dSJnu6kPAW1/Levp+aYWzuj4rVDs=; b=jYuzqjLMN6uWAUbUw5SQhnbmedAe4YoJHTPfDV01rxFbn6d4BbBwQC9o/RItp2KEVux1KR bs2cQ0tXNO7bz3BvCggLCAnkf2SshTNQGtqhNGS1BZqaZyr4k/xzv/I9dzVTyUjlhfxdWm F+2MleQeS6af3iCiL/KXYblUSLCAlolxKsvOA6KoZLoyuPajhriBG/P9VewUMKuC6cgLze KqzkRMOUIBp/i+3l3tAo55Sm9mEwR1Pu86Y4ppvlV+h4WEYnVCmNt48DCXkcW7QwR2V+Y7 DDNAqa9X7UkBIKjUj3dGMnzsAd75uI8ghJEWq/gZWbklCiHagHVOciRRsIviIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727321389; a=rsa-sha256; cv=none; b=PBVqe3nw/1fN09HUdZcwLjEXMJj3zljPuKkuHeYnIzGBbY49bWuZ/fID6KqWSrco8zM6Mh rli8i1kBLe/0pXkeSNKvjbmb1TZxLS7ysqprNd59rAdIwQqajUZyMX6TeA33hcpldiVVL5 zVUUVqTx8mMaZd9MAreUFhZO9uXYESxek4yuj9+0VhErSwmbMeVeQ4Qu89t7VgBRoP3lR1 ZLSgQ2lzs3US9F3NrSFQH/JQi77TmWbk2hYZ1R8SGXj9G9m/Bxk98japacynMOctMiWu1b j7dqMwXQDIV3lq1z5qSmdzRhIIpUGBobmCJtl2nw32YlLN/jl79OfHcltoHY0Q== 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 4XDfH05SKXzgfd; Thu, 26 Sep 2024 03:29:48 +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 48Q3TmBd082609; Thu, 26 Sep 2024 03:29:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q3TmeS082606; Thu, 26 Sep 2024 03:29:48 GMT (envelope-from git) Date: Thu, 26 Sep 2024 03:29:48 GMT Message-Id: <202409260329.48Q3TmeS082606@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: ee5cdcc50d36 - stable/14 - e1000: fix link power down 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: ee5cdcc50d36a9059da2c3bfff49521909ea1bd5 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=ee5cdcc50d36a9059da2c3bfff49521909ea1bd5 commit ee5cdcc50d36a9059da2c3bfff49521909ea1bd5 Author: Anatoly Burakov AuthorDate: 2024-09-19 05:38:32 +0000 Commit: Kevin Bowling CommitDate: 2024-09-26 03:27:57 +0000 e1000: fix link power down DPDK commit message net/e1000/base: fix link power down Current code is a result of work to reduce duplication between various device models. However, the logic that was replaced did not exactly match the new logic, and as a result the link power down was not working correctly for some NICs, and the link remained up even when the interface is down. Fix it to correctly power down the link under all circumstances that were supported by old logic. Fixes: 44dddd1 ("net/e1000/base: remove duplicated codes") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson Obtained from: DPDK (a8218d0) (cherry picked from commit 811912c46b5886f1aa3bb7a51a6ec1270bc947a8) --- sys/dev/e1000/e1000_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/e1000/e1000_base.c b/sys/dev/e1000/e1000_base.c index ff810821d9e9..d83dc48c4d4d 100644 --- a/sys/dev/e1000/e1000_base.c +++ b/sys/dev/e1000/e1000_base.c @@ -137,7 +137,7 @@ void e1000_power_down_phy_copper_base(struct e1000_hw *hw) return; /* If the management interface is not enabled, then power down */ - if (phy->ops.check_reset_block(hw)) + if (!(e1000_enable_mng_pass_thru(hw) || phy->ops.check_reset_block(hw))) e1000_power_down_phy_copper(hw); } From nobody Thu Sep 26 03:29:49 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 4XDfH22sKZz5Y6P1; Thu, 26 Sep 2024 03:29:50 +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 4XDfH20Cs1z4W4Y; Thu, 26 Sep 2024 03:29:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321390; 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=HuT2t+L34sRz/+ErwPz+u80J8g9avC7cxmo99erqu9U=; b=WvRKJ/sY9Cu9mA3FrrllXL3mkie8RZIoQn8mb4upMLQpzQNgdyttEOkHkr/3h5SNq0QnnR bfRtQ+z8M92BjM0/DbBQ/c8Dk9IV+/8nHoCXgqiIjif/V0Bw7iK13XF1a40XtKOI48rdsS yABBpeGEzv9R4yefu0a4rNhEHDwEEHHjcddEyrYo4sefeW12+t++2Fb+c+ORYasnG5aRsD sANHtx8qcVy5uZl7Zg4oiFcztVzFHXyIVEbTnYJW8FATSyrzYoIDNRoUwSzLuKTtgCy/TZ fSsz5k81qOiQmR2UtjQDapc3+EmEaYh66w3/1eif97TZQD5qdU2e9ZrrgewzDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321390; 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=HuT2t+L34sRz/+ErwPz+u80J8g9avC7cxmo99erqu9U=; b=sKrb7UthbufYRTrnwFU4njyk+aByBu2sSGdvNMe6UFzOAaZvOFVdGUTa2IVPJ9VyWgk51U tIY6z5XYUqCaXFofSIoIAblWcFHtO4Cz7vY/1EZQ+nFRLPuNZP/bxhCECogSgXWJ3ABnc1 rygxo2gLp6ucY7bw+xdxbMhAK41WyhDOH6ABAvcpHjjKzsEwv/mLWnupecQujFtRLLVDEP ZXtGWGrxOCmg8kAAwHgtT1yw+yRAPrf1yFzKlLkXnCawqdVNBtySYEiUAyP8WxGFJ5kAa7 8Djnx9vKiYf+mHCouJlL5bsTFP2QO6V5cZ20FkgqeLedzE44QRBpJ3G9yCkorA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727321390; a=rsa-sha256; cv=none; b=QeT0u9Np9ZrBNrQPPBbYZGKC1TmoWV0z9afjFnzNW97KKLGpsfHTUoTgwdqaxXYM6GsPAK N3YqOpjtDbbXSoQuj3DmUdn0bbz42wpDpRyCU6iHCObHzl1VnoApA6pZiqYSoxrsw6vPsA IlXuRmQWwilx/coHteoR4VbqL20uYwirx2qiR4P+nDpzYu5aiSaBKebVlfMmYnSXtD9NJB Hi5ckjcPjHMQFkdqZbA0fTmfMHiygwDPpXo4fxMe0Sn873DyQKjtajjWdGeYJa9MGij6tm C/GcHt19zQX0QKZ86CaMgFbQ8XDMa/+NlhESynxMXz/L/C08UFnTGOjNRZAK+g== 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 4XDfH16jHLzg6w; Thu, 26 Sep 2024 03:29:49 +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 48Q3TnsJ082651; Thu, 26 Sep 2024 03:29:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q3TnXx082648; Thu, 26 Sep 2024 03:29:49 GMT (envelope-from git) Date: Thu, 26 Sep 2024 03:29:49 GMT Message-Id: <202409260329.48Q3TnXx082648@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: 7f89ee2c304d - stable/14 - ixgbe: increase VF reset timeout 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: 7f89ee2c304d647de5528abd0519cd39365cb50a Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=7f89ee2c304d647de5528abd0519cd39365cb50a commit 7f89ee2c304d647de5528abd0519cd39365cb50a Author: Kevin Traynor AuthorDate: 2024-09-19 20:29:34 +0000 Commit: Kevin Bowling CommitDate: 2024-09-26 03:28:13 +0000 ixgbe: increase VF reset timeout DPDK commit meesage When VF issues a reset to PF there is a 50 msec wait plus an additional max of 1 msec (200 * 5us) for the PF to indicate the reset is complete before timeout. In some cases, it is seen that the reset is timing out, in which case the reset does not complete and an error is returned. In order to account for this, continue to wait an initial 50 msecs, but then allow a max of an additional 50 msecs (10,000 * 5us) for the command to complete. Fixes: af75078 ("first public release") Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Acked-by: Vladimir Medvedkin Obtained from: DPDK (64e714f) (cherry picked from commit 28fdb212adc0431fff683749a1307038e25ff58e) --- sys/dev/ixgbe/ixgbe_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index b8aeaf51f86c..deb68fa03312 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -1832,7 +1832,7 @@ enum { /* VFRE bitmask */ #define IXGBE_VFRE_ENABLE_ALL 0xFFFFFFFF -#define IXGBE_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */ +#define IXGBE_VF_INIT_TIMEOUT 10000 /* Number of retries to clear RSTI */ /* RDHMPN and TDHMPN bitmasks */ #define IXGBE_RDHMPN_RDICADDR 0x007FF800 From nobody Thu Sep 26 03:29:50 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 4XDfH33mDtz5Y6mR; Thu, 26 Sep 2024 03:29:51 +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 4XDfH31WPgz4W9Z; Thu, 26 Sep 2024 03:29:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321391; 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=aK/4owFrdnAQyLhe2325otgqVY2trPbuwkgYko9zWJc=; b=xRl7k3Mv2R5MBWRxhtyktNHorkAUENDIyvO2L9WXUe9cdSq5UVIOV3PU14hzlCjo4lgPmR g2kBkPAL2iykHh4/6Nwp5DCczGsDNRgXBgvCo1kdkP6dZY6UbkcGaZHQGPrXmkYCUrg4na X/osnWnggBXNTtCHv4djtHnyoHt4dhq0tg4jcygvLB++otn9vCW2xH5M7z7xuZqGxEwbK3 xqoEKKpQKokFaCx2uBxwdnqgDUb6w9SV0yu7GHnfliwHiCxsyOz+5TmtbF3G0aychZvYSE VY3xe7iR2ZaAfrwh/zqRWzQ1Om+20gU1BHPdzDeqGYXeb4sRPSCoeQSkdvhpHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321391; 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=aK/4owFrdnAQyLhe2325otgqVY2trPbuwkgYko9zWJc=; b=IbOKZQDcY+tD+/eYqqbzxmkHXtUyFI34bb3QeHP0MokgH3i9ucrKs35Ecg7fu2zmlj9Iq2 CV53HlimBQ3CZ62LdppAWBKZyYZlm0kCO35RBnA12esR3gXs/ieDgrurqXf7BXB2KICwm4 MKwbOAH3hj+lE1xfJzziYhezw+jm6k9lohqk/TDpIPtF27o6AmmpqF1JW9f/q8h7N2rtmH tynG7VS6WuZ8Z8Hm+1lXxc8NKSsvtrid1BEphP5ronfntPXSQeTmmsfjIfXIsnLPDS0CwI N43E5OkcDoTW63fpUImr04BwvcOfG7YGTkJEZnhJpRb1FjNE3Nn+gJUEfE5Pxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727321391; a=rsa-sha256; cv=none; b=KRdABsRNAzNczxx0pCME04HWrlxvZ1QXVVdF75iF67Aw0x8oZqjzkQgmNpDauoCoM+ZB7c c/QVbTjgyFXbKdJfgAoJ7J9s5o4YADove2EFAGehAh3GmR8O+pAWhyRdfcvXgDA+4kFCHT pAPhMwm9AID+svZqjEUvmqJehigI9v9gaL2UGmYFjGbyrByED45KvsTOonfic+rGUKpDGJ 1f9Q/d9/BOwBaFyWYEA2MNn20OkEl1fvhXWqQW/tq0VOv0myarYojahcxzraIOglLxxH1f BJIPUPJTFjZ81afV7QHE7LpXyWKUVYSywTI+mqqsNqsUZ6SAJ1QB17ehbmm5Bw== 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 4XDfH30MLrzgff; Thu, 26 Sep 2024 03:29:51 +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 48Q3TogF082699; Thu, 26 Sep 2024 03:29:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q3ToJN082696; Thu, 26 Sep 2024 03:29:50 GMT (envelope-from git) Date: Thu, 26 Sep 2024 03:29:50 GMT Message-Id: <202409260329.48Q3ToJN082696@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: cced5c203046 - stable/14 - ixv: fix x550 VF link speed reported 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: cced5c203046549221e13eea66565bab1d11bae3 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=cced5c203046549221e13eea66565bab1d11bae3 commit cced5c203046549221e13eea66565bab1d11bae3 Author: Piotr Skajewski AuthorDate: 2024-09-19 20:31:45 +0000 Commit: Kevin Bowling CommitDate: 2024-09-26 03:28:30 +0000 ixv: fix x550 VF link speed reported DPDK commit message net/ixgbe/base: fix 5G link speed reported on VF When 5000 Base-T was set on PF the VF reported 100 Base-T. This patch changes ixgbe_check_mac_link_vf function where there was an incorrect conditional which checks using PF mac types, now it is correctly using VF mac types. Fixes: 12e2090 ("net/ixgbe/base: include new speeds in VFLINK interpretation") Cc: stable@dpdk.org Signed-off-by: Piotr Skajewski Reviewed-by: Radoslaw Tyl Reviewed-by: Slawomir Mrozowicz Reviewed-by: Alice Michael Obtained from: DPDK (9eb7fdb) (cherry picked from commit ab92cab02633580f763a38a329a5b25050bb4fbf) --- sys/dev/ixgbe/ixgbe_vf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_vf.c b/sys/dev/ixgbe/ixgbe_vf.c index 91df9b7dd1c3..beef259de339 100644 --- a/sys/dev/ixgbe/ixgbe_vf.c +++ b/sys/dev/ixgbe/ixgbe_vf.c @@ -642,7 +642,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed, switch (links_reg & IXGBE_LINKS_SPEED_82599) { case IXGBE_LINKS_SPEED_10G_82599: *speed = IXGBE_LINK_SPEED_10GB_FULL; - if (hw->mac.type >= ixgbe_mac_X550) { + if (hw->mac.type >= ixgbe_mac_X550_vf) { if (links_reg & IXGBE_LINKS_SPEED_NON_STD) *speed = IXGBE_LINK_SPEED_2_5GB_FULL; } @@ -652,7 +652,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed, break; case IXGBE_LINKS_SPEED_100_82599: *speed = IXGBE_LINK_SPEED_100_FULL; - if (hw->mac.type == ixgbe_mac_X550) { + if (hw->mac.type == ixgbe_mac_X550_vf) { if (links_reg & IXGBE_LINKS_SPEED_NON_STD) *speed = IXGBE_LINK_SPEED_5GB_FULL; } @@ -660,7 +660,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed, case IXGBE_LINKS_SPEED_10_X550EM_A: *speed = IXGBE_LINK_SPEED_UNKNOWN; /* Since Reserved in older MAC's */ - if (hw->mac.type >= ixgbe_mac_X550) + if (hw->mac.type >= ixgbe_mac_X550_vf) *speed = IXGBE_LINK_SPEED_10_FULL; break; default: From nobody Thu Sep 26 03:29:52 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 4XDfH449Nrz5Y6P2; Thu, 26 Sep 2024 03:29:52 +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 4XDfH41bXcz4WJ5; Thu, 26 Sep 2024 03:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321392; 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=FvjPdEbOgGMzgzA+iN0Bc3FtWdOyDumK4PvifI5n7CM=; b=ZAlMyACtRza+fV8E7JqkNOqy/NBN42WY6L9itBkUVtPtxV7jf70Ify15sQECxVJlO/5KLW QMeyMatvjOn/NwdZeD5dY0d96l5NXWiALCaYZsOwLFmCqkebu86LzsTNDdlV1OCpijdogj /r9EsEnQ7GSh5cb3dWtI0k4CrsTbrVqKUzzYTIVUD84Ilv8DU4dy0s24PgtITO0UtPsIc0 9xR/COWv4j15ay862IFpe2GE2/jJ3L8GcczgIo+7uDt+wxSn6/V/G3xVP2kf30so14nJiW PM9/G6OwM/uoYFMyDZ3RVqpKM5JhOPSeyswJvorohHQgPrzzRRnba3cpsIOdsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321392; 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=FvjPdEbOgGMzgzA+iN0Bc3FtWdOyDumK4PvifI5n7CM=; b=WsWIqAFHhZIr8YET1K1lh9S2tN6EpTi64NqmksKEsY2aJalm0qQmH9ebV5QxD6WoM8hLc8 qlTLXElV9h4zhCseIyDSfUqVO6AMB/euj8u6NHGARtCVSwg3yA1G0UNmjaK3zv4Fz69a4Y G70HEOuF1r1kkBL//AwZkVOv8pMOgpKkyYOvQoCi1lrcDUbUrnz6+mf0cnXqozArZwTvgu 8aoZ1C0J2eMKcj51uEil2tFYGB8zf6OJ2QRr8mJBiUtxBp3okhi8P8CO9MqGmNdkJt5/tt fAccYvXg04H2EhpVVcuH8X4QbWc0zSIC6UCt3aT6lrMCKKGbR0SKut+vam+JSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727321392; a=rsa-sha256; cv=none; b=Sn8ibT36+ldJUQk45vpEIwz/mElb5AyrVpuvEkBE2giRnz8ilPg3vOkVSWySgdgle5Eb9j 0cb8uY39RBVLcRUr13DkKfvU6souAzaTRxUFlCiSRrmojeKPjNd6Ej7/cLJNXX+ySEgd2Y 0uyuo0y6Ic2pqzusz0QGFsmEoELKn6kz8ZbwevVcT2qZK6FXkrjbC7ItvfQ/Gwoxjrszes vjeeOvjedsshjGol/qRoJZQ9E6xLx1w6RJVr9QyoUqEOY8mnKpo0OUHseqB0Sz8+vcwINV j3erf9D2zgtQJyXSQKUpKnZ6YgnwNpbuPh6eObTclZdst9bOC8gnqnAuAeyDvw== 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 4XDfH4142XzgQL; Thu, 26 Sep 2024 03:29:52 +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 48Q3TqRe082749; Thu, 26 Sep 2024 03:29:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q3TqYL082746; Thu, 26 Sep 2024 03:29:52 GMT (envelope-from git) Date: Thu, 26 Sep 2024 03:29:52 GMT Message-Id: <202409260329.48Q3TqYL082746@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: a23401dd1afd - stable/14 - ixgbe: fix PHY ID for X550 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: a23401dd1afdf7b2617bf09072781580b12d587c Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a23401dd1afdf7b2617bf09072781580b12d587c commit a23401dd1afdf7b2617bf09072781580b12d587c Author: Radoslaw Tyl AuthorDate: 2024-09-19 20:42:14 +0000 Commit: Kevin Bowling CommitDate: 2024-09-26 03:28:47 +0000 ixgbe: fix PHY ID for X550 DPDK commit message net/ixgbe/base: fix PHY ID for X550 Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq because phy ID's last 4 bits are always masked, and should not be taken into account when selecting phy type. This patch adds default PHY ID for X550 devices with mask on last 4 bits (0xFFFFFFF0), and fixes the switch statement to use it. Fixes: 58ddc80 ("ixgbe/base: add new X550 PHY ids") Cc: stable@dpdk.org Signed-off-by: Radoslaw Tyl Reviewed-by: Piotr Skajewski Reviewed-by: Alice Michael Obtained from: DPDK (a9f5a3b) (cherry picked from commit 9b56dfd27c64fcaf2dfbaa1eb3e2bd2b163fa56c) --- sys/dev/ixgbe/ixgbe_phy.c | 3 +-- sys/dev/ixgbe/ixgbe_type.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index f4bee6c34f53..00f396283879 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -462,8 +462,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id) case TN1010_PHY_ID: phy_type = ixgbe_phy_tn; break; - case X550_PHY_ID2: - case X550_PHY_ID3: + case X550_PHY_ID: case X540_PHY_ID: phy_type = ixgbe_phy_aq; break; diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index deb68fa03312..1b447f42f17a 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -1696,6 +1696,7 @@ struct ixgbe_dmac_config { #define TN1010_PHY_ID 0x00A19410 #define TNX_FW_REV 0xB #define X540_PHY_ID 0x01540200 +#define X550_PHY_ID 0x01540220 #define X550_PHY_ID2 0x01540223 #define X550_PHY_ID3 0x01540221 #define X557_PHY_ID 0x01540240 From nobody Thu Sep 26 03:29:54 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 4XDfH663JVz5Y6mZ; Thu, 26 Sep 2024 03:29:54 +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 4XDfH63yPRz4WBt; Thu, 26 Sep 2024 03:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321394; 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=lwbaDDnjTlnhIvjAAwMotT7plUtEKZ+5nK5yclxV72Q=; b=qTYrTfm4vt/LDShECbKaSDARr6C5jKd1t5wXYbdGaKK0GBAZ+SG3LZQLErM1sEdsBpiSmh wfGrqNdkzXX1g9kp+1FOAA2WyVd350LJ2SR+Qe2ce39HJi3aMSrnwmDqE15jPcURRj+Xap VpgGezdeQuIiMdcIivbH13eUYs2hGp18l+ARMo73I2X8usLjb+pmOFcLJrmmE2UBE+GKX+ HwoDx16AWQ4jOalj7fdqH0SScBNlDnYeYwsLj92O8H6fmPRyafFWOxUJS2V8jZFsOgFkcv IMe4awzEhtuYTZJMmdERUgwhW/B0qU4Kkag6TqumAi36N8ML2PcH5OLXwSZzcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321394; 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=lwbaDDnjTlnhIvjAAwMotT7plUtEKZ+5nK5yclxV72Q=; b=HtiQp34Wz+jpibmd8BAUH/eFXNPKuTxSj6Fp/8G9MA5fOPcVyyCZUmLNsjRAFhGNwkvu+q 8Jt1cLr2ZBLcDERWWxq//QD1JdJgVM37dKoqviEQWT+OoDUqeZl/aLW8iYJ8vuBce67+UE DCbSD8jH9DP25hElTtUGpVjVH6+Xw16YkiyiMsP/ZhXM5Auf0rNd8JkICQyOvuOcozFGKB 4NRUxp4AymjsrnTCGpn4UrPlEEX+/C2Yk3jyEiTDjare6OrM0MkBzuD8oQUPtJKF407DhJ uwvn+4Epfr0fjCR4jvqg8dY/0O/tAQlBfM92yMGO/uB2nq2Rx4mjQaoYKuOm3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727321394; a=rsa-sha256; cv=none; b=hqjtVEXkFr5pZJvDTeBoilSqwUBZVyyun84XJINlqfLx2MARVeyhPnlDU6j+FVSUAQcKZz OCIS+gt94D4rcV/AMipoGeyy0Mu3tArM4X1WqqTyDUkX0zSAvPt5OtCpXZai+eSgo39fu9 prD3td8q3c6A1tCT+ag0RDCmiREH5xUDrsRnaI3JkW07wSaFfEIpw98XvrVWVk5UdSvMjo C4jDOgrqt4T120RNnDyMk+fdRfbSqZZTH+s6dqBHXPgt2P3RU4DUT4krSh+kNStzzbqMr0 Vt6L/w5ORhCXZRN28zWKrZYFSLSXyc2SHcJVa0JQEJ+o/LVpNQirN6MaVjSVWg== 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 4XDfH635HSzg3l; Thu, 26 Sep 2024 03:29:54 +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 48Q3TsNv082852; Thu, 26 Sep 2024 03:29:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q3Ts4s082849; Thu, 26 Sep 2024 03:29:54 GMT (envelope-from git) Date: Thu, 26 Sep 2024 03:29:54 GMT Message-Id: <202409260329.48Q3Ts4s082849@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: 89011d8c4ddf - stable/14 - ixgbe: correct register names to match datasheet 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: 89011d8c4ddf9ad7a4d7c3fc970be2d9029caa1e Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=89011d8c4ddf9ad7a4d7c3fc970be2d9029caa1e commit 89011d8c4ddf9ad7a4d7c3fc970be2d9029caa1e Author: Jakub Chylkowski AuthorDate: 2024-09-19 23:25:09 +0000 Commit: Kevin Bowling CommitDate: 2024-09-26 03:29:18 +0000 ixgbe: correct register names to match datasheet DPDK commit message net/ixgbe/base: correct registers names to match datasheet Some of mailbox-related registers have different names than it is specified in datasheet. Correct these names to correspond to their datasheet counterparts. Additionally, several calculations are changed to no longer use magic numbers but dedicated macros instead. Signed-off-by: Jakub Chylkowski Reviewed-by: Marek Zalfresso-jundzillo Reviewed-by: Alice Michael Reviewed-by: Piotr Skajewski Reviewed-by: Slawomir Mrozowicz Tested-by: Piotr Skajewski Tested-by: Alice Michael Obtained from: DPDK (10fd55e) (cherry picked from commit b3c7fde6fe9113f849232604523878b4b68df0cc) --- sys/dev/ixgbe/ixgbe_mbx.c | 30 +++++++++++++++--------------- sys/dev/ixgbe/ixgbe_mbx.h | 8 ++++---- sys/dev/ixgbe/ixgbe_type.h | 11 ++++++----- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c index d12aadea7097..c8f839fce85a 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.c +++ b/sys/dev/ixgbe/ixgbe_mbx.c @@ -527,12 +527,12 @@ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) static s32 ixgbe_check_for_bit_pf(struct ixgbe_hw *hw, u32 mask, s32 index) { - u32 mbvficr = IXGBE_READ_REG(hw, IXGBE_MBVFICR(index)); + u32 pfmbicr = IXGBE_READ_REG(hw, IXGBE_PFMBICR(index)); s32 ret_val = IXGBE_ERR_MBX; - if (mbvficr & mask) { + if (pfmbicr & mask) { ret_val = IXGBE_SUCCESS; - IXGBE_WRITE_REG(hw, IXGBE_MBVFICR(index), mask); + IXGBE_WRITE_REG(hw, IXGBE_PFMBICR(index), mask); } return ret_val; @@ -547,13 +547,13 @@ static s32 ixgbe_check_for_bit_pf(struct ixgbe_hw *hw, u32 mask, s32 index) **/ static s32 ixgbe_check_for_msg_pf(struct ixgbe_hw *hw, u16 vf_number) { + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_number); + s32 index = IXGBE_PFMBICR_INDEX(vf_number); s32 ret_val = IXGBE_ERR_MBX; - s32 index = IXGBE_MBVFICR_INDEX(vf_number); - u32 vf_bit = vf_number % 16; DEBUGFUNC("ixgbe_check_for_msg_pf"); - if (!ixgbe_check_for_bit_pf(hw, IXGBE_MBVFICR_VFREQ_VF1 << vf_bit, + if (!ixgbe_check_for_bit_pf(hw, IXGBE_PFMBICR_VFREQ_VF1 << vf_shift, index)) { ret_val = IXGBE_SUCCESS; hw->mbx.stats.reqs++; @@ -571,13 +571,13 @@ static s32 ixgbe_check_for_msg_pf(struct ixgbe_hw *hw, u16 vf_number) **/ static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_number) { + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_number); + s32 index = IXGBE_PFMBICR_INDEX(vf_number); s32 ret_val = IXGBE_ERR_MBX; - s32 index = IXGBE_MBVFICR_INDEX(vf_number); - u32 vf_bit = vf_number % 16; DEBUGFUNC("ixgbe_check_for_ack_pf"); - if (!ixgbe_check_for_bit_pf(hw, IXGBE_MBVFICR_VFACK_VF1 << vf_bit, + if (!ixgbe_check_for_bit_pf(hw, IXGBE_PFMBICR_VFACK_VF1 << vf_shift, index)) { ret_val = IXGBE_SUCCESS; hw->mbx.stats.acks++; @@ -595,22 +595,22 @@ static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_number) **/ static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number) { - u32 reg_offset = (vf_number < 32) ? 0 : 1; - u32 vf_shift = vf_number % 32; - u32 vflre = 0; + u32 vf_shift = IXGBE_PFVFLRE_SHIFT(vf_number); + u32 index = IXGBE_PFVFLRE_INDEX(vf_number); s32 ret_val = IXGBE_ERR_MBX; + u32 vflre = 0; DEBUGFUNC("ixgbe_check_for_rst_pf"); switch (hw->mac.type) { case ixgbe_mac_82599EB: - vflre = IXGBE_READ_REG(hw, IXGBE_VFLRE(reg_offset)); + vflre = IXGBE_READ_REG(hw, IXGBE_PFVFLRE(index)); break; case ixgbe_mac_X550: case ixgbe_mac_X550EM_x: case ixgbe_mac_X550EM_a: case ixgbe_mac_X540: - vflre = IXGBE_READ_REG(hw, IXGBE_VFLREC(reg_offset)); + vflre = IXGBE_READ_REG(hw, IXGBE_PFVFLREC(index)); break; default: break; @@ -618,7 +618,7 @@ static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number) if (vflre & (1 << vf_shift)) { ret_val = IXGBE_SUCCESS; - IXGBE_WRITE_REG(hw, IXGBE_VFLREC(reg_offset), (1 << vf_shift)); + IXGBE_WRITE_REG(hw, IXGBE_PFVFLREC(index), (1 << vf_shift)); hw->mbx.stats.rsts++; } diff --git a/sys/dev/ixgbe/ixgbe_mbx.h b/sys/dev/ixgbe/ixgbe_mbx.h index fa407c4969d1..fc4d58e1c0db 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.h +++ b/sys/dev/ixgbe/ixgbe_mbx.h @@ -60,10 +60,10 @@ #define IXGBE_PFMAILBOX_PFU 0x00000008 /* PF owns the mailbox buffer */ #define IXGBE_PFMAILBOX_RVFU 0x00000010 /* Reset VFU - used when VF stuck */ -#define IXGBE_MBVFICR_VFREQ_MASK 0x0000FFFF /* bits for VF messages */ -#define IXGBE_MBVFICR_VFREQ_VF1 0x00000001 /* bit for VF 1 message */ -#define IXGBE_MBVFICR_VFACK_MASK 0xFFFF0000 /* bits for VF acks */ -#define IXGBE_MBVFICR_VFACK_VF1 0x00010000 /* bit for VF 1 ack */ +#define IXGBE_PFMBICR_VFREQ_MASK 0x0000FFFF /* bits for VF messages */ +#define IXGBE_PFMBICR_VFREQ_VF1 0x00000001 /* bit for VF 1 message */ +#define IXGBE_PFMBICR_VFACK_MASK 0xFFFF0000 /* bits for VF acks */ +#define IXGBE_PFMBICR_VFACK_VF1 0x00010000 /* bit for VF 1 ack */ /* If it's a IXGBE_VF_* msg then it originates in the VF and is sent to the diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index 1b447f42f17a..2fc500c9329c 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -483,8 +483,14 @@ struct ixgbe_nvm_version { #define IXGBE_PFMAILBOX(_i) (0x04B00 + (4 * (_i))) /* 64 total */ /* 64 Mailboxes, 16 DW each */ #define IXGBE_PFMBMEM(_i) (0x13000 + (64 * (_i))) +#define IXGBE_PFMBICR_INDEX(_i) ((_i) >> 4) +#define IXGBE_PFMBICR_SHIFT(_i) ((_i) % 16) #define IXGBE_PFMBICR(_i) (0x00710 + (4 * (_i))) /* 4 total */ #define IXGBE_PFMBIMR(_i) (0x00720 + (4 * (_i))) /* 4 total */ +#define IXGBE_PFVFLRE(_i) ((((_i) & 1) ? 0x001C0 : 0x00600)) +#define IXGBE_PFVFLREC(_i) (0x00700 + ((_i) * 4)) +#define IXGBE_PFVFLRE_INDEX(_i) ((_i) >> 5) +#define IXGBE_PFVFLRE_SHIFT(_i) ((_i) % 32) #define IXGBE_VFRE(_i) (0x051E0 + ((_i) * 4)) #define IXGBE_VFTE(_i) (0x08110 + ((_i) * 4)) #define IXGBE_VMECM(_i) (0x08790 + ((_i) * 4)) @@ -2899,11 +2905,6 @@ enum { #define IXGBE_RX_DESC_SPECIAL_PRI_SHIFT 0x000D /* Priority in upper 3 of 16 */ #define IXGBE_TX_DESC_SPECIAL_PRI_SHIFT IXGBE_RX_DESC_SPECIAL_PRI_SHIFT -/* SR-IOV specific macros */ -#define IXGBE_MBVFICR_INDEX(vf_number) (vf_number >> 4) -#define IXGBE_MBVFICR(_i) (0x00710 + ((_i) * 4)) -#define IXGBE_VFLRE(_i) (((_i & 1) ? 0x001C0 : 0x00600)) -#define IXGBE_VFLREC(_i) (0x00700 + ((_i) * 4)) /* Translated register #defines */ #define IXGBE_PVFCTRL(P) (0x00300 + (4 * (P))) #define IXGBE_PVFSTATUS(P) (0x00008 + (0 * (P))) From nobody Thu Sep 26 03:33:38 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 4XDfMQ47WHz5Y6hQ; Thu, 26 Sep 2024 03:33:38 +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 4XDfMQ3RLZz4Y6n; Thu, 26 Sep 2024 03:33:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321618; 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=Wijsd+5YsdNVgmK6N0p3nWaxcV4k/fuFxGprmHlSbUI=; b=KjIhcvLd+jRI9lIyAsQs26tUH6pgbxn7bxP9N5LINHyqHxM2Sp6WhX2EUwsLVNmshLPeK6 EZe8iRjkMDamIw8PWbJWbx5oOJL7N/3lkTsTsqWVawKJhzi1LTvH7t6TpxbAw+qes8Zx+P vTCQxCyl+CSm6unvfUZhKUP0RM4FMFwSvqux2rEX3gLDDAafLse6hj/V3XyPGXNZFBbCVA v1LngdFsli0HuMYtoPCV2XCimH8xGpSnPOzUPDUNXAPxccccq1DvnJcMlKeJTy7QkFPOUE h7DPeKxxYZYBVPDqgWlde229nAYI/V2RQf/xrMXlQQ41uSKBPBtEvh1eCeZveg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321618; 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=Wijsd+5YsdNVgmK6N0p3nWaxcV4k/fuFxGprmHlSbUI=; b=ZsVOxaVxqSshQTq0Sxsg9sLuk8XJDiN88yF+PH+KtT4RPsFcy9tZBqdQ71tncjxAro2Lie cO2DGA2pmgOUIYoJFOhVVUfZqH1YgVJga1ysdyQf6qLHGT0w8Q4SBXvDsWJzvPxEdWgHCY hIxV1LOF8oJcHVAMbYvp7X86Sq/dzBImjmlik2XwDXQDoBwMTZlN140GS1fn5mp+UnYODI 9X3qLUN24HgJIbWMzHTwcRP5eJBeTJXROogbvY7oFUSwBsOROn+TGgtjjag9tEbNvpoPAz 1UMMGzdd9G/TUcmONb1ZZ5Wb04gskrC4rsD/CHx6g7Wlv7gY4URlWpn/xQ0yCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727321618; a=rsa-sha256; cv=none; b=WEvsNpqSUIqKaWboHVDy3aGYlFnTHd5740O6iV3mJHmCYaqZ9wzsNsTxvmw6BKn9eR2xnO TTUuOzMmcuR7P/+tm+78q7Nxvo8V7QXePpjLxGxF522y1ijUigKiFiT9UYPhRq857YpAaK UaOV0OiZ1oVjMvwsiOePpAtzn3zxflju2AJb3PYN79q/EnvNO52/JtN4QJRYOoCKnIb5Zz PVOLiaj8JvfAlSbRW6jxnbJgDYMWcJUrWFkdqxu+pBb/HqzyYGOXamlqavDu/6mAoRjzxJ /kgpKo2/u0g4fS61n8LmcM/euHcDipKz4ZEwd917/ap6I7QpsRMxMLdADs5TYw== 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 4XDfMQ32nZzgm6; Thu, 26 Sep 2024 03:33:38 +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 48Q3Xc9o099131; Thu, 26 Sep 2024 03:33:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q3XcgH099128; Thu, 26 Sep 2024 03:33:38 GMT (envelope-from git) Date: Thu, 26 Sep 2024 03:33:38 GMT Message-Id: <202409260333.48Q3XcgH099128@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: 19ec9395b7b3 - stable/13 - ixv: fix x550 VF link speed reported 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/13 X-Git-Reftype: branch X-Git-Commit: 19ec9395b7b369dbfdd87102ea522ceb44b87895 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=19ec9395b7b369dbfdd87102ea522ceb44b87895 commit 19ec9395b7b369dbfdd87102ea522ceb44b87895 Author: Piotr Skajewski AuthorDate: 2024-09-19 20:31:45 +0000 Commit: Kevin Bowling CommitDate: 2024-09-26 03:32:34 +0000 ixv: fix x550 VF link speed reported DPDK commit message net/ixgbe/base: fix 5G link speed reported on VF When 5000 Base-T was set on PF the VF reported 100 Base-T. This patch changes ixgbe_check_mac_link_vf function where there was an incorrect conditional which checks using PF mac types, now it is correctly using VF mac types. Fixes: 12e2090 ("net/ixgbe/base: include new speeds in VFLINK interpretation") Cc: stable@dpdk.org Signed-off-by: Piotr Skajewski Reviewed-by: Radoslaw Tyl Reviewed-by: Slawomir Mrozowicz Reviewed-by: Alice Michael Obtained from: DPDK (9eb7fdb) (cherry picked from commit ab92cab02633580f763a38a329a5b25050bb4fbf) --- sys/dev/ixgbe/ixgbe_vf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_vf.c b/sys/dev/ixgbe/ixgbe_vf.c index 91df9b7dd1c3..beef259de339 100644 --- a/sys/dev/ixgbe/ixgbe_vf.c +++ b/sys/dev/ixgbe/ixgbe_vf.c @@ -642,7 +642,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed, switch (links_reg & IXGBE_LINKS_SPEED_82599) { case IXGBE_LINKS_SPEED_10G_82599: *speed = IXGBE_LINK_SPEED_10GB_FULL; - if (hw->mac.type >= ixgbe_mac_X550) { + if (hw->mac.type >= ixgbe_mac_X550_vf) { if (links_reg & IXGBE_LINKS_SPEED_NON_STD) *speed = IXGBE_LINK_SPEED_2_5GB_FULL; } @@ -652,7 +652,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed, break; case IXGBE_LINKS_SPEED_100_82599: *speed = IXGBE_LINK_SPEED_100_FULL; - if (hw->mac.type == ixgbe_mac_X550) { + if (hw->mac.type == ixgbe_mac_X550_vf) { if (links_reg & IXGBE_LINKS_SPEED_NON_STD) *speed = IXGBE_LINK_SPEED_5GB_FULL; } @@ -660,7 +660,7 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed, case IXGBE_LINKS_SPEED_10_X550EM_A: *speed = IXGBE_LINK_SPEED_UNKNOWN; /* Since Reserved in older MAC's */ - if (hw->mac.type >= ixgbe_mac_X550) + if (hw->mac.type >= ixgbe_mac_X550_vf) *speed = IXGBE_LINK_SPEED_10_FULL; break; default: From nobody Thu Sep 26 03:33:37 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 4XDfMP37RBz5Y6pB; Thu, 26 Sep 2024 03:33:37 +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 4XDfMP2R8Lz4Y8y; Thu, 26 Sep 2024 03:33:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321617; 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=HcN7hh1CwHabo1fryKbOLNPTUSVwpab6NaPTCBYUY7I=; b=HdVIa2sN0T8fmfKs1reZ74eYMsuc7jFs6mziN1KkzF/R79mhXM2kHD67UBWwygdpgKA4zX xzi/0wvFQG6ZUxKI/At4IutniiP0YH65qMAZkgEDWiLVykEd76ke0skgpjd17RX4ffAEkm 4UBl5mssQrNwcxSMkhVBUQeNXmMlu3BPbD9+d6Z0i2NObGZBb2SPnEkZquovDtmtJLRsGj Jh8tF/+887PrOY35su08YlpYRtiAE7jYQ3ivLIeYbOHG7Bba88t8Swpu+ApwbP95P2ND2S l8rG5he2IKvy6JQk6HwPjhN90hzWpfrpDraVJUDfJ9TouDaVcmhae2oAgWeesA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321617; 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=HcN7hh1CwHabo1fryKbOLNPTUSVwpab6NaPTCBYUY7I=; b=abSDBfJ9qMrHWnNiYA7P8VvozOEPnuCfTrwGXHc26NfsuA+4L2chWuJLTWxl+JZDiJsUiu ud49yD5HMp20AL1WI79/HSOzu63vzIigHfQhqPUtHpk3lCeUrXBagK/vNkiURDY9FvnS5/ cWJu53HKXkc4j0VV8houCxJnLRcn3j/IooazTw9rZTSDAlb8pHj9O1KHjqE4q6uA0UnXYN xOFxbvl9+ZZEx+A0A7Mi16cPEJLKFkW2/lPaxhvH6LRiGpcG+Z39Hk4r4vDwAJx1ViVNX2 Dwj2XGCClBmZ4ldxwoiULWE1YLnISiJft8NRUK2ci9XtrSiTfS1o0lAKfGhQ+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727321617; a=rsa-sha256; cv=none; b=QGR2MABbMK+SI9jvF2oXmtxnGKIdarL3PG2iBNx2jI8obU5QP3qhGJFqaCPzuF7gy3IGDJ 54g3aGdWfkxoKipPo7MN5eB14yD9i8QCkk+98yE9V9U3q8Ipweyfml9ek38LzzX7b3faL5 g4+0jzTpfl7VNxaLbiz7den2yclZE74EOvzD2R5Agc7W31wcpqI45KbD4W02O0EFPPoPB9 i5WFkOlhaTcM6rp52lPpYFYjCT5tIAlkaGeQdF9tNCzEkaGxuERl/HvpTZ/zSR7e3F6vN3 OISEvUg4zU4lwgMi9qFiNaLE8KZBx3u7zHU8NGrINVVUoAmHe16rD0Y6DKkD3A== 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 4XDfMP22Xjzgvl; Thu, 26 Sep 2024 03:33:37 +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 48Q3Xbwl099083; Thu, 26 Sep 2024 03:33:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q3XbOC099080; Thu, 26 Sep 2024 03:33:37 GMT (envelope-from git) Date: Thu, 26 Sep 2024 03:33:37 GMT Message-Id: <202409260333.48Q3XbOC099080@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: aa9cac54b805 - stable/13 - ixgbe: increase VF reset timeout 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/13 X-Git-Reftype: branch X-Git-Commit: aa9cac54b805b16b2f3de6ea583e16813e770ca8 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=aa9cac54b805b16b2f3de6ea583e16813e770ca8 commit aa9cac54b805b16b2f3de6ea583e16813e770ca8 Author: Kevin Traynor AuthorDate: 2024-09-19 20:29:34 +0000 Commit: Kevin Bowling CommitDate: 2024-09-26 03:32:20 +0000 ixgbe: increase VF reset timeout DPDK commit meesage When VF issues a reset to PF there is a 50 msec wait plus an additional max of 1 msec (200 * 5us) for the PF to indicate the reset is complete before timeout. In some cases, it is seen that the reset is timing out, in which case the reset does not complete and an error is returned. In order to account for this, continue to wait an initial 50 msecs, but then allow a max of an additional 50 msecs (10,000 * 5us) for the command to complete. Fixes: af75078 ("first public release") Cc: stable@dpdk.org Signed-off-by: Kevin Traynor Acked-by: Vladimir Medvedkin Obtained from: DPDK (64e714f) (cherry picked from commit 28fdb212adc0431fff683749a1307038e25ff58e) --- sys/dev/ixgbe/ixgbe_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index b8aeaf51f86c..deb68fa03312 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -1832,7 +1832,7 @@ enum { /* VFRE bitmask */ #define IXGBE_VFRE_ENABLE_ALL 0xFFFFFFFF -#define IXGBE_VF_INIT_TIMEOUT 200 /* Number of retries to clear RSTI */ +#define IXGBE_VF_INIT_TIMEOUT 10000 /* Number of retries to clear RSTI */ /* RDHMPN and TDHMPN bitmasks */ #define IXGBE_RDHMPN_RDICADDR 0x007FF800 From nobody Thu Sep 26 03:33:36 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 4XDfMN2Kh8z5Y73K; Thu, 26 Sep 2024 03:33:36 +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 4XDfMN1TlPz4YBy; Thu, 26 Sep 2024 03:33:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321616; 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=O5lqTD++AiHmG/hjAu7TzH+RmehVub7DAJZ54Wb5jlM=; b=kFvi2vpqfqAPiOa+4H+Y7cx/UUN3v9FAh1r8Sd83kvstsX35FDNrQMj8Lclbl9iVibqv9O K4cggF2WWvLkHhSF9rXb8G18950T47c2unu99lBwaSoZm8vG0C+oNC/oW7hvvqMrtNDjxS CV4YoAOkcVFqMeU7q/DRXCWa7E1Iu75m3U76jHGjpgLN7EjDLF0wRRtAd/9egiDMWVr8/J ZMyKaUdsV3cEHjOd6aBWwyq2bJOR/KmxcOg4pSh3PnmjKxgtFs/v+ZUBFnJO4R0xpyeF0U NizA+Wr7AJBsz1B7FYLrPzPxjnqordAaPZVvfqJ72AiCnPP6m5QtKeuzMnz4mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321616; 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=O5lqTD++AiHmG/hjAu7TzH+RmehVub7DAJZ54Wb5jlM=; b=g+zvsWUmPZi80x0OplZEwsC8WaJ/chAlndObjWXbvFQlwcguLIJFfk0C0wEIf84ls4gp+E 6TqqabKk3dbS01w4Kmm1BCq7TVsiJZqRUgL6mC9kg+wjyWp5+ttrFI7rXWSGhpluTpMFMg gE3eS6wPz0hMDoSezoqlvLqF9NHHvONxqaZfcqi8yRbZZz1GkhRy8ViXwfOPeR5yAN5Tk/ Q+mIwYwcafUUxzCHVQrWRHZdfkghn07dU5MwyqFVh95mULySeYFnmNXKtq3MpoLY0lpXMa K5cEWv+QEwty0h7XzKpe8J5BqNzN5UxEWXon2tyMDvEPZyrtHfIsMe/K7aQwRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727321616; a=rsa-sha256; cv=none; b=LO94d9KA1m0PorUfnUKGvY9Jr+moQk7kBmntQ1ymWv+O0CRn6Uiy36A03EwA6Rw87dm2B+ wGjrqK+0+3ORh32be8G7dt6SSsdXPawBKMc7X8OhSOhWkjN77y2cuPf1Xcpaft5U4qUjYC DP3mO6eeNbYTP3eHaDlAyETRLl7pBaJQ5OD9RjZE8ngAFQw+IzYTwD2kJNQJSwKmZYMNqi EU94iJiOBw2lL7rSX4PfckMDwA+L/QQQv3XE6ob+3bFAWEd+b1zGBViJXE1RYVtpjds6e2 PW3hyc0Os1ZII1RTnwQ0GKXay4AVup5+neMfqFQREiThHtvaqOZBam+Ie3kMkg== 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 4XDfMN14qYzgg1; Thu, 26 Sep 2024 03:33:36 +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 48Q3Xax4099035; Thu, 26 Sep 2024 03:33:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q3XaSg099031; Thu, 26 Sep 2024 03:33:36 GMT (envelope-from git) Date: Thu, 26 Sep 2024 03:33:36 GMT Message-Id: <202409260333.48Q3XaSg099031@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: 6f5092ed7503 - stable/13 - e1000: fix link power down 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/13 X-Git-Reftype: branch X-Git-Commit: 6f5092ed7503608984447ee973decbdef8a7715f Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=6f5092ed7503608984447ee973decbdef8a7715f commit 6f5092ed7503608984447ee973decbdef8a7715f Author: Anatoly Burakov AuthorDate: 2024-09-19 05:38:32 +0000 Commit: Kevin Bowling CommitDate: 2024-09-26 03:32:06 +0000 e1000: fix link power down DPDK commit message net/e1000/base: fix link power down Current code is a result of work to reduce duplication between various device models. However, the logic that was replaced did not exactly match the new logic, and as a result the link power down was not working correctly for some NICs, and the link remained up even when the interface is down. Fix it to correctly power down the link under all circumstances that were supported by old logic. Fixes: 44dddd1 ("net/e1000/base: remove duplicated codes") Cc: stable@dpdk.org Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson Obtained from: DPDK (a8218d0) (cherry picked from commit 811912c46b5886f1aa3bb7a51a6ec1270bc947a8) --- sys/dev/e1000/e1000_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/e1000/e1000_base.c b/sys/dev/e1000/e1000_base.c index ff810821d9e9..d83dc48c4d4d 100644 --- a/sys/dev/e1000/e1000_base.c +++ b/sys/dev/e1000/e1000_base.c @@ -137,7 +137,7 @@ void e1000_power_down_phy_copper_base(struct e1000_hw *hw) return; /* If the management interface is not enabled, then power down */ - if (phy->ops.check_reset_block(hw)) + if (!(e1000_enable_mng_pass_thru(hw) || phy->ops.check_reset_block(hw))) e1000_power_down_phy_copper(hw); } From nobody Thu Sep 26 03:33:39 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 4XDfMR6kgPz5Y6Pc; Thu, 26 Sep 2024 03:33:39 +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 4XDfMR4Ss9z4XnT; Thu, 26 Sep 2024 03:33:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321619; 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=o3I9Ym/HxY5BSeCGkWgZZ+qiskCV9urTE6psXI6s8oQ=; b=F4Covo4SibsrhezLHPZlca476gzXJoNEGI8Vt1CNBwCFFLCD1YHJDvaNR+9B6Kt/MyIKCN tCxJDOLoeXLb7YZBlzJBQnrkDhYST4J7Ux5nVldCPYlFhQBLEUEEYo4g2xJZ3bVl7n9T31 ydEpC3ivBdpSJ+3qG+NrJLJnzdlvS/4t/BokGGrw/6uYdF0FMNWSZ8LgJ6ZJS1LAdcEoBP mU63aLBtGjPwmI6M057OGbpKyVRmwG0dlVyIPbA47aqYDXeObWZAeALJ+6eid6JZeZFG3g VLEwGGTLNgyWANXcxOlXS/NHezSighkwM0PWBFowVT9pzNielF5xbYopU58JSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321619; 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=o3I9Ym/HxY5BSeCGkWgZZ+qiskCV9urTE6psXI6s8oQ=; b=KQ5Nmnf3AYtOsBm6lij2H2ijr81VlCKV7eykf6TkJuvdZ+iy8MwO1uf7ObGlpcGFIAlfjr d21uGtv60vhN+FwTA7dFbX2M24qK87gPd96Iqm4GZHBLHlPRCzW5jqnUF99AGwcXrvtW78 oEkRzXk+fJ7ZxpminSx6fDTO9gXx1F6bTPo529Uugquh5Krn+2PY7P/4TGbVtqdrQUfQQ6 +zUcmQLz9qITlq6J8A2GS6EDgFa2JWzQ9S3moDM2TSC86+yU2vVoYwK2zbIldAIEfm3+Ny MS5REMX9aLbU8lHS9cGCkt5O068sDkGndRSJELXCcn9mvmjJ1I+HlsmmYcZnJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727321619; a=rsa-sha256; cv=none; b=ABReks4ahrELqYUzTRWOJGecT6HOgOYen8hpCoEyjQ7fsID5yES5KHKB9LIDX9u3BjCti/ gTzdu1xRKXpaPoDa0hy1zAzdho6Vc5DlmHrTEwm58b3VrlxvQOkt+cTOhgAdnQ4jL68TQZ 58O/X5d5IkoT4MfOVqsuUgktPFWErYjSzOBTdlzZAf9Tes8pcfMk1fTQUqpSoMyhuxMG7d ILvCzGuyZKjbfxIsxhH1l6S/I6XYklmMNElBbocyvucP00cdzMXzM7Gs9QgzglLsvwyCHS MBFnL9W4/gAiAmefZBAgt3JK8WPY7z7Y7CCe7k7yB+rYjQORATb+GN1TCDBKPA== 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 4XDfMR44M9zgq1; Thu, 26 Sep 2024 03:33:39 +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 48Q3Xdm1099178; Thu, 26 Sep 2024 03:33:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q3Xd8B099175; Thu, 26 Sep 2024 03:33:39 GMT (envelope-from git) Date: Thu, 26 Sep 2024 03:33:39 GMT Message-Id: <202409260333.48Q3Xd8B099175@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: 0097d7ec6bc4 - stable/13 - ixgbe: fix PHY ID for X550 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/13 X-Git-Reftype: branch X-Git-Commit: 0097d7ec6bc46a441fb13b703c1ea0388d6033c8 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=0097d7ec6bc46a441fb13b703c1ea0388d6033c8 commit 0097d7ec6bc46a441fb13b703c1ea0388d6033c8 Author: Radoslaw Tyl AuthorDate: 2024-09-19 20:42:14 +0000 Commit: Kevin Bowling CommitDate: 2024-09-26 03:32:48 +0000 ixgbe: fix PHY ID for X550 DPDK commit message net/ixgbe/base: fix PHY ID for X550 Function ixgbe_get_phy_type_from_id() for X550_PHY_ID2 and X550_PHY_ID3 always return ixgbe_phy_unknown instead of ixgbe_phy_aq because phy ID's last 4 bits are always masked, and should not be taken into account when selecting phy type. This patch adds default PHY ID for X550 devices with mask on last 4 bits (0xFFFFFFF0), and fixes the switch statement to use it. Fixes: 58ddc80 ("ixgbe/base: add new X550 PHY ids") Cc: stable@dpdk.org Signed-off-by: Radoslaw Tyl Reviewed-by: Piotr Skajewski Reviewed-by: Alice Michael Obtained from: DPDK (a9f5a3b) (cherry picked from commit 9b56dfd27c64fcaf2dfbaa1eb3e2bd2b163fa56c) --- sys/dev/ixgbe/ixgbe_phy.c | 3 +-- sys/dev/ixgbe/ixgbe_type.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index f4bee6c34f53..00f396283879 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -462,8 +462,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id) case TN1010_PHY_ID: phy_type = ixgbe_phy_tn; break; - case X550_PHY_ID2: - case X550_PHY_ID3: + case X550_PHY_ID: case X540_PHY_ID: phy_type = ixgbe_phy_aq; break; diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index deb68fa03312..1b447f42f17a 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -1696,6 +1696,7 @@ struct ixgbe_dmac_config { #define TN1010_PHY_ID 0x00A19410 #define TNX_FW_REV 0xB #define X540_PHY_ID 0x01540200 +#define X550_PHY_ID 0x01540220 #define X550_PHY_ID2 0x01540223 #define X550_PHY_ID3 0x01540221 #define X557_PHY_ID 0x01540240 From nobody Thu Sep 26 03:33:40 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 4XDfMT0Y2lz5Y6bV; Thu, 26 Sep 2024 03:33: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDfMS713Tz4Y6v; Thu, 26 Sep 2024 03:33:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321621; 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=PYTB+WExkS4Ge+bcIQmzi8VK5KlWnqZhGnt8ZTv2+B4=; b=sYREsz7lrSc8VockXd3sABwOw1IEdNG0cL1dq+BqzsfmpOdNTI9pnrAHZSs8eghfutgR+W 4svvlKW4jiI3af9iT7o0v7ZVtWqSHK8PtswBiKSB9I+/uLO8vlg120yR75As/bddxpnorB U+ioTuOto7moVlSAcSUMHoRhWFhYLeGvYXUL6eSdMAc0PLw9ahu8cHEEJFl9h9EwU59u0D KADX+YO/bGPjGMYg4xbAW+/LQcSaYQtATPQDRuvc0TYwhqbsD1k3xVk9OTZLX4X3+UGl5R YGInRrtT7U7PJoO0YPo0rNTcsdoY7Y18z6zX9Y2R+oiSmkCAgXMUkLSijnZAcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321621; 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=PYTB+WExkS4Ge+bcIQmzi8VK5KlWnqZhGnt8ZTv2+B4=; b=dFyX00LzjLewPfwwLxsD4H7OQ8FGAdX/TwJX8Z4PE5QlE5bvHvrjIVNuboKY+nG7TXToFu C9vmterWss9MGhlFFkm+kteY3OMHr9jESOQcf9qvXCY2ISdJbKaCLgQT6Vx+sTDy4DKFh4 s6N25OJ1S4U0DSoaHzvWDd/wzBs8LdZrfUv8II/6hHPpPF0KXb86omyJnQc9EMvsx0PMz/ FXQotpp+88qZCugGeHn9et9K8mtXNib5QLomWi8Fb+AVK47idod8c6XYx/tFDM16wlPvHt bu+nNv0LgnK33qUoVlBViMU159GX/nFMk81jSOXmvEfTW9s2OLV5Hv+ssvS9og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727321621; a=rsa-sha256; cv=none; b=gHIyxOQ5XAhKa+kY/CASJ+1pHu9JTmiLkkqboQq2/aNBP/TjVXYKMbYc8yngAAL10+Op32 LMvMZCf2suWACbmK7TqBRIejpld5lEnafJqG6lMx+bfFSIOuhWy6sBjrubiYJ4PhydOOdL hLIykqzrwEoZsSgWMZDaatf7bTXJ/ta7Jv3OvxChL4nswekG+HwnW7s4AUJ+k5i2q0OBz3 9JrDjnLX9fGEy6ozfhCIfnVnXWSTLfyLa1ogMwsjgH5+BJTsApWiNhm269yjdb3LEaD9TV 1DFazJyf0WcYI0XG3wPpPj/Vc/vI5asGOIrSlRffHMZYOTYVV7UaMBVgATSLzg== 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 4XDfMS55Dvzgm7; Thu, 26 Sep 2024 03:33:40 +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 48Q3XewP099223; Thu, 26 Sep 2024 03:33:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q3XeEl099220; Thu, 26 Sep 2024 03:33:40 GMT (envelope-from git) Date: Thu, 26 Sep 2024 03:33:40 GMT Message-Id: <202409260333.48Q3XeEl099220@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: 2e256578e7d8 - stable/13 - ixgbe: rename VF message type macros 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/13 X-Git-Reftype: branch X-Git-Commit: 2e256578e7d8a81051b3a96b92f6d3140d884156 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2e256578e7d8a81051b3a96b92f6d3140d884156 commit 2e256578e7d8a81051b3a96b92f6d3140d884156 Author: Jakub Chylkowski AuthorDate: 2024-09-19 21:02:06 +0000 Commit: Kevin Bowling CommitDate: 2024-09-26 03:33:03 +0000 ixgbe: rename VF message type macros DPDK commit message There is name similarity within IXGBE_VT_MSGTYPE_ACK and PFMAILBOX.ACK / VFMAILBOX.ACK which may cause confusion. Rename MSGTYPE macros to SUCCESS and FAILURE as they are not specified in datasheet and now will be easily distinguishable. Signed-off-by: Jakub Chylkowski Reviewed-by: Marek Zalfresso-jundzillo Reviewed-by: Alice Michael Reviewed-by: Piotr Skajewski Reviewed-by: Slawomir Mrozowicz Tested-by: Piotr Skajewski Tested-by: Alice Michael Obtained from: DPDK (4f675c9) (cherry picked from commit 10746040820ee5186caf4d4d61cf88196ec213ba) --- sys/dev/ixgbe/if_sriov.c | 10 +++++----- sys/dev/ixgbe/ixgbe_mbx.h | 14 +++++++------- sys/dev/ixgbe/ixgbe_vf.c | 34 ++++++++++++++++++---------------- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index cc6243848f67..794f2e0365f5 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -107,14 +107,14 @@ static inline void ixgbe_send_vf_ack(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) { msg &= IXGBE_VT_MSG_MASK; - ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_ACK); + ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_SUCCESS); } static inline void ixgbe_send_vf_nack(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) { msg &= IXGBE_VT_MSG_MASK; - ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_NACK); + ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_FAILURE); } static inline void @@ -362,9 +362,9 @@ ixgbe_vf_reset_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) if (ixgbe_validate_mac_addr(vf->ether_addr) == 0) { ixgbe_set_rar(&sc->hw, vf->rar_index, vf->ether_addr, vf->pool, true); - ack = IXGBE_VT_MSGTYPE_ACK; + ack = IXGBE_VT_MSGTYPE_SUCCESS; } else - ack = IXGBE_VT_MSGTYPE_NACK; + ack = IXGBE_VT_MSGTYPE_FAILURE; ixgbe_vf_enable_transmit(sc, vf); ixgbe_vf_enable_receive(sc, vf); @@ -556,7 +556,7 @@ ixgbe_vf_get_queues(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) return; } - resp[0] = IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_ACK | + resp[0] = IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_SUCCESS | IXGBE_VT_MSGTYPE_CTS; num_queues = ixgbe_vf_queues(sc->iov_mode); diff --git a/sys/dev/ixgbe/ixgbe_mbx.h b/sys/dev/ixgbe/ixgbe_mbx.h index 47b9327bb896..fa407c4969d1 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.h +++ b/sys/dev/ixgbe/ixgbe_mbx.h @@ -68,14 +68,14 @@ /* If it's a IXGBE_VF_* msg then it originates in the VF and is sent to the * PF. The reverse is true if it is IXGBE_PF_*. - * Message ACK's are the value or'd with 0xF0000000 + * Message results are the value or'd with 0xF0000000 */ -#define IXGBE_VT_MSGTYPE_ACK 0x80000000 /* Messages below or'd with - * this are the ACK */ -#define IXGBE_VT_MSGTYPE_NACK 0x40000000 /* Messages below or'd with - * this are the NACK */ -#define IXGBE_VT_MSGTYPE_CTS 0x20000000 /* Indicates that VF is still - * clear to send requests */ +#define IXGBE_VT_MSGTYPE_SUCCESS 0x80000000 /* Messages or'd with this + * have succeeded */ +#define IXGBE_VT_MSGTYPE_FAILURE 0x40000000 /* Messages or'd with this + * have failed */ +#define IXGBE_VT_MSGTYPE_CTS 0x20000000 /* Indicates that VF is still + * clear to send requests */ #define IXGBE_VT_MSGINFO_SHIFT 16 /* bits 23:16 are used for extra info for certain messages */ #define IXGBE_VT_MSGINFO_MASK (0xFF << IXGBE_VT_MSGINFO_SHIFT) diff --git a/sys/dev/ixgbe/ixgbe_vf.c b/sys/dev/ixgbe/ixgbe_vf.c index beef259de339..4624c2b5c0a3 100644 --- a/sys/dev/ixgbe/ixgbe_vf.c +++ b/sys/dev/ixgbe/ixgbe_vf.c @@ -223,11 +223,11 @@ s32 ixgbe_reset_hw_vf(struct ixgbe_hw *hw) if (ret_val) return ret_val; - if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK) && - msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_NACK)) + if (msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_SUCCESS) && + msgbuf[0] != (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_FAILURE)) return IXGBE_ERR_INVALID_MAC_ADDR; - if (msgbuf[0] == (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_ACK)) + if (msgbuf[0] == (IXGBE_VF_RESET | IXGBE_VT_MSGTYPE_SUCCESS)) memcpy(hw->mac.perm_addr, addr, IXGBE_ETH_LENGTH_OF_ADDRESS); hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD]; @@ -356,9 +356,9 @@ s32 ixgbe_set_rar_vf(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, msgbuf[0] &= ~IXGBE_VT_MSGTYPE_CTS; - /* if nacked the address was rejected, use "perm_addr" */ + /* if we had failure, the address was rejected, use "perm_addr" */ if (!ret_val && - (msgbuf[0] == (IXGBE_VF_SET_MAC_ADDR | IXGBE_VT_MSGTYPE_NACK))) { + (msgbuf[0] == (IXGBE_VF_SET_MAC_ADDR | IXGBE_VT_MSGTYPE_FAILURE))) { ixgbe_get_mac_addr_vf(hw, hw->mac.addr); return IXGBE_ERR_MBX; } @@ -447,7 +447,7 @@ s32 ixgbevf_update_xcast_mode(struct ixgbe_hw *hw, int xcast_mode) return err; msgbuf[0] &= ~IXGBE_VT_MSGTYPE_CTS; - if (msgbuf[0] == (IXGBE_VF_UPDATE_XCAST_MODE | IXGBE_VT_MSGTYPE_NACK)) + if (msgbuf[0] == (IXGBE_VF_UPDATE_XCAST_MODE | IXGBE_VT_MSGTYPE_FAILURE)) return IXGBE_ERR_FEATURE_NOT_SUPPORTED; return IXGBE_SUCCESS; } @@ -470,7 +470,7 @@ s32 ixgbe_get_link_state_vf(struct ixgbe_hw *hw, bool *link_state) err = ixgbevf_write_msg_read_ack(hw, msgbuf, msgbuf, 2); - if (err || (msgbuf[0] & IXGBE_VT_MSGTYPE_NACK)) { + if (err || (msgbuf[0] & IXGBE_VT_MSGTYPE_FAILURE)) { ret_val = IXGBE_ERR_MBX; } else { ret_val = IXGBE_SUCCESS; @@ -503,10 +503,10 @@ s32 ixgbe_set_vfta_vf(struct ixgbe_hw *hw, u32 vlan, u32 vind, msgbuf[0] |= vlan_on << IXGBE_VT_MSGINFO_SHIFT; ret_val = ixgbevf_write_msg_read_ack(hw, msgbuf, msgbuf, 2); - if (!ret_val && (msgbuf[0] & IXGBE_VT_MSGTYPE_ACK)) + if (!ret_val && (msgbuf[0] & IXGBE_VT_MSGTYPE_SUCCESS)) return IXGBE_SUCCESS; - return ret_val | (msgbuf[0] & IXGBE_VT_MSGTYPE_NACK); + return ret_val | (msgbuf[0] & IXGBE_VT_MSGTYPE_FAILURE); } /** @@ -571,7 +571,7 @@ s32 ixgbevf_set_uc_addr_vf(struct ixgbe_hw *hw, u32 index, u8 *addr) if (!ret_val) { msgbuf[0] &= ~IXGBE_VT_MSGTYPE_CTS; - if (msgbuf[0] == (msgbuf_chk | IXGBE_VT_MSGTYPE_NACK)) + if (msgbuf[0] == (msgbuf_chk | IXGBE_VT_MSGTYPE_FAILURE)) return IXGBE_ERR_OUT_OF_MEM; } @@ -674,8 +674,10 @@ s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed, goto out; if (!(in_msg & IXGBE_VT_MSGTYPE_CTS)) { - /* msg is not CTS and is NACK we must have lost CTS status */ - if (in_msg & IXGBE_VT_MSGTYPE_NACK) + /* msg is not CTS and is FAILURE, + * we must have lost CTS status. + */ + if (in_msg & IXGBE_VT_MSGTYPE_FAILURE) ret_val = -1; goto out; } @@ -713,7 +715,7 @@ s32 ixgbevf_rlpml_set_vf(struct ixgbe_hw *hw, u16 max_size) if (retval) return retval; if ((msgbuf[0] & IXGBE_VF_SET_LPE) && - (msgbuf[0] & IXGBE_VT_MSGTYPE_NACK)) + (msgbuf[0] & IXGBE_VT_MSGTYPE_FAILURE)) return IXGBE_ERR_MBX; return 0; @@ -739,7 +741,7 @@ int ixgbevf_negotiate_api_version(struct ixgbe_hw *hw, int api) msg[0] &= ~IXGBE_VT_MSGTYPE_CTS; /* Store value and return 0 on success */ - if (msg[0] == (IXGBE_VF_API_NEGOTIATE | IXGBE_VT_MSGTYPE_ACK)) { + if (msg[0] == (IXGBE_VF_API_NEGOTIATE | IXGBE_VT_MSGTYPE_SUCCESS)) { hw->api_version = api; return 0; } @@ -775,11 +777,11 @@ int ixgbevf_get_queues(struct ixgbe_hw *hw, unsigned int *num_tcs, msg[0] &= ~IXGBE_VT_MSGTYPE_CTS; /* - * if we we didn't get an ACK there must have been + * if we we didn't get a SUCCESS there must have been * some sort of mailbox error so we should treat it * as such */ - if (msg[0] != (IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_ACK)) + if (msg[0] != (IXGBE_VF_GET_QUEUES | IXGBE_VT_MSGTYPE_SUCCESS)) return IXGBE_ERR_MBX; /* record and validate values from message */ From nobody Thu Sep 26 03:33:41 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 4XDfMT6tK6z5Y6kf; Thu, 26 Sep 2024 03:33: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDfMT6Gg2z4YC2; Thu, 26 Sep 2024 03:33:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321621; 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=VsX4OWPepYMeA0enmMEZumK6gFAXUXGWq1u11DzNhsI=; b=DNjKRQH6diy3tgQXUMBwbZiQ9xBvPf66EREE4DuUaS4yM7EM2Wpl2QjSNaRsHSAwrGAMJS 4Jrl527VDnxjTp98V3MUh9o3pHS/2iGr2ADXeSZT+Wxhi2bZx9IMQRZqpBeOnmAIv6pMMz UAzS9fgaL6hZgVOV7YuvtdspzYsn8yS5jjPt3mC8iulKmdideSm4qBNGpqGuxoql3mTHP+ d7hxReP6wLzUsnSMOcEb1go23Z34I6R+w3yg9wGG9PbipSTW6Hu3F/Mj71+hB47dlPm9Oi ewoGc2gwixvfd+uIrK15vhjBgPFU+H93YCumr8cBkwep2V7VL8CwdcXD4kIUpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727321621; 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=VsX4OWPepYMeA0enmMEZumK6gFAXUXGWq1u11DzNhsI=; b=wNhpJjm1RRZHCuCAiWJXxbEttdyuTi89f8ctUwYXibMDqfDTFh75G8o115ny+MD6mOUFXY JpGbMVtGHfl2/0f3vI6cI2hRRI4lzwNZPpEFFrh99K2nVEZbqIuZJQgk75Yqbhw/fajlrz kVHLgm9TuOSBJwIk9tCY7EtTE8beTDtHdcBHn890860ziB/8sF/TTGQZ8biiUE8372jw6E 7a7ot8eYxYRHME/WtgNoiKe/Pb+mGUf4VrPsCwWSW/wMVggcFOBT8caW+V2t/T2kUvvVF7 LrjJ2/hKCiyPbmWcZI4MjTcME7pZbM0ex+APIH/QvrQhAjpARf8HRas52Tm2Xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727321621; a=rsa-sha256; cv=none; b=O+8WhBvNzSIaKty+7XXdYDEZ4LlghU5ejE9HutjaKAciArTn/6016Ku8hKGyQSu8jp0JvB J26Hq4FlWqG29XifPjKp9z3wd1GpZ0MrAQoe4OaYsUhIRAeHjJPCKoipoejtIbQiZ+TZHa HBbpflWWhQlqhSyxsLUTe4tnZalt3urCFk6YXI0+OXZP7oIUP/Qrh60cmGP5jy8vD4jHs8 yYBYS3b459mp1qa9r56wTrksftm1W85LF3hLdRBku88yGQycpxzZusgBYhiqDHvLrBuwMs pYMBTjLJS+eat2qtyVasQZwRvMgvdhlkgRgT8ahDNbqCeYaQa3PPrg1NAriIfA== 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 4XDfMT5t2hzgy1; Thu, 26 Sep 2024 03:33: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 48Q3Xfrn099271; Thu, 26 Sep 2024 03:33:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q3Xfoi099268; Thu, 26 Sep 2024 03:33:41 GMT (envelope-from git) Date: Thu, 26 Sep 2024 03:33:41 GMT Message-Id: <202409260333.48Q3Xfoi099268@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: 172cd7eab18e - stable/13 - ixgbe: correct register names to match datasheet 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/13 X-Git-Reftype: branch X-Git-Commit: 172cd7eab18ee27de94d843a740a1240968ae8e8 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=172cd7eab18ee27de94d843a740a1240968ae8e8 commit 172cd7eab18ee27de94d843a740a1240968ae8e8 Author: Jakub Chylkowski AuthorDate: 2024-09-19 23:25:09 +0000 Commit: Kevin Bowling CommitDate: 2024-09-26 03:33:17 +0000 ixgbe: correct register names to match datasheet DPDK commit message net/ixgbe/base: correct registers names to match datasheet Some of mailbox-related registers have different names than it is specified in datasheet. Correct these names to correspond to their datasheet counterparts. Additionally, several calculations are changed to no longer use magic numbers but dedicated macros instead. Signed-off-by: Jakub Chylkowski Reviewed-by: Marek Zalfresso-jundzillo Reviewed-by: Alice Michael Reviewed-by: Piotr Skajewski Reviewed-by: Slawomir Mrozowicz Tested-by: Piotr Skajewski Tested-by: Alice Michael Obtained from: DPDK (10fd55e) (cherry picked from commit b3c7fde6fe9113f849232604523878b4b68df0cc) --- sys/dev/ixgbe/ixgbe_mbx.c | 30 +++++++++++++++--------------- sys/dev/ixgbe/ixgbe_mbx.h | 8 ++++---- sys/dev/ixgbe/ixgbe_type.h | 11 ++++++----- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c index d12aadea7097..c8f839fce85a 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.c +++ b/sys/dev/ixgbe/ixgbe_mbx.c @@ -527,12 +527,12 @@ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) static s32 ixgbe_check_for_bit_pf(struct ixgbe_hw *hw, u32 mask, s32 index) { - u32 mbvficr = IXGBE_READ_REG(hw, IXGBE_MBVFICR(index)); + u32 pfmbicr = IXGBE_READ_REG(hw, IXGBE_PFMBICR(index)); s32 ret_val = IXGBE_ERR_MBX; - if (mbvficr & mask) { + if (pfmbicr & mask) { ret_val = IXGBE_SUCCESS; - IXGBE_WRITE_REG(hw, IXGBE_MBVFICR(index), mask); + IXGBE_WRITE_REG(hw, IXGBE_PFMBICR(index), mask); } return ret_val; @@ -547,13 +547,13 @@ static s32 ixgbe_check_for_bit_pf(struct ixgbe_hw *hw, u32 mask, s32 index) **/ static s32 ixgbe_check_for_msg_pf(struct ixgbe_hw *hw, u16 vf_number) { + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_number); + s32 index = IXGBE_PFMBICR_INDEX(vf_number); s32 ret_val = IXGBE_ERR_MBX; - s32 index = IXGBE_MBVFICR_INDEX(vf_number); - u32 vf_bit = vf_number % 16; DEBUGFUNC("ixgbe_check_for_msg_pf"); - if (!ixgbe_check_for_bit_pf(hw, IXGBE_MBVFICR_VFREQ_VF1 << vf_bit, + if (!ixgbe_check_for_bit_pf(hw, IXGBE_PFMBICR_VFREQ_VF1 << vf_shift, index)) { ret_val = IXGBE_SUCCESS; hw->mbx.stats.reqs++; @@ -571,13 +571,13 @@ static s32 ixgbe_check_for_msg_pf(struct ixgbe_hw *hw, u16 vf_number) **/ static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_number) { + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_number); + s32 index = IXGBE_PFMBICR_INDEX(vf_number); s32 ret_val = IXGBE_ERR_MBX; - s32 index = IXGBE_MBVFICR_INDEX(vf_number); - u32 vf_bit = vf_number % 16; DEBUGFUNC("ixgbe_check_for_ack_pf"); - if (!ixgbe_check_for_bit_pf(hw, IXGBE_MBVFICR_VFACK_VF1 << vf_bit, + if (!ixgbe_check_for_bit_pf(hw, IXGBE_PFMBICR_VFACK_VF1 << vf_shift, index)) { ret_val = IXGBE_SUCCESS; hw->mbx.stats.acks++; @@ -595,22 +595,22 @@ static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_number) **/ static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number) { - u32 reg_offset = (vf_number < 32) ? 0 : 1; - u32 vf_shift = vf_number % 32; - u32 vflre = 0; + u32 vf_shift = IXGBE_PFVFLRE_SHIFT(vf_number); + u32 index = IXGBE_PFVFLRE_INDEX(vf_number); s32 ret_val = IXGBE_ERR_MBX; + u32 vflre = 0; DEBUGFUNC("ixgbe_check_for_rst_pf"); switch (hw->mac.type) { case ixgbe_mac_82599EB: - vflre = IXGBE_READ_REG(hw, IXGBE_VFLRE(reg_offset)); + vflre = IXGBE_READ_REG(hw, IXGBE_PFVFLRE(index)); break; case ixgbe_mac_X550: case ixgbe_mac_X550EM_x: case ixgbe_mac_X550EM_a: case ixgbe_mac_X540: - vflre = IXGBE_READ_REG(hw, IXGBE_VFLREC(reg_offset)); + vflre = IXGBE_READ_REG(hw, IXGBE_PFVFLREC(index)); break; default: break; @@ -618,7 +618,7 @@ static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number) if (vflre & (1 << vf_shift)) { ret_val = IXGBE_SUCCESS; - IXGBE_WRITE_REG(hw, IXGBE_VFLREC(reg_offset), (1 << vf_shift)); + IXGBE_WRITE_REG(hw, IXGBE_PFVFLREC(index), (1 << vf_shift)); hw->mbx.stats.rsts++; } diff --git a/sys/dev/ixgbe/ixgbe_mbx.h b/sys/dev/ixgbe/ixgbe_mbx.h index fa407c4969d1..fc4d58e1c0db 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.h +++ b/sys/dev/ixgbe/ixgbe_mbx.h @@ -60,10 +60,10 @@ #define IXGBE_PFMAILBOX_PFU 0x00000008 /* PF owns the mailbox buffer */ #define IXGBE_PFMAILBOX_RVFU 0x00000010 /* Reset VFU - used when VF stuck */ -#define IXGBE_MBVFICR_VFREQ_MASK 0x0000FFFF /* bits for VF messages */ -#define IXGBE_MBVFICR_VFREQ_VF1 0x00000001 /* bit for VF 1 message */ -#define IXGBE_MBVFICR_VFACK_MASK 0xFFFF0000 /* bits for VF acks */ -#define IXGBE_MBVFICR_VFACK_VF1 0x00010000 /* bit for VF 1 ack */ +#define IXGBE_PFMBICR_VFREQ_MASK 0x0000FFFF /* bits for VF messages */ +#define IXGBE_PFMBICR_VFREQ_VF1 0x00000001 /* bit for VF 1 message */ +#define IXGBE_PFMBICR_VFACK_MASK 0xFFFF0000 /* bits for VF acks */ +#define IXGBE_PFMBICR_VFACK_VF1 0x00010000 /* bit for VF 1 ack */ /* If it's a IXGBE_VF_* msg then it originates in the VF and is sent to the diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index 1b447f42f17a..2fc500c9329c 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -483,8 +483,14 @@ struct ixgbe_nvm_version { #define IXGBE_PFMAILBOX(_i) (0x04B00 + (4 * (_i))) /* 64 total */ /* 64 Mailboxes, 16 DW each */ #define IXGBE_PFMBMEM(_i) (0x13000 + (64 * (_i))) +#define IXGBE_PFMBICR_INDEX(_i) ((_i) >> 4) +#define IXGBE_PFMBICR_SHIFT(_i) ((_i) % 16) #define IXGBE_PFMBICR(_i) (0x00710 + (4 * (_i))) /* 4 total */ #define IXGBE_PFMBIMR(_i) (0x00720 + (4 * (_i))) /* 4 total */ +#define IXGBE_PFVFLRE(_i) ((((_i) & 1) ? 0x001C0 : 0x00600)) +#define IXGBE_PFVFLREC(_i) (0x00700 + ((_i) * 4)) +#define IXGBE_PFVFLRE_INDEX(_i) ((_i) >> 5) +#define IXGBE_PFVFLRE_SHIFT(_i) ((_i) % 32) #define IXGBE_VFRE(_i) (0x051E0 + ((_i) * 4)) #define IXGBE_VFTE(_i) (0x08110 + ((_i) * 4)) #define IXGBE_VMECM(_i) (0x08790 + ((_i) * 4)) @@ -2899,11 +2905,6 @@ enum { #define IXGBE_RX_DESC_SPECIAL_PRI_SHIFT 0x000D /* Priority in upper 3 of 16 */ #define IXGBE_TX_DESC_SPECIAL_PRI_SHIFT IXGBE_RX_DESC_SPECIAL_PRI_SHIFT -/* SR-IOV specific macros */ -#define IXGBE_MBVFICR_INDEX(vf_number) (vf_number >> 4) -#define IXGBE_MBVFICR(_i) (0x00710 + ((_i) * 4)) -#define IXGBE_VFLRE(_i) (((_i & 1) ? 0x001C0 : 0x00600)) -#define IXGBE_VFLREC(_i) (0x00700 + ((_i) * 4)) /* Translated register #defines */ #define IXGBE_PVFCTRL(P) (0x00300 + (4 * (P))) #define IXGBE_PVFSTATUS(P) (0x00008 + (0 * (P))) From nobody Thu Sep 26 05:20:40 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 4XDhkx5YFlz5YDHt; Thu, 26 Sep 2024 05:20: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDhkx2Dlsz4hd3; Thu, 26 Sep 2024 05:20:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727328041; 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=OzIsy5KDEjl+ZkJ9NAs021CJsrAT99OE5MjlTk44lbk=; b=Vg1zD2x077wlk8J7imenx7f1Xo8ZFH0g6XucVNYJGY2fmJSlWsqLTUhNy3RZ/Hi8hIoAbq P2M+iAsvYVmJiwD1t6qZdWByQLYU5eTzH3h+RFgSsI1ezwDvkc5gIkFv4/jXO2oKa5VcGo YnHfkSrs85DDBf2l4Otx7/espuu35Lxc5XXwBMyWZ2PzJ4pXChkLeFzoxQhjqKT0+B/TfH fRQI6GqwDMFL7R40Z9+XRnDhu70zlo0vTvo+OkXfI9++B5qaMTNtJDGDd87zBBKGRiCpjz erEesWMC1qB3fLNPpghtpoPcMHsEogOHiYM9o8Dxki14CQF/EPu463H3kSacHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727328041; 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=OzIsy5KDEjl+ZkJ9NAs021CJsrAT99OE5MjlTk44lbk=; b=WTKqSTUl5abMvFiXTqTbZ40R425jkuA1mTqFLmCiFQWMeQAknfN8akC1mnH1P21AgHuqh/ rsinqH+JZky/roYmip1g+KdPiNewfuQOE5djYWir62s44H0t1eR36wzFidRijqbDx1MXmB kVqvZGzL7mTHRgBADGQO06m3JQrTKvR0adyZFmven+6tY5dhTsfsRwLCVNQoR4axT3vcvC ygqbSQpfsBbeqzom5KPCEOYGfnxlaPndOEXzFJavU3Xo72DI0YxdOwfdGIrZE0OTQ+kAZp 9hP0V2Y7nc8zXApZmcheuhYhNkatPu1idwMhCuT5TlBfSit6b/YlzxFnNSKyqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727328041; a=rsa-sha256; cv=none; b=Tjby042IIwKwJsU9sp/iwJ9lI/u0Ia3zOL5JRcixhK4S5cRFTnuTnoDDhC+IRjRQ2AfZJH 1BFGBGbiUMntTZOt0dw4GfI8cOWVtPUY/CslhoFq6OzneDSdz/BQMrh4Vhi2R2rGlUt0B8 FMYgXrGOONWYZWIwKZ+1SqJjdUsruqruDf43n0k5HwbzC7guFfgryqDu3De9xpmZ1Cukxe LRfiWzKJ8YH/J1RWEwbXgpbq6I7e2geE50xuhKZ/oqlcMJhBe6aMHaIpof6NWXjrxFsIh7 yOwN/LSAMUyqjjBK4ybAkPSYkkFzBVAUxa2umPB9Lapzu8BFmroEpypofnsblQ== 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 4XDhkx0jt2zkBR; Thu, 26 Sep 2024 05:20: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 48Q5KffU079400; Thu, 26 Sep 2024 05:20:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q5KeTg079382; Thu, 26 Sep 2024 05:20:40 GMT (envelope-from git) Date: Thu, 26 Sep 2024 05:20:40 GMT Message-Id: <202409260520.48Q5KeTg079382@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5d07b8f51499 - stable/14 - iflib: Fix compiler warnings 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5d07b8f514991072d6e04fb9801fe3ee2bbb8e1e Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5d07b8f514991072d6e04fb9801fe3ee2bbb8e1e commit 5d07b8f514991072d6e04fb9801fe3ee2bbb8e1e Author: Stephen J. Kiernan AuthorDate: 2024-04-03 20:21:55 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-26 05:19:00 +0000 iflib: Fix compiler warnings Some of the QUAD sysctls are actually for unsigned quad values. Switch to using UQUAD instead, as that is meant for unsigned. Reviewed by: erj, jhb Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D44620 (cherry picked from commit 303dea74c2cb3a41fba455fce8577993e637c3da) --- sys/net/iflib.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 0dba65fee2d8..84a42b76dc68 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -6935,32 +6935,32 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) CTLFLAG_RD, &txq->ift_task.gt_cpu, 0, "cpu this queue is bound to"); #if MEMORY_LOGGING - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "txq_dequeued", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_dequeued", CTLFLAG_RD, &txq->ift_dequeued, "total mbufs freed"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "txq_enqueued", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_enqueued", CTLFLAG_RD, &txq->ift_enqueued, "total mbufs enqueued"); #endif - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag", CTLFLAG_RD, &txq->ift_mbuf_defrag, "# of times m_defrag was called"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "m_pullups", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "m_pullups", CTLFLAG_RD, &txq->ift_pullups, "# of times m_pullup was called"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag_failed", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag_failed", CTLFLAG_RD, &txq->ift_mbuf_defrag_failed, "# of times m_defrag failed"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "no_desc_avail", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "no_desc_avail", CTLFLAG_RD, &txq->ift_no_desc_avail, "# of times no descriptors were available"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "tx_map_failed", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "tx_map_failed", CTLFLAG_RD, &txq->ift_map_failed, "# of times DMA map failed"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "txd_encap_efbig", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txd_encap_efbig", CTLFLAG_RD, &txq->ift_txd_encap_efbig, "# of times txd_encap returned EFBIG"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "no_tx_dma_setup", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "no_tx_dma_setup", CTLFLAG_RD, &txq->ift_no_tx_dma_setup, "# of times map failed for other than EFBIG"); SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_pidx", @@ -6975,10 +6975,10 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_in_use", CTLFLAG_RD, &txq->ift_in_use, 1, "descriptors in use"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "txq_processed", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_processed", CTLFLAG_RD, &txq->ift_processed, "descriptors procesed for clean"); - SYSCTL_ADD_QUAD(ctx_list, queue_list, OID_AUTO, "txq_cleaned", + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_cleaned", CTLFLAG_RD, &txq->ift_cleaned, "total cleaned"); SYSCTL_ADD_PROC(ctx_list, queue_list, OID_AUTO, "ring_state", @@ -7043,16 +7043,16 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) CTLFLAG_RD, &fl->ifl_buf_size, 1, "buffer size"); #if MEMORY_LOGGING - SYSCTL_ADD_QUAD(ctx_list, fl_list, OID_AUTO, "fl_m_enqueued", + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_m_enqueued", CTLFLAG_RD, &fl->ifl_m_enqueued, "mbufs allocated"); - SYSCTL_ADD_QUAD(ctx_list, fl_list, OID_AUTO, "fl_m_dequeued", + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_m_dequeued", CTLFLAG_RD, &fl->ifl_m_dequeued, "mbufs freed"); - SYSCTL_ADD_QUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_enqueued", + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_enqueued", CTLFLAG_RD, &fl->ifl_cl_enqueued, "clusters allocated"); - SYSCTL_ADD_QUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_dequeued", + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_dequeued", CTLFLAG_RD, &fl->ifl_cl_dequeued, "clusters freed"); #endif From nobody Thu Sep 26 05:20:42 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 4XDhky3tkvz5YDNT; Thu, 26 Sep 2024 05:20:42 +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 4XDhky1rymz4hKR; Thu, 26 Sep 2024 05:20:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727328042; 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=49h9VNTBQOcpCiaG5GwXfkD6r7eyQvlD5Jnr8Txx204=; b=ew/NzZ0C9+M1xG+kPSzgN8EV749tQdhPfEOmCKnlMUy8ondJOfhSR85E2eLJSSqBsdCtRK jpK9OkTI9P4XtYcO9PEjoVJCPnNRaM3POSspgKWLAMHrrSu4qmS/8CJJp6DM6Fm3kC4iTJ pg7qDIJ3vbd+0C8V65algCmI9TYYjQHbhToxWVkzBAYqFIF6mFe2728clyrjKijtpQQEAH rKS1ZStLngB3xGh4fmOQKi55HwsAyIqiWjswD3099GriUix0AoP0RuTrivIQAFVWw9nQ+9 9RuS6zAzUmBMWAGYG2e5V60SvMrJEfUoiQwsKapDuVY1upiyGdTB84rTZtUznQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727328042; 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=49h9VNTBQOcpCiaG5GwXfkD6r7eyQvlD5Jnr8Txx204=; b=AXs6bND/1uACyzAq+vYpzUBqATLdHnEXf7ZzxEG/bpEQ+8YmGYxpD6GKSK6KO4cVLbrliG Y7sUjx6I5APG2tiXHjIDdI0Nt1/XE3KyWOMauT6gLP+T7YsVF5c1wh8jprJAuhRPWZOP5A c6WDx0irRiooGYUdqvX5NyJouQrluM35synoCyaGR/EG+YFl+siwED9PRENioTBnutkS15 g4l4Bdv9zrfJDRRiR5jbFGOIVEf1T5cdYAKUgHXLXxq4jWjrJanbsCR3WYOojn7IueadWQ MeQ8pSS/0LR5BsA+G7KdSh4uUAUKgQ/dbXKhJJOJK5QY1JNeR+vPLYzwkPGVfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727328042; a=rsa-sha256; cv=none; b=xkuCekGv3bDxa6E8Zd0IDerHAyOAzRQx2uScTcEdOdfXtQELOrpNmuF+SenRUJl9TJ6GHX dtQxsPCrd8EUFFqmM9ZRQ79Snf7BXUVsCJchgQEKpYZuS2DHYqwvS0fa1XGsPM/HrtohVe RJZzk8ZsLsE1wM5GpzBnTLS5tSlxbLz7YNrjVFJGPc0y8Erb4WZW90ELs/F8ixfLBssGS5 Ajpx4+oJA+a6/GgxmBAVTIYiMY+s/1mBbOJqFdJH9Ki47yAqSXDttmWHNoB+Qqb4IhTdoe cE/beCRWD8uLk9cXSuPrNQ0l9pf2JpAYAce72lvJvwATmTQTvBdMdFpdxxsd0w== 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 4XDhky1S5RzkN2; Thu, 26 Sep 2024 05:20:42 +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 48Q5Kgn8079678; Thu, 26 Sep 2024 05:20:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q5Kgh4079675; Thu, 26 Sep 2024 05:20:42 GMT (envelope-from git) Date: Thu, 26 Sep 2024 05:20:42 GMT Message-Id: <202409260520.48Q5Kgh4079675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 2f3af838e6fc - stable/14 - iflib: Correct indentation according to style(9) 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2f3af838e6fc42d672cadde7cff43163b69fc167 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=2f3af838e6fc42d672cadde7cff43163b69fc167 commit 2f3af838e6fc42d672cadde7cff43163b69fc167 Author: Stephen J. Kiernan AuthorDate: 2024-04-16 18:35:57 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-26 05:19:00 +0000 iflib: Correct indentation according to style(9) The indentation style for the SYSCTL_* macros used was not matching KNF. Reported by: jhb Differential Revision: https://reviews.freebsd.org/D44811 (cherry picked from commit e4a0c92e7aea50654290e3082668932cea16b64f) --- sys/net/iflib.c | 277 +++++++++++++++++++++++++++----------------------------- 1 file changed, 135 insertions(+), 142 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 84a42b76dc68..c6a01624436c 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -583,13 +583,15 @@ static SYSCTL_NODE(_net, OID_AUTO, iflib, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, */ static int iflib_min_tx_latency = 0; SYSCTL_INT(_net_iflib, OID_AUTO, min_tx_latency, CTLFLAG_RW, - &iflib_min_tx_latency, 0, "minimize transmit latency at the possible expense of throughput"); + &iflib_min_tx_latency, 0, + "minimize transmit latency at the possible expense of throughput"); static int iflib_no_tx_batch = 0; SYSCTL_INT(_net_iflib, OID_AUTO, no_tx_batch, CTLFLAG_RW, - &iflib_no_tx_batch, 0, "minimize transmit latency at the possible expense of throughput"); + &iflib_no_tx_batch, 0, + "minimize transmit latency at the possible expense of throughput"); static int iflib_timer_default = 1000; SYSCTL_INT(_net_iflib, OID_AUTO, timer_default, CTLFLAG_RW, - &iflib_timer_default, 0, "number of ticks between iflib_timer calls"); + &iflib_timer_default, 0, "number of ticks between iflib_timer calls"); #if IFLIB_DEBUG_COUNTERS @@ -602,31 +604,31 @@ static int iflib_fl_refills; static int iflib_fl_refills_large; static int iflib_tx_frees; -SYSCTL_INT(_net_iflib, OID_AUTO, tx_seen, CTLFLAG_RD, - &iflib_tx_seen, 0, "# TX mbufs seen"); -SYSCTL_INT(_net_iflib, OID_AUTO, tx_sent, CTLFLAG_RD, - &iflib_tx_sent, 0, "# TX mbufs sent"); -SYSCTL_INT(_net_iflib, OID_AUTO, tx_encap, CTLFLAG_RD, - &iflib_tx_encap, 0, "# TX mbufs encapped"); -SYSCTL_INT(_net_iflib, OID_AUTO, tx_frees, CTLFLAG_RD, - &iflib_tx_frees, 0, "# TX frees"); -SYSCTL_INT(_net_iflib, OID_AUTO, rx_allocs, CTLFLAG_RD, - &iflib_rx_allocs, 0, "# RX allocations"); -SYSCTL_INT(_net_iflib, OID_AUTO, fl_refills, CTLFLAG_RD, - &iflib_fl_refills, 0, "# refills"); +SYSCTL_INT(_net_iflib, OID_AUTO, tx_seen, CTLFLAG_RD, &iflib_tx_seen, 0, + "# TX mbufs seen"); +SYSCTL_INT(_net_iflib, OID_AUTO, tx_sent, CTLFLAG_RD, &iflib_tx_sent, 0, + "# TX mbufs sent"); +SYSCTL_INT(_net_iflib, OID_AUTO, tx_encap, CTLFLAG_RD, &iflib_tx_encap, 0, + "# TX mbufs encapped"); +SYSCTL_INT(_net_iflib, OID_AUTO, tx_frees, CTLFLAG_RD, &iflib_tx_frees, 0, + "# TX frees"); +SYSCTL_INT(_net_iflib, OID_AUTO, rx_allocs, CTLFLAG_RD, &iflib_rx_allocs, 0, + "# RX allocations"); +SYSCTL_INT(_net_iflib, OID_AUTO, fl_refills, CTLFLAG_RD, &iflib_fl_refills, 0, + "# refills"); SYSCTL_INT(_net_iflib, OID_AUTO, fl_refills_large, CTLFLAG_RD, - &iflib_fl_refills_large, 0, "# large refills"); + &iflib_fl_refills_large, 0, "# large refills"); static int iflib_txq_drain_flushing; static int iflib_txq_drain_oactive; static int iflib_txq_drain_notready; SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_flushing, CTLFLAG_RD, - &iflib_txq_drain_flushing, 0, "# drain flushes"); + &iflib_txq_drain_flushing, 0, "# drain flushes"); SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_oactive, CTLFLAG_RD, - &iflib_txq_drain_oactive, 0, "# drain oactives"); + &iflib_txq_drain_oactive, 0, "# drain oactives"); SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_notready, CTLFLAG_RD, - &iflib_txq_drain_notready, 0, "# drain notready"); + &iflib_txq_drain_notready, 0, "# drain notready"); static int iflib_encap_load_mbuf_fail; static int iflib_encap_pad_mbuf_fail; @@ -634,13 +636,13 @@ static int iflib_encap_txq_avail_fail; static int iflib_encap_txd_encap_fail; SYSCTL_INT(_net_iflib, OID_AUTO, encap_load_mbuf_fail, CTLFLAG_RD, - &iflib_encap_load_mbuf_fail, 0, "# busdma load failures"); + &iflib_encap_load_mbuf_fail, 0, "# busdma load failures"); SYSCTL_INT(_net_iflib, OID_AUTO, encap_pad_mbuf_fail, CTLFLAG_RD, - &iflib_encap_pad_mbuf_fail, 0, "# runt frame pad failures"); + &iflib_encap_pad_mbuf_fail, 0, "# runt frame pad failures"); SYSCTL_INT(_net_iflib, OID_AUTO, encap_txq_avail_fail, CTLFLAG_RD, - &iflib_encap_txq_avail_fail, 0, "# txq avail failures"); + &iflib_encap_txq_avail_fail, 0, "# txq avail failures"); SYSCTL_INT(_net_iflib, OID_AUTO, encap_txd_encap_fail, CTLFLAG_RD, - &iflib_encap_txd_encap_fail, 0, "# driver encap failures"); + &iflib_encap_txd_encap_fail, 0, "# driver encap failures"); static int iflib_task_fn_rxs; static int iflib_rx_intr_enables; @@ -652,22 +654,22 @@ static int iflib_rxd_flush; static int iflib_verbose_debug; -SYSCTL_INT(_net_iflib, OID_AUTO, task_fn_rx, CTLFLAG_RD, - &iflib_task_fn_rxs, 0, "# task_fn_rx calls"); +SYSCTL_INT(_net_iflib, OID_AUTO, task_fn_rx, CTLFLAG_RD, &iflib_task_fn_rxs, 0, + "# task_fn_rx calls"); SYSCTL_INT(_net_iflib, OID_AUTO, rx_intr_enables, CTLFLAG_RD, - &iflib_rx_intr_enables, 0, "# RX intr enables"); -SYSCTL_INT(_net_iflib, OID_AUTO, fast_intrs, CTLFLAG_RD, - &iflib_fast_intrs, 0, "# fast_intr calls"); -SYSCTL_INT(_net_iflib, OID_AUTO, rx_unavail, CTLFLAG_RD, - &iflib_rx_unavail, 0, "# times rxeof called with no available data"); + &iflib_rx_intr_enables, 0, "# RX intr enables"); +SYSCTL_INT(_net_iflib, OID_AUTO, fast_intrs, CTLFLAG_RD, &iflib_fast_intrs, 0, + "# fast_intr calls"); +SYSCTL_INT(_net_iflib, OID_AUTO, rx_unavail, CTLFLAG_RD, &iflib_rx_unavail, 0, + "# times rxeof called with no available data"); SYSCTL_INT(_net_iflib, OID_AUTO, rx_ctx_inactive, CTLFLAG_RD, - &iflib_rx_ctx_inactive, 0, "# times rxeof called with inactive context"); -SYSCTL_INT(_net_iflib, OID_AUTO, rx_if_input, CTLFLAG_RD, - &iflib_rx_if_input, 0, "# times rxeof called if_input"); -SYSCTL_INT(_net_iflib, OID_AUTO, rxd_flush, CTLFLAG_RD, - &iflib_rxd_flush, 0, "# times rxd_flush called"); + &iflib_rx_ctx_inactive, 0, "# times rxeof called with inactive context"); +SYSCTL_INT(_net_iflib, OID_AUTO, rx_if_input, CTLFLAG_RD, &iflib_rx_if_input, + 0, "# times rxeof called if_input"); +SYSCTL_INT(_net_iflib, OID_AUTO, rxd_flush, CTLFLAG_RD, &iflib_rxd_flush, 0, + "# times rxd_flush called"); SYSCTL_INT(_net_iflib, OID_AUTO, verbose_debug, CTLFLAG_RW, - &iflib_verbose_debug, 0, "enable verbose debugging"); + &iflib_verbose_debug, 0, "enable verbose debugging"); #define DBG_COUNTER_INC(name) atomic_add_int(&(iflib_ ## name), 1) static void @@ -6845,42 +6847,41 @@ iflib_add_device_sysctl_pre(if_ctx_t ctx) ctx_list = device_get_sysctl_ctx(dev); child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); - ctx->ifc_sysctl_node = node = SYSCTL_ADD_NODE(ctx_list, child, OID_AUTO, "iflib", - CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "IFLIB fields"); + ctx->ifc_sysctl_node = node = SYSCTL_ADD_NODE(ctx_list, child, + OID_AUTO, "iflib", CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "IFLIB fields"); oid_list = SYSCTL_CHILDREN(node); SYSCTL_ADD_CONST_STRING(ctx_list, oid_list, OID_AUTO, "driver_version", - CTLFLAG_RD, ctx->ifc_sctx->isc_driver_version, - "driver version"); + CTLFLAG_RD, ctx->ifc_sctx->isc_driver_version, "driver version"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "override_ntxqs", - CTLFLAG_RWTUN, &ctx->ifc_sysctl_ntxqs, 0, - "# of txqs to use, 0 => use default #"); + CTLFLAG_RWTUN, &ctx->ifc_sysctl_ntxqs, 0, + "# of txqs to use, 0 => use default #"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "override_nrxqs", - CTLFLAG_RWTUN, &ctx->ifc_sysctl_nrxqs, 0, - "# of rxqs to use, 0 => use default #"); + CTLFLAG_RWTUN, &ctx->ifc_sysctl_nrxqs, 0, + "# of rxqs to use, 0 => use default #"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "override_qs_enable", - CTLFLAG_RWTUN, &ctx->ifc_sysctl_qs_eq_override, 0, - "permit #txq != #rxq"); + CTLFLAG_RWTUN, &ctx->ifc_sysctl_qs_eq_override, 0, + "permit #txq != #rxq"); SYSCTL_ADD_INT(ctx_list, oid_list, OID_AUTO, "disable_msix", - CTLFLAG_RWTUN, &ctx->ifc_softc_ctx.isc_disable_msix, 0, - "disable MSI-X (default 0)"); + CTLFLAG_RWTUN, &ctx->ifc_softc_ctx.isc_disable_msix, 0, + "disable MSI-X (default 0)"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "rx_budget", - CTLFLAG_RWTUN, &ctx->ifc_sysctl_rx_budget, 0, - "set the RX budget"); + CTLFLAG_RWTUN, &ctx->ifc_sysctl_rx_budget, 0, "set the RX budget"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "tx_abdicate", - CTLFLAG_RWTUN, &ctx->ifc_sysctl_tx_abdicate, 0, - "cause TX to abdicate instead of running to completion"); + CTLFLAG_RWTUN, &ctx->ifc_sysctl_tx_abdicate, 0, + "cause TX to abdicate instead of running to completion"); ctx->ifc_sysctl_core_offset = CORE_OFFSET_UNSPECIFIED; SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "core_offset", - CTLFLAG_RDTUN, &ctx->ifc_sysctl_core_offset, 0, - "offset to start using cores at"); + CTLFLAG_RDTUN, &ctx->ifc_sysctl_core_offset, 0, + "offset to start using cores at"); SYSCTL_ADD_U8(ctx_list, oid_list, OID_AUTO, "separate_txrx", - CTLFLAG_RDTUN, &ctx->ifc_sysctl_separate_txrx, 0, - "use separate cores for TX and RX"); + CTLFLAG_RDTUN, &ctx->ifc_sysctl_separate_txrx, 0, + "use separate cores for TX and RX"); SYSCTL_ADD_U8(ctx_list, oid_list, OID_AUTO, "use_logical_cores", - CTLFLAG_RDTUN, &ctx->ifc_sysctl_use_logical_cores, 0, - "try to make use of logical cores for TX and RX"); + CTLFLAG_RDTUN, &ctx->ifc_sysctl_use_logical_cores, 0, + "try to make use of logical cores for TX and RX"); SYSCTL_ADD_U16(ctx_list, oid_list, OID_AUTO, "use_extra_msix_vectors", CTLFLAG_RDTUN, &ctx->ifc_sysctl_extra_msix_vectors, 0, "attempt to reserve the given number of extra MSI-X vectors during driver load for the creation of additional interfaces later"); @@ -6932,77 +6933,71 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_INT(ctx_list, queue_list, OID_AUTO, "cpu", - CTLFLAG_RD, - &txq->ift_task.gt_cpu, 0, "cpu this queue is bound to"); + CTLFLAG_RD, &txq->ift_task.gt_cpu, 0, + "cpu this queue is bound to"); #if MEMORY_LOGGING SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_dequeued", - CTLFLAG_RD, - &txq->ift_dequeued, "total mbufs freed"); + CTLFLAG_RD, &txq->ift_dequeued, "total mbufs freed"); SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_enqueued", - CTLFLAG_RD, - &txq->ift_enqueued, "total mbufs enqueued"); + CTLFLAG_RD, &txq->ift_enqueued, "total mbufs enqueued"); #endif SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag", - CTLFLAG_RD, - &txq->ift_mbuf_defrag, "# of times m_defrag was called"); + CTLFLAG_RD, &txq->ift_mbuf_defrag, + "# of times m_defrag was called"); SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "m_pullups", - CTLFLAG_RD, - &txq->ift_pullups, "# of times m_pullup was called"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "mbuf_defrag_failed", - CTLFLAG_RD, - &txq->ift_mbuf_defrag_failed, "# of times m_defrag failed"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "no_desc_avail", - CTLFLAG_RD, - &txq->ift_no_desc_avail, "# of times no descriptors were available"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "tx_map_failed", - CTLFLAG_RD, - &txq->ift_map_failed, "# of times DMA map failed"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txd_encap_efbig", - CTLFLAG_RD, - &txq->ift_txd_encap_efbig, "# of times txd_encap returned EFBIG"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "no_tx_dma_setup", - CTLFLAG_RD, - &txq->ift_no_tx_dma_setup, "# of times map failed for other than EFBIG"); + CTLFLAG_RD, &txq->ift_pullups, + "# of times m_pullup was called"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "mbuf_defrag_failed", CTLFLAG_RD, + &txq->ift_mbuf_defrag_failed, "# of times m_defrag failed"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "no_desc_avail", CTLFLAG_RD, &txq->ift_no_desc_avail, + "# of times no descriptors were available"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "tx_map_failed", CTLFLAG_RD, &txq->ift_map_failed, + "# of times DMA map failed"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "txd_encap_efbig", CTLFLAG_RD, &txq->ift_txd_encap_efbig, + "# of times txd_encap returned EFBIG"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "no_tx_dma_setup", CTLFLAG_RD, &txq->ift_no_tx_dma_setup, + "# of times map failed for other than EFBIG"); SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_pidx", - CTLFLAG_RD, - &txq->ift_pidx, 1, "Producer Index"); + CTLFLAG_RD, &txq->ift_pidx, 1, "Producer Index"); SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_cidx", - CTLFLAG_RD, - &txq->ift_cidx, 1, "Consumer Index"); - SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_cidx_processed", - CTLFLAG_RD, - &txq->ift_cidx_processed, 1, "Consumer Index seen by credit update"); + CTLFLAG_RD, &txq->ift_cidx, 1, "Consumer Index"); + SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, + "txq_cidx_processed", CTLFLAG_RD, &txq->ift_cidx_processed, + 1, "Consumer Index seen by credit update"); SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "txq_in_use", - CTLFLAG_RD, - &txq->ift_in_use, 1, "descriptors in use"); - SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_processed", - CTLFLAG_RD, - &txq->ift_processed, "descriptors procesed for clean"); + CTLFLAG_RD, &txq->ift_in_use, 1, "descriptors in use"); + SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, + "txq_processed", CTLFLAG_RD, &txq->ift_processed, + "descriptors procesed for clean"); SYSCTL_ADD_UQUAD(ctx_list, queue_list, OID_AUTO, "txq_cleaned", - CTLFLAG_RD, - &txq->ift_cleaned, "total cleaned"); + CTLFLAG_RD, &txq->ift_cleaned, "total cleaned"); SYSCTL_ADD_PROC(ctx_list, queue_list, OID_AUTO, "ring_state", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, __DEVOLATILE(uint64_t *, &txq->ift_br->state), 0, mp_ring_state_handler, "A", "soft ring state"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_enqueues", - CTLFLAG_RD, &txq->ift_br->enqueues, - "# of enqueues to the mp_ring for this queue"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_drops", - CTLFLAG_RD, &txq->ift_br->drops, - "# of drops in the mp_ring for this queue"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_starts", - CTLFLAG_RD, &txq->ift_br->starts, - "# of normal consumer starts in the mp_ring for this queue"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_stalls", - CTLFLAG_RD, &txq->ift_br->stalls, - "# of consumer stalls in the mp_ring for this queue"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_restarts", - CTLFLAG_RD, &txq->ift_br->restarts, - "# of consumer restarts in the mp_ring for this queue"); - SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, "r_abdications", - CTLFLAG_RD, &txq->ift_br->abdications, - "# of consumer abdications in the mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_enqueues", CTLFLAG_RD, &txq->ift_br->enqueues, + "# of enqueues to the mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_drops", CTLFLAG_RD, &txq->ift_br->drops, + "# of drops in the mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_starts", CTLFLAG_RD, &txq->ift_br->starts, + "# of normal consumer starts in mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_stalls", CTLFLAG_RD, &txq->ift_br->stalls, + "# of consumer stalls in the mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_restarts", CTLFLAG_RD, &txq->ift_br->restarts, + "# of consumer restarts in the mp_ring for this queue"); + SYSCTL_ADD_COUNTER_U64(ctx_list, queue_list, OID_AUTO, + "r_abdications", CTLFLAG_RD, &txq->ift_br->abdications, + "# of consumer abdications in the mp_ring for this queue"); } if (scctx->isc_nrxqsets > 100) @@ -7017,44 +7012,42 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "Queue Name"); queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_INT(ctx_list, queue_list, OID_AUTO, "cpu", - CTLFLAG_RD, - &rxq->ifr_task.gt_cpu, 0, "cpu this queue is bound to"); + CTLFLAG_RD, &rxq->ifr_task.gt_cpu, 0, + "cpu this queue is bound to"); if (sctx->isc_flags & IFLIB_HAS_RXCQ) { - SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, "rxq_cq_cidx", - CTLFLAG_RD, - &rxq->ifr_cq_cidx, 1, "Consumer Index"); + SYSCTL_ADD_U16(ctx_list, queue_list, OID_AUTO, + "rxq_cq_cidx", CTLFLAG_RD, &rxq->ifr_cq_cidx, 1, + "Consumer Index"); } for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) { snprintf(namebuf, NAME_BUFLEN, "rxq_fl%d", j); - fl_node = SYSCTL_ADD_NODE(ctx_list, queue_list, OID_AUTO, namebuf, - CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "freelist Name"); + fl_node = SYSCTL_ADD_NODE(ctx_list, queue_list, + OID_AUTO, namebuf, CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, "freelist Name"); fl_list = SYSCTL_CHILDREN(fl_node); SYSCTL_ADD_U16(ctx_list, fl_list, OID_AUTO, "pidx", - CTLFLAG_RD, - &fl->ifl_pidx, 1, "Producer Index"); + CTLFLAG_RD, &fl->ifl_pidx, 1, "Producer Index"); SYSCTL_ADD_U16(ctx_list, fl_list, OID_AUTO, "cidx", - CTLFLAG_RD, - &fl->ifl_cidx, 1, "Consumer Index"); + CTLFLAG_RD, &fl->ifl_cidx, 1, "Consumer Index"); SYSCTL_ADD_U16(ctx_list, fl_list, OID_AUTO, "credits", - CTLFLAG_RD, - &fl->ifl_credits, 1, "credits available"); + CTLFLAG_RD, &fl->ifl_credits, 1, + "credits available"); SYSCTL_ADD_U16(ctx_list, fl_list, OID_AUTO, "buf_size", - CTLFLAG_RD, - &fl->ifl_buf_size, 1, "buffer size"); + CTLFLAG_RD, &fl->ifl_buf_size, 1, "buffer size"); #if MEMORY_LOGGING - SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_m_enqueued", - CTLFLAG_RD, - &fl->ifl_m_enqueued, "mbufs allocated"); - SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_m_dequeued", - CTLFLAG_RD, - &fl->ifl_m_dequeued, "mbufs freed"); - SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_enqueued", - CTLFLAG_RD, - &fl->ifl_cl_enqueued, "clusters allocated"); - SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, "fl_cl_dequeued", - CTLFLAG_RD, - &fl->ifl_cl_dequeued, "clusters freed"); + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, + "fl_m_enqueued", CTLFLAG_RD, &fl->ifl_m_enqueued, + "mbufs allocated"); + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, + "fl_m_dequeued", CTLFLAG_RD, &fl->ifl_m_dequeued, + "mbufs freed"); + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, + "fl_cl_enqueued", CTLFLAG_RD, &fl->ifl_cl_enqueued, + "clusters allocated"); + SYSCTL_ADD_UQUAD(ctx_list, fl_list, OID_AUTO, + "fl_cl_dequeued", CTLFLAG_RD, &fl->ifl_cl_dequeued, + "clusters freed"); #endif } } From nobody Thu Sep 26 05:20:44 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 4XDhl04vdDz5YDHx; Thu, 26 Sep 2024 05:20:44 +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 4XDhl03XkVz4hgk; Thu, 26 Sep 2024 05:20:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727328044; 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=qazafNn+OL6j/nB/BLo9hmZlH28Gwqxdo/fB0eXK+nY=; b=lBp+pzhSFNRglvCRU6RYBJS/WbXYc9VTfPc/or5YAzHQhjv7QTGGnAup+MVibldcm2+8Xo 9c2ldxUgxXrYqdl8+NY+/Y4NmSAxxsIjnn738lvwecWGb4izYRSvIy78Cu4FJUU3Yoqe2D sceF8b4/eAaYvcX2aZ86N+my3lk4y/vKVGxG1F7P5/24UkKbVfl0A6vvfNKxgPKq/J5lxt /9jx4dzHPBUXglRue4rT+R53Id4BO0TXgjJTSYObj8AHxAE9KqQWmsyRkRRZihyxj1uPFg lPdhD1XFzJHGbM8dr6W13ylW7fyOHzjldllCGfyUVGO2PpgzwlYr6TQEf08WyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727328044; 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=qazafNn+OL6j/nB/BLo9hmZlH28Gwqxdo/fB0eXK+nY=; b=fod13ofIyyU6iz2xKvbH2L2wWZ/wbP33SSA5c+Mddfp7pMbsCBwvp1uDjObNg5xJD/fHus yCgPYTuv7DibRdChItgxEzgMSUreYbuYiR4Lz5FZ8468FYjoSb+/G2VwhEV7V619GTJtyE xLmQCqfsFuzSzLlvJ75kLZkjmNwDwneg9lRuOm5qJizgEPYDTZhAyh5MM5rsdNvS9qZ5mh Nf0f5a5eTnDV12ksiGnCI8HFNbPg6r3twsI0aMwUJs4ShIsa3VZN/zArMqw4A/yV07ZgeD 84DGRDdfmGa0XIarwD+gQcg1yytk601IhHIpt+ajsskph9wfF5en2JRSY9+MUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727328044; a=rsa-sha256; cv=none; b=xCPi0uDJTajByRbhFm7qTwG7/nE6CX0kO82UfOrslUqnFoyjes/EUncI0lfGI14bjblI51 OIKVl3bEDTN4fkOJAICv9DOSbURx76WwW4WShLJxdf3Qu2L1w6lsgElO/QDhkvm/VINmR3 Xi7Il43JARKSEpK7S7SNCKuuEmiVbX6xztajTfXNBKi9ikDJsImh1BLb20CCD/L5rU4V8p BbIY4e+PyIlyjVHJSNGkgwTo9/M8FksJHPX6PymuU+lNf0kPe80v9q7EuaUWwd7ayiRNRH 51FB1JoXBV2SpnAVnSbOARXV1ZYxsse3S7TxeA8UyemEdwcUwxfzRUQ+tjrGcg== 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 4XDhl037dczjxX; Thu, 26 Sep 2024 05:20:44 +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 48Q5Kit2079775; Thu, 26 Sep 2024 05:20:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q5Kinn079772; Thu, 26 Sep 2024 05:20:44 GMT (envelope-from git) Date: Thu, 26 Sep 2024 05:20:44 GMT Message-Id: <202409260520.48Q5Kinn079772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 647860bff214 - stable/14 - iflib: Many style fixes 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 647860bff21446419dee923b07490fd4a6cd181a Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=647860bff21446419dee923b07490fd4a6cd181a commit 647860bff21446419dee923b07490fd4a6cd181a Author: Zhenlei Huang AuthorDate: 2024-09-22 02:07:39 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-26 05:19:01 +0000 iflib: Many style fixes MFC after: 3 days (cherry picked from commit fa7045f99cdb2b699205653f42f3fe78597880a7) --- sys/net/iflib.c | 296 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 148 insertions(+), 148 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 63a2f6be5b5e..8cb0d0610a21 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -126,8 +126,8 @@ */ static MALLOC_DEFINE(M_IFLIB, "iflib", "ifnet library"); -#define IFLIB_RXEOF_MORE (1U << 0) -#define IFLIB_RXEOF_EMPTY (2U << 0) +#define IFLIB_RXEOF_MORE (1U << 0) +#define IFLIB_RXEOF_EMPTY (2U << 0) struct iflib_txq; typedef struct iflib_txq *iflib_txq_t; @@ -200,16 +200,16 @@ struct iflib_ctx { qidx_t ifc_sysctl_ntxds[8]; qidx_t ifc_sysctl_nrxds[8]; struct if_txrx ifc_txrx; -#define isc_txd_encap ifc_txrx.ift_txd_encap -#define isc_txd_flush ifc_txrx.ift_txd_flush -#define isc_txd_credits_update ifc_txrx.ift_txd_credits_update -#define isc_rxd_available ifc_txrx.ift_rxd_available -#define isc_rxd_pkt_get ifc_txrx.ift_rxd_pkt_get -#define isc_rxd_refill ifc_txrx.ift_rxd_refill -#define isc_rxd_flush ifc_txrx.ift_rxd_flush -#define isc_legacy_intr ifc_txrx.ift_legacy_intr -#define isc_txq_select ifc_txrx.ift_txq_select -#define isc_txq_select_v2 ifc_txrx.ift_txq_select_v2 +#define isc_txd_encap ifc_txrx.ift_txd_encap +#define isc_txd_flush ifc_txrx.ift_txd_flush +#define isc_txd_credits_update ifc_txrx.ift_txd_credits_update +#define isc_rxd_available ifc_txrx.ift_rxd_available +#define isc_rxd_pkt_get ifc_txrx.ift_rxd_pkt_get +#define isc_rxd_refill ifc_txrx.ift_rxd_refill +#define isc_rxd_flush ifc_txrx.ift_rxd_flush +#define isc_legacy_intr ifc_txrx.ift_legacy_intr +#define isc_txq_select ifc_txrx.ift_txq_select +#define isc_txq_select_v2 ifc_txrx.ift_txq_select_v2 eventhandler_tag ifc_vlan_attach_event; eventhandler_tag ifc_vlan_detach_event; @@ -272,12 +272,12 @@ iflib_get_extra_msix_vectors_sysctl(if_ctx_t ctx) return (ctx->ifc_sysctl_extra_msix_vectors); } -#define IP_ALIGNED(m) ((((uintptr_t)(m)->m_data) & 0x3) == 0x2) -#define CACHE_PTR_INCREMENT (CACHE_LINE_SIZE/sizeof(void*)) -#define CACHE_PTR_NEXT(ptr) ((void *)(((uintptr_t)(ptr)+CACHE_LINE_SIZE-1) & (CACHE_LINE_SIZE-1))) +#define IP_ALIGNED(m) ((((uintptr_t)(m)->m_data) & 0x3) == 0x2) +#define CACHE_PTR_INCREMENT (CACHE_LINE_SIZE / sizeof(void *)) +#define CACHE_PTR_NEXT(ptr) ((void *)(((uintptr_t)(ptr) + CACHE_LINE_SIZE - 1) & (CACHE_LINE_SIZE - 1))) -#define LINK_ACTIVE(ctx) ((ctx)->ifc_link_state == LINK_STATE_UP) -#define CTX_IS_VF(ctx) ((ctx)->ifc_sctx->isc_flags & IFLIB_IS_VF) +#define LINK_ACTIVE(ctx) ((ctx)->ifc_link_state == LINK_STATE_UP) +#define CTX_IS_VF(ctx) ((ctx)->ifc_sctx->isc_flags & IFLIB_IS_VF) typedef struct iflib_sw_rx_desc_array { bus_dmamap_t *ifsd_map; /* bus_dma maps for packet */ @@ -325,9 +325,9 @@ typedef struct iflib_sw_tx_desc_array { #define IFC_NETMAP_TX_IRQ 0x80000000 -#define CSUM_OFFLOAD (CSUM_IP_TSO|CSUM_IP6_TSO|CSUM_IP| \ - CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \ - CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP) +#define CSUM_OFFLOAD (CSUM_IP_TSO | CSUM_IP6_TSO | CSUM_IP | \ + CSUM_IP_UDP | CSUM_IP_TCP | CSUM_IP_SCTP | \ + CSUM_IP6_UDP | CSUM_IP6_TCP | CSUM_IP6_SCTP) struct iflib_txq { qidx_t ift_in_use; @@ -455,11 +455,11 @@ struct iflib_rxq { uint8_t ifr_ntxqirq; uint8_t ifr_txqid[IFLIB_MAX_TX_SHARED_INTR]; uint8_t ifr_fl_offset; - struct lro_ctrl ifr_lc; + struct lro_ctrl ifr_lc; struct grouptask ifr_task; struct callout ifr_watchdog; struct iflib_filter_info ifr_filter_info; - iflib_dma_info_t ifr_ifdi; + iflib_dma_info_t ifr_ifdi; /* dynamically allocate if any drivers need a value substantially larger than this */ struct if_rxd_frag ifr_frags[IFLIB_MAX_RX_SEGS] __aligned(CACHE_LINE_SIZE); @@ -483,8 +483,8 @@ typedef struct if_rxsd { #define RXD_INFO_SIZE 8 #define PKT_TYPE uint32_t #endif -#define PKT_LOOP_BOUND ((PKT_INFO_SIZE/3)*3) -#define RXD_LOOP_BOUND ((RXD_INFO_SIZE/4)*4) +#define PKT_LOOP_BOUND ((PKT_INFO_SIZE / 3) * 3) +#define RXD_LOOP_BOUND ((RXD_INFO_SIZE / 4) * 4) typedef struct if_pkt_info_pad { PKT_TYPE pkt_val[PKT_INFO_SIZE]; @@ -507,7 +507,7 @@ pkt_info_zero(if_pkt_info_t pi) #ifndef __LP64__ pi_pad->pkt_val[6] = 0; pi_pad->pkt_val[7] = 0; pi_pad->pkt_val[8] = 0; pi_pad->pkt_val[9] = 0; pi_pad->pkt_val[10] = 0; -#endif +#endif } static inline void @@ -519,12 +519,12 @@ rxd_info_zero(if_rxd_info_t ri) ri_pad = (if_rxd_info_pad_t)ri; for (i = 0; i < RXD_LOOP_BOUND; i += 4) { ri_pad->rxd_val[i] = 0; - ri_pad->rxd_val[i+1] = 0; - ri_pad->rxd_val[i+2] = 0; - ri_pad->rxd_val[i+3] = 0; + ri_pad->rxd_val[i + 1] = 0; + ri_pad->rxd_val[i + 2] = 0; + ri_pad->rxd_val[i + 3] = 0; } #ifdef __LP64__ - ri_pad->rxd_val[RXD_INFO_SIZE-1] = 0; + ri_pad->rxd_val[RXD_INFO_SIZE - 1] = 0; #endif } @@ -532,19 +532,19 @@ rxd_info_zero(if_rxd_info_t ri) * Only allow a single packet to take up most 1/nth of the tx ring */ #define MAX_SINGLE_PACKET_FRACTION 12 -#define IF_BAD_DMA (bus_addr_t)-1 +#define IF_BAD_DMA ((bus_addr_t)-1) -#define CTX_ACTIVE(ctx) ((if_getdrvflags((ctx)->ifc_ifp) & IFF_DRV_RUNNING)) +#define CTX_ACTIVE(ctx) ((if_getdrvflags((ctx)->ifc_ifp) & IFF_DRV_RUNNING)) -#define CTX_LOCK_INIT(_sc) sx_init(&(_sc)->ifc_ctx_sx, "iflib ctx lock") -#define CTX_LOCK(ctx) sx_xlock(&(ctx)->ifc_ctx_sx) -#define CTX_UNLOCK(ctx) sx_xunlock(&(ctx)->ifc_ctx_sx) -#define CTX_LOCK_DESTROY(ctx) sx_destroy(&(ctx)->ifc_ctx_sx) +#define CTX_LOCK_INIT(_sc) sx_init(&(_sc)->ifc_ctx_sx, "iflib ctx lock") +#define CTX_LOCK(ctx) sx_xlock(&(ctx)->ifc_ctx_sx) +#define CTX_UNLOCK(ctx) sx_xunlock(&(ctx)->ifc_ctx_sx) +#define CTX_LOCK_DESTROY(ctx) sx_destroy(&(ctx)->ifc_ctx_sx) -#define STATE_LOCK_INIT(_sc, _name) mtx_init(&(_sc)->ifc_state_mtx, _name, "iflib state lock", MTX_DEF) -#define STATE_LOCK(ctx) mtx_lock(&(ctx)->ifc_state_mtx) -#define STATE_UNLOCK(ctx) mtx_unlock(&(ctx)->ifc_state_mtx) -#define STATE_LOCK_DESTROY(ctx) mtx_destroy(&(ctx)->ifc_state_mtx) +#define STATE_LOCK_INIT(_sc, _name) mtx_init(&(_sc)->ifc_state_mtx, _name, "iflib state lock", MTX_DEF) +#define STATE_LOCK(ctx) mtx_lock(&(ctx)->ifc_state_mtx) +#define STATE_UNLOCK(ctx) mtx_unlock(&(ctx)->ifc_state_mtx) +#define STATE_LOCK_DESTROY(ctx) mtx_destroy(&(ctx)->ifc_state_mtx) #define CALLOUT_LOCK(txq) mtx_lock(&txq->ift_mtx) #define CALLOUT_UNLOCK(txq) mtx_unlock(&txq->ift_mtx) @@ -579,7 +579,7 @@ static SYSCTL_NODE(_net, OID_AUTO, iflib, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "iflib driver parameters"); /* - * XXX need to ensure that this can't accidentally cause the head to be moved backwards + * XXX need to ensure that this can't accidentally cause the head to be moved backwards */ static int iflib_min_tx_latency = 0; SYSCTL_INT(_net_iflib, OID_AUTO, min_tx_latency, CTLFLAG_RW, @@ -721,7 +721,7 @@ static void iflib_stop(if_ctx_t ctx); static void iflib_if_init_locked(if_ctx_t ctx); static void iflib_free_intr_mem(if_ctx_t ctx); #ifndef __NO_STRICT_ALIGNMENT -static struct mbuf * iflib_fixup_rx(struct mbuf *m); +static struct mbuf *iflib_fixup_rx(struct mbuf *m); #endif static SLIST_HEAD(cpu_offset_list, cpu_offset) cpu_offsets = @@ -745,7 +745,7 @@ iflib_num_rx_descs(if_ctx_t ctx) if_shared_ctx_t sctx = ctx->ifc_sctx; uint16_t first_rxq = (sctx->isc_flags & IFLIB_HAS_RXCQ) ? 1 : 0; - return scctx->isc_nrxd[first_rxq]; + return (scctx->isc_nrxd[first_rxq]); } static int @@ -755,7 +755,7 @@ iflib_num_tx_descs(if_ctx_t ctx) if_shared_ctx_t sctx = ctx->ifc_sctx; uint16_t first_txq = (sctx->isc_flags & IFLIB_HAS_TXCQ) ? 1 : 0; - return scctx->isc_ntxd[first_txq]; + return (scctx->isc_ntxd[first_txq]); } #ifdef DEV_NETMAP @@ -851,7 +851,7 @@ iflib_netmap_config(struct netmap_adapter *na, struct nm_config_info *info) info->num_tx_rings, info->num_rx_rings, info->num_tx_descs, info->num_rx_descs, info->rx_buf_maxsize); - return 0; + return (0); } static int @@ -925,7 +925,7 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, bool init) MPASS(i < IFLIB_MAX_RX_REFRESH); if (addr == NETMAP_BUF_BASE(na)) /* bad buf */ - return netmap_ring_reinit(kring); + return (netmap_ring_reinit(kring)); fl->ifl_bus_addrs[i] = paddr + nm_get_offset(kring, slot); @@ -1268,7 +1268,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int flags) if (n) { /* update the state variables */ if (netmap_no_pendintr && !force_update) { /* diagnostics */ - iflib_rx_miss ++; + iflib_rx_miss++; iflib_rx_miss_bufs += n; } kring->nr_hwtail = nm_i; @@ -1406,7 +1406,7 @@ prefetch2cachelines(void *x) { __asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); #if (CACHE_LINE_SIZE < 128) - __asm volatile("prefetcht0 %0" :: "m" (*(((unsigned long *)x)+CACHE_LINE_SIZE/(sizeof(unsigned long))))); + __asm volatile("prefetcht0 %0" :: "m" (*(((unsigned long *)x) + CACHE_LINE_SIZE / (sizeof(unsigned long))))); #endif } #else @@ -1474,7 +1474,7 @@ iflib_dma_alloc_align(if_ctx_t ctx, int size, int align, iflib_dma_info_t dma, i goto fail_0; } - err = bus_dmamem_alloc(dma->idi_tag, (void**) &dma->idi_vaddr, + err = bus_dmamem_alloc(dma->idi_tag, (void **)&dma->idi_vaddr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT | BUS_DMA_ZERO, &dma->idi_map); if (err) { device_printf(dev, @@ -1743,8 +1743,8 @@ iflib_txsd_alloc(iflib_txq_t txq) NULL, /* lockfunc */ NULL, /* lockfuncarg */ &txq->ift_buf_tag))) { - device_printf(dev,"Unable to allocate TX DMA tag: %d\n", err); - device_printf(dev,"maxsize: %ju nsegments: %d maxsegsize: %ju\n", + device_printf(dev, "Unable to allocate TX DMA tag: %d\n", err); + device_printf(dev, "maxsize: %ju nsegments: %d maxsegsize: %ju\n", (uintmax_t)sctx->isc_tx_maxsize, nsegments, (uintmax_t)sctx->isc_tx_maxsegsize); goto fail; } @@ -1954,7 +1954,7 @@ iflib_rxsd_alloc(iflib_rxq_t rxq) device_t dev = ctx->ifc_dev; iflib_fl_t fl; bus_addr_t lowaddr; - int err; + int err; MPASS(scctx->isc_nrxd[0] > 0); MPASS(scctx->isc_nrxd[rxq->ifr_fl_offset] > 0); @@ -2304,8 +2304,8 @@ iflib_fl_setup(iflib_fl_t fl) bit_nclear(fl->ifl_rx_bitmap, 0, fl->ifl_size - 1); /* - ** Free current RX buffer structs and their mbufs - */ + * Free current RX buffer structs and their mbufs + */ iflib_fl_bufs_free(fl); /* Now replenish the mbufs */ MPASS(fl->ifl_credits == 0); @@ -2435,7 +2435,7 @@ iflib_timer(void *arg) GROUPTASK_ENQUEUE(&txq->ift_task); sctx->isc_pause_frames = 0; - if (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING) + if (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING) callout_reset_on(&txq->ift_timer, iflib_timer_default, iflib_timer, txq, txq->ift_timer.c_cpu); return; @@ -2446,7 +2446,7 @@ iflib_timer(void *arg) txq->ift_id, TXQ_AVAIL(txq), txq->ift_pidx); STATE_LOCK(ctx); if_setdrvflagbits(ctx->ifc_ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); - ctx->ifc_flags |= (IFC_DO_WATCHDOG|IFC_DO_RESET); + ctx->ifc_flags |= (IFC_DO_WATCHDOG | IFC_DO_RESET); iflib_admin_intr_deferred(ctx); STATE_UNLOCK(ctx); } @@ -2670,8 +2670,8 @@ calc_next_rxd(iflib_fl_t fl, int cidx) if (__predict_false(size == 0)) return (start); - cur = start + size*cidx; - end = start + size*nrxd; + cur = start + size * cidx; + end = start + size * nrxd; next = CACHE_PTR_NEXT(cur); return (next < end ? next : start); } @@ -2683,19 +2683,19 @@ prefetch_pkts(iflib_fl_t fl, int cidx) int nrxd = fl->ifl_size; caddr_t next_rxd; - nextptr = (cidx + CACHE_PTR_INCREMENT) & (nrxd-1); + nextptr = (cidx + CACHE_PTR_INCREMENT) & (nrxd - 1); prefetch(&fl->ifl_sds.ifsd_m[nextptr]); prefetch(&fl->ifl_sds.ifsd_cl[nextptr]); next_rxd = calc_next_rxd(fl, cidx); prefetch(next_rxd); - prefetch(fl->ifl_sds.ifsd_m[(cidx + 1) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_m[(cidx + 2) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_m[(cidx + 3) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_m[(cidx + 4) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_cl[(cidx + 1) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_cl[(cidx + 2) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_cl[(cidx + 3) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_cl[(cidx + 4) & (nrxd-1)]); + prefetch(fl->ifl_sds.ifsd_m[(cidx + 1) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_m[(cidx + 2) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_m[(cidx + 3) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_m[(cidx + 4) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_cl[(cidx + 1) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_cl[(cidx + 2) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_cl[(cidx + 3) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_cl[(cidx + 4) & (nrxd - 1)]); } static struct mbuf * @@ -2720,7 +2720,7 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, bool unload, if_rxsd_t sd, #endif if (rxq->ifr_ctx->ifc_flags & IFC_PREFETCH) prefetch_pkts(fl, cidx); - next = (cidx + CACHE_PTR_INCREMENT) & (fl->ifl_size-1); + next = (cidx + CACHE_PTR_INCREMENT) & (fl->ifl_size - 1); prefetch(&fl->ifl_sds.ifsd_map[next]); map = fl->ifl_sds.ifsd_map[cidx]; @@ -2768,7 +2768,7 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, bool unload, if_rxsd_t sd, if (unload && irf->irf_len != 0) bus_dmamap_unload(fl->ifl_buf_tag, map); - fl->ifl_cidx = (fl->ifl_cidx + 1) & (fl->ifl_size-1); + fl->ifl_cidx = (fl->ifl_cidx + 1) & (fl->ifl_size - 1); if (__predict_false(fl->ifl_cidx == 0)) fl->ifl_gen = 0; bit_clear(fl->ifl_rx_bitmap, cidx); @@ -2812,7 +2812,7 @@ assemble_segments(iflib_rxq_t rxq, if_rxd_info_t ri, if_rxsd_t sd, int *pf_rv) continue; } if (mh == NULL) { - flags = M_PKTHDR|M_EXT; + flags = M_PKTHDR | M_EXT; mh = mt = m; padlen = ri->iri_pad; } else { @@ -2913,16 +2913,16 @@ iflib_check_lro_possible(struct mbuf *m, bool v4_forwarding, bool v6_forwarding) eh = mtod(m, struct ether_header *); switch (eh->ether_type) { #if defined(INET6) - case htons(ETHERTYPE_IPV6): - return (!v6_forwarding); + case htons(ETHERTYPE_IPV6): + return (!v6_forwarding); #endif -#if defined (INET) - case htons(ETHERTYPE_IP): - return (!v4_forwarding); +#if defined(INET) + case htons(ETHERTYPE_IP): + return (!v4_forwarding); #endif } - return false; + return (false); } #else static void @@ -3058,8 +3058,8 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) mt = mf = NULL; } } - if ((m->m_pkthdr.csum_flags & (CSUM_L4_CALC|CSUM_L4_VALID)) == - (CSUM_L4_CALC|CSUM_L4_VALID)) { + if ((m->m_pkthdr.csum_flags & (CSUM_L4_CALC | CSUM_L4_VALID)) == + (CSUM_L4_CALC | CSUM_L4_VALID)) { if (lro_possible && tcp_lro_rx(&rxq->ifr_lc, m, 0) == 0) continue; } @@ -3102,15 +3102,15 @@ err: return (0); } -#define TXD_NOTIFY_COUNT(txq) (((txq)->ift_size / (txq)->ift_update_freq)-1) +#define TXD_NOTIFY_COUNT(txq) (((txq)->ift_size / (txq)->ift_update_freq) - 1) static inline qidx_t txq_max_db_deferred(iflib_txq_t txq, qidx_t in_use) { qidx_t notify_count = TXD_NOTIFY_COUNT(txq); qidx_t minthresh = txq->ift_size / 8; - if (in_use > 4*minthresh) + if (in_use > 4 * minthresh) return (notify_count); - if (in_use > 2*minthresh) + if (in_use > 2 * minthresh) return (notify_count >> 1); if (in_use > minthresh) return (notify_count >> 3); @@ -3122,21 +3122,21 @@ txq_max_rs_deferred(iflib_txq_t txq) { qidx_t notify_count = TXD_NOTIFY_COUNT(txq); qidx_t minthresh = txq->ift_size / 8; - if (txq->ift_in_use > 4*minthresh) + if (txq->ift_in_use > 4 * minthresh) return (notify_count); - if (txq->ift_in_use > 2*minthresh) + if (txq->ift_in_use > 2 * minthresh) return (notify_count >> 1); if (txq->ift_in_use > minthresh) return (notify_count >> 2); return (2); } -#define M_CSUM_FLAGS(m) ((m)->m_pkthdr.csum_flags) -#define M_HAS_VLANTAG(m) (m->m_flags & M_VLANTAG) +#define M_CSUM_FLAGS(m) ((m)->m_pkthdr.csum_flags) +#define M_HAS_VLANTAG(m) (m->m_flags & M_VLANTAG) -#define TXQ_MAX_DB_DEFERRED(txq, in_use) txq_max_db_deferred((txq), (in_use)) -#define TXQ_MAX_RS_DEFERRED(txq) txq_max_rs_deferred(txq) -#define TXQ_MAX_DB_CONSUMED(size) (size >> 4) +#define TXQ_MAX_DB_DEFERRED(txq, in_use) txq_max_db_deferred((txq), (in_use)) +#define TXQ_MAX_RS_DEFERRED(txq) txq_max_rs_deferred(txq) +#define TXQ_MAX_DB_CONSUMED(size) (size >> 4) /* forward compatibility for cxgb */ #define FIRST_QSET(ctx) 0 @@ -3441,7 +3441,7 @@ iflib_parse_header(iflib_txq_t txq, if_pkt_info_t pi, struct mbuf **mp) } } if ((sctx->isc_flags & IFLIB_NEED_ZERO_CSUM) && (pi->ipi_csum_flags & CSUM_IP)) - ip->ip_sum = 0; + ip->ip_sum = 0; break; } @@ -3541,8 +3541,8 @@ calc_next_txd(iflib_txq_t txq, int cidx, uint8_t qid) if (__predict_false(size == 0)) return (start); - cur = start + size*cidx; - end = start + size*ntxd; + cur = start + size * cidx; + end = start + size * ntxd; next = CACHE_PTR_NEXT(cur); return (next < end ? next : start); } @@ -3569,7 +3569,7 @@ iflib_ether_pad(device_t dev, struct mbuf **m_head, uint16_t min_frame_size) device_printf(dev, "cannot pad short frame, m_dup() failed"); DBG_COUNTER_INC(encap_pad_mbuf_fail); DBG_COUNTER_INC(tx_frees); - return ENOMEM; + return (ENOMEM); } m_freem(*m_head); *m_head = new_head; @@ -3588,7 +3588,7 @@ iflib_ether_pad(device_t dev, struct mbuf **m_head, uint16_t min_frame_size) return (ENOBUFS); } - return 0; + return (0); } static int @@ -3620,7 +3620,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) cidx = txq->ift_cidx; pidx = txq->ift_pidx; if (ctx->ifc_flags & IFC_PREFETCH) { - next = (cidx + CACHE_PTR_INCREMENT) & (ntxd-1); + next = (cidx + CACHE_PTR_INCREMENT) & (ntxd - 1); if (!(ctx->ifc_flags & IFLIB_HAS_TXCQ)) { next_txd = calc_next_txd(txq, cidx, 0); prefetch(next_txd); @@ -3629,7 +3629,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) /* prefetch the next cache line of mbuf pointers and flags */ prefetch(&txq->ift_sds.ifsd_m[next]); prefetch(&txq->ift_sds.ifsd_map[next]); - next = (cidx + CACHE_LINE_SIZE) & (ntxd-1); + next = (cidx + CACHE_LINE_SIZE) & (ntxd - 1); } map = txq->ift_sds.ifsd_map[pidx]; ifsd_m = txq->ift_sds.ifsd_m; @@ -3650,13 +3650,13 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) err = iflib_ether_pad(ctx->ifc_dev, m_headp, scctx->isc_min_frame_size); if (err) { DBG_COUNTER_INC(encap_txd_encap_fail); - return err; + return (err); } } m_head = *m_headp; pkt_info_zero(&pi); - pi.ipi_mflags = (m_head->m_flags & (M_VLANTAG|M_BCAST|M_MCAST)); + pi.ipi_mflags = (m_head->m_flags & (M_VLANTAG | M_BCAST | M_MCAST)); pi.ipi_pidx = pidx; pi.ipi_qsidx = txq->ift_id; pi.ipi_len = m_head->m_pkthdr.len; @@ -3762,7 +3762,7 @@ defrag: txq->ift_gen = 1; } /* - * drivers can need as many as + * drivers can need as many as * two sentinels */ MPASS(ndesc <= pi.ipi_nsegs + 2); @@ -3814,7 +3814,7 @@ iflib_tx_desc_free(iflib_txq_t txq, int n) cidx = txq->ift_cidx; gen = txq->ift_gen; qsize = txq->ift_size; - mask = qsize-1; + mask = qsize - 1; ifsd_m = txq->ift_sds.ifsd_m; do_prefetch = (txq->ift_ctx->ifc_flags & IFC_PREFETCH); @@ -3895,17 +3895,17 @@ _ring_peek_one(struct ifmp_ring *r, int cidx, int offset, int remaining) struct mbuf **items; size = r->size; - next = (cidx + CACHE_PTR_INCREMENT) & (size-1); + next = (cidx + CACHE_PTR_INCREMENT) & (size - 1); items = __DEVOLATILE(struct mbuf **, &r->items[0]); - prefetch(items[(cidx + offset) & (size-1)]); + prefetch(items[(cidx + offset) & (size - 1)]); if (remaining > 1) { prefetch2cachelines(&items[next]); - prefetch2cachelines(items[(cidx + offset + 1) & (size-1)]); - prefetch2cachelines(items[(cidx + offset + 2) & (size-1)]); - prefetch2cachelines(items[(cidx + offset + 3) & (size-1)]); + prefetch2cachelines(items[(cidx + offset + 1) & (size - 1)]); + prefetch2cachelines(items[(cidx + offset + 2) & (size - 1)]); + prefetch2cachelines(items[(cidx + offset + 3) & (size - 1)]); } - return (__DEVOLATILE(struct mbuf **, &r->items[(cidx + offset) & (size-1)])); + return (__DEVOLATILE(struct mbuf **, &r->items[(cidx + offset) & (size - 1)])); } static void @@ -3955,9 +3955,9 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx) */ DBG_COUNTER_INC(txq_drain_flushing); for (i = 0; i < avail; i++) { - if (__predict_true(r->items[(cidx + i) & (r->size-1)] != (void *)txq)) - m_freem(r->items[(cidx + i) & (r->size-1)]); - r->items[(cidx + i) & (r->size-1)] = NULL; + if (__predict_true(r->items[(cidx + i) & (r->size - 1)] != (void *)txq)) + m_freem(r->items[(cidx + i) & (r->size - 1)]); + r->items[(cidx + i) & (r->size - 1)] = NULL; } return (avail); } @@ -4187,7 +4187,7 @@ _task_fn_admin(void *context) do_reset = (ctx->ifc_flags & IFC_DO_RESET); do_watchdog = (ctx->ifc_flags & IFC_DO_WATCHDOG); in_detach = (ctx->ifc_flags & IFC_IN_DETACH); - ctx->ifc_flags &= ~(IFC_DO_RESET|IFC_DO_WATCHDOG); + ctx->ifc_flags &= ~(IFC_DO_RESET | IFC_DO_WATCHDOG); STATE_UNLOCK(ctx); if ((!running && !oactive) && !(ctx->ifc_sctx->isc_flags & IFLIB_ADMIN_ALWAYS_RUN)) @@ -4343,7 +4343,7 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) } while (next != NULL); if (count > nitems(marr)) - if ((mp = malloc(count*sizeof(struct mbuf *), M_IFLIB, M_NOWAIT)) == NULL) { + if ((mp = malloc(count * sizeof(struct mbuf *), M_IFLIB, M_NOWAIT)) == NULL) { /* XXX check nextpkt */ m_freem(m); /* XXX simplify for now */ @@ -4482,11 +4482,11 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) avoid_reset = true; #endif /* - ** Calling init results in link renegotiation, - ** so we avoid doing it when possible. - */ + * Calling init results in link renegotiation, + * so we avoid doing it when possible. + */ if (avoid_reset) { - if_setflagbits(ifp, IFF_UP,0); + if_setflagbits(ifp, IFF_UP, 0); if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) reinit = 1; #ifdef INET @@ -4588,7 +4588,7 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) mask &= ctx->ifc_softc_ctx.isc_capabilities | IFCAP_MEXTPG; setmask = 0; #ifdef TCP_OFFLOAD - setmask |= mask & (IFCAP_TOE4|IFCAP_TOE6); + setmask |= mask & (IFCAP_TOE4 | IFCAP_TOE6); #endif setmask |= (mask & IFCAP_FLAGS); setmask |= (mask & IFCAP_WOL); @@ -4913,15 +4913,15 @@ find_child_with_core(int cpu, struct cpu_group *grp) int i; if (grp->cg_children == 0) - return -1; + return (-1); MPASS(grp->cg_child); for (i = 0; i < grp->cg_children; i++) { if (CPU_ISSET(cpu, &grp->cg_child[i].cg_mask)) - return i; + return (i); } - return -1; + return (-1); } @@ -4938,7 +4938,7 @@ find_l2_neighbor(int cpu) grp = cpu_top; if (grp == NULL) - return -1; + return (-1); /* * Find the smallest CPU group that contains the given core. @@ -4957,7 +4957,7 @@ find_l2_neighbor(int cpu) /* Must share L2. */ if (grp->cg_level > CG_SHARE_L2 || grp->cg_level == CG_SHARE_NONE) - return -1; + return (-1); /* * Select the first member of the set that isn't the reference @@ -5198,10 +5198,10 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct int err, msix, rid; int num_txd, num_rxd; - ctx = malloc(sizeof(* ctx), M_IFLIB, M_WAITOK|M_ZERO); + ctx = malloc(sizeof(*ctx), M_IFLIB, M_WAITOK | M_ZERO); if (sc == NULL) { - sc = malloc(sctx->isc_driver->size, M_IFLIB, M_WAITOK|M_ZERO); + sc = malloc(sctx->isc_driver->size, M_IFLIB, M_WAITOK | M_ZERO); device_set_softc(dev, ctx); ctx->ifc_flags |= IFC_SC_ALLOCATED; } @@ -5285,7 +5285,7 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct } if (scctx->isc_rss_table_size == 0) scctx->isc_rss_table_size = 64; - scctx->isc_rss_table_mask = scctx->isc_rss_table_size-1; + scctx->isc_rss_table_mask = scctx->isc_rss_table_size - 1; GROUPTASK_INIT(&ctx->ifc_admin_task, 0, _task_fn_admin, ctx); /* XXX format name */ @@ -5302,16 +5302,16 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct MPASS(CPU_COUNT(&ctx->ifc_cpus) > 0); /* - ** Now set up MSI or MSI-X, should return us the number of supported - ** vectors (will be 1 for a legacy interrupt and MSI). - */ + * Now set up MSI or MSI-X, should return us the number of supported + * vectors (will be 1 for a legacy interrupt and MSI). + */ if (sctx->isc_flags & IFLIB_SKIP_MSIX) { msix = scctx->isc_vectors; } else if (scctx->isc_msix_bar != 0) - /* - * The simple fact that isc_msix_bar is not 0 does not mean we - * we have a good value there that is known to work. - */ + /* + * The simple fact that isc_msix_bar is not 0 does not mean we + * we have a good value there that is known to work. + */ msix = iflib_msix_init(ctx); else { scctx->isc_vectors = 1; @@ -5583,7 +5583,7 @@ iflib_device_suspend(device_t dev) IFDI_SUSPEND(ctx); CTX_UNLOCK(ctx); - return bus_generic_suspend(dev); + return (bus_generic_suspend(dev)); } int iflib_device_shutdown(device_t dev) @@ -5594,7 +5594,7 @@ iflib_device_shutdown(device_t dev) IFDI_SHUTDOWN(ctx); CTX_UNLOCK(ctx); - return bus_generic_suspend(dev); + return (bus_generic_suspend(dev)); } int @@ -5981,20 +5981,20 @@ iflib_queues_alloc(if_ctx_t ctx) goto err_rx_desc; } - for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) + for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) fl->ifl_rx_bitmap = bit_alloc(fl->ifl_size, M_IFLIB, M_WAITOK); } /* TXQs */ - vaddrs = malloc(sizeof(caddr_t)*ntxqsets*ntxqs, M_IFLIB, M_WAITOK); - paddrs = malloc(sizeof(uint64_t)*ntxqsets*ntxqs, M_IFLIB, M_WAITOK); + vaddrs = malloc(sizeof(caddr_t) * ntxqsets * ntxqs, M_IFLIB, M_WAITOK); + paddrs = malloc(sizeof(uint64_t) * ntxqsets * ntxqs, M_IFLIB, M_WAITOK); for (i = 0; i < ntxqsets; i++) { iflib_dma_info_t di = ctx->ifc_txqs[i].ift_ifdi; for (j = 0; j < ntxqs; j++, di++) { - vaddrs[i*ntxqs + j] = di->idi_vaddr; - paddrs[i*ntxqs + j] = di->idi_paddr; + vaddrs[i * ntxqs + j] = di->idi_vaddr; + paddrs[i * ntxqs + j] = di->idi_paddr; } } if ((err = IFDI_TX_QUEUES_ALLOC(ctx, vaddrs, paddrs, ntxqs, ntxqsets)) != 0) { @@ -6009,14 +6009,14 @@ iflib_queues_alloc(if_ctx_t ctx) free(paddrs, M_IFLIB); /* RXQs */ - vaddrs = malloc(sizeof(caddr_t)*nrxqsets*nrxqs, M_IFLIB, M_WAITOK); - paddrs = malloc(sizeof(uint64_t)*nrxqsets*nrxqs, M_IFLIB, M_WAITOK); + vaddrs = malloc(sizeof(caddr_t) * nrxqsets * nrxqs, M_IFLIB, M_WAITOK); + paddrs = malloc(sizeof(uint64_t) * nrxqsets * nrxqs, M_IFLIB, M_WAITOK); for (i = 0; i < nrxqsets; i++) { iflib_dma_info_t di = ctx->ifc_rxqs[i].ifr_ifdi; for (j = 0; j < nrxqs; j++, di++) { - vaddrs[i*nrxqs + j] = di->idi_vaddr; - paddrs[i*nrxqs + j] = di->idi_paddr; + vaddrs[i * nrxqs + j] = di->idi_vaddr; + paddrs[i * nrxqs + j] = di->idi_paddr; } } if ((err = IFDI_RX_QUEUES_ALLOC(ctx, vaddrs, paddrs, nrxqs, nrxqsets)) != 0) { @@ -6517,7 +6517,7 @@ void iflib_config_gtask_deinit(struct grouptask *gtask) { - taskqgroup_detach(qgroup_if_config_tqg, gtask); + taskqgroup_detach(qgroup_if_config_tqg, gtask); } void @@ -6742,11 +6742,11 @@ msi: scctx->isc_ntxqsets = 1; scctx->isc_vectors = vectors; if (vectors == 1 && pci_alloc_msi(dev, &vectors) == 0) { - device_printf(dev,"Using an MSI interrupt\n"); + device_printf(dev, "Using an MSI interrupt\n"); scctx->isc_intr = IFLIB_INTR_MSI; } else { scctx->isc_vectors = 1; - device_printf(dev,"Using a Legacy interrupt\n"); + device_printf(dev, "Using a Legacy interrupt\n"); scctx->isc_intr = IFLIB_INTR_LEGACY; } @@ -6779,7 +6779,7 @@ mp_ring_state_handler(SYSCTL_HANDLER_ARGS) state[0], state[1], state[2], ring_state); rc = sbuf_finish(sb); sbuf_delete(sb); - return(rc); + return (rc); } enum iflib_ndesc_handler { @@ -6798,7 +6798,7 @@ mp_ndesc_handler(SYSCTL_HANDLER_ARGS) int nqs, rc, i; nqs = 8; - switch(type) { + switch (type) { case IFLIB_NTXD_HANDLER: ndesc = ctx->ifc_sysctl_ntxds; if (ctx->ifc_sctx) @@ -6816,7 +6816,7 @@ mp_ndesc_handler(SYSCTL_HANDLER_ARGS) if (nqs == 0) nqs = 8; - for (i=0; i<8; i++) { + for (i = 0; i < 8; i++) { if (i >= nqs) break; if (i) @@ -6826,14 +6826,14 @@ mp_ndesc_handler(SYSCTL_HANDLER_ARGS) rc = sysctl_handle_string(oidp, buf, sizeof(buf), req); if (rc || req->newptr == NULL) - return rc; + return (rc); for (i = 0, next = buf, p = strsep(&next, " ,"); i < 8 && p; i++, p = strsep(&next, " ,")) { ndesc[i] = strtoul(p, NULL, 10); } - return(rc); + return (rc); } #define NAME_BUFLEN 32 From nobody Thu Sep 26 05:20:43 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 4XDhkz5pn0z5YD6K; Thu, 26 Sep 2024 05:20:43 +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 4XDhkz2sdXz4hKS; Thu, 26 Sep 2024 05:20:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727328043; 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=Ae2Nx1oNrACxDDSfkKXGlpjDTVz4n/rvJM0qblJXRHc=; b=Qkkmnv+t8sjlXeSGVsmDqui4fQ2+9pz77dzJ3dHgJmfArEAOsFvVxFGLlbLXcLA4kIByHY BfLKpIEJahiuTf2igKjsU9h8fGBF+lTyl8gy5P+KUlRMgwM8CURsEqy9KmOARiGrDJYSv6 aPTL2WwcvfSm0LUDBizV0CL42gguZ2FuDKDUimTwJTlqVu7rQZb6Vp/g6QgLOboCZSa//v KxccahRbleqJ+znpLz7ScQ/M2GzxYRHlDgLX/AuboBBNy8+DqXwqTzNNRu6vHAhUqWvm11 9Bg6UZolofXgTFukR4rIQ21X1xUEFmseO1YrTL8G+qDQZk/Wiw7y5l6IzmEBqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727328043; 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=Ae2Nx1oNrACxDDSfkKXGlpjDTVz4n/rvJM0qblJXRHc=; b=GEs05Y425O98pDg33ZOaTNjZjqCS2xm+eeSnqpEtiL3x6S44MhW+xeJnq1kdkL/2Yfj/r8 gYkKwpg3/1nZ0iCMjJDWz6CDl7W+L4MVn4SWLbTlsUuDDIflIa3AbqqxcCEX0vnubjtayg Id1Dcs8/ts/1pil1xLqJhNoJsiFgClDs/bNnbINTgB8ZZZSD5tjybSRj0pPTWABKqmV53U 9cXo3J5/moYX42N9xZLF12/2oqCzvxFFwwcBhge3lMCYjPsTeCRBvGkHz/nRwCubHo+E9q PVM00ngqliYegVctMjJWx+UCIbMEPgOQ7VypPUyX40hpnjgspXqFLoMf8g2mqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727328043; a=rsa-sha256; cv=none; b=u0fO8zPmRPjUO5jh0eqZ536DoQJ6KV5/20ohKmD+WZxKS53eZBONz+FF/cK81PuI7lrm6q eNjLfu5F1Xr9ESqL3g99/ekcSTFpo58OfRiESIGnxQZ+DCuXTrhA4CsCy/4JmwviYo/ynS Wd4OinBPFpLlSXEDWPKAyAbQOZAmVISDv7EoAl/BJYQAmRMvJ5PDSP7sZXIGiH+Ue+AGdH 4SckHmEoGIDxHbIx8h4BKGYUfw636x/GsqnUMRM95fXzAFtviqVzzrQiYHFIIoI9nzWba7 d9Qig9oKEEF2Ie1KC378TudQIc7dT8JYsGGx7QEknioTiGBHmSqAC6xKoW4B8g== 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 4XDhkz2ThkzjNM; Thu, 26 Sep 2024 05:20:43 +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 48Q5Kh8J079730; Thu, 26 Sep 2024 05:20:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q5KhgK079727; Thu, 26 Sep 2024 05:20:43 GMT (envelope-from git) Date: Thu, 26 Sep 2024 05:20:43 GMT Message-Id: <202409260520.48Q5KhgK079727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: a8eb9e3844da - stable/14 - iflib: Prefer C99's __func__ over GCC's __FUNCTION__ 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a8eb9e3844dacbf2c3d7e8e85b7fe23c2ea7f7eb Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=a8eb9e3844dacbf2c3d7e8e85b7fe23c2ea7f7eb commit a8eb9e3844dacbf2c3d7e8e85b7fe23c2ea7f7eb Author: Zhenlei Huang AuthorDate: 2024-09-22 02:07:38 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-26 05:19:01 +0000 iflib: Prefer C99's __func__ over GCC's __FUNCTION__ MFC after: 3 days (cherry picked from commit b90ba458dcaecc4041e008b99fde003bc9867a0d) --- sys/net/iflib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index c6a01624436c..63a2f6be5b5e 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -3874,7 +3874,7 @@ iflib_completed_tx_reclaim(iflib_txq_t txq, int thresh) if (reclaim <= thresh /* + MAX_TX_DESC(txq->ift_ctx) */) { #ifdef INVARIANTS if (iflib_verbose_debug) { - printf("%s processed=%ju cleaned=%ju tx_nsegments=%d reclaim=%d thresh=%d\n", __FUNCTION__, + printf("%s processed=%ju cleaned=%ju tx_nsegments=%d reclaim=%d thresh=%d\n", __func__, txq->ift_processed, txq->ift_cleaned, txq->ift_ctx->ifc_softc_ctx.isc_tx_nsegments, reclaim, thresh); } @@ -3980,7 +3980,7 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx) count = MIN(avail, TX_BATCH_SIZE); #ifdef INVARIANTS if (iflib_verbose_debug) - printf("%s avail=%d ifc_flags=%x txq_avail=%d ", __FUNCTION__, + printf("%s avail=%d ifc_flags=%x txq_avail=%d ", __func__, avail, ctx->ifc_flags, TXQ_AVAIL(txq)); #endif do_prefetch = (ctx->ifc_flags & IFC_PREFETCH); From nobody Thu Sep 26 06:05:08 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 4XDjkD5wtvz5YGSt; Thu, 26 Sep 2024 06:05:08 +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 4XDjkD39X8z4m9p; Thu, 26 Sep 2024 06:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727330708; 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=wxwd7zf2doNkHelNqK6yI2Kx8gJ/91by93b2Vqkr6C4=; b=EWyC4YR80UZO+VXVwxbCgk+lF8v/MuUIQu6vna/pcdUB240oRjbpixhL7AUaAPpjOd/AhC lIYIcTwBrPestnYIqpr7KOcqSvdGCPBOUZjwfEZp2F74G/OLPCgUt3QGLyRe1as8t/THwF N2L1Fkbzv/FCYIczdSOqxjgvHXU9b0R1ygNuNu0l8YHDiFvDbTL5nib4xckyt+Uac3kDCY lCfa139s2QisQpszUnxJNP5xXFf5N9wJ/F1+0faLhht4zS24TZWKBld0ipVsRIHB0FxDQT pAyM/jwwfjzPUT368G43AMjMpl+DKaMwQ4ANZimjdKFqYya0QOq3zN2lkhShwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727330708; 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=wxwd7zf2doNkHelNqK6yI2Kx8gJ/91by93b2Vqkr6C4=; b=A/+F5z1IJnNJvqfdXSY+6XtpOaj/+OthVH6gXUqUnDFgB4X2qK/K16m378I+7974Gun7mb 78XhkqbYPlMISKilHrecv0pnfcMV3tZYzALMgKbZwe11QT+LxOIGmTUrLLCuljA75eBS/x y6PCuOVySYYJBPiDanhnaMV52F8t1RAW3DjlfK2k9Q09A6YGU5SuB7L46+hGWvYwbuTKCX c6yHjDXHb4y8/up3UFZiY+YgiYLzvGhrP7r+dZC7UkbmZVbqNkURSDzzuO81+3mP7iwPTX wP+uIRSsgie+UH4i1f7qbNQmlCe0zD2QuMVpLi6FZ1ZAPxLZvf1UUFWkYLzkCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727330708; a=rsa-sha256; cv=none; b=ZQYr41fTuOYsTL3vc0NR5EzyoUvdY85hd9ah00SNFi0vdtqP9QhOInBcZGJ4Hb/EVanmOW S9OYVLI9Km16tfGd0BTbw3QrtGwuxI0CfZjisFyGRWxL1rz48EwileFxSlstKF0bma4Wi/ WIj+YfKMZUQwxOAA3I9EZ6TWAby9SAST6hB8igXHwhaMrq8Dq18TnKS6fW/O1OUKt+PZAu u+yeX4ywE2f+EKxCl3WHp2dkOvhY03swniXlziPEHRx06B/fhZ4QCcnS8fAeEVeE8SrcHw xWdbCp4fiVljWR5AyRzB8GehtstwMvEf8J6ZXC7q1An5CmIcOJWg8N4zV1oAXA== 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 4XDjkD2nXjzlSG; Thu, 26 Sep 2024 06:05:08 +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 48Q6581D053817; Thu, 26 Sep 2024 06:05:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q658Gp053814; Thu, 26 Sep 2024 06:05:08 GMT (envelope-from git) Date: Thu, 26 Sep 2024 06:05:08 GMT Message-Id: <202409260605.48Q658Gp053814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 3f2792166aee - main - MAC: improve consistency in error handling 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f2792166aeed4baf07d351bcb12a9d196c443eb Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=3f2792166aeed4baf07d351bcb12a9d196c443eb commit 3f2792166aeed4baf07d351bcb12a9d196c443eb Author: Michael Tuexen AuthorDate: 2024-09-26 06:02:06 +0000 Commit: Michael Tuexen CommitDate: 2024-09-26 06:04:54 +0000 MAC: improve consistency in error handling Whenever mac_syncache_init() returns an error, ensure that *label = NULL. This simplifies the error handling by the caller. Reviewed by: rscheff MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46701 --- sys/security/mac/mac_inet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/security/mac/mac_inet.c b/sys/security/mac/mac_inet.c index 29a355071065..9770fa840f95 100644 --- a/sys/security/mac/mac_inet.c +++ b/sys/security/mac/mac_inet.c @@ -485,6 +485,7 @@ mac_syncache_init(struct label **label) MAC_POLICY_PERFORM_NOSLEEP(syncache_destroy_label, *label); mac_labelzone_free(*label); + *label = NULL; } return (error); } else From nobody Thu Sep 26 06:08:44 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 4XDjpP01KLz5YGlb; Thu, 26 Sep 2024 06:08:45 +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 4XDjpN6Gxnz4mCw; Thu, 26 Sep 2024 06:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727330924; 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=MBuM2URTHhlLjATQUICETvw1Ya6wsSz+xUWJVGxpeyU=; b=LoO3OBcBlcj4v1tll7N6dXmjoZjKaWyyPcZVnGF3r75bay25tUPpa8sitHo2v1/QnYn42A mJO0T4yHxXCMZcGKZ7NsVHDQdPsRAD4mdRAfE16ocWutQ8gHKqW8BfZBTwzeDj8cUngByY vhd6RK+igrpYR4rFxZ/3NU3JPhcLWALldANxUSPubqbCAWgTLYKLDG+pLxgQ5GVx4qOg7z k7fTgGDF4da2byuXsEXdG7rAEXlenZlHzMhltMR5xDgqpaNgeleeX74H9kaD8mQdSzy1Z6 lWn+wsXkTBXPnbj/ThOLg+ZcKfHWRZ5sY6j2yO1kCPIA24Pmg2J10kqIPr1pCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727330924; 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=MBuM2URTHhlLjATQUICETvw1Ya6wsSz+xUWJVGxpeyU=; b=skCuIVPqYDnIVjaAT7BAJjrLeGvldPk/4ajmc+zi2a9FGyXiXtn1byNWbHhH4qHKmVc2vR yvxY1XItKtFkvo0gf2+xQ/mp7VFmHZQkMyo/9P2ukG3v/gWTFSxthR/IBbcpGxznN0Qa42 mH6pI6mzsQzXwwONw29tHCoCzkq7nzUPz9pAEDaIT1BnCsfUSGViUud/aG6gpoi1OIT5vH zVs67Tc/2CQbf+K43ZdhIr6OqWP9tgauALZLNtUpqvxk5eNjJQF5UYCpf6JKyI0ppHQ8qJ aRHnN2Uu5duyUtA+nhaDQCrbW+qBq9w6nc7jhTX3g606fYf0qAOChwNYfKG3ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727330924; a=rsa-sha256; cv=none; b=m4d0dniDDrL2gqWSW4h0LQXJJIDCACx+34KTYfj2lHmudbej3PBAKFiy+nb8sXA/1I7R9I VSJbGChNjoG9CzsBJFL8Q9mSSmQPjxV/DzHLlkPzgj53UENX/EK55yx29Yn1NezjmUw//P 4amORXTB83uEKzc+fa37ImEuJt3zUwYEMyo7L5oStTkFiuR8gCfbDJ4L32rtISemdTaNVm rSyEFzPluN8ZI7I+pP9Ld+3nHcIK7HSU+Rv4yQ6uWGhFMOMCRVF+sNsJ3uUJyhBwwrjJkP Ravq9nk0PshF97yNdmrbeESvZawfr4bOcZelUMlh3N4aO0cCWNaEvpUrjSKcqg== 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 4XDjpN5sjnzlSK; Thu, 26 Sep 2024 06:08:44 +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 48Q68ihA054406; Thu, 26 Sep 2024 06:08:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q68iSB054403; Thu, 26 Sep 2024 06:08:44 GMT (envelope-from git) Date: Thu, 26 Sep 2024 06:08:44 GMT Message-Id: <202409260608.48Q68iSB054403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 2fb778fab893 - main - MAC: improve handling of listening sockets 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2fb778fab893b4a8a86ecfa20acf2e23bb2cdae8 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2fb778fab893b4a8a86ecfa20acf2e23bb2cdae8 commit 2fb778fab893b4a8a86ecfa20acf2e23bb2cdae8 Author: Michael Tuexen AuthorDate: 2024-09-26 06:06:24 +0000 Commit: Michael Tuexen CommitDate: 2024-09-26 06:06:24 +0000 MAC: improve handling of listening sockets so_peerlabel can only be used when the socket is not listening. Reviewed by: markj MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46755 --- sys/kern/uipc_socket.c | 5 +++++ sys/security/mac/mac_internal.h | 1 + sys/security/mac/mac_socket.c | 19 +++++++++++++------ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index e83422e3a29f..189e8ca5b498 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -153,6 +153,7 @@ #include #include +#include #include @@ -1485,6 +1486,10 @@ solisten_proto(struct socket *so, int backlog) sbrcv_timeo = so->so_rcv.sb_timeo; sbsnd_timeo = so->so_snd.sb_timeo; +#ifdef MAC + mac_socketpeer_label_free(so->so_peerlabel); +#endif + if (!(so->so_proto->pr_flags & PR_SOCKBUF)) { sbdestroy(so, SO_SND); sbdestroy(so, SO_RCV); diff --git a/sys/security/mac/mac_internal.h b/sys/security/mac/mac_internal.h index aa407598600a..89f74a65c803 100644 --- a/sys/security/mac/mac_internal.h +++ b/sys/security/mac/mac_internal.h @@ -242,6 +242,7 @@ struct label *mac_pipe_label_alloc(void); void mac_pipe_label_free(struct label *label); struct label *mac_socket_label_alloc(int flag); void mac_socket_label_free(struct label *label); +void mac_socketpeer_label_free(struct label *label); struct label *mac_vnode_label_alloc(void); void mac_vnode_label_free(struct label *label); diff --git a/sys/security/mac/mac_socket.c b/sys/security/mac/mac_socket.c index e9f94404734a..b03f98bbfdb5 100644 --- a/sys/security/mac/mac_socket.c +++ b/sys/security/mac/mac_socket.c @@ -170,7 +170,7 @@ mac_socket_label_free(struct label *label) mac_labelzone_free(label); } -static void +void mac_socketpeer_label_free(struct label *label) { @@ -185,8 +185,10 @@ mac_socket_destroy(struct socket *so) if (so->so_label != NULL) { mac_socket_label_free(so->so_label); so->so_label = NULL; - mac_socketpeer_label_free(so->so_peerlabel); - so->so_peerlabel = NULL; + if (!SOLISTENING(so)) { + mac_socketpeer_label_free(so->so_peerlabel); + so->so_peerlabel = NULL; + } } } @@ -618,10 +620,15 @@ mac_getsockopt_peerlabel(struct ucred *cred, struct socket *so, buffer = malloc(mac->m_buflen, M_MACTEMP, M_WAITOK | M_ZERO); intlabel = mac_socket_label_alloc(M_WAITOK); SOCK_LOCK(so); - mac_socket_copy_label(so->so_peerlabel, intlabel); + if (SOLISTENING(so)) + error = EINVAL; + else + mac_socket_copy_label(so->so_peerlabel, intlabel); SOCK_UNLOCK(so); - error = mac_socketpeer_externalize_label(intlabel, elements, buffer, - mac->m_buflen); + if (error == 0) { + error = mac_socketpeer_externalize_label(intlabel, elements, buffer, + mac->m_buflen); + } mac_socket_label_free(intlabel); if (error == 0) error = copyout(buffer, mac->m_string, strlen(buffer)+1); From nobody Thu Sep 26 06:12:11 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 4XDjtM3pNxz5YH75; Thu, 26 Sep 2024 06:12:11 +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 4XDjtM1d2qz4msL; Thu, 26 Sep 2024 06:12:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727331131; 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=RzII8kzZfDPg1JdfbfPMZgFoke1pB5zPtOf4Ffww+fg=; b=fYkzoTnz5X6UCXh8pw+aHdyfzcaJHH+D+KJbQq9BwVyofOHxLbHtMTSnKOUPKBA9nCKS/L QwEmGU+W3SdnlFHJRmNrhwDhpaZ+jOHPeeI/tFTvJWhME3DTOdWEZgVCLaGmO1IiSLuwol hUyJOsYFsUC9okfYW+NWl23FEQV9Gj91AvjBnYkQsX6kSgTkzHDHZ7hsIAxfQgd5fCTUPR cvo3ESXrzvc/oQgqZqFlwuG/MGE0CkLFX2W1RJMUscu2o7lwSxtvIGaNCHg1oMk8bQsLLd QxjUYIPoIysKx+CAUxhiMO2GS7vPjze9mK+UCBjoSukCd27PUF/Um5ydkTrGDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727331131; 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=RzII8kzZfDPg1JdfbfPMZgFoke1pB5zPtOf4Ffww+fg=; b=qU3M7XxBiiNsyqpzRLH0EAkkN453e9fJ48YlYSOy+4791qVRcVhKobJncHQvXnN0hTVSaO xWgtGtTYYUT491kbpO0YZ108TudCsfuNuIXl1o3NubwH6O/jd6xM2lOG6fWCh9USKSwMK2 2zG8T945BHArBdLuWAE+sodvc4mrcI7wXUB8Z387Yi3WyDWUXoDRESty16d/Kaui9Q87ol rhtKEiTZa5v6BuM5zDqH0fDtLm9ew+TElfIGaZjeZtxqVJHWPHFbaNXqmaXDoYhYnESDB8 0vKRqeEUWn4cOuddBlBtRXEcdr/plHouLyQaJePn9QqpzHKdyify4uQk/yRTlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727331131; a=rsa-sha256; cv=none; b=dJIUzJUkuEY+/Oo7nKL7T4XOyxnzPK9lWz5EXgmRJBfYujA/XTDL+kjgRuEO2AL9i/bm3w xZ1SEpVD6NxaYkUXeJdS55YPKmYu2GD2t30PL+wfjsTXYV5T+t5yK+hN6N2yZPAukabhBL wh+etTCrtfhrqRlJBT1bPZfPmqArATkheVRKybkrbZhcKib/bm5vAfpDLmYI7dZex19/X7 O9yETb6YnY+11q3kFqB5OxF9TvbcyZVty1N3VqDj04z3/InFGeSa+mCxsmylt8DMbaq/Xk 9FT+F/K/OOmrkOSgAWamQPzsK/oGoaZhsP/3w8ghbY7hemuIakW3cQwzVQ/pYw== 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 4XDjtM1DnyzllG; Thu, 26 Sep 2024 06:12:11 +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 48Q6CBfR066549; Thu, 26 Sep 2024 06:12:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q6CB3V066546; Thu, 26 Sep 2024 06:12:11 GMT (envelope-from git) Date: Thu, 26 Sep 2024 06:12:11 GMT Message-Id: <202409260612.48Q6CB3V066546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 78e1b031d2e8 - main - tcp: improve MAC error handling for SYN segments 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78e1b031d2e8ef0e1cbc8874891f5476dc7868bc Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=78e1b031d2e8ef0e1cbc8874891f5476dc7868bc commit 78e1b031d2e8ef0e1cbc8874891f5476dc7868bc Author: Michael Tuexen AuthorDate: 2024-09-26 06:10:01 +0000 Commit: Michael Tuexen CommitDate: 2024-09-26 06:10:01 +0000 tcp: improve MAC error handling for SYN segments Don't leak a maclabel when SYN segments are processed which results in an error due to MD5 signature handling. Tweak the #idef MAC to allow additional upcoming changes. Reviewed by: markj MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46766 --- sys/netinet/tcp_syncache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 80bf12474c1c..ed131421207d 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1372,7 +1372,7 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, int autoflowlabel = 0; #endif #ifdef MAC - struct label *maclabel; + struct label *maclabel = NULL; #endif struct syncache scs; struct ucred *cred; @@ -1763,10 +1763,11 @@ donenoprobe: tfo_expanded: if (cred != NULL) crfree(cred); + if (sc == NULL || sc == &scs) { #ifdef MAC - if (sc == &scs) mac_syncache_destroy(&maclabel); #endif + } return (rv); } From nobody Thu Sep 26 09:16:36 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 4XDnz92m3lz5Wm1k; Thu, 26 Sep 2024 09:16:37 +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 4XDnz90gD8z4441; Thu, 26 Sep 2024 09:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727342197; 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=Xtn26OwEtNQSuua9eqpToml74XFechz1MAO4K09O0G4=; b=p427LH0ekO4IFiLvSg3JcQNZbieuFhJRFVtu65EXqC8X0VJ3hhgTon6guwiNUVz4GADZ7U DWUdUPPRXh5oeqDUZCAjZALTmQimCK7rj96aXpuRChmbDc66I04WzPCpc40NAL03MiH46u gp2DmveMvXjuE5rz/PH9x5IbgNbQNaA7hq44a/XXZGgyaRpcAfy2uHUEPzwl4tCaQuba5A EbsK/xUwuH9dPDPzi6szPzF9VYG5HJ1OS/8s191PDK4XXKoMgev4IwZxCqB6QHiPBsh/9r ttqFO5robeurHxv7/UBrRxceCmRC9Dv1KLsXPU1h7kaIAD92o0NPwJxLVsz8cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727342197; 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=Xtn26OwEtNQSuua9eqpToml74XFechz1MAO4K09O0G4=; b=tC+D2K7aeGwdoJCCJl+A6kpaNucUcRNx4MPobPNpXkuqFW9NP3Wl+AIfuZ6Ytc24mUs9+p wzvNB04t7c8AjO65869wCB56udVRyWQxsgg5Nevmh2pspHYi9iacyU7fPqCVwi0KO5dZJV Hbjvs2NWh5hkjiNW2DkQrT1tfG6WTsPZQBXLU2Qs9hN4qOb/le2WAKFZ9ayonDET3ADPOn oKBwIMjFZSsdzZhJugFyQvXTHIQsIfBezNI3aA3r97of7w/5cwAEk2r9HVmU2mvLBvulgN mnrgQOR6f/LMWB3pZ3RrBGOvoAi29nPZnSjvahX6AfwVlqpTCsRWgJeqdxoOsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727342197; a=rsa-sha256; cv=none; b=Ed0ITR8s7huq3YJRMm+JRks09o+C16ToKMkclGDKx73IvLQu9EEAYtCG57wHWQYNsfzgqq Co/bTr7v9bVsWMgHhaoEgEdZtw8WKjKy9m8PybR601NAa4Ugq4CZ2yc6dIZvHmC25QndpB uU+G3jHVQ9b1xTHpv7tmEi8XL3Wu4a7WGLP4mSBGc1mKksHreAOb2/bzZoXD5/xrrcntwC 8bNZcKBW1wR2gRnXjFEKag/L9lswz7jpAiMH52Nu0QvIoDh8iQSb0Awbl32vegcqiHvJFS KPZRqebKKU1OFScwEa+kph8QLCt94eCdiKYgmO9ASYqkBBvnQnqWHrsrhQdIPA== 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 4XDnz90HpxzrLV; Thu, 26 Sep 2024 09:16:37 +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 48Q9GaGp077383; Thu, 26 Sep 2024 09:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48Q9GaFt077380; Thu, 26 Sep 2024 09:16:36 GMT (envelope-from git) Date: Thu, 26 Sep 2024 09:16:36 GMT Message-Id: <202409260916.48Q9GaFt077380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Tom Jones Subject: git: 99adbd1b3f3b - main - gpioc: Fix handling of priv data during open 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: thj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99adbd1b3f3b2c198a8994c9681655978a7d9a1f Auto-Submitted: auto-generated The branch main has been updated by thj: URL: https://cgit.FreeBSD.org/src/commit/?id=99adbd1b3f3b2c198a8994c9681655978a7d9a1f commit 99adbd1b3f3b2c198a8994c9681655978a7d9a1f Author: Tom Jones AuthorDate: 2024-09-26 09:13:41 +0000 Commit: Tom Jones CommitDate: 2024-09-26 09:16:17 +0000 gpioc: Fix handling of priv data during open Fix the ordering of priv data creation with setting priv data. This handles failure better and resolves a panic when repeatedly running tools/tools/gpioevents. Explicitly initialise more fields in priv data while we are here. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46568 --- sys/dev/gpio/gpioc.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c index 4ebf958d6974..b9d95338e211 100644 --- a/sys/dev/gpio/gpioc.c +++ b/sys/dev/gpio/gpioc.c @@ -677,19 +677,18 @@ static int gpioc_open(struct cdev *dev, int oflags, int devtype, struct thread *td) { struct gpioc_cdevpriv *priv; - int err; + int err = 0; priv = malloc(sizeof(*priv), M_GPIOC, M_WAITOK | M_ZERO); priv->sc = dev->si_drv1; - priv->report_option = GPIO_EVENT_REPORT_DETAIL; - err = devfs_set_cdevpriv(priv, gpioc_cdevpriv_dtor); - if (err != 0) { - gpioc_cdevpriv_dtor(priv); - return (err); - } + mtx_init(&priv->mtx, "gpioc priv", NULL, MTX_DEF); knlist_init_mtx(&priv->selinfo.si_note, &priv->mtx); + priv->async = false; + priv->report_option = GPIO_EVENT_REPORT_DETAIL; + priv->sigio = NULL; + /* * Allocate a circular buffer for events. The scheme we use for summary * reporting assumes there will always be a pair of events available to @@ -701,7 +700,13 @@ gpioc_open(struct cdev *dev, int oflags, int devtype, struct thread *td) priv->events = malloc(priv->numevents * sizeof(struct gpio_event_detail), M_GPIOC, M_WAITOK | M_ZERO); - return (0); + priv->evidx_head = priv->evidx_tail = 0; + SLIST_INIT(&priv->pins); + + err = devfs_set_cdevpriv(priv, gpioc_cdevpriv_dtor); + if (err != 0) + gpioc_cdevpriv_dtor(priv); + return (err); } static int From nobody Thu Sep 26 10:02:26 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 4XDq032kt5z5X4fp; Thu, 26 Sep 2024 10:02:27 +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 4XDq030kp6z48v3; Thu, 26 Sep 2024 10:02:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727344947; 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=OOP8VQwyKXIuW7qGC83p2+/US1QSehYmCjW/5gsrC00=; b=lHsXz+LJV3S5PGVgT5B8qYNJT81jG+f/WRxkxWG/NJWNvi7mM0TSEYmpOJXAHYtiV+1Gvb 49t6KDnG5vsS5KLzDcODpAtlNcJhpWki0b2eL2YgUBLNQWO8dmEjKxymAjoucI0O9nlix1 cELy6qUiQ7ZNihU37iIcfE2jaEKFvmvZk4B3PaIVRIU+pFjHhYu8uStOtT/jYWdGkx0i4F Gd/5cETKVHCz7zNI4NhWObRht35+inqOAMVkxzC4T9l5sSCIOWJYUze9citVt4RWoWn3Ni 2e2K1ZeysywPvOO0S545sI4M2BUznMEauwfkX52BDXji3jU19OGrJxkFhfMqxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727344947; 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=OOP8VQwyKXIuW7qGC83p2+/US1QSehYmCjW/5gsrC00=; b=SxYM5mWErsVk5UDsk2NNc6OGqw07sqxzDCvsrGm2ZlheAkUYJl9DzY7QyxOxo6286pC3Kd 9RtaJgpAfbVizHR7n58F3dDz+XaHa6hcHjgXpKQ61nanH3lPK3a1fuSM6WLGyszUWeX1ao rDIpO65bcpEXPTxorAQUnGEgyTrr7z2Idvqss0ByaEQG1cYYdcGFHF2yWEB3XUBEVKBCEf Gr1I0QfzqlMHwYowIVqCma8Hpu5uH1AaPkGBXi+LD0phsVLuj8XQDds7HQJ+KHM+KWwLaj 1yiGhSmoeH/+PX3a6/sR0l1gcYCXVoo3J8/uZyk84s48j+tY0+GyoHxRQYvTFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727344947; a=rsa-sha256; cv=none; b=WfmkKEW8f6lEPJbSJ2XiMQkejF+ZkkF6//E6EGTl7uxy/D3061d/m42RMcEMghedaK+YLe L5/LHSd6x+PtnLOSwyurKpE0d1KHjg7in8DHFEuN4cDfo/KwPvB/xpbSqyMNMH+ZDsIVEA LfkBpFJgHYnNXmElxq1sd7g37ZKZXmf4Z+W0TpEwkIXmSVbpHGSxtDA1xOCiWSiKrC1n1L gG9Gc9HF0UrMQUfY7m4h7TaspCFFzQ+XU7deag7lC/R4XDXmJVLsFGD/4xQYTyuuaPFnZw 0a60hunONFcjpmv8ma9iHE3ftnp6/pUqVXMox1FdSozNWqIl8Ihu1/u15pxw8A== 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 4XDq0272V3zsY2; Thu, 26 Sep 2024 10:02:26 +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 48QA2QWX061899; Thu, 26 Sep 2024 10:02:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QA2QnL061896; Thu, 26 Sep 2024 10:02:26 GMT (envelope-from git) Date: Thu, 26 Sep 2024 10:02:26 GMT Message-Id: <202409261002.48QA2QnL061896@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: bf154c499e84 - stable/13 - iflib: Many style fixes 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bf154c499e84a6703180b60aac2481100ffd4c67 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=bf154c499e84a6703180b60aac2481100ffd4c67 commit bf154c499e84a6703180b60aac2481100ffd4c67 Author: Zhenlei Huang AuthorDate: 2024-09-22 02:07:39 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-26 10:00:19 +0000 iflib: Many style fixes MFC after: 3 days (cherry picked from commit fa7045f99cdb2b699205653f42f3fe78597880a7) (cherry picked from commit 647860bff21446419dee923b07490fd4a6cd181a) --- sys/net/iflib.c | 296 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 148 insertions(+), 148 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 6ab307c8cca7..252fb3b529ed 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -126,8 +126,8 @@ */ MALLOC_DEFINE(M_IFLIB, "iflib", "ifnet library"); -#define IFLIB_RXEOF_MORE (1U << 0) -#define IFLIB_RXEOF_EMPTY (2U << 0) +#define IFLIB_RXEOF_MORE (1U << 0) +#define IFLIB_RXEOF_EMPTY (2U << 0) struct iflib_txq; typedef struct iflib_txq *iflib_txq_t; @@ -200,16 +200,16 @@ struct iflib_ctx { qidx_t ifc_sysctl_ntxds[8]; qidx_t ifc_sysctl_nrxds[8]; struct if_txrx ifc_txrx; -#define isc_txd_encap ifc_txrx.ift_txd_encap -#define isc_txd_flush ifc_txrx.ift_txd_flush -#define isc_txd_credits_update ifc_txrx.ift_txd_credits_update -#define isc_rxd_available ifc_txrx.ift_rxd_available -#define isc_rxd_pkt_get ifc_txrx.ift_rxd_pkt_get -#define isc_rxd_refill ifc_txrx.ift_rxd_refill -#define isc_rxd_flush ifc_txrx.ift_rxd_flush -#define isc_legacy_intr ifc_txrx.ift_legacy_intr -#define isc_txq_select ifc_txrx.ift_txq_select -#define isc_txq_select_v2 ifc_txrx.ift_txq_select_v2 +#define isc_txd_encap ifc_txrx.ift_txd_encap +#define isc_txd_flush ifc_txrx.ift_txd_flush +#define isc_txd_credits_update ifc_txrx.ift_txd_credits_update +#define isc_rxd_available ifc_txrx.ift_rxd_available +#define isc_rxd_pkt_get ifc_txrx.ift_rxd_pkt_get +#define isc_rxd_refill ifc_txrx.ift_rxd_refill +#define isc_rxd_flush ifc_txrx.ift_rxd_flush +#define isc_legacy_intr ifc_txrx.ift_legacy_intr +#define isc_txq_select ifc_txrx.ift_txq_select +#define isc_txq_select_v2 ifc_txrx.ift_txq_select_v2 eventhandler_tag ifc_vlan_attach_event; eventhandler_tag ifc_vlan_detach_event; @@ -278,12 +278,12 @@ iflib_get_extra_msix_vectors_sysctl(if_ctx_t ctx) return (ctx->ifc_sysctl_extra_msix_vectors); } -#define IP_ALIGNED(m) ((((uintptr_t)(m)->m_data) & 0x3) == 0x2) -#define CACHE_PTR_INCREMENT (CACHE_LINE_SIZE/sizeof(void*)) -#define CACHE_PTR_NEXT(ptr) ((void *)(((uintptr_t)(ptr)+CACHE_LINE_SIZE-1) & (CACHE_LINE_SIZE-1))) +#define IP_ALIGNED(m) ((((uintptr_t)(m)->m_data) & 0x3) == 0x2) +#define CACHE_PTR_INCREMENT (CACHE_LINE_SIZE / sizeof(void *)) +#define CACHE_PTR_NEXT(ptr) ((void *)(((uintptr_t)(ptr) + CACHE_LINE_SIZE - 1) & (CACHE_LINE_SIZE - 1))) -#define LINK_ACTIVE(ctx) ((ctx)->ifc_link_state == LINK_STATE_UP) -#define CTX_IS_VF(ctx) ((ctx)->ifc_sctx->isc_flags & IFLIB_IS_VF) +#define LINK_ACTIVE(ctx) ((ctx)->ifc_link_state == LINK_STATE_UP) +#define CTX_IS_VF(ctx) ((ctx)->ifc_sctx->isc_flags & IFLIB_IS_VF) typedef struct iflib_sw_rx_desc_array { bus_dmamap_t *ifsd_map; /* bus_dma maps for packet */ @@ -316,9 +316,9 @@ typedef struct iflib_sw_tx_desc_array { #define IFLIB_RESTART_BUDGET 8 -#define CSUM_OFFLOAD (CSUM_IP_TSO|CSUM_IP6_TSO|CSUM_IP| \ - CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \ - CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP) +#define CSUM_OFFLOAD (CSUM_IP_TSO | CSUM_IP6_TSO | CSUM_IP | \ + CSUM_IP_UDP | CSUM_IP_TCP | CSUM_IP_SCTP | \ + CSUM_IP6_UDP | CSUM_IP6_TCP | CSUM_IP6_SCTP) struct iflib_txq { qidx_t ift_in_use; @@ -446,11 +446,11 @@ struct iflib_rxq { uint8_t ifr_ntxqirq; uint8_t ifr_txqid[IFLIB_MAX_TX_SHARED_INTR]; uint8_t ifr_fl_offset; - struct lro_ctrl ifr_lc; + struct lro_ctrl ifr_lc; struct grouptask ifr_task; struct callout ifr_watchdog; struct iflib_filter_info ifr_filter_info; - iflib_dma_info_t ifr_ifdi; + iflib_dma_info_t ifr_ifdi; /* dynamically allocate if any drivers need a value substantially larger than this */ struct if_rxd_frag ifr_frags[IFLIB_MAX_RX_SEGS] __aligned(CACHE_LINE_SIZE); @@ -474,8 +474,8 @@ typedef struct if_rxsd { #define RXD_INFO_SIZE 8 #define PKT_TYPE uint32_t #endif -#define PKT_LOOP_BOUND ((PKT_INFO_SIZE/3)*3) -#define RXD_LOOP_BOUND ((RXD_INFO_SIZE/4)*4) +#define PKT_LOOP_BOUND ((PKT_INFO_SIZE / 3) * 3) +#define RXD_LOOP_BOUND ((RXD_INFO_SIZE / 4) * 4) typedef struct if_pkt_info_pad { PKT_TYPE pkt_val[PKT_INFO_SIZE]; @@ -498,7 +498,7 @@ pkt_info_zero(if_pkt_info_t pi) #ifndef __LP64__ pi_pad->pkt_val[6] = 0; pi_pad->pkt_val[7] = 0; pi_pad->pkt_val[8] = 0; pi_pad->pkt_val[9] = 0; pi_pad->pkt_val[10] = 0; -#endif +#endif } static device_method_t iflib_pseudo_methods[] = { @@ -520,12 +520,12 @@ rxd_info_zero(if_rxd_info_t ri) ri_pad = (if_rxd_info_pad_t)ri; for (i = 0; i < RXD_LOOP_BOUND; i += 4) { ri_pad->rxd_val[i] = 0; - ri_pad->rxd_val[i+1] = 0; - ri_pad->rxd_val[i+2] = 0; - ri_pad->rxd_val[i+3] = 0; + ri_pad->rxd_val[i + 1] = 0; + ri_pad->rxd_val[i + 2] = 0; + ri_pad->rxd_val[i + 3] = 0; } #ifdef __LP64__ - ri_pad->rxd_val[RXD_INFO_SIZE-1] = 0; + ri_pad->rxd_val[RXD_INFO_SIZE - 1] = 0; #endif } @@ -533,19 +533,19 @@ rxd_info_zero(if_rxd_info_t ri) * Only allow a single packet to take up most 1/nth of the tx ring */ #define MAX_SINGLE_PACKET_FRACTION 12 -#define IF_BAD_DMA (bus_addr_t)-1 +#define IF_BAD_DMA ((bus_addr_t)-1) -#define CTX_ACTIVE(ctx) ((if_getdrvflags((ctx)->ifc_ifp) & IFF_DRV_RUNNING)) +#define CTX_ACTIVE(ctx) ((if_getdrvflags((ctx)->ifc_ifp) & IFF_DRV_RUNNING)) -#define CTX_LOCK_INIT(_sc) sx_init(&(_sc)->ifc_ctx_sx, "iflib ctx lock") -#define CTX_LOCK(ctx) sx_xlock(&(ctx)->ifc_ctx_sx) -#define CTX_UNLOCK(ctx) sx_xunlock(&(ctx)->ifc_ctx_sx) -#define CTX_LOCK_DESTROY(ctx) sx_destroy(&(ctx)->ifc_ctx_sx) +#define CTX_LOCK_INIT(_sc) sx_init(&(_sc)->ifc_ctx_sx, "iflib ctx lock") +#define CTX_LOCK(ctx) sx_xlock(&(ctx)->ifc_ctx_sx) +#define CTX_UNLOCK(ctx) sx_xunlock(&(ctx)->ifc_ctx_sx) +#define CTX_LOCK_DESTROY(ctx) sx_destroy(&(ctx)->ifc_ctx_sx) -#define STATE_LOCK_INIT(_sc, _name) mtx_init(&(_sc)->ifc_state_mtx, _name, "iflib state lock", MTX_DEF) -#define STATE_LOCK(ctx) mtx_lock(&(ctx)->ifc_state_mtx) -#define STATE_UNLOCK(ctx) mtx_unlock(&(ctx)->ifc_state_mtx) -#define STATE_LOCK_DESTROY(ctx) mtx_destroy(&(ctx)->ifc_state_mtx) +#define STATE_LOCK_INIT(_sc, _name) mtx_init(&(_sc)->ifc_state_mtx, _name, "iflib state lock", MTX_DEF) +#define STATE_LOCK(ctx) mtx_lock(&(ctx)->ifc_state_mtx) +#define STATE_UNLOCK(ctx) mtx_unlock(&(ctx)->ifc_state_mtx) +#define STATE_LOCK_DESTROY(ctx) mtx_destroy(&(ctx)->ifc_state_mtx) #define CALLOUT_LOCK(txq) mtx_lock(&txq->ift_mtx) #define CALLOUT_UNLOCK(txq) mtx_unlock(&txq->ift_mtx) @@ -588,7 +588,7 @@ static SYSCTL_NODE(_net, OID_AUTO, iflib, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "iflib driver parameters"); /* - * XXX need to ensure that this can't accidentally cause the head to be moved backwards + * XXX need to ensure that this can't accidentally cause the head to be moved backwards */ static int iflib_min_tx_latency = 0; SYSCTL_INT(_net_iflib, OID_AUTO, min_tx_latency, CTLFLAG_RW, @@ -729,7 +729,7 @@ static void _iflib_pre_assert(if_softc_ctx_t scctx); static void iflib_if_init_locked(if_ctx_t ctx); static void iflib_free_intr_mem(if_ctx_t ctx); #ifndef __NO_STRICT_ALIGNMENT -static struct mbuf * iflib_fixup_rx(struct mbuf *m); +static struct mbuf *iflib_fixup_rx(struct mbuf *m); #endif static SLIST_HEAD(cpu_offset_list, cpu_offset) cpu_offsets = @@ -753,7 +753,7 @@ iflib_num_rx_descs(if_ctx_t ctx) if_shared_ctx_t sctx = ctx->ifc_sctx; uint16_t first_rxq = (sctx->isc_flags & IFLIB_HAS_RXCQ) ? 1 : 0; - return scctx->isc_nrxd[first_rxq]; + return (scctx->isc_nrxd[first_rxq]); } static int @@ -763,7 +763,7 @@ iflib_num_tx_descs(if_ctx_t ctx) if_shared_ctx_t sctx = ctx->ifc_sctx; uint16_t first_txq = (sctx->isc_flags & IFLIB_HAS_TXCQ) ? 1 : 0; - return scctx->isc_ntxd[first_txq]; + return (scctx->isc_ntxd[first_txq]); } #ifdef DEV_NETMAP @@ -859,7 +859,7 @@ iflib_netmap_config(struct netmap_adapter *na, struct nm_config_info *info) info->num_tx_rings, info->num_rx_rings, info->num_tx_descs, info->num_rx_descs, info->rx_buf_maxsize); - return 0; + return (0); } static int @@ -932,7 +932,7 @@ netmap_fl_refill(iflib_rxq_t rxq, struct netmap_kring *kring, bool init) MPASS(i < IFLIB_MAX_RX_REFRESH); if (addr == NETMAP_BUF_BASE(na)) /* bad buf */ - return netmap_ring_reinit(kring); + return (netmap_ring_reinit(kring)); fl->ifl_rxd_idxs[i] = nic_i; @@ -1272,7 +1272,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int flags) if (n) { /* update the state variables */ if (netmap_no_pendintr && !force_update) { /* diagnostics */ - iflib_rx_miss ++; + iflib_rx_miss++; iflib_rx_miss_bufs += n; } kring->nr_hwtail = nm_i; @@ -1409,7 +1409,7 @@ prefetch2cachelines(void *x) { __asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); #if (CACHE_LINE_SIZE < 128) - __asm volatile("prefetcht0 %0" :: "m" (*(((unsigned long *)x)+CACHE_LINE_SIZE/(sizeof(unsigned long))))); + __asm volatile("prefetcht0 %0" :: "m" (*(((unsigned long *)x) + CACHE_LINE_SIZE / (sizeof(unsigned long))))); #endif } #else @@ -1463,7 +1463,7 @@ iflib_dma_alloc_align(if_ctx_t ctx, int size, int align, iflib_dma_info_t dma, i goto fail_0; } - err = bus_dmamem_alloc(dma->idi_tag, (void**) &dma->idi_vaddr, + err = bus_dmamem_alloc(dma->idi_tag, (void **)&dma->idi_vaddr, BUS_DMA_NOWAIT | BUS_DMA_COHERENT | BUS_DMA_ZERO, &dma->idi_map); if (err) { device_printf(dev, @@ -1729,8 +1729,8 @@ iflib_txsd_alloc(iflib_txq_t txq) NULL, /* lockfunc */ NULL, /* lockfuncarg */ &txq->ift_buf_tag))) { - device_printf(dev,"Unable to allocate TX DMA tag: %d\n", err); - device_printf(dev,"maxsize: %ju nsegments: %d maxsegsize: %ju\n", + device_printf(dev, "Unable to allocate TX DMA tag: %d\n", err); + device_printf(dev, "maxsize: %ju nsegments: %d maxsegsize: %ju\n", (uintmax_t)sctx->isc_tx_maxsize, nsegments, (uintmax_t)sctx->isc_tx_maxsegsize); goto fail; } @@ -1939,7 +1939,7 @@ iflib_rxsd_alloc(iflib_rxq_t rxq) if_softc_ctx_t scctx = &ctx->ifc_softc_ctx; device_t dev = ctx->ifc_dev; iflib_fl_t fl; - int err; + int err; MPASS(scctx->isc_nrxd[0] > 0); MPASS(scctx->isc_nrxd[rxq->ifr_fl_offset] > 0); @@ -2287,8 +2287,8 @@ iflib_fl_setup(iflib_fl_t fl) bit_nclear(fl->ifl_rx_bitmap, 0, fl->ifl_size - 1); /* - ** Free current RX buffer structs and their mbufs - */ + * Free current RX buffer structs and their mbufs + */ iflib_fl_bufs_free(fl); /* Now replenish the mbufs */ MPASS(fl->ifl_credits == 0); @@ -2418,7 +2418,7 @@ iflib_timer(void *arg) GROUPTASK_ENQUEUE(&txq->ift_task); sctx->isc_pause_frames = 0; - if (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING) + if (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING) callout_reset_on(&txq->ift_timer, iflib_timer_default, iflib_timer, txq, txq->ift_timer.c_cpu); return; @@ -2429,7 +2429,7 @@ iflib_timer(void *arg) txq->ift_id, TXQ_AVAIL(txq), txq->ift_pidx); STATE_LOCK(ctx); if_setdrvflagbits(ctx->ifc_ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); - ctx->ifc_flags |= (IFC_DO_WATCHDOG|IFC_DO_RESET); + ctx->ifc_flags |= (IFC_DO_WATCHDOG | IFC_DO_RESET); iflib_admin_intr_deferred(ctx); STATE_UNLOCK(ctx); } @@ -2648,8 +2648,8 @@ calc_next_rxd(iflib_fl_t fl, int cidx) if (__predict_false(size == 0)) return (start); - cur = start + size*cidx; - end = start + size*nrxd; + cur = start + size * cidx; + end = start + size * nrxd; next = CACHE_PTR_NEXT(cur); return (next < end ? next : start); } @@ -2661,19 +2661,19 @@ prefetch_pkts(iflib_fl_t fl, int cidx) int nrxd = fl->ifl_size; caddr_t next_rxd; - nextptr = (cidx + CACHE_PTR_INCREMENT) & (nrxd-1); + nextptr = (cidx + CACHE_PTR_INCREMENT) & (nrxd - 1); prefetch(&fl->ifl_sds.ifsd_m[nextptr]); prefetch(&fl->ifl_sds.ifsd_cl[nextptr]); next_rxd = calc_next_rxd(fl, cidx); prefetch(next_rxd); - prefetch(fl->ifl_sds.ifsd_m[(cidx + 1) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_m[(cidx + 2) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_m[(cidx + 3) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_m[(cidx + 4) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_cl[(cidx + 1) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_cl[(cidx + 2) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_cl[(cidx + 3) & (nrxd-1)]); - prefetch(fl->ifl_sds.ifsd_cl[(cidx + 4) & (nrxd-1)]); + prefetch(fl->ifl_sds.ifsd_m[(cidx + 1) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_m[(cidx + 2) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_m[(cidx + 3) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_m[(cidx + 4) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_cl[(cidx + 1) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_cl[(cidx + 2) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_cl[(cidx + 3) & (nrxd - 1)]); + prefetch(fl->ifl_sds.ifsd_cl[(cidx + 4) & (nrxd - 1)]); } static struct mbuf * @@ -2699,7 +2699,7 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, bool unload, if_rxsd_t sd, #endif if (rxq->ifr_ctx->ifc_flags & IFC_PREFETCH) prefetch_pkts(fl, cidx); - next = (cidx + CACHE_PTR_INCREMENT) & (fl->ifl_size-1); + next = (cidx + CACHE_PTR_INCREMENT) & (fl->ifl_size - 1); prefetch(&fl->ifl_sds.ifsd_map[next]); map = fl->ifl_sds.ifsd_map[cidx]; @@ -2746,7 +2746,7 @@ rxd_frag_to_sd(iflib_rxq_t rxq, if_rxd_frag_t irf, bool unload, if_rxsd_t sd, if (unload && irf->irf_len != 0) bus_dmamap_unload(fl->ifl_buf_tag, map); - fl->ifl_cidx = (fl->ifl_cidx + 1) & (fl->ifl_size-1); + fl->ifl_cidx = (fl->ifl_cidx + 1) & (fl->ifl_size - 1); if (__predict_false(fl->ifl_cidx == 0)) fl->ifl_gen = 0; bit_clear(fl->ifl_rx_bitmap, cidx); @@ -2790,7 +2790,7 @@ assemble_segments(iflib_rxq_t rxq, if_rxd_info_t ri, if_rxsd_t sd, int *pf_rv) continue; } if (mh == NULL) { - flags = M_PKTHDR|M_EXT; + flags = M_PKTHDR | M_EXT; mh = mt = m; padlen = ri->iri_pad; } else { @@ -2889,16 +2889,16 @@ iflib_check_lro_possible(struct mbuf *m, bool v4_forwarding, bool v6_forwarding) eh = mtod(m, struct ether_header *); switch (eh->ether_type) { #if defined(INET6) - case htons(ETHERTYPE_IPV6): - return (!v6_forwarding); + case htons(ETHERTYPE_IPV6): + return (!v6_forwarding); #endif -#if defined (INET) - case htons(ETHERTYPE_IP): - return (!v4_forwarding); +#if defined(INET) + case htons(ETHERTYPE_IP): + return (!v4_forwarding); #endif } - return false; + return (false); } #else static void @@ -3034,8 +3034,8 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) mt = mf = NULL; } } - if ((m->m_pkthdr.csum_flags & (CSUM_L4_CALC|CSUM_L4_VALID)) == - (CSUM_L4_CALC|CSUM_L4_VALID)) { + if ((m->m_pkthdr.csum_flags & (CSUM_L4_CALC | CSUM_L4_VALID)) == + (CSUM_L4_CALC | CSUM_L4_VALID)) { if (lro_possible && tcp_lro_rx(&rxq->ifr_lc, m, 0) == 0) continue; } @@ -3078,15 +3078,15 @@ err: return (0); } -#define TXD_NOTIFY_COUNT(txq) (((txq)->ift_size / (txq)->ift_update_freq)-1) +#define TXD_NOTIFY_COUNT(txq) (((txq)->ift_size / (txq)->ift_update_freq) - 1) static inline qidx_t txq_max_db_deferred(iflib_txq_t txq, qidx_t in_use) { qidx_t notify_count = TXD_NOTIFY_COUNT(txq); qidx_t minthresh = txq->ift_size / 8; - if (in_use > 4*minthresh) + if (in_use > 4 * minthresh) return (notify_count); - if (in_use > 2*minthresh) + if (in_use > 2 * minthresh) return (notify_count >> 1); if (in_use > minthresh) return (notify_count >> 3); @@ -3098,21 +3098,21 @@ txq_max_rs_deferred(iflib_txq_t txq) { qidx_t notify_count = TXD_NOTIFY_COUNT(txq); qidx_t minthresh = txq->ift_size / 8; - if (txq->ift_in_use > 4*minthresh) + if (txq->ift_in_use > 4 * minthresh) return (notify_count); - if (txq->ift_in_use > 2*minthresh) + if (txq->ift_in_use > 2 * minthresh) return (notify_count >> 1); if (txq->ift_in_use > minthresh) return (notify_count >> 2); return (2); } -#define M_CSUM_FLAGS(m) ((m)->m_pkthdr.csum_flags) -#define M_HAS_VLANTAG(m) (m->m_flags & M_VLANTAG) +#define M_CSUM_FLAGS(m) ((m)->m_pkthdr.csum_flags) +#define M_HAS_VLANTAG(m) (m->m_flags & M_VLANTAG) -#define TXQ_MAX_DB_DEFERRED(txq, in_use) txq_max_db_deferred((txq), (in_use)) -#define TXQ_MAX_RS_DEFERRED(txq) txq_max_rs_deferred(txq) -#define TXQ_MAX_DB_CONSUMED(size) (size >> 4) +#define TXQ_MAX_DB_DEFERRED(txq, in_use) txq_max_db_deferred((txq), (in_use)) +#define TXQ_MAX_RS_DEFERRED(txq) txq_max_rs_deferred(txq) +#define TXQ_MAX_DB_CONSUMED(size) (size >> 4) /* forward compatibility for cxgb */ #define FIRST_QSET(ctx) 0 @@ -3417,7 +3417,7 @@ iflib_parse_header(iflib_txq_t txq, if_pkt_info_t pi, struct mbuf **mp) } } if ((sctx->isc_flags & IFLIB_NEED_ZERO_CSUM) && (pi->ipi_csum_flags & CSUM_IP)) - ip->ip_sum = 0; + ip->ip_sum = 0; break; } @@ -3517,8 +3517,8 @@ calc_next_txd(iflib_txq_t txq, int cidx, uint8_t qid) if (__predict_false(size == 0)) return (start); - cur = start + size*cidx; - end = start + size*ntxd; + cur = start + size * cidx; + end = start + size * ntxd; next = CACHE_PTR_NEXT(cur); return (next < end ? next : start); } @@ -3545,7 +3545,7 @@ iflib_ether_pad(device_t dev, struct mbuf **m_head, uint16_t min_frame_size) device_printf(dev, "cannot pad short frame, m_dup() failed"); DBG_COUNTER_INC(encap_pad_mbuf_fail); DBG_COUNTER_INC(tx_frees); - return ENOMEM; + return (ENOMEM); } m_freem(*m_head); *m_head = new_head; @@ -3564,7 +3564,7 @@ iflib_ether_pad(device_t dev, struct mbuf **m_head, uint16_t min_frame_size) return (ENOBUFS); } - return 0; + return (0); } static int @@ -3596,7 +3596,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) cidx = txq->ift_cidx; pidx = txq->ift_pidx; if (ctx->ifc_flags & IFC_PREFETCH) { - next = (cidx + CACHE_PTR_INCREMENT) & (ntxd-1); + next = (cidx + CACHE_PTR_INCREMENT) & (ntxd - 1); if (!(ctx->ifc_flags & IFLIB_HAS_TXCQ)) { next_txd = calc_next_txd(txq, cidx, 0); prefetch(next_txd); @@ -3605,7 +3605,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) /* prefetch the next cache line of mbuf pointers and flags */ prefetch(&txq->ift_sds.ifsd_m[next]); prefetch(&txq->ift_sds.ifsd_map[next]); - next = (cidx + CACHE_LINE_SIZE) & (ntxd-1); + next = (cidx + CACHE_LINE_SIZE) & (ntxd - 1); } map = txq->ift_sds.ifsd_map[pidx]; ifsd_m = txq->ift_sds.ifsd_m; @@ -3626,13 +3626,13 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) err = iflib_ether_pad(ctx->ifc_dev, m_headp, scctx->isc_min_frame_size); if (err) { DBG_COUNTER_INC(encap_txd_encap_fail); - return err; + return (err); } } m_head = *m_headp; pkt_info_zero(&pi); - pi.ipi_mflags = (m_head->m_flags & (M_VLANTAG|M_BCAST|M_MCAST)); + pi.ipi_mflags = (m_head->m_flags & (M_VLANTAG | M_BCAST | M_MCAST)); pi.ipi_pidx = pidx; pi.ipi_qsidx = txq->ift_id; pi.ipi_len = m_head->m_pkthdr.len; @@ -3738,7 +3738,7 @@ defrag: txq->ift_gen = 1; } /* - * drivers can need as many as + * drivers can need as many as * two sentinels */ MPASS(ndesc <= pi.ipi_nsegs + 2); @@ -3790,7 +3790,7 @@ iflib_tx_desc_free(iflib_txq_t txq, int n) cidx = txq->ift_cidx; gen = txq->ift_gen; qsize = txq->ift_size; - mask = qsize-1; + mask = qsize - 1; ifsd_m = txq->ift_sds.ifsd_m; do_prefetch = (txq->ift_ctx->ifc_flags & IFC_PREFETCH); @@ -3871,17 +3871,17 @@ _ring_peek_one(struct ifmp_ring *r, int cidx, int offset, int remaining) struct mbuf **items; size = r->size; - next = (cidx + CACHE_PTR_INCREMENT) & (size-1); + next = (cidx + CACHE_PTR_INCREMENT) & (size - 1); items = __DEVOLATILE(struct mbuf **, &r->items[0]); - prefetch(items[(cidx + offset) & (size-1)]); + prefetch(items[(cidx + offset) & (size - 1)]); if (remaining > 1) { prefetch2cachelines(&items[next]); - prefetch2cachelines(items[(cidx + offset + 1) & (size-1)]); - prefetch2cachelines(items[(cidx + offset + 2) & (size-1)]); - prefetch2cachelines(items[(cidx + offset + 3) & (size-1)]); + prefetch2cachelines(items[(cidx + offset + 1) & (size - 1)]); + prefetch2cachelines(items[(cidx + offset + 2) & (size - 1)]); + prefetch2cachelines(items[(cidx + offset + 3) & (size - 1)]); } - return (__DEVOLATILE(struct mbuf **, &r->items[(cidx + offset) & (size-1)])); + return (__DEVOLATILE(struct mbuf **, &r->items[(cidx + offset) & (size - 1)])); } static void @@ -3931,9 +3931,9 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx) */ DBG_COUNTER_INC(txq_drain_flushing); for (i = 0; i < avail; i++) { - if (__predict_true(r->items[(cidx + i) & (r->size-1)] != (void *)txq)) - m_freem(r->items[(cidx + i) & (r->size-1)]); - r->items[(cidx + i) & (r->size-1)] = NULL; + if (__predict_true(r->items[(cidx + i) & (r->size - 1)] != (void *)txq)) + m_freem(r->items[(cidx + i) & (r->size - 1)]); + r->items[(cidx + i) & (r->size - 1)] = NULL; } return (avail); } @@ -4163,7 +4163,7 @@ _task_fn_admin(void *context) do_reset = (ctx->ifc_flags & IFC_DO_RESET); do_watchdog = (ctx->ifc_flags & IFC_DO_WATCHDOG); in_detach = (ctx->ifc_flags & IFC_IN_DETACH); - ctx->ifc_flags &= ~(IFC_DO_RESET|IFC_DO_WATCHDOG); + ctx->ifc_flags &= ~(IFC_DO_RESET | IFC_DO_WATCHDOG); STATE_UNLOCK(ctx); if ((!running && !oactive) && !(ctx->ifc_sctx->isc_flags & IFLIB_ADMIN_ALWAYS_RUN)) @@ -4317,7 +4317,7 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) } while (next != NULL); if (count > nitems(marr)) - if ((mp = malloc(count*sizeof(struct mbuf *), M_IFLIB, M_NOWAIT)) == NULL) { + if ((mp = malloc(count * sizeof(struct mbuf *), M_IFLIB, M_NOWAIT)) == NULL) { /* XXX check nextpkt */ m_freem(m); /* XXX simplify for now */ @@ -4456,11 +4456,11 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) avoid_reset = true; #endif /* - ** Calling init results in link renegotiation, - ** so we avoid doing it when possible. - */ + * Calling init results in link renegotiation, + * so we avoid doing it when possible. + */ if (avoid_reset) { - if_setflagbits(ifp, IFF_UP,0); + if_setflagbits(ifp, IFF_UP, 0); if (!(if_getdrvflags(ifp) & IFF_DRV_RUNNING)) reinit = 1; #ifdef INET @@ -4562,7 +4562,7 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) mask &= ctx->ifc_softc_ctx.isc_capabilities | IFCAP_MEXTPG; setmask = 0; #ifdef TCP_OFFLOAD - setmask |= mask & (IFCAP_TOE4|IFCAP_TOE6); + setmask |= mask & (IFCAP_TOE4 | IFCAP_TOE6); #endif setmask |= (mask & IFCAP_FLAGS); setmask |= (mask & IFCAP_WOL); @@ -4887,15 +4887,15 @@ find_child_with_core(int cpu, struct cpu_group *grp) int i; if (grp->cg_children == 0) - return -1; + return (-1); MPASS(grp->cg_child); for (i = 0; i < grp->cg_children; i++) { if (CPU_ISSET(cpu, &grp->cg_child[i].cg_mask)) - return i; + return (i); } - return -1; + return (-1); } @@ -4912,7 +4912,7 @@ find_l2_neighbor(int cpu) grp = cpu_top; if (grp == NULL) - return -1; + return (-1); /* * Find the smallest CPU group that contains the given core. @@ -4931,7 +4931,7 @@ find_l2_neighbor(int cpu) /* Must share L2. */ if (grp->cg_level > CG_SHARE_L2 || grp->cg_level == CG_SHARE_NONE) - return -1; + return (-1); /* * Select the first member of the set that isn't the reference @@ -5172,10 +5172,10 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct int err, msix, rid; int num_txd, num_rxd; - ctx = malloc(sizeof(* ctx), M_IFLIB, M_WAITOK|M_ZERO); + ctx = malloc(sizeof(*ctx), M_IFLIB, M_WAITOK | M_ZERO); if (sc == NULL) { - sc = malloc(sctx->isc_driver->size, M_IFLIB, M_WAITOK|M_ZERO); + sc = malloc(sctx->isc_driver->size, M_IFLIB, M_WAITOK | M_ZERO); device_set_softc(dev, ctx); ctx->ifc_flags |= IFC_SC_ALLOCATED; } @@ -5257,7 +5257,7 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct } if (scctx->isc_rss_table_size == 0) scctx->isc_rss_table_size = 64; - scctx->isc_rss_table_mask = scctx->isc_rss_table_size-1; + scctx->isc_rss_table_mask = scctx->isc_rss_table_size - 1; GROUPTASK_INIT(&ctx->ifc_admin_task, 0, _task_fn_admin, ctx); /* XXX format name */ @@ -5274,16 +5274,16 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct MPASS(CPU_COUNT(&ctx->ifc_cpus) > 0); /* - ** Now set up MSI or MSI-X, should return us the number of supported - ** vectors (will be 1 for a legacy interrupt and MSI). - */ + * Now set up MSI or MSI-X, should return us the number of supported + * vectors (will be 1 for a legacy interrupt and MSI). + */ if (sctx->isc_flags & IFLIB_SKIP_MSIX) { msix = scctx->isc_vectors; } else if (scctx->isc_msix_bar != 0) - /* - * The simple fact that isc_msix_bar is not 0 does not mean we - * we have a good value there that is known to work. - */ + /* + * The simple fact that isc_msix_bar is not 0 does not mean we + * we have a good value there that is known to work. + */ msix = iflib_msix_init(ctx); else { scctx->isc_vectors = 1; @@ -5786,7 +5786,7 @@ iflib_device_suspend(device_t dev) IFDI_SUSPEND(ctx); CTX_UNLOCK(ctx); - return bus_generic_suspend(dev); + return (bus_generic_suspend(dev)); } int iflib_device_shutdown(device_t dev) @@ -5797,7 +5797,7 @@ iflib_device_shutdown(device_t dev) IFDI_SHUTDOWN(ctx); CTX_UNLOCK(ctx); - return bus_generic_suspend(dev); + return (bus_generic_suspend(dev)); } int @@ -6205,20 +6205,20 @@ iflib_queues_alloc(if_ctx_t ctx) goto err_rx_desc; } - for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) + for (j = 0, fl = rxq->ifr_fl; j < rxq->ifr_nfl; j++, fl++) fl->ifl_rx_bitmap = bit_alloc(fl->ifl_size, M_IFLIB, M_WAITOK); } /* TXQs */ - vaddrs = malloc(sizeof(caddr_t)*ntxqsets*ntxqs, M_IFLIB, M_WAITOK); - paddrs = malloc(sizeof(uint64_t)*ntxqsets*ntxqs, M_IFLIB, M_WAITOK); + vaddrs = malloc(sizeof(caddr_t) * ntxqsets * ntxqs, M_IFLIB, M_WAITOK); + paddrs = malloc(sizeof(uint64_t) * ntxqsets * ntxqs, M_IFLIB, M_WAITOK); for (i = 0; i < ntxqsets; i++) { iflib_dma_info_t di = ctx->ifc_txqs[i].ift_ifdi; for (j = 0; j < ntxqs; j++, di++) { - vaddrs[i*ntxqs + j] = di->idi_vaddr; - paddrs[i*ntxqs + j] = di->idi_paddr; + vaddrs[i * ntxqs + j] = di->idi_vaddr; + paddrs[i * ntxqs + j] = di->idi_paddr; } } if ((err = IFDI_TX_QUEUES_ALLOC(ctx, vaddrs, paddrs, ntxqs, ntxqsets)) != 0) { @@ -6233,14 +6233,14 @@ iflib_queues_alloc(if_ctx_t ctx) free(paddrs, M_IFLIB); /* RXQs */ - vaddrs = malloc(sizeof(caddr_t)*nrxqsets*nrxqs, M_IFLIB, M_WAITOK); - paddrs = malloc(sizeof(uint64_t)*nrxqsets*nrxqs, M_IFLIB, M_WAITOK); + vaddrs = malloc(sizeof(caddr_t) * nrxqsets * nrxqs, M_IFLIB, M_WAITOK); + paddrs = malloc(sizeof(uint64_t) * nrxqsets * nrxqs, M_IFLIB, M_WAITOK); for (i = 0; i < nrxqsets; i++) { iflib_dma_info_t di = ctx->ifc_rxqs[i].ifr_ifdi; for (j = 0; j < nrxqs; j++, di++) { - vaddrs[i*nrxqs + j] = di->idi_vaddr; - paddrs[i*nrxqs + j] = di->idi_paddr; + vaddrs[i * nrxqs + j] = di->idi_vaddr; + paddrs[i * nrxqs + j] = di->idi_paddr; } } if ((err = IFDI_RX_QUEUES_ALLOC(ctx, vaddrs, paddrs, nrxqs, nrxqsets)) != 0) { @@ -6745,7 +6745,7 @@ void iflib_config_gtask_deinit(struct grouptask *gtask) { - taskqgroup_detach(qgroup_if_config_tqg, gtask); + taskqgroup_detach(qgroup_if_config_tqg, gtask); } void @@ -6970,11 +6970,11 @@ msi: scctx->isc_ntxqsets = 1; scctx->isc_vectors = vectors; if (vectors == 1 && pci_alloc_msi(dev, &vectors) == 0) { - device_printf(dev,"Using an MSI interrupt\n"); + device_printf(dev, "Using an MSI interrupt\n"); scctx->isc_intr = IFLIB_INTR_MSI; } else { scctx->isc_vectors = 1; - device_printf(dev,"Using a Legacy interrupt\n"); + device_printf(dev, "Using a Legacy interrupt\n"); scctx->isc_intr = IFLIB_INTR_LEGACY; } @@ -7007,7 +7007,7 @@ mp_ring_state_handler(SYSCTL_HANDLER_ARGS) state[0], state[1], state[2], ring_state); rc = sbuf_finish(sb); sbuf_delete(sb); - return(rc); + return (rc); } enum iflib_ndesc_handler { @@ -7026,7 +7026,7 @@ mp_ndesc_handler(SYSCTL_HANDLER_ARGS) int nqs, rc, i; nqs = 8; - switch(type) { + switch (type) { case IFLIB_NTXD_HANDLER: ndesc = ctx->ifc_sysctl_ntxds; if (ctx->ifc_sctx) @@ -7044,7 +7044,7 @@ mp_ndesc_handler(SYSCTL_HANDLER_ARGS) if (nqs == 0) nqs = 8; - for (i=0; i<8; i++) { + for (i = 0; i < 8; i++) { if (i >= nqs) break; if (i) @@ -7054,14 +7054,14 @@ mp_ndesc_handler(SYSCTL_HANDLER_ARGS) rc = sysctl_handle_string(oidp, buf, sizeof(buf), req); if (rc || req->newptr == NULL) - return rc; + return (rc); for (i = 0, next = buf, p = strsep(&next, " ,"); i < 8 && p; i++, p = strsep(&next, " ,")) { ndesc[i] = strtoul(p, NULL, 10); } - return(rc); + return (rc); } #define NAME_BUFLEN 32 From nobody Thu Sep 26 11:06:14 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 4XDrPg1mNhz5X7hB; Thu, 26 Sep 2024 11:06:15 +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 4XDrPg19FHz4HFY; Thu, 26 Sep 2024 11:06:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348775; 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=76wrbo6lLReda9upTYDzp27aqVbuDqmCW8OfToJdP2Q=; b=oDxZJL73zryUvw5j1l7xFRKWy48/J83gmjuLy2BkvvcrYib9uYOy1ilzcv1LrlWHQVbvAa atB6mWtCR6gd/NxVVm5cwlmvVrGWKtWje5HbCLS/uWCObpBLBlWg2hYpEsTlnjGH5gNJ1S CnMXbtjzba0Xasa7dsdFNQc0zgdQbQRhQgW2H1Uav/v073zqOY8sMIvVFdO8q8GuyBCYB6 DuyNNm16uYTFtcXwBZwLYgxbXOp43ux2A57y+rSB2hQqPJXhj+0BxKkXWe6xhkYkRQLDSB se4kW0ssRmmSqDcE55IM2qR7dK6bEe/595gf4V2xtY60eqE9+CFUT8nAM7TvEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348775; 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=76wrbo6lLReda9upTYDzp27aqVbuDqmCW8OfToJdP2Q=; b=LWZMiflKN05hbAC8Ql0wRheUXQ319ARAgwssazJz1JFp9yVIuSdE2GDb1NRNQ0UIfnmNTz bAIkjeeNGj7WHTW0idB2ZicdGwwLfsSsb7lpQuUW3gxR46+yMUvr51R2F0B9v8QCYvkIsT dxAjJLjeHPwwUVU1SSm9fiXOy5GP79kVO+XLITFv/xkyBzWuJTTD0WsGQ78TuAfKUgLtm9 72duPhgS0hMKuCHD1FQFqEtoySfKVlLUcfsZ3a0JYWLoV9vHveCaf7kCNLg1tQX7ueqJG/ 10/afae2kAJDnH4QKC0vTCoX5BPltWqyVJ8B7q+bgBLzzHFXUg//+dg0RyAgcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727348775; a=rsa-sha256; cv=none; b=q2wMAMs0YMmrReES5Z5ZDeVtmALiSZlP5Y8vkuwTpdKdzEMaigHRDl8uGLaoD6DUiW8KpZ bGVrTqedvMfT/rw4rUEFDES2muOVqQeUMhELywmC8v1GABwobOGHV7n3sQ9MP/xx7AL+Sb SSZtWUhuVPyAOZv3icUNEOaw+o8JK4uQyZw7GRuWpmT1oJ8mL+nplRHY3lIcc9nju+GtDM Qi9xdd+jTAF+4JmooPUuxvw8w/0RR0vyTUtUxBDF6tgGI56kKZFczQicVO8NRk/8hpXcvw fiHP+L4gwMNsqN6ffEsz3SERU8ETxBHojl1JC+5O6wpSojwhqyan3OiLLMDt6w== 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 4XDrPg0dgPztQd; Thu, 26 Sep 2024 11:06:15 +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 48QB6E2k063376; Thu, 26 Sep 2024 11:06:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QB6EwX063373; Thu, 26 Sep 2024 11:06:14 GMT (envelope-from git) Date: Thu, 26 Sep 2024 11:06:14 GMT Message-Id: <202409261106.48QB6EwX063373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 504981357aa3 - main - nuageinit: Lua check and lint files 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 504981357aa36365784458cfe8d9e23097bfac7b Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=504981357aa36365784458cfe8d9e23097bfac7b commit 504981357aa36365784458cfe8d9e23097bfac7b Author: Jose Luis Duran AuthorDate: 2024-07-29 18:40:52 +0000 Commit: Baptiste Daroussin CommitDate: 2024-09-26 10:58:00 +0000 nuageinit: Lua check and lint files Mostly white space, style, and luacheck compliance. Signed-off-by: Jose Luis Duran --- libexec/nuageinit/nuage.lua | 56 +++++----- libexec/nuageinit/nuageinit | 158 ++++++++++++++------------- libexec/nuageinit/tests/Makefile | 10 +- libexec/nuageinit/tests/addgroup.lua | 1 + libexec/nuageinit/tests/addsshkey.lua | 3 + libexec/nuageinit/tests/adduser.lua | 1 + libexec/nuageinit/tests/dirname.lua | 7 +- libexec/nuageinit/tests/err.lua | 1 + libexec/nuageinit/tests/nuage.sh | 21 +++- libexec/nuageinit/tests/nuageinit.sh | 187 ++++++++++++++++---------------- libexec/nuageinit/tests/sethostname.lua | 1 + libexec/nuageinit/tests/utils.sh | 18 ++- libexec/nuageinit/tests/warn.lua | 1 + libexec/nuageinit/yaml.lua | 1 + 14 files changed, 258 insertions(+), 208 deletions(-) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index 116ab143ccfa..d35d3725fa99 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -1,15 +1,17 @@ +--- -- SPDX-License-Identifier: BSD-2-Clause -- -- Copyright(c) 2022 Baptiste Daroussin +local lfs = require("lfs") local pu = require("posix.unistd") local function warnmsg(str) - io.stderr:write(str.."\n") + io.stderr:write(str .. "\n") end local function errmsg(str) - io.stderr:write(str.."\n") + io.stderr:write(str .. "\n") os.exit(1) end @@ -28,15 +30,17 @@ local function mkdir_p(path) if lfs.attributes(path, "mode") ~= nil then return true end - local r,err = mkdir_p(dirname(path)) + local r, err = mkdir_p(dirname(path)) if not r then - return nil,err.." (creating "..path..")" + return nil, err .. " (creating " .. path .. ")" end return lfs.mkdir(path) end local function sethostname(hostname) - if hostname == nil then return end + if hostname == nil then + return + end local root = os.getenv("NUAGE_FAKE_ROOTDIR") if not root then root = "" @@ -44,12 +48,12 @@ local function sethostname(hostname) local hostnamepath = root .. "/etc/rc.conf.d/hostname" mkdir_p(dirname(hostnamepath)) - local f,err = io.open(hostnamepath, "w") + local f, err = io.open(hostnamepath, "w") if not f then - warnmsg("Impossible to open "..hostnamepath .. ":" ..err) + warnmsg("Impossible to open " .. hostnamepath .. ":" .. err) return end - f:write("hostname=\""..hostname.."\"\n") + f:write('hostname="' .. hostname .. '"\n') f:close() end @@ -62,7 +66,7 @@ local function splitlist(list) elseif type(list) == "table" then ret = list else - warnmsg("Invalid type ".. type(list) ..", expecting table or string") + warnmsg("Invalid type " .. type(list) .. ", expecting table or string") end return ret end @@ -77,7 +81,7 @@ local function adduser(pwd) if root then cmd = cmd .. "-R " .. root .. " " end - local f = io.popen(cmd .. " usershow " ..pwd.name .. " -7 2>/dev/null") + local f = io.popen(cmd .. " usershow " .. pwd.name .. " -7 2> /dev/null") local pwdstr = f:read("*a") f:close() if pwdstr:len() ~= 0 then @@ -89,10 +93,10 @@ local function adduser(pwd) if not pwd.homedir then pwd.homedir = "/home/" .. pwd.name end - local extraargs="" + local extraargs = "" if pwd.groups then local list = splitlist(pwd.groups) - extraargs = " -G ".. table.concat(list, ',') + extraargs = " -G " .. table.concat(list, ",") end -- pw will automatically create a group named after the username -- do not add a -g option in this case @@ -108,23 +112,23 @@ local function adduser(pwd) local precmd = "" local postcmd = "" if pwd.passwd then - precmd = "echo "..pwd.passwd .. "| " + precmd = "echo " .. pwd.passwd .. "| " postcmd = " -H 0 " elseif pwd.plain_text_passwd then - precmd = "echo "..pwd.plain_text_passwd .. "| " + precmd = "echo " .. pwd.plain_text_passwd .. "| " postcmd = " -h 0 " end cmd = precmd .. "pw " if root then cmd = cmd .. "-R " .. root .. " " end - cmd = cmd .. "useradd -n ".. pwd.name .. " -M 0755 -w none " - cmd = cmd .. extraargs .. " -c '".. pwd.gecos - cmd = cmd .. "' -d '" .. pwd.homedir .. "' -s "..pwd.shell .. postcmd + cmd = cmd .. "useradd -n " .. pwd.name .. " -M 0755 -w none " + cmd = cmd .. extraargs .. " -c '" .. pwd.gecos + cmd = cmd .. "' -d '" .. pwd.homedir .. "' -s " .. pwd.shell .. postcmd local r = os.execute(cmd) if not r then - warnmsg("nuageinit: fail to add user "..pwd.name); + warnmsg("nuageinit: fail to add user " .. pwd.name) warnmsg(cmd) return nil end @@ -149,7 +153,7 @@ local function addgroup(grp) if root then cmd = cmd .. "-R " .. root .. " " end - local f = io.popen(cmd .. " groupshow " ..grp.name .. " 2>/dev/null") + local f = io.popen(cmd .. " groupshow " .. grp.name .. " 2> /dev/null") local grpstr = f:read("*a") f:close() if grpstr:len() ~= 0 then @@ -158,16 +162,16 @@ local function addgroup(grp) local extraargs = "" if grp.members then local list = splitlist(grp.members) - extraargs = " -M " .. table.concat(list, ',') + extraargs = " -M " .. table.concat(list, ",") end cmd = "pw " if root then cmd = cmd .. "-R " .. root .. " " end - cmd = cmd .. "groupadd -n ".. grp.name .. extraargs + cmd = cmd .. "groupadd -n " .. grp.name .. extraargs local r = os.execute(cmd) if not r then - warnmsg("nuageinit: fail to add group ".. grp.name); + warnmsg("nuageinit: fail to add group " .. grp.name) warnmsg(cmd) return false end @@ -196,7 +200,7 @@ local function addsshkey(homedir, key) local f = io.open(ak_path, "a") if not f then - warnmsg("nuageinit: impossible to open "..ak_path) + warnmsg("nuageinit: impossible to open " .. ak_path) return end f:write(key .. "\n") @@ -214,12 +218,12 @@ end local n = { warn = warnmsg, err = errmsg, + dirname = dirname, + mkdir_p = mkdir_p, sethostname = sethostname, adduser = adduser, addgroup = addgroup, - addsshkey = addsshkey, - dirname = dirname, - mkdir_p = mkdir_p, + addsshkey = addsshkey } return n diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 622e294bb531..50d77dfef9f5 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -1,18 +1,18 @@ #!/usr/libexec/flua - +--- -- SPDX-License-Identifier: BSD-2-Clause-FreeBSD -- -- Copyright(c) 2022 Baptiste Daroussin local nuage = require("nuage") +local ucl = require("ucl") local yaml = require("yaml") if #arg ~= 2 then - nuage.err("Usage ".. arg[0] .." [config-2|nocloud]") + nuage.err("Usage " .. arg[0] .. " [config-2|nocloud]") end local path = arg[1] local citype = arg[2] -local ucl = require("ucl") local default_user = { name = "freebsd", @@ -30,9 +30,9 @@ end local function open_config(name) nuage.mkdir_p(root .. "/etc/rc.conf.d") - local f,err = io.open(root .. "/etc/rc.conf.d/" .. name, "w") + local f, err = io.open(root .. "/etc/rc.conf.d/" .. name, "w") if not f then - nuage.err("nuageinit: unable to open "..name.." config: " .. err) + nuage.err("nuageinit: unable to open " .. name .. " config: " .. err) end return f end @@ -40,17 +40,17 @@ end local function get_ifaces() local parser = ucl.parser() -- grab ifaces - local ns = io.popen('netstat -i --libxo json') + local ns = io.popen("netstat -i --libxo json") local netres = ns:read("*a") ns:close() - local res,err = parser:parse_string(netres) + local res, err = parser:parse_string(netres) if not res then nuage.warn("Error parsing netstat -i --libxo json outout: " .. err) return nil end local ifaces = parser:get_object() local myifaces = {} - for _,iface in pairs(ifaces["statistics"]["interface"]) do + for _, iface in pairs(ifaces["statistics"]["interface"]) do if iface["network"]:match("") then local s = iface["address"] myifaces[s:lower()] = iface["name"] @@ -67,7 +67,7 @@ local function config2_network(p) return end f:close() - local res,err = parser:parse_file(p .. "/network_data.json") + local res, err = parser:parse_file(p .. "/network_data.json") if not res then nuage.warn("nuageinit: error parsing network_data.json: " .. err) return @@ -80,7 +80,7 @@ local function config2_network(p) return end local mylinks = {} - for _,v in pairs(obj["links"]) do + for _, v in pairs(obj["links"]) do local s = v["ethernet_mac_address"]:lower() mylinks[v["id"]] = ifaces[s] end @@ -91,66 +91,72 @@ local function config2_network(p) local ipv6 = {} local ipv6_routes = {} local ipv4 = {} - for _,v in pairs(obj["networks"]) do + for _, v in pairs(obj["networks"]) do local interface = mylinks[v["link"]] if v["type"] == "ipv4_dhcp" then - network:write("ifconfig_"..interface.."=\"DHCP\"\n") + network:write("ifconfig_" .. interface .. '="DHCP"\n') end if v["type"] == "ipv4" then - network:write("ifconfig_"..interface.."=\"inet "..v["ip_address"].." netmask " .. v["netmask"] .. "\"\n") + network:write( + "ifconfig_" .. interface .. '="inet ' .. v["ip_address"] .. " netmask " .. v["netmask"] .. '"\n' + ) if v["gateway"] then - routing:write("defaultrouter=\""..v["gateway"].."\"\n") + routing:write('defaultrouter="' .. v["gateway"] .. '"\n') end if v["routes"] then - for i,r in ipairs(v["routes"]) do + for i, r in ipairs(v["routes"]) do local rname = "cloudinit" .. i .. "_" .. interface - if v["gateway"] and v["gateway"] == r["gateway"] then goto next end + if v["gateway"] and v["gateway"] == r["gateway"] then + goto next + end if r["network"] == "0.0.0.0" then - routing:write("defaultrouter=\""..r["gateway"].."\"\n") + routing:write('defaultrouter="' .. r["gateway"] .. '"\n') goto next end - routing:write("route_".. rname .. "=\"-net ".. r["network"] .. " ") - routing:write(r["gateway"] .. " " .. r["netmask"] .. "\"\n") + routing:write("route_" .. rname .. '="-net ' .. r["network"] .. " ") + routing:write(r["gateway"] .. " " .. r["netmask"] .. '"\n') ipv4[#ipv4 + 1] = rname ::next:: end end end if v["type"] == "ipv6" then - ipv6[#ipv6+1] = interface - ipv6_routes[#ipv6_routes+1] = interface - network:write("ifconfig_"..interface.."_ipv6=\"inet6 "..v["ip_address"].."\"\n") + ipv6[#ipv6 + 1] = interface + ipv6_routes[#ipv6_routes + 1] = interface + network:write("ifconfig_" .. interface .. '_ipv6="inet6 ' .. v["ip_address"] .. '"\n') if v["gateway"] then - routing:write("ipv6_defaultrouter=\""..v["gateway"].."\"\n") - routing:write("ipv6_route_"..interface.."=\""..v["gateway"]) - routing:write(" -prefixlen 128 -interface "..interface.."\"\n") + routing:write('ipv6_defaultrouter="' .. v["gateway"] .. '"\n') + routing:write("ipv6_route_" .. interface .. '="' .. v["gateway"]) + routing:write(" -prefixlen 128 -interface " .. interface .. '"\n') end -- TODO compute the prefixlen for the routes --if v["routes"] then - -- for i,r in ipairs(v["routes"]) do + -- for i, r in ipairs(v["routes"]) do -- local rname = "cloudinit" .. i .. "_" .. mylinks[v["link"]] -- -- skip all the routes which are already covered by the default gateway, some provider -- -- still list plenty of them. - -- if v["gateway"] == r["gateway"] then goto next end - -- routing:write("ipv6_route_" .. rname .. "\"\n") - -- ipv6_routes[#ipv6_routes+1] = rname + -- if v["gateway"] == r["gateway"] then + -- goto next + -- end + -- routing:write("ipv6_route_" .. rname .. '"\n') + -- ipv6_routes[#ipv6_routes + 1] = rname -- ::next:: -- end --end end end if #ipv4 > 0 then - routing:write("static_routes=\"") - routing:write(table.concat(ipv4, " ") .. "\"\n") + routing:write('static_routes="') + routing:write(table.concat(ipv4, " ") .. '"\n') end if #ipv6 > 0 then - network:write("ipv6_network_interfaces=\"") - network:write(table.concat(ipv6, " ") .. "\"\n") - network:write("ipv6_default_interface=\""..ipv6[1].."\"\n") + network:write('ipv6_network_interfaces="') + network:write(table.concat(ipv6, " ") .. '"\n') + network:write('ipv6_default_interface="' .. ipv6[1] .. '"\n') end if #ipv6_routes > 0 then - routing:write("ipv6_static_routes=\"") - routing:write(table.concat(ipv6, " ") .. "\"\n") + routing:write('ipv6_static_routes="') + routing:write(table.concat(ipv6, " ") .. '"\n') end network:close() routing:close() @@ -158,7 +164,7 @@ end if citype == "config-2" then local parser = ucl.parser() - local res,err = parser:parse_file(path..'/meta_data.json') + local res, err = parser:parse_file(path .. "/meta_data.json") if not res then nuage.err("nuageinit: error parsing config-2: meta_data.json: " .. err) @@ -175,32 +181,32 @@ if citype == "config-2" then -- network config2_network(path) elseif citype == "nocloud" then - local f,err = io.open(path.."/meta-data") + local f, err = io.open(path .. "/meta-data") if err then - nuage.err("nuageinit: error parsing nocloud meta-data: ".. err) + nuage.err("nuageinit: error parsing nocloud meta-data: " .. err) end local obj = yaml.eval(f:read("*a")) f:close() if not obj then nuage.err("nuageinit: error parsing nocloud meta-data") end - local hostname = obj['local-hostname'] + local hostname = obj["local-hostname"] if not hostname then - hostname = obj['hostname'] + hostname = obj["hostname"] end if hostname then nuage.sethostname(hostname) end else - nuage.err("Unknown cloud init type: ".. citype) + nuage.err("Unknown cloud init type: " .. citype) end -- deal with user-data local ud = nil local f = nil -userdatas = { "user-data", "user_data" } -for _,v in pairs(userdatas) do - f = io.open(path..'/' .. v, "r") +userdatas = {"user-data", "user_data"} +for _, v in pairs(userdatas) do + f = io.open(path .. "/" .. v, "r") if f then ud = v break @@ -209,33 +215,33 @@ end if not f then os.exit(0) end -local line = f:read('*l') +local line = f:read("*l") f:close() if line == "#cloud-config" then - f = io.open(path.."/" .. ud) + f = io.open(path .. "/" .. ud) local obj = yaml.eval(f:read("*a")) f:close() if not obj then nuage.err("nuageinit: error parsing cloud-config file: " .. ud) end if obj.groups then - for n,g in pairs(obj.groups) do + for n, g in pairs(obj.groups) do if (type(g) == "string") then local r = nuage.addgroup({name = g}) if not r then - nuage.warn("nuageinit: failed to add group: ".. g) + nuage.warn("nuageinit: failed to add group: " .. g) end elseif type(g) == "table" then - for k,v in pairs(g) do + for k, v in pairs(g) do nuage.addgroup({name = k, members = v}) end else - nuage.warn("nuageinit: invalid type : "..type(g).." for users entry number "..n); + nuage.warn("nuageinit: invalid type: " .. type(g) .. " for users entry number " .. n) end end end if obj.users then - for n,u in pairs(obj.users) do + for n, u in pairs(obj.users) do if type(u) == "string" then if u == "default" then nuage.adduser(default_user) @@ -249,12 +255,12 @@ if line == "#cloud-config" then end local homedir = nuage.adduser(u) if u.ssh_authorized_keys then - for _,v in ipairs(u.ssh_authorized_keys) do + for _, v in ipairs(u.ssh_authorized_keys) do nuage.addsshkey(homedir, v) end end else - nuage.warn("nuageinit: invalid type : "..type(u).." for users entry number "..n); + nuage.warn("nuageinit: invalid type : " .. type(u) .. " for users entry number " .. n) end ::unext:: end @@ -264,7 +270,7 @@ if line == "#cloud-config" then end if obj.ssh_authorized_keys then local homedir = nuage.adduser(default_user) - for _,k in ipairs(obj.ssh_authorized_keys) do + for _, k in ipairs(obj.ssh_authorized_keys) do nuage.addsshkey(homedir, k) end end @@ -273,48 +279,52 @@ if line == "#cloud-config" then nuage.mkdir_p(root .. "/etc/rc.conf.d") local network = open_config("network") local routing = open_config("routing") - local ipv6={} - for _,v in pairs(obj.network.ethernets) do - if not v.match then goto next end - if not v.match.macaddress then goto next end + local ipv6 = {} + for _, v in pairs(obj.network.ethernets) do + if not v.match then + goto next + end + if not v.match.macaddress then + goto next + end if not ifaces[v.match.macaddress] then - nuage.warn("nuageinit: not interface matching: "..v.match.macaddress) + nuage.warn("nuageinit: not interface matching: " .. v.match.macaddress) goto next end local interface = ifaces[v.match.macaddress] if v.dhcp4 then - network:write("ifconfig_"..interface.."=\"DHCP\"\n") + network:write("ifconfig_" .. interface .. '="DHCP"\n') elseif v.addresses then - for _,a in pairs(v.addresses) do + for _, a in pairs(v.addresses) do if a:match("^(%d+)%.(%d+)%.(%d+)%.(%d+)") then - network:write("ifconfig_"..interface.."=\"inet "..a.."\"\n") + network:write("ifconfig_" .. interface .. '="inet ' .. a .. '"\n') else - network:write("ifconfig_"..interface.."_ipv6=\"inet6 "..a.."\"\n") - ipv6[#ipv6 +1] = interface + network:write("ifconfig_" .. interface .. '_ipv6="inet6 ' .. a .. '"\n') + ipv6[#ipv6 + 1] = interface end end end if v.gateway4 then - routing:write("defaultrouter=\""..v.gateway4.."\"\n") + routing:write('defaultrouter="' .. v.gateway4 .. '"\n') end if v.gateway6 then - routing:write("ipv6_defaultrouter=\""..v.gateway6.."\"\n") - routing:write("ipv6_route_"..interface.."=\""..v.gateway6) - routing:write(" -prefixlen 128 -interface "..interface.."\"\n") + routing:write('ipv6_defaultrouter="' .. v.gateway6 .. '"\n') + routing:write("ipv6_route_" .. interface .. '="' .. v.gateway6) + routing:write(" -prefixlen 128 -interface " .. interface .. '"\n') end ::next:: end if #ipv6 > 0 then - network:write("ipv6_network_interfaces=\"") - network:write(table.concat(ipv6, " ") .. "\"\n") - network:write("ipv6_default_interface=\""..ipv6[1].."\"\n") + network:write('ipv6_network_interfaces="') + network:write(table.concat(ipv6, " ") .. '"\n') + network:write('ipv6_default_interface="' .. ipv6[1] .. '"\n') end network:close() routing:close() end else - local res,err = os.execute(path..'/' .. ud) + local res, err = os.execute(path .. "/" .. ud) if not res then - nuage.err("nuageinit: error executing user-data script: ".. err) + nuage.err("nuageinit: error executing user-data script: " .. err) end end diff --git a/libexec/nuageinit/tests/Makefile b/libexec/nuageinit/tests/Makefile index d5b3bd9dcc82..ccb81c090445 100644 --- a/libexec/nuageinit/tests/Makefile +++ b/libexec/nuageinit/tests/Makefile @@ -2,12 +2,12 @@ PACKAGE= tests ATF_TESTS_SH= nuage utils nuageinit -${PACKAGE}FILES+= warn.lua -${PACKAGE}FILES+= err.lua -${PACKAGE}FILES+= dirname.lua -${PACKAGE}FILES+= sethostname.lua +${PACKAGE}FILES+= addgroup.lua ${PACKAGE}FILES+= addsshkey.lua ${PACKAGE}FILES+= adduser.lua -${PACKAGE}FILES+= addgroup.lua +${PACKAGE}FILES+= dirname.lua +${PACKAGE}FILES+= err.lua +${PACKAGE}FILES+= sethostname.lua +${PACKAGE}FILES+= warn.lua .include diff --git a/libexec/nuageinit/tests/addgroup.lua b/libexec/nuageinit/tests/addgroup.lua index 60a0d8346793..a36a5e24c7b3 100644 --- a/libexec/nuageinit/tests/addgroup.lua +++ b/libexec/nuageinit/tests/addgroup.lua @@ -1,6 +1,7 @@ #!/usr/libexec/flua local n = require("nuage") + if n.addgroup() then n.err("addgroup should not accept empty value") end diff --git a/libexec/nuageinit/tests/addsshkey.lua b/libexec/nuageinit/tests/addsshkey.lua index 3aa5f7619ec2..47e102c162a9 100644 --- a/libexec/nuageinit/tests/addsshkey.lua +++ b/libexec/nuageinit/tests/addsshkey.lua @@ -1,2 +1,5 @@ +#!/usr/libexec/flua + local n = require("nuage") + n.addsshkey(".", "mykey") diff --git a/libexec/nuageinit/tests/adduser.lua b/libexec/nuageinit/tests/adduser.lua index 9366d2abd0f4..cef6be0c0e0c 100644 --- a/libexec/nuageinit/tests/adduser.lua +++ b/libexec/nuageinit/tests/adduser.lua @@ -1,6 +1,7 @@ #!/usr/libexec/flua local n = require("nuage") + if n.adduser() then n.err("adduser should not accept empty value") end diff --git a/libexec/nuageinit/tests/dirname.lua b/libexec/nuageinit/tests/dirname.lua index d1268e48575c..7e3a2c835502 100644 --- a/libexec/nuageinit/tests/dirname.lua +++ b/libexec/nuageinit/tests/dirname.lua @@ -1,8 +1,11 @@ +#!/usr/libexec/flua + local n = require("nuage") + print(n.dirname("/my/path/path1")) if n.dirname("path") then - nuage.err("Expecting nil for n.dirname(\"path\")") + n.err('Expecting nil for n.dirname("path")') end if n.dirname() then - nuage.err("Expecting nil for n.dirname") + n.err("Expecting nil for n.dirname") end diff --git a/libexec/nuageinit/tests/err.lua b/libexec/nuageinit/tests/err.lua index c62fa1098f09..567d4f2df66e 100644 --- a/libexec/nuageinit/tests/err.lua +++ b/libexec/nuageinit/tests/err.lua @@ -1,4 +1,5 @@ #!/usr/libexec/flua local n = require("nuage") + n.err("plop") diff --git a/libexec/nuageinit/tests/nuage.sh b/libexec/nuageinit/tests/nuage.sh index 29842bff3d6b..4e2353176b16 100644 --- a/libexec/nuageinit/tests/nuage.sh +++ b/libexec/nuageinit/tests/nuage.sh @@ -1,9 +1,16 @@ +#- +# Copyright (c) 2022 Baptiste Daroussin +# +# SPDX-License-Identifier: BSD-2-Clause +# + atf_test_case sethostname atf_test_case addsshkey atf_test_case adduser atf_test_case addgroup -sethostname_body() { +sethostname_body() +{ export NUAGE_FAKE_ROOTDIR="$(pwd)" atf_check /usr/libexec/flua $(atf_get_srcdir)/sethostname.lua if [ ! -f etc/rc.conf.d/hostname ]; then @@ -12,7 +19,8 @@ sethostname_body() { atf_check -o inline:"hostname=\"myhostname\"\n" cat etc/rc.conf.d/hostname } -addsshkey_body() { +addsshkey_body() +{ atf_check /usr/libexec/flua $(atf_get_srcdir)/addsshkey.lua if [ ! -f .ssh/authorized_keys ]; then atf_fail "ssh key not added" @@ -24,7 +32,8 @@ addsshkey_body() { atf_check -o inline:"mykey\nmykey\n" cat .ssh/authorized_keys } -adduser_body() { +adduser_body() +{ export NUAGE_FAKE_ROOTDIR="$(pwd)" if [ $(id -u) -ne 0 ]; then atf_skip "root required" @@ -38,7 +47,8 @@ adduser_body() { atf_check -o inline:"impossible_username::1001:1001::0:0:impossible_username User:/home/impossible_username:/bin/sh\n" grep impossible_username etc/master.passwd } -addgroup_body() { +addgroup_body() +{ export NUAGE_FAKE_ROOTDIR="$(pwd)" mkdir etc printf "wheel:*:0:root\n" > etc/group @@ -46,7 +56,8 @@ addgroup_body() { atf_check -o inline:"impossible_groupname:*:1001:\n" grep impossible_groupname etc/group } -atf_init_test_cases() { +atf_init_test_cases() +{ atf_add_test_case sethostname atf_add_test_case addsshkey atf_add_test_case adduser diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh index b5078e256853..64ac066fefbf 100644 --- a/libexec/nuageinit/tests/nuageinit.sh +++ b/libexec/nuageinit/tests/nuageinit.sh @@ -1,8 +1,13 @@ +#- +# Copyright (c) 2022 Baptiste Daroussin +# +# SPDX-License-Identifier: BSD-2-Clause +# + atf_test_case args atf_test_case nocloud atf_test_case nocloud_userdata_script atf_test_case nocloud_user_data_script -atf_test_case nocloud_userdata_cloudconfig atf_test_case nocloud_userdata_cloudconfig_users atf_test_case nocloud_network atf_test_case config2 @@ -12,7 +17,6 @@ atf_test_case config2_pubkeys_meta_data atf_test_case config2_network atf_test_case config2_network_static_v4 - args_body() { atf_check -s exit:1 -e inline:"Usage /usr/libexec/nuageinit [config-2|nocloud]\n" /usr/libexec/nuageinit @@ -43,8 +47,8 @@ nocloud_userdata_script_body() here=$(pwd) mkdir -p media/nuageinit printf "instance-id: iid-local01\n" > ${here}/media/nuageinit/meta-data - printf "#!/bin/sh\necho "yeah"\n" > ${here}/media/nuageinit/user-data - chmod 755 ${here}/media/nuageinit/user-data + printf "#!/bin/sh\necho yeah\n" > ${here}/media/nuageinit/user-data + chmod 755 ${here}/media/nuageinit/user-data atf_check -s exit:0 -o inline:"yeah\n" /usr/libexec/nuageinit ${here}/media/nuageinit nocloud } @@ -53,8 +57,8 @@ nocloud_user_data_script_body() here=$(pwd) mkdir -p media/nuageinit printf "instance-id: iid-local01\n" > ${here}/media/nuageinit/meta-data - printf "#!/bin/sh\necho "yeah"\n" > ${here}/media/nuageinit/user_data - chmod 755 ${here}/media/nuageinit/user_data + printf "#!/bin/sh\necho yeah\n" > ${here}/media/nuageinit/user_data + chmod 755 ${here}/media/nuageinit/user_data atf_check -s exit:0 -o inline:"yeah\n" /usr/libexec/nuageinit ${here}/media/nuageinit nocloud } @@ -68,16 +72,16 @@ nocloud_userdata_cloudconfig_users_body() mkdir -p media/nuageinit printf "instance-id: iid-local01\n" > ${here}/media/nuageinit/meta-data mkdir -p etc - cat > etc/master.passwd < etc/master.passwd << EOF root:*:0:0::0:0:Charlie &:/root:/bin/csh sys:*:1:0::0:0:Sys:/home/sys:/bin/csh EOF pwd_mkdb -d etc ${here}/etc/master.passwd - cat > etc/group < etc/group << EOF wheel:*:0:root users:*:1: EOF - cat > media/nuageinit/user-data < media/nuageinit/user-data << EOF #cloud-config groups: - admingroup: [root,sys] @@ -115,12 +119,12 @@ nocloud_network_body() here=$(pwd) mkdir -p media/nuageinit mkdir -p etc - cat > etc/master.passwd < etc/master.passwd << EOF root:*:0:0::0:0:Charlie &:/root:/bin/csh sys:*:1:0::0:0:Sys:/home/sys:/bin/csh EOF pwd_mkdb -d etc ${here}/etc/master.passwd - cat > etc/group < etc/group << EOF wheel:*:0:root users:*:1: EOF @@ -135,16 +139,15 @@ EOF myiface=$1 myaddr=$(ifconfig $myiface ether | awk '/ether/ { print $2 }') printf "instance-id: iid-local01\n" > ${here}/media/nuageinit/meta-data - cat > media/nuageinit/user-data < media/nuageinit/user-data << EOF #cloud-config -# network: version: 2 ethernets: # opaque ID for physical interfaces, only referred to by other stanzas id0: match: - macaddress: '${myaddr}' + macaddress: "$myaddr" addresses: - 192.168.14.2/24 - 2001:1::1/64 @@ -153,13 +156,13 @@ network: EOF export NUAGE_FAKE_ROOTDIR=$(pwd) atf_check /usr/libexec/nuageinit ${here}/media/nuageinit nocloud - cat > network < network << EOF ifconfig_${myiface}="inet 192.168.14.2/24" ifconfig_${myiface}_ipv6="inet6 2001:1::1/64" ipv6_network_interfaces="${myiface}" ipv6_default_interface="${myiface}" EOF - cat > routing < routing << EOF defaultrouter="192.168.14.1" ipv6_defaultrouter="2001:1::2" ipv6_route_${myiface}="2001:1::2 -prefixlen 128 -interface ${myiface}" @@ -176,7 +179,7 @@ config2_body() atf_check /usr/libexec/nuageinit ${here}/media/nuageinit config-2 cat > media/nuageinit/meta_data.json << EOF { - "hostname": "cloudimg", + "hostname": "cloudimg" } EOF export NUAGE_FAKE_ROOTDIR=$(pwd) @@ -195,17 +198,16 @@ config2_pubkeys_body() touch media/nuageinit/meta_data.json cat > media/nuageinit/user-data << EOF #cloud-config - ssh_authorized_keys: - "ssh-rsa AAAAB3NzaC1y...== Generated by Nova" EOF mkdir -p etc - cat > etc/master.passwd < etc/master.passwd << EOF root:*:0:0::0:0:Charlie &:/root:/bin/csh sys:*:1:0::0:0:Sys:/home/sys:/bin/csh EOF pwd_mkdb -d etc ${here}/etc/master.passwd - cat > etc/group < etc/group << EOF wheel:*:0:root users:*:1: EOF @@ -225,17 +227,16 @@ config2_pubkeys_user_data_body() touch media/nuageinit/meta_data.json cat > media/nuageinit/user_data << EOF #cloud-config - ssh_authorized_keys: - "ssh-rsa AAAAB3NzaC1y...== Generated by Nova" EOF mkdir -p etc - cat > etc/master.passwd < etc/master.passwd << EOF root:*:0:0::0:0:Charlie &:/root:/bin/csh sys:*:1:0::0:0:Sys:/home/sys:/bin/csh EOF pwd_mkdb -d etc ${here}/etc/master.passwd - cat > etc/group < etc/group << EOF wheel:*:0:root users:*:1: EOF @@ -251,37 +252,37 @@ config2_pubkeys_meta_data_body() atf_skip "root required" fi mkdir -p media/nuageinit - cat > media/nuageinit/meta_data.json < media/nuageinit/meta_data.json << EOF { - "uuid": "uuid_for_this_instance", - "admin_pass": "a_generated_password", - "public_keys": { - "tdb": "ssh-ed25519 my_key_id tdb@host" - }, - "keys": [ - { - "name": "tdb", - "type": "ssh", - "data": "ssh-ed25519 my_key_id tdb@host" - } - ], - "hostname": "freebsd-14-test.novalocal", - "name": "freebsd-14-test", - "launch_index": 0, - "availability_zone": "nova", - "random_seed": "long_random_seed", - "project_id": "my_project_id", - "devices": [], - "dedicated_cpus": [] + "uuid": "uuid_for_this_instance", + "admin_pass": "a_generated_password", + "public_keys": { + "tdb": "ssh-ed25519 my_key_id tdb@host" + }, + "keys": [ + { + "name": "tdb", + "type": "ssh", + "data": "ssh-ed25519 my_key_id tdb@host" + } + ], + "hostname": "freebsd-14-test.novalocal", + "name": "freebsd-14-test", + "launch_index": 0, + "availability_zone": "nova", + "random_seed": "long_random_seed", + "project_id": "my_project_id", + "devices": [], + "dedicated_cpus": [] } EOF mkdir -p etc - cat > etc/master.passwd < etc/master.passwd << EOF root:*:0:0::0:0:Charlie &:/root:/bin/csh sys:*:1:0::0:0:Sys:/home/sys:/bin/csh EOF pwd_mkdb -d etc ${here}/etc/master.passwd - cat > etc/group < etc/group << EOF wheel:*:0:root users:*:1: EOF @@ -289,7 +290,8 @@ EOF atf_check -o inline:"ssh-ed25519 my_key_id tdb@host\n" cat home/freebsd/.ssh/authorized_keys } -config2_network_body() { +config2_network_body() +{ here=$(pwd) mkdir -p media/nuageinit printf "{}" > media/nuageinit/meta_data.json @@ -300,13 +302,13 @@ config2_network_body() { set -- $mynetworks myiface=$1 myaddr=$(ifconfig $myiface ether | awk '/ether/ { print $2 }') -cat > media/nuageinit/network_data.json < media/nuageinit/network_data.json << EOF { "links": [ { "ethernet_mac_address": "$myaddr", "id": "iface0", - "mtu": null, + "mtu": null } ], "networks": [ @@ -315,39 +317,39 @@ cat > media/nuageinit/network_data.json < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: d71e2c037c94 - main - nuageinit: Silence an fstyp(8) warning 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d71e2c037c942dbe2a9fd2630d5cf155dd1bf7db Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=d71e2c037c942dbe2a9fd2630d5cf155dd1bf7db commit d71e2c037c942dbe2a9fd2630d5cf155dd1bf7db Author: Jose Luis Duran AuthorDate: 2024-07-26 01:59:36 +0000 Commit: Baptiste Daroussin CommitDate: 2024-09-26 10:58:42 +0000 nuageinit: Silence an fstyp(8) warning Silence a warning emitted by fread(3) in fstyp(8)'s read_buf(), when detecting the file system type of the cloud-init device: % fstyp /dev/iso9660/cidata fstyp: fread: Invalid argument cd9660 Also rephrase slightly a comment while here. Signed-off-by: Jose Luis Duran --- libexec/rc/rc.d/nuageinit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libexec/rc/rc.d/nuageinit b/libexec/rc/rc.d/nuageinit index 8da0b1aed741..a44761ea1d9e 100755 --- a/libexec/rc/rc.d/nuageinit +++ b/libexec/rc/rc.d/nuageinit @@ -18,8 +18,8 @@ nuageinit_start() { local citype # detect cloud init provider - # according to the specification of the config drive - # it either formatted in vfat or iso9660 and labeled + # according to the specification, the config drive + # is either formatted in vfat or iso9660 and labeled # config-2 for f in iso9660 msdosfs; do drive="/dev/$f/[cC][oO][nN][fF][iI][gG]-2" @@ -39,7 +39,7 @@ nuageinit_start() err 1 "Impossible to find a cloud init provider" fi mkdir -p /media/nuageinit - fs=$(fstyp $drive) + fs=$(fstyp $drive 2> /dev/null) mount -t $fs $drive /media/nuageinit # according to the specification, the content is either # in the openstack or ec2 directory From nobody Thu Sep 26 11:06:17 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 4XDrPj5FPTz5X7qc; Thu, 26 Sep 2024 11:06:17 +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 4XDrPj2tW1z4H8h; Thu, 26 Sep 2024 11:06:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348777; 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=09TOVnQiXXADqOQ8FR1f/IzQbJQT9/BoDNEq6Wmkib4=; b=fVLbTRVMpYXT7QFH1Gwq2+hyc142I2AfGzK1h41CNaY9Igw8eLjLTsKggcEhyoob7x9Piv S74i26YS2DdwnBoMmo2GmxkOFT/9hQKBgJMiJpY/eoq4lc/RVZe4zFnHqgdLfVAEp6Xcjl wOp3eRdya20C8po4siSqJuhrSmHxjkzfTgeuikitAzj3unkEPMvmNfVjExI8aCDvP7JayF dezYzO6+YMUYxl3dwvXCUU9j7EL7K5VJA7n4l+KlKMkHfWt7wbu/LeX/cCIA0D5OmjwJJY RHr6cLI7RVKG9gQ3hrazKFJ6MorvPryD3fAhnEW/uL8Xt4ZefgnInLf0zsSQlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348777; 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=09TOVnQiXXADqOQ8FR1f/IzQbJQT9/BoDNEq6Wmkib4=; b=yRRGSA21MkQBcq/xfzoztvH7cHkM2nX7bUtvpRsxsfTxf0ScMw3IUm5ZcL64y4kD8wXjZG 8ZelDM8eA5A6gFjIjdEe6gw5S+EWrmR9bxI0zOiDMcooAZLioHtP96eQQBla0O9+sqJeOm medKfUbixIgTX9YNf1lW1U80QODcE/Ek2bH2JqR7YyoET1u/5SacJAhDDVNVi/mLHnn8vM ISRR+9epPip0/9c8191C+2iggQzzVyKhvLzW/OWkOomMw/fz5MvtMymsWSZ2QG189uk4FX lRPFNxm7YW/g/1JkOibT6horMG6eCH1MzfcWcJECilStp/5ZpTqAd0ejWRbL+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727348777; a=rsa-sha256; cv=none; b=l6qsn6+iSMMzT209ZurfWhIpWIjtabno7CwYdw3l0ljJ58vWEBY202fDggVfYgU5ygezUO 6T9hXHghsLZ0aRKrR9RN0GMkssqUHor/TxQWmH1X4uY5OPojyT2pWBEX4lJCcDfLpHdRkI NQ5PVJqQdcxnDXf4h+Akpb7AkS4Yk0J1UpXt4dl6IGuSd6ryUaRuReUwP9KxKwSm5L/y9M XEftdBtkfvl0qDQV02ZoDiI7fpCdNcURkSVfSo48qw/1QGBFhT55NBL1fy5jZ2h+2fQTrT e70NmZIBhgm7UpCnXcUOEnilaC/SfkPzecAp8/xIU3zSURvHFsYDYjPnlXfemw== 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 4XDrPj1nVxzv7L; Thu, 26 Sep 2024 11:06:17 +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 48QB6HaP063470; Thu, 26 Sep 2024 11:06:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QB6HFO063467; Thu, 26 Sep 2024 11:06:17 GMT (envelope-from git) Date: Thu, 26 Sep 2024 11:06:17 GMT Message-Id: <202409261106.48QB6HFO063467@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 9b2d92addc31 - main - nuageinit: Replace os.execute with Lua libraries 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b2d92addc31ba6f5696c85d184a45d43e9073dc Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=9b2d92addc31ba6f5696c85d184a45d43e9073dc commit 9b2d92addc31ba6f5696c85d184a45d43e9073dc Author: Jose Luis Duran AuthorDate: 2024-07-30 00:37:10 +0000 Commit: Baptiste Daroussin CommitDate: 2024-09-26 10:59:00 +0000 nuageinit: Replace os.execute with Lua libraries Prefer posix.sys.stat's chmod() to os.execute(). While here, change the name of the locals to be more descriptive. Signed-off-by: Jose Luis Duran --- libexec/nuageinit/nuage.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index d35d3725fa99..1f035036f802 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -3,8 +3,9 @@ -- -- Copyright(c) 2022 Baptiste Daroussin +local unistd = require("posix.unistd") +local sys_stat = require("posix.sys.stat") local lfs = require("lfs") -local pu = require("posix.unistd") local function warnmsg(str) io.stderr:write(str .. "\n") @@ -206,12 +207,12 @@ local function addsshkey(homedir, key) f:write(key .. "\n") f:close() if chownak then - os.execute("chmod 0600 " .. ak_path) - pu.chown(ak_path, dirattrs.uid, dirattrs.gid) + sys_stat.chmod(ak_path, 384) + unistd.chown(ak_path, dirattrs.uid, dirattrs.gid) end if chowndotssh then - os.execute("chmod 0700 " .. dotssh_path) - pu.chown(dotssh_path, dirattrs.uid, dirattrs.gid) + sys_stat.chmod(dotssh_path, 448) + unistd.chown(dotssh_path, dirattrs.uid, dirattrs.gid) end end From nobody Thu Sep 26 11:06:18 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 4XDrPk5zSgz5X7wD; Thu, 26 Sep 2024 11:06:18 +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 4XDrPk4g60z4HCB; Thu, 26 Sep 2024 11:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348778; 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=96EofNjN2cXWfZHkm/WrOxrsY3U9k0abKdM/2kvebwc=; b=HnI/JGrdm4S3BLgt0AOOBsg59jy3zJs3qrMqBTuDWQJJ+wJdzc0QrS8BAlxaYU8OVpQAVX fDnZvUWK0AuhAUU/N5Bsm2thZEaYiXA/eY5Q8/MJCD1YsNK2kmPsRmyWWHcb8qtoEYg08x 4H2NdPvW5prkdNZQ6w9jttYpIaOi4CyQv3eJZ00fVPVJMN7mri2HH62RHFD6k2Q9HbTpJC wnbxESrDv/7CRB5iNyRjJD2F9+X7S9rGhd2+Nnvr95utIxExoyN0a4THcAB6fLry5WA/Ud N0avffi5kiluLDWr+BmHByrLRHUy3I1oW3zjg0FyY+x3RGu1rtyyBm3kCsiZgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348778; 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=96EofNjN2cXWfZHkm/WrOxrsY3U9k0abKdM/2kvebwc=; b=Rugg6cQK/qT3j+MlpddSdDzi76Mp1U67pCpLAU8yRHTPuns+svO3As2MpVg7XwrlypR92c zVDasl/isEH1JEi1Zu2qTH7x4ttRjuCQP3yunJ7DWzGppPMTUJtovZ3Gf7SGBnPoB4DaaE 4EHhIH6Qb0LBW08LjJpUYkD2mqX3cIEmg7KS1QoU228KMbzZHVyA0LzJavnxlPUVIJvS8Z O5lETALP/DZRfYJU8hJIdnMJN4ZiNT8bG86LBn/RnpNNnGHEg1XHanIFazmwqxLaHNlS8s Z/ef2zUOA9tM79HY42PnzqUA+b0/KfX+0ENLNR7CEXlaFlVT0iV/SaGPX/IaZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727348778; a=rsa-sha256; cv=none; b=xiJi9do1FQBVYsKlAPq82ZPBXCu/vMUA74cKEJm0rWtZWVNgAyEQu8qswloK3IReNTnQ2V 5eMkf4jS7HDQy9t2jeFwcqTekNRm4ptkdYiXdHUhKXDNxJZikOwBnXBs69VajZpCAkFIXd QJS7ig4Ul+JxKtlRqBBM45GEjF7tGwEmsFWGBCkAMOy9AM7sgKW3xEGpQKRkSp/Jwod5U3 clURA9Sn5W000QwfdbzhhIkgZmXO9gATdktgBH9eyH7NHirs4hu7NECbXc/Yl2xw4ALDr/ ux1KrDiXGlpi7JMy1S7asadyJ7rAGTUX04bET1r5nKy/6G47+6U7MilobOkXIw== 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 4XDrPk32yWztg9; Thu, 26 Sep 2024 11:06:18 +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 48QB6Ilw063514; Thu, 26 Sep 2024 11:06:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QB6IcC063511; Thu, 26 Sep 2024 11:06:18 GMT (envelope-from git) Date: Thu, 26 Sep 2024 11:06:18 GMT Message-Id: <202409261106.48QB6IcC063511@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 945632ca7611 - main - nuageinit: Standardize warning/error messages 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 945632ca76117029e7bd1f46d17ccb378973daf7 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=945632ca76117029e7bd1f46d17ccb378973daf7 commit 945632ca76117029e7bd1f46d17ccb378973daf7 Author: Jose Luis Duran AuthorDate: 2024-07-30 01:18:11 +0000 Commit: Baptiste Daroussin CommitDate: 2024-09-26 10:59:14 +0000 nuageinit: Standardize warning/error messages Standardize the utilities from nuage.lua, to return nil on failure, plus an error message as a second result, and some value different from nil on success. Make warnmsg() and errmsg() append "nuageinit: " by default. Pass an optional second parameter as false to avoid printing this tag. Signed-off-by: Jose Luis Duran --- libexec/nuageinit/nuage.lua | 21 ++++++++++++++------- libexec/nuageinit/nuageinit | 26 +++++++++++++------------- libexec/nuageinit/tests/nuage.sh | 4 ++-- libexec/nuageinit/tests/nuageinit.sh | 4 ++-- libexec/nuageinit/tests/utils.sh | 4 ++-- 5 files changed, 33 insertions(+), 26 deletions(-) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index 1f035036f802..c27b66b23be2 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -7,12 +7,19 @@ local unistd = require("posix.unistd") local sys_stat = require("posix.sys.stat") local lfs = require("lfs") -local function warnmsg(str) - io.stderr:write(str .. "\n") +local function warnmsg(str, prepend) + if not str then + return + end + local tag = "" + if prepend ~= false then + tag = "nuageinit: " + end + io.stderr:write(tag .. str .. "\n") end -local function errmsg(str) - io.stderr:write(str .. "\n") +local function errmsg(str, prepend) + warnmsg(str, prepend) os.exit(1) end @@ -129,7 +136,7 @@ local function adduser(pwd) local r = os.execute(cmd) if not r then - warnmsg("nuageinit: fail to add user " .. pwd.name) + warnmsg("fail to add user " .. pwd.name) warnmsg(cmd) return nil end @@ -172,7 +179,7 @@ local function addgroup(grp) cmd = cmd .. "groupadd -n " .. grp.name .. extraargs local r = os.execute(cmd) if not r then - warnmsg("nuageinit: fail to add group " .. grp.name) + warnmsg("fail to add group " .. grp.name) warnmsg(cmd) return false end @@ -201,7 +208,7 @@ local function addsshkey(homedir, key) local f = io.open(ak_path, "a") if not f then - warnmsg("nuageinit: impossible to open " .. ak_path) + warnmsg("impossible to open " .. ak_path) return end f:write(key .. "\n") diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 50d77dfef9f5..8c289fea6b1d 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -9,7 +9,7 @@ local ucl = require("ucl") local yaml = require("yaml") if #arg ~= 2 then - nuage.err("Usage " .. arg[0] .. " [config-2|nocloud]") + nuage.err("Usage " .. arg[0] .. " [config-2|nocloud]", false) end local path = arg[1] local citype = arg[2] @@ -32,7 +32,7 @@ local function open_config(name) nuage.mkdir_p(root .. "/etc/rc.conf.d") local f, err = io.open(root .. "/etc/rc.conf.d/" .. name, "w") if not f then - nuage.err("nuageinit: unable to open " .. name .. " config: " .. err) + nuage.err("unable to open " .. name .. " config: " .. err) end return f end @@ -69,14 +69,14 @@ local function config2_network(p) f:close() local res, err = parser:parse_file(p .. "/network_data.json") if not res then - nuage.warn("nuageinit: error parsing network_data.json: " .. err) + nuage.warn("error parsing network_data.json: " .. err) return end local obj = parser:get_object() local ifaces = get_ifaces() if not ifaces then - nuage.warn("nuageinit: no network interfaces found") + nuage.warn("no network interfaces found") return end local mylinks = {} @@ -167,7 +167,7 @@ if citype == "config-2" then local res, err = parser:parse_file(path .. "/meta_data.json") if not res then - nuage.err("nuageinit: error parsing config-2: meta_data.json: " .. err) + nuage.err("error parsing config-2 meta_data.json: " .. err) end local obj = parser:get_object() if obj.public_keys then @@ -183,12 +183,12 @@ if citype == "config-2" then elseif citype == "nocloud" then local f, err = io.open(path .. "/meta-data") if err then - nuage.err("nuageinit: error parsing nocloud meta-data: " .. err) + nuage.err("error parsing nocloud meta-data: " .. err) end local obj = yaml.eval(f:read("*a")) f:close() if not obj then - nuage.err("nuageinit: error parsing nocloud meta-data") + nuage.err("error parsing nocloud meta-data") end local hostname = obj["local-hostname"] if not hostname then @@ -222,21 +222,21 @@ if line == "#cloud-config" then local obj = yaml.eval(f:read("*a")) f:close() if not obj then - nuage.err("nuageinit: error parsing cloud-config file: " .. ud) + nuage.err("error parsing cloud-config file: " .. ud) end if obj.groups then for n, g in pairs(obj.groups) do if (type(g) == "string") then local r = nuage.addgroup({name = g}) if not r then - nuage.warn("nuageinit: failed to add group: " .. g) + nuage.warn("failed to add group: " .. g) end elseif type(g) == "table" then for k, v in pairs(g) do nuage.addgroup({name = k, members = v}) end else - nuage.warn("nuageinit: invalid type: " .. type(g) .. " for users entry number " .. n) + nuage.warn("invalid type: " .. type(g) .. " for users entry number " .. n) end end end @@ -260,7 +260,7 @@ if line == "#cloud-config" then end end else - nuage.warn("nuageinit: invalid type : " .. type(u) .. " for users entry number " .. n) + nuage.warn("invalid type : " .. type(u) .. " for users entry number " .. n) end ::unext:: end @@ -288,7 +288,7 @@ if line == "#cloud-config" then goto next end if not ifaces[v.match.macaddress] then - nuage.warn("nuageinit: not interface matching: " .. v.match.macaddress) + nuage.warn("not interface matching: " .. v.match.macaddress) goto next end local interface = ifaces[v.match.macaddress] @@ -325,6 +325,6 @@ if line == "#cloud-config" then else local res, err = os.execute(path .. "/" .. ud) if not res then - nuage.err("nuageinit: error executing user-data script: " .. err) + nuage.err("error executing user-data script: " .. err) end end diff --git a/libexec/nuageinit/tests/nuage.sh b/libexec/nuageinit/tests/nuage.sh index 4e2353176b16..6d8a2746de1f 100644 --- a/libexec/nuageinit/tests/nuage.sh +++ b/libexec/nuageinit/tests/nuage.sh @@ -42,7 +42,7 @@ adduser_body() printf "root:*:0:0::0:0:Charlie &:/root:/bin/csh\n" > etc/master.passwd pwd_mkdb -d etc etc/master.passwd printf "wheel:*:0:root\n" > etc/group - atf_check -e inline:"Argument should be a table\nArgument should be a table\n" /usr/libexec/flua $(atf_get_srcdir)/adduser.lua + atf_check -e inline:"nuageinit: Argument should be a table\nnuageinit: Argument should be a table\n" /usr/libexec/flua $(atf_get_srcdir)/adduser.lua test -d home/impossible_username || atf_fail "home not created" atf_check -o inline:"impossible_username::1001:1001::0:0:impossible_username User:/home/impossible_username:/bin/sh\n" grep impossible_username etc/master.passwd } @@ -52,7 +52,7 @@ addgroup_body() export NUAGE_FAKE_ROOTDIR="$(pwd)" mkdir etc printf "wheel:*:0:root\n" > etc/group - atf_check -e inline:"Argument should be a table\nArgument should be a table\n" /usr/libexec/flua $(atf_get_srcdir)/addgroup.lua + atf_check -e inline:"nuageinit: Argument should be a table\nnuageinit: Argument should be a table\n" /usr/libexec/flua $(atf_get_srcdir)/addgroup.lua atf_check -o inline:"impossible_groupname:*:1001:\n" grep impossible_groupname etc/group } diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh index 64ac066fefbf..f3fc55e87523 100644 --- a/libexec/nuageinit/tests/nuageinit.sh +++ b/libexec/nuageinit/tests/nuageinit.sh @@ -22,7 +22,7 @@ args_body() atf_check -s exit:1 -e inline:"Usage /usr/libexec/nuageinit [config-2|nocloud]\n" /usr/libexec/nuageinit atf_check -s exit:1 -e inline:"Usage /usr/libexec/nuageinit [config-2|nocloud]\n" /usr/libexec/nuageinit bla atf_check -s exit:1 -e inline:"Usage /usr/libexec/nuageinit [config-2|nocloud]\n" /usr/libexec/nuageinit bla meh plop - atf_check -s exit:1 -e inline:"Unknown cloud init type: meh\n" /usr/libexec/nuageinit bla meh + atf_check -s exit:1 -e inline:"nuageinit: Unknown cloud init type: meh\n" /usr/libexec/nuageinit bla meh } nocloud_body() @@ -174,7 +174,7 @@ config2_body() { here=$(pwd) mkdir -p media/nuageinit - atf_check -s exit:1 -e match:"nuageinit: error parsing config-2: meta_data.json.*" /usr/libexec/nuageinit ${here}/media/nuageinit config-2 + atf_check -s exit:1 -e match:"nuageinit: error parsing config-2 meta_data.json:.*" /usr/libexec/nuageinit ${here}/media/nuageinit config-2 printf "{}" > media/nuageinit/meta_data.json atf_check /usr/libexec/nuageinit ${here}/media/nuageinit config-2 cat > media/nuageinit/meta_data.json << EOF diff --git a/libexec/nuageinit/tests/utils.sh b/libexec/nuageinit/tests/utils.sh index c3b5b8212938..26f117d81d60 100644 --- a/libexec/nuageinit/tests/utils.sh +++ b/libexec/nuageinit/tests/utils.sh @@ -10,12 +10,12 @@ atf_test_case dirname warn_body() { - atf_check -e "inline:plop\n" -s exit:0 /usr/libexec/flua $(atf_get_srcdir)/warn.lua + atf_check -e "inline:nuageinit: plop\n" -s exit:0 /usr/libexec/flua $(atf_get_srcdir)/warn.lua } err_body() { - atf_check -e "inline:plop\n" -s exit:1 /usr/libexec/flua $(atf_get_srcdir)/err.lua + atf_check -e "inline:nuageinit: plop\n" -s exit:1 /usr/libexec/flua $(atf_get_srcdir)/err.lua } dirname_body() From nobody Thu Sep 26 11:06:19 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 4XDrPl5ZrPz5X8Ft; Thu, 26 Sep 2024 11:06:19 +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 4XDrPl4lgyz4HNJ; Thu, 26 Sep 2024 11:06:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348779; 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=Ne5ljSJFe6L1U5npSksW0EmgrzU2plGTaV0D8G9wgo0=; b=tcbd+akf/PxRHMq7KfVtiBWe40jJb32caL4ugj6QU8CdhHFguxGyKZmPIuW5QHJyUoHVq3 z4RHt4BeWoX3YVTwRYPJ5T9ssZT7t9TE+Bi0Inb9QRdAI9gujgZzn6z+8nr4D9JhhZtO5i mXYqVYNJxbdXNJciYjHlsBvK8PZblcM81lWw8sgHS8lop64QYmGBFS0+W+J696lrepV9Vn UU9wSI/uVrfTz+1IRfK/RT9Bi8fnpBaYG7iDVbD18bMfbBlUKXHenOBActhBVA4IReBe8i gmBd4Bh5VfesYQV7kZ2DvLP/Kj+hNhzN6AWt3p3KVvSbr+KlowGAbOo3Nl4y6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348779; 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=Ne5ljSJFe6L1U5npSksW0EmgrzU2plGTaV0D8G9wgo0=; b=U1tSKfVlM/1SFHp5H2gTtwI3uYsOquFDfNR7PGgcRpKmoAG8H4fqIXqqJA4alRpCWHik6k qk26tiBlGR0ovU4gZfrH7TYBjDo8L99P+q6030IDCtcW4ZNjcf0ctILaDq6nn3C5KU5X3N 6agzvXG3Y7zoGzwhqWiQZH269btvDM8wy4duHRqEKbCw8ZqcoQDUeyd4OJ6zLIqabYK0q7 KLtYln1KFmgGmteGQS+pjuvIggFZ2UJmkLW826mjtZBXqAeMyzjmSmsOL63eL3YgV7SkUn u9wYM3KVUSmSMnAo1mXkiBC/CSYRBOnSiLiDjQCMgJgSSqMdR7I4jkxSivEaKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727348779; a=rsa-sha256; cv=none; b=SgZRRk09TrWMcebhJlh0wE+1p8iRLUQnd8gKq3Z3AqU4wljW6GrajJzewyifmH6hXO1pVb DhlWw/kO+jP3ucgyi/4iqFvRThgr9+4Il6s4jrOaIoQs/uSetqz7u5pXtZLVVloSGrDexp HwzhJFYASNZdCKeDRtk/9lnziyGmawlPkK0Xi83Pt4D+89+XKG5DMjewilktApSXgv5m7e ybuX9AcqgXsdbvDDJUB54+9t6GLobNDF2Ah8B2+O7zr4VlKhQv2A4r41pQOqrOJTb2VikS rl0e1nLleI9E/l8CdJGFymXBSpCdBdR5AgnpRdflfg3TD09cdjmx5NIYU1iL2A== 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 4XDrPl3Vk7zv7M; Thu, 26 Sep 2024 11:06:19 +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 48QB6JYm063556; Thu, 26 Sep 2024 11:06:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QB6Jqv063553; Thu, 26 Sep 2024 11:06:19 GMT (envelope-from git) Date: Thu, 26 Sep 2024 11:06:19 GMT Message-Id: <202409261106.48QB6Jqv063553@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 38bb6f79e39a - main - nuageinit: Standardize user-facing error messages 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38bb6f79e39a14ea99f559f59129a4cadf92b569 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=38bb6f79e39a14ea99f559f59129a4cadf92b569 commit 38bb6f79e39a14ea99f559f59129a4cadf92b569 Author: Jose Luis Duran AuthorDate: 2024-07-30 01:59:16 +0000 Commit: Baptiste Daroussin CommitDate: 2024-09-26 10:59:24 +0000 nuageinit: Standardize user-facing error messages Signed-off-by: Jose Luis Duran --- libexec/nuageinit/nuageinit | 2 +- libexec/nuageinit/tests/nuageinit.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 8c289fea6b1d..c8f74d13b7fd 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -9,7 +9,7 @@ local ucl = require("ucl") local yaml = require("yaml") if #arg ~= 2 then - nuage.err("Usage " .. arg[0] .. " [config-2|nocloud]", false) + nuage.err("Usage: " .. arg[0] .. " ( | )", false) end local path = arg[1] local citype = arg[2] diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh index f3fc55e87523..6b8ea7ff3328 100644 --- a/libexec/nuageinit/tests/nuageinit.sh +++ b/libexec/nuageinit/tests/nuageinit.sh @@ -19,9 +19,9 @@ atf_test_case config2_network_static_v4 args_body() { - atf_check -s exit:1 -e inline:"Usage /usr/libexec/nuageinit [config-2|nocloud]\n" /usr/libexec/nuageinit - atf_check -s exit:1 -e inline:"Usage /usr/libexec/nuageinit [config-2|nocloud]\n" /usr/libexec/nuageinit bla - atf_check -s exit:1 -e inline:"Usage /usr/libexec/nuageinit [config-2|nocloud]\n" /usr/libexec/nuageinit bla meh plop + atf_check -s exit:1 -e inline:"Usage: /usr/libexec/nuageinit ( | )\n" /usr/libexec/nuageinit + atf_check -s exit:1 -e inline:"Usage: /usr/libexec/nuageinit ( | )\n" /usr/libexec/nuageinit bla + atf_check -s exit:1 -e inline:"Usage: /usr/libexec/nuageinit ( | )\n" /usr/libexec/nuageinit bla meh plop atf_check -s exit:1 -e inline:"nuageinit: Unknown cloud init type: meh\n" /usr/libexec/nuageinit bla meh } From nobody Thu Sep 26 11:06:20 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 4XDrPm6rmHz5X7ql; Thu, 26 Sep 2024 11:06:20 +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 4XDrPm5Vzdz4HNY; Thu, 26 Sep 2024 11:06:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348780; 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=Vp3vMQSUvV9OhU59l5Nn5Yt45Hq1OXkxkXR0YpQlgsw=; b=D7ey+Do/gdvgSWPX9rfvkbuK/2Vln7zUucHn/EP1slXxgJq2nAaPZ+WO+QQ67n5MkdL6V2 USY/d6JEBEqQ5a6TDH3Hr2MS9GpWNveXE73c6FMj0HzwqP51C7aR9woYhJlPAOjlPpqSZg JTBbL4QrKoJmoQT6bsF/brIn4Ybx55h1bq01003yHSHTcoMLFo1/40+bJOeWQ975xDrBaJ je170siHDiCNRXozh9eCy9PhCii+LX/YVhi9HyrU7zQ0cE7CLBN3fz1lEuO/D7+rUt8K4T uFAqo+CqF33jPwY+5U61+WF7SqE0CAVjl3wcNEST4SQ8Nv7h6Cf8ZwL95c/lRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348780; 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=Vp3vMQSUvV9OhU59l5Nn5Yt45Hq1OXkxkXR0YpQlgsw=; b=L8aqRiFfM0Xm24M3AWkp6OkltaexGnOzbl2i1/esbWBn2+5IijHw9be1FMN68kqGe4xy9I EGNa4i2lUVvTebBiWYMIyQ7p9LamNCU7kTJWx2Xwkcg33HOKEMGlHggQXQLbx22zp/zp0K KEex024B7IUPYOCn+yrt1+AZhYI+zBo9itWd1B2YFKl9/unXq/4NGH+Vz9HA+jmQ+qYdn9 zT0h4lKlgmDUTFVh6/DPVvjo2JtD9Cp8tUyXK1oy2fFA7UngEuH7NoFbZ0qqe+N703s0V/ 9JaNtm5jQHKu97VLbrQfc9n80hbH0fOeQPcGdkXtbLpMPS1q60J6RNIDy7otDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727348780; a=rsa-sha256; cv=none; b=qw4fsHXoRBje2nrd7PvvHxgRTg/mnRjoXtObzENgpqqKxgzZBCXhaoBI685vYNLHLH2pZh G029sl0LKra+s0udF7I7D6RgIBg40joB/Dq5qUbn3F9UkHazEG26GMH8CaMdJkdVbVdY4P PLQWphVPAqrTxYD1eOO5hUdIIjAPzd3GS4zFXjJbMU7Rp05r9GUlGxTUWL0jqOlG/dK9dh jVeosE6iyW0x0rlZIJ3iForzsv0K7zR6B6/Us2hYZqcoEl0OQBt32EXTXU305KbEocx900 TSr/XDIqI93YBZ3hCrqx2Fc4S/CrMELVAI9AtgHv7qk389HnWjGX/hNG429I5w== 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 4XDrPm4kZbzttG; Thu, 26 Sep 2024 11:06:20 +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 48QB6KT4063592; Thu, 26 Sep 2024 11:06:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QB6KqW063589; Thu, 26 Sep 2024 11:06:20 GMT (envelope-from git) Date: Thu, 26 Sep 2024 11:06:20 GMT Message-Id: <202409261106.48QB6KqW063589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: b9ce743c5447 - main - nuageinit: Fix passwords 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9ce743c5447e90c2c97f4d49e048c301f708527 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=b9ce743c5447e90c2c97f4d49e048c301f708527 commit b9ce743c5447e90c2c97f4d49e048c301f708527 Author: Jose Luis Duran AuthorDate: 2024-07-30 01:28:18 +0000 Commit: Baptiste Daroussin CommitDate: 2024-09-26 10:59:56 +0000 nuageinit: Fix passwords The hashed password usually contains a "$" sign, which, when used on a shell, must be escaped. Also, the plain text password may contain special characters that require escaping. Add a quick fix by enclosing it in single quotes. Note that if the plain text password contains a "'", it will still fail. This will be properly fixed in later commits. Some here documents require the document to be a string literal, especially when passing invalid characters. Enclose it in single quotes. Signed-off-by: Jose Luis Duran --- libexec/nuageinit/nuage.lua | 8 ++++---- libexec/nuageinit/tests/nuageinit.sh | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index c27b66b23be2..4e21405a443b 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -120,11 +120,11 @@ local function adduser(pwd) local precmd = "" local postcmd = "" if pwd.passwd then - precmd = "echo " .. pwd.passwd .. "| " - postcmd = " -H 0 " + precmd = "echo '" .. pwd.passwd .. "' | " + postcmd = " -H 0" elseif pwd.plain_text_passwd then - precmd = "echo " .. pwd.plain_text_passwd .. "| " - postcmd = " -h 0 " + precmd = "echo '" .. pwd.plain_text_passwd .. "' | " + postcmd = " -h 0" end cmd = precmd .. "pw " if root then diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh index 6b8ea7ff3328..434fb3095929 100644 --- a/libexec/nuageinit/tests/nuageinit.sh +++ b/libexec/nuageinit/tests/nuageinit.sh @@ -81,7 +81,7 @@ EOF wheel:*:0:root users:*:1: EOF - cat > media/nuageinit/user-data << EOF + cat > media/nuageinit/user-data << 'EOF' #cloud-config groups: - admingroup: [root,sys] @@ -103,11 +103,11 @@ cloud-users:*:1002: freebsd:*:1003: foobar:*:1004: EOF - cat > expectedpasswd << EOF + cat > expectedpasswd << 'EOF' root:*:0:0::0:0:Charlie &:/root:/bin/csh sys:*:1:0::0:0:Sys:/home/sys:/bin/csh freebsd:freebsd:1001:1003::0:0:FreeBSD User:/home/freebsd:/bin/sh -foobar:H/1LT4f9/N3wpgNunhsIqtMj62OKiS3nyNwuizouQc3u7MbYCarYeAHWYPYb2FT.lbioDm2RrkJPb9BZMN1O/:1002:1004::0:0:Foo B. Bar:/home/foobar:/bin/sh +foobar:$6$j212wezy$7H/1LT4f9/N3wpgNunhsIqtMj62OKiS3nyNwuizouQc3u7MbYCarYeAHWYPYb2FT.lbioDm2RrkJPb9BZMN1O/:1002:1004::0:0:Foo B. Bar:/home/foobar:/bin/sh EOF sed -i "" "s/freebsd:.*:1001/freebsd:freebsd:1001/" ${here}/etc/master.passwd atf_check -o file:expectedpasswd cat ${here}/etc/master.passwd From nobody Thu Sep 26 11:06:21 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 4XDrPp3pT0z5X87r; Thu, 26 Sep 2024 11:06:22 +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 4XDrPp265hz4HWD; Thu, 26 Sep 2024 11:06:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348782; 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=EZ5Jg1IeL5spiSI5cjxZ+gB0MH/Z8pD0wulVGlshiCM=; b=llPEqPd43JJAIOYKv1YDIIcT7RIWSYK1lkD0y6OixU07eqVnzH2aAAKGa6hefvA1eX5+hO y9Qt0TxrL49c5JhhGYnRRHlLkacrI7fNBP9fxbO0+Uh72l3y6KRbou7opDq4BQvRKdgJpq xmhBZVIZ8XO53rkx/arrRSD9DRgULeoPo8cMaqfhIzv9uL0GqOiDno3F1zCRbK9pm2iRhq EjVf1Cy/JsBgrb7L88sd083veMHxjNu8lu+JmvhvMpJ62UMe0cfUL+6B38rD1CGaEL8Jgc wjbwzHD/bTH0iNpSBUQzBApISptpsnABUXFkA9a036JhxnwSd3nw7z1U0d38+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348782; 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=EZ5Jg1IeL5spiSI5cjxZ+gB0MH/Z8pD0wulVGlshiCM=; b=b8dRkBnBclK2kAnaSt5Z0dmeFCdkpp7baXZRo+JXe7CgbjZTqHsFWdsxJrhvrkBXy2D5ih WePsFsDxpLg1CiZ7xC9Ycn5LVrgP0PCo+nHonLBjhKf22xUY2/T46vFVBGXrrwgK41J8AJ Okohwz4Sdk0W9swMmIawEKCI+CKxHn2Yp/0tEPtHzlXYk5yvH/xYvUOhoGQFP3mY0WOtYS CRGKiyjFUysOia/LVMLwns9QVrlDcm0IK7a9PQZnXuTawqpJQXeE2DDXi/39TV4xK80NQ/ VFhclbtFfLEQdDRwiiZNFr5kDQnHbzXfejJsniljVmyTf9qYAO/Ky8DUPBobNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727348782; a=rsa-sha256; cv=none; b=TU51wOT9hgS0ns+qcqLYCjQOWjGgWvEyUWur3J94TZudobJqCo3Bh9RCNexjGLj7pOP3/g 4NUoiLBO0kI5vHILx5XYYx7CXH8GqqGE/HtgRNQzPla2kCIuHy5/4/XRKfUZcJ72rwQXkT juvzuLEQ30Uvinbv+U2bbBOwF+QegcQG+Kg7COdadZF6JQ4NShBDJdtQTcXyP+Kun+Dq6G H+6flS2ok7u1AinnrzesjC601Z1RStY0DKKnA3mboVktVfIzj4Q7fXUbhc3WPA8OeCeD1v v8PTmDkoPfl+9c3Wr/ZpnUHh2zrGFL7w2wJ5A923Jjxu7kKVGK4FEbwOCrNsnQ== 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 4XDrPn5FjbztgB; Thu, 26 Sep 2024 11:06:21 +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 48QB6L3x063628; Thu, 26 Sep 2024 11:06:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QB6L6p063625; Thu, 26 Sep 2024 11:06:21 GMT (envelope-from git) Date: Thu, 26 Sep 2024 11:06:21 GMT Message-Id: <202409261106.48QB6L6p063625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: e72457c4f516 - main - nuageinit: tests: Cleanup 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e72457c4f5166eef2a27249e02f3c1e9a1cf852d Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=e72457c4f5166eef2a27249e02f3c1e9a1cf852d commit e72457c4f5166eef2a27249e02f3c1e9a1cf852d Author: Jose Luis Duran AuthorDate: 2024-07-30 03:26:21 +0000 Commit: Baptiste Daroussin CommitDate: 2024-09-26 11:00:16 +0000 nuageinit: tests: Cleanup - Export NUAGE_FAKE_ROOTDIR only once - Use the header section of the test to require the root user - Use the PWD environment variable - Set the root/sys shell as /bin/sh - Use RFC 5737 reserved IP addresses Signed-off-by: Jose Luis Duran --- libexec/nuageinit/tests/nuage.sh | 14 +-- libexec/nuageinit/tests/nuageinit.sh | 165 ++++++++++++++++------------------- 2 files changed, 83 insertions(+), 96 deletions(-) diff --git a/libexec/nuageinit/tests/nuage.sh b/libexec/nuageinit/tests/nuage.sh index 6d8a2746de1f..293a0a4a9a83 100644 --- a/libexec/nuageinit/tests/nuage.sh +++ b/libexec/nuageinit/tests/nuage.sh @@ -4,6 +4,8 @@ # SPDX-License-Identifier: BSD-2-Clause # +export NUAGE_FAKE_ROOTDIR="$PWD" + atf_test_case sethostname atf_test_case addsshkey atf_test_case adduser @@ -11,7 +13,6 @@ atf_test_case addgroup sethostname_body() { - export NUAGE_FAKE_ROOTDIR="$(pwd)" atf_check /usr/libexec/flua $(atf_get_srcdir)/sethostname.lua if [ ! -f etc/rc.conf.d/hostname ]; then atf_fail "hostname not written" @@ -32,14 +33,14 @@ addsshkey_body() atf_check -o inline:"mykey\nmykey\n" cat .ssh/authorized_keys } +adduser_head() +{ + atf_set "require.user" root +} adduser_body() { - export NUAGE_FAKE_ROOTDIR="$(pwd)" - if [ $(id -u) -ne 0 ]; then - atf_skip "root required" - fi mkdir etc - printf "root:*:0:0::0:0:Charlie &:/root:/bin/csh\n" > etc/master.passwd + printf "root:*:0:0::0:0:Charlie &:/root:/bin/sh\n" > etc/master.passwd pwd_mkdb -d etc etc/master.passwd printf "wheel:*:0:root\n" > etc/group atf_check -e inline:"nuageinit: Argument should be a table\nnuageinit: Argument should be a table\n" /usr/libexec/flua $(atf_get_srcdir)/adduser.lua @@ -49,7 +50,6 @@ adduser_body() addgroup_body() { - export NUAGE_FAKE_ROOTDIR="$(pwd)" mkdir etc printf "wheel:*:0:root\n" > etc/group atf_check -e inline:"nuageinit: Argument should be a table\nnuageinit: Argument should be a table\n" /usr/libexec/flua $(atf_get_srcdir)/addgroup.lua diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh index 434fb3095929..f7f39ce32ad8 100644 --- a/libexec/nuageinit/tests/nuageinit.sh +++ b/libexec/nuageinit/tests/nuageinit.sh @@ -4,6 +4,8 @@ # SPDX-License-Identifier: BSD-2-Clause # +export NUAGE_FAKE_ROOTDIR="$PWD" + atf_test_case args atf_test_case nocloud atf_test_case nocloud_userdata_script @@ -27,56 +29,51 @@ args_body() nocloud_body() { - here=$(pwd) mkdir -p media/nuageinit - atf_check -s exit:1 -e match:"nuageinit: error parsing nocloud.*" /usr/libexec/nuageinit ${here}/media/nuageinit/ nocloud - export NUAGE_FAKE_ROOTDIR=$(pwd) - printf "instance-id: iid-local01\nlocal-hostname: cloudimg\n" > ${here}/media/nuageinit/meta-data - atf_check -s exit:0 /usr/libexec/nuageinit ${here}/media/nuageinit nocloud + atf_check -s exit:1 -e match:"nuageinit: error parsing nocloud.*" /usr/libexec/nuageinit "${PWD}"/media/nuageinit/ nocloud + printf "instance-id: iid-local01\nlocal-hostname: cloudimg\n" > "${PWD}"/media/nuageinit/meta-data + atf_check -s exit:0 /usr/libexec/nuageinit "${PWD}"/media/nuageinit nocloud atf_check -o inline:"hostname=\"cloudimg\"\n" cat etc/rc.conf.d/hostname cat > media/nuageinit/meta-data << EOF instance-id: iid-local01 hostname: myhost EOF - atf_check -s exit:0 /usr/libexec/nuageinit ${here}/media/nuageinit nocloud + atf_check -s exit:0 /usr/libexec/nuageinit "${PWD}"/media/nuageinit nocloud atf_check -o inline:"hostname=\"myhost\"\n" cat etc/rc.conf.d/hostname } nocloud_userdata_script_body() { - here=$(pwd) mkdir -p media/nuageinit - printf "instance-id: iid-local01\n" > ${here}/media/nuageinit/meta-data - printf "#!/bin/sh\necho yeah\n" > ${here}/media/nuageinit/user-data - chmod 755 ${here}/media/nuageinit/user-data - atf_check -s exit:0 -o inline:"yeah\n" /usr/libexec/nuageinit ${here}/media/nuageinit nocloud + printf "instance-id: iid-local01\n" > "${PWD}"/media/nuageinit/meta-data + printf "#!/bin/sh\necho yeah\n" > "${PWD}"/media/nuageinit/user-data + chmod 755 "${PWD}"/media/nuageinit/user-data + atf_check -s exit:0 -o inline:"yeah\n" /usr/libexec/nuageinit "${PWD}"/media/nuageinit nocloud } nocloud_user_data_script_body() { - here=$(pwd) mkdir -p media/nuageinit - printf "instance-id: iid-local01\n" > ${here}/media/nuageinit/meta-data - printf "#!/bin/sh\necho yeah\n" > ${here}/media/nuageinit/user_data - chmod 755 ${here}/media/nuageinit/user_data - atf_check -s exit:0 -o inline:"yeah\n" /usr/libexec/nuageinit ${here}/media/nuageinit nocloud + printf "instance-id: iid-local01\n" > "${PWD}"/media/nuageinit/meta-data + printf "#!/bin/sh\necho yeah\n" > "${PWD}"/media/nuageinit/user_data + chmod 755 "${PWD}"/media/nuageinit/user_data + atf_check -s exit:0 -o inline:"yeah\n" /usr/libexec/nuageinit "${PWD}"/media/nuageinit nocloud } +nocloud_userdata_cloudconfig_users_head() +{ + atf_set "require.user" root +} nocloud_userdata_cloudconfig_users_body() { - here=$(pwd) - export NUAGE_FAKE_ROOTDIR=$(pwd) - if [ $(id -u) -ne 0 ]; then - atf_skip "root required" - fi mkdir -p media/nuageinit - printf "instance-id: iid-local01\n" > ${here}/media/nuageinit/meta-data + printf "instance-id: iid-local01\n" > "${PWD}"/media/nuageinit/meta-data mkdir -p etc cat > etc/master.passwd << EOF -root:*:0:0::0:0:Charlie &:/root:/bin/csh -sys:*:1:0::0:0:Sys:/home/sys:/bin/csh +root:*:0:0::0:0:Charlie &:/root:/bin/sh +sys:*:1:0::0:0:Sys:/home/sys:/bin/sh EOF - pwd_mkdb -d etc ${here}/etc/master.passwd + pwd_mkdb -d etc "${PWD}"/etc/master.passwd cat > etc/group << EOF wheel:*:0:root users:*:1: @@ -94,7 +91,7 @@ users: groups: users passwd: $6$j212wezy$7H/1LT4f9/N3wpgNunhsIqtMj62OKiS3nyNwuizouQc3u7MbYCarYeAHWYPYb2FT.lbioDm2RrkJPb9BZMN1O/ EOF - atf_check /usr/libexec/nuageinit ${here}/media/nuageinit nocloud + atf_check /usr/libexec/nuageinit "${PWD}"/media/nuageinit nocloud cat > expectedgroup << EOF wheel:*:0:root,freebsd users:*:1:foobar @@ -104,33 +101,33 @@ freebsd:*:1003: foobar:*:1004: EOF cat > expectedpasswd << 'EOF' -root:*:0:0::0:0:Charlie &:/root:/bin/csh -sys:*:1:0::0:0:Sys:/home/sys:/bin/csh +root:*:0:0::0:0:Charlie &:/root:/bin/sh +sys:*:1:0::0:0:Sys:/home/sys:/bin/sh freebsd:freebsd:1001:1003::0:0:FreeBSD User:/home/freebsd:/bin/sh foobar:$6$j212wezy$7H/1LT4f9/N3wpgNunhsIqtMj62OKiS3nyNwuizouQc3u7MbYCarYeAHWYPYb2FT.lbioDm2RrkJPb9BZMN1O/:1002:1004::0:0:Foo B. Bar:/home/foobar:/bin/sh EOF - sed -i "" "s/freebsd:.*:1001/freebsd:freebsd:1001/" ${here}/etc/master.passwd - atf_check -o file:expectedpasswd cat ${here}/etc/master.passwd - atf_check -o file:expectedgroup cat ${here}/etc/group + sed -i "" "s/freebsd:.*:1001/freebsd:freebsd:1001/" "${PWD}"/etc/master.passwd + atf_check -o file:expectedpasswd cat "${PWD}"/etc/master.passwd + atf_check -o file:expectedgroup cat "${PWD}"/etc/group } +nocloud_network_head() +{ + atf_set "require.user" root +} nocloud_network_body() { - here=$(pwd) mkdir -p media/nuageinit mkdir -p etc cat > etc/master.passwd << EOF -root:*:0:0::0:0:Charlie &:/root:/bin/csh -sys:*:1:0::0:0:Sys:/home/sys:/bin/csh +root:*:0:0::0:0:Charlie &:/root:/bin/sh +sys:*:1:0::0:0:Sys:/home/sys:/bin/sh EOF - pwd_mkdb -d etc ${here}/etc/master.passwd + pwd_mkdb -d etc "${PWD}"/etc/master.passwd cat > etc/group << EOF wheel:*:0:root users:*:1: EOF - if [ $(id -u) -ne 0 ]; then - atf_skip "root required" - fi mynetworks=$(ifconfig -l ether) if [ -z "$mynetworks" ]; then atf_skip "a network interface is needed" @@ -138,7 +135,7 @@ EOF set -- $mynetworks myiface=$1 myaddr=$(ifconfig $myiface ether | awk '/ether/ { print $2 }') - printf "instance-id: iid-local01\n" > ${here}/media/nuageinit/meta-data + printf "instance-id: iid-local01\n" > "${PWD}"/media/nuageinit/meta-data cat > media/nuageinit/user-data << EOF #cloud-config network: @@ -149,51 +146,48 @@ network: match: macaddress: "$myaddr" addresses: - - 192.168.14.2/24 - - 2001:1::1/64 - gateway4: 192.168.14.1 - gateway6: 2001:1::2 + - 192.0.2.2/24 + - 2001:db8::2/64 + gateway4: 192.0.2.1 + gateway6: 2001:db8::1 EOF - export NUAGE_FAKE_ROOTDIR=$(pwd) - atf_check /usr/libexec/nuageinit ${here}/media/nuageinit nocloud + atf_check /usr/libexec/nuageinit "${PWD}"/media/nuageinit nocloud cat > network << EOF -ifconfig_${myiface}="inet 192.168.14.2/24" -ifconfig_${myiface}_ipv6="inet6 2001:1::1/64" +ifconfig_${myiface}="inet 192.0.2.2/24" +ifconfig_${myiface}_ipv6="inet6 2001:db8::2/64" ipv6_network_interfaces="${myiface}" ipv6_default_interface="${myiface}" EOF cat > routing << EOF -defaultrouter="192.168.14.1" -ipv6_defaultrouter="2001:1::2" -ipv6_route_${myiface}="2001:1::2 -prefixlen 128 -interface ${myiface}" +defaultrouter="192.0.2.1" +ipv6_defaultrouter="2001:db8::1" +ipv6_route_${myiface}="2001:db8::1 -prefixlen 128 -interface ${myiface}" EOF - atf_check -o file:network cat ${here}/etc/rc.conf.d/network - atf_check -o file:routing cat ${here}/etc/rc.conf.d/routing + atf_check -o file:network cat "${PWD}"/etc/rc.conf.d/network + atf_check -o file:routing cat "${PWD}"/etc/rc.conf.d/routing } + config2_body() { - here=$(pwd) mkdir -p media/nuageinit - atf_check -s exit:1 -e match:"nuageinit: error parsing config-2 meta_data.json:.*" /usr/libexec/nuageinit ${here}/media/nuageinit config-2 + atf_check -s exit:1 -e match:"nuageinit: error parsing config-2 meta_data.json:.*" /usr/libexec/nuageinit "${PWD}"/media/nuageinit config-2 printf "{}" > media/nuageinit/meta_data.json - atf_check /usr/libexec/nuageinit ${here}/media/nuageinit config-2 + atf_check /usr/libexec/nuageinit "${PWD}"/media/nuageinit config-2 cat > media/nuageinit/meta_data.json << EOF { "hostname": "cloudimg" } EOF - export NUAGE_FAKE_ROOTDIR=$(pwd) - atf_check /usr/libexec/nuageinit ${here}/media/nuageinit config-2 + atf_check /usr/libexec/nuageinit "${PWD}"/media/nuageinit config-2 atf_check -o inline:"hostname=\"cloudimg\"\n" cat etc/rc.conf.d/hostname } +config2_pubkeys_head() +{ + atf_set "require.user" root +} config2_pubkeys_body() { - here=$(pwd) - export NUAGE_FAKE_ROOTDIR=$(pwd) - if [ $(id -u) -ne 0 ]; then - atf_skip "root required" - fi mkdir -p media/nuageinit touch media/nuageinit/meta_data.json cat > media/nuageinit/user-data << EOF @@ -203,26 +197,24 @@ ssh_authorized_keys: EOF mkdir -p etc cat > etc/master.passwd << EOF -root:*:0:0::0:0:Charlie &:/root:/bin/csh -sys:*:1:0::0:0:Sys:/home/sys:/bin/csh +root:*:0:0::0:0:Charlie &:/root:/bin/sh +sys:*:1:0::0:0:Sys:/home/sys:/bin/sh EOF - pwd_mkdb -d etc ${here}/etc/master.passwd + pwd_mkdb -d etc "${PWD}"/etc/master.passwd cat > etc/group << EOF wheel:*:0:root users:*:1: EOF - atf_check /usr/libexec/nuageinit ${here}/media/nuageinit config-2 + atf_check /usr/libexec/nuageinit "${PWD}"/media/nuageinit config-2 atf_check -o inline:"ssh-rsa AAAAB3NzaC1y...== Generated by Nova\n" cat home/freebsd/.ssh/authorized_keys } - +config2_pubkeys_user_data_head() +{ + atf_set "require.user" root +} config2_pubkeys_user_data_body() { - here=$(pwd) - export NUAGE_FAKE_ROOTDIR=$(pwd) - if [ $(id -u) -ne 0 ]; then - atf_skip "root required" - fi mkdir -p media/nuageinit touch media/nuageinit/meta_data.json cat > media/nuageinit/user_data << EOF @@ -232,15 +224,15 @@ ssh_authorized_keys: EOF mkdir -p etc cat > etc/master.passwd << EOF -root:*:0:0::0:0:Charlie &:/root:/bin/csh -sys:*:1:0::0:0:Sys:/home/sys:/bin/csh +root:*:0:0::0:0:Charlie &:/root:/bin/sh +sys:*:1:0::0:0:Sys:/home/sys:/bin/sh EOF - pwd_mkdb -d etc ${here}/etc/master.passwd + pwd_mkdb -d etc "${PWD}"/etc/master.passwd cat > etc/group << EOF wheel:*:0:root users:*:1: EOF - atf_check /usr/libexec/nuageinit ${here}/media/nuageinit config-2 + atf_check /usr/libexec/nuageinit "${PWD}"/media/nuageinit config-2 atf_check -o inline:"ssh-rsa AAAAB3NzaC1y...== Generated by Nova\n" cat home/freebsd/.ssh/authorized_keys } @@ -292,7 +284,6 @@ EOF config2_network_body() { - here=$(pwd) mkdir -p media/nuageinit printf "{}" > media/nuageinit/meta_data.json mynetworks=$(ifconfig -l ether) @@ -322,7 +313,7 @@ cat > media/nuageinit/network_data.json << EOF "type": "ipv6", "link": "iface0", // supports condensed IPv6 with CIDR netmask - "ip_address": "2001:cdba::3257:9652/24", + "ip_address": "2001:db8::3257:9652/64", "gateway": "fd00::1", "routes": [ { @@ -341,11 +332,10 @@ cat > media/nuageinit/network_data.json << EOF ] } EOF - export NUAGE_FAKE_ROOTDIR=$(pwd) - atf_check /usr/libexec/nuageinit ${here}/media/nuageinit config-2 + atf_check /usr/libexec/nuageinit "${PWD}"/media/nuageinit config-2 cat > network << EOF ifconfig_${myiface}="DHCP" -ifconfig_${myiface}_ipv6="inet6 2001:cdba::3257:9652/24" +ifconfig_${myiface}_ipv6="inet6 2001:db8::3257:9652/64" ipv6_network_interfaces="${myiface}" ipv6_default_interface="${myiface}" EOF @@ -354,13 +344,12 @@ ipv6_defaultrouter="fd00::1" ipv6_route_${myiface}="fd00::1 -prefixlen 128 -interface ${myiface}" ipv6_static_routes="${myiface}" EOF - atf_check -o file:network cat ${here}/etc/rc.conf.d/network - atf_check -o file:routing cat ${here}/etc/rc.conf.d/routing + atf_check -o file:network cat "${PWD}"/etc/rc.conf.d/network + atf_check -o file:routing cat "${PWD}"/etc/rc.conf.d/routing } config2_network_static_v4_body() { - here=$(pwd) mkdir -p media/nuageinit printf "{}" > media/nuageinit/meta_data.json mynetworks=$(ifconfig -l ether) @@ -402,9 +391,7 @@ cat > media/nuageinit/network_data.json << EOF ] } EOF - - export NUAGE_FAKE_ROOTDIR=$(pwd) - atf_check /usr/libexec/nuageinit ${here}/media/nuageinit config-2 + atf_check /usr/libexec/nuageinit "${PWD}"/media/nuageinit config-2 cat > network << EOF ifconfig_${myiface}="inet 10.184.0.244 netmask 255.255.240.0" EOF @@ -413,8 +400,8 @@ route_cloudinit1_${myiface}="-net 10.0.0.0 11.0.0.1 255.0.0.0" defaultrouter="23.253.157.1" static_routes="cloudinit1_${myiface}" EOF - atf_check -o file:network cat ${here}/etc/rc.conf.d/network - atf_check -o file:routing cat ${here}/etc/rc.conf.d/routing + atf_check -o file:network cat "${PWD}"/etc/rc.conf.d/network + atf_check -o file:routing cat "${PWD}"/etc/rc.conf.d/routing } atf_init_test_cases() From nobody Thu Sep 26 11:06:22 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 4XDrPq24LYz5X7qr; Thu, 26 Sep 2024 11:06:23 +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 4XDrPq0Jg9z4HLN; Thu, 26 Sep 2024 11:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348783; 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=4JAbgvYWgEGZ8MxgBMvaRx/0gMmVTrHKXf2D+pl5bsU=; b=Uz7uBLZbyrnDk8PUs2LywC2GZBA+VTJJcTPpqg/7/ejQzXJtjrDu4vXB745r1y1TL81jvV hE2kveXFRsXUVmHZF4ojZMWIzuexw3pJFheHrDiJ019KqnVbvgm+O6o7TQAbDWuu3ECvwC 5ZqOUhuj8EYV/U6b3f4/AxQQA3bVBIQx8hfpKp0ixq6JgX52xiOhSGjl+JQaCr7gkytkDu Hmh3ItvPlpHLhxtTHHGlpFlB/3gGkZ3dSWuPd2x8LupYXRPU9a6I3nhpYPwJJhqbIU7IoE SgBFzVdVqScan21rk6H9wwyaCUmJTbJjLRpMmXJEVz9P1SoM1i5hcRJvV6d6BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727348783; 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=4JAbgvYWgEGZ8MxgBMvaRx/0gMmVTrHKXf2D+pl5bsU=; b=AIIavwOH52XHqOOVJ1T3KBCBFjKi1NZdIeMCmSXNMX4UveMILTjVdqepSBimuLAzpgeePp +kPp4iXUT66xqmKZyeBleV2rzX2gJAVHkx1Dyfhr5JKGOo5yZoB8cRubmkWCUTRnaXiq0X v8OHqQYv6oZy6iP52D4EG0Z7JydnqrDfZABq/vvA6FAMHUR60UU/Zqt4Db+af1VoN1d3+H AwYkYgHpFpld32mu2y7QHLORMXRhSNV0G6DavVYnXlEHQvfqGyBDTZXq6XLTRQypFSz+Mi TU1EX1tfPZ7ishjHyWZLnPF4stOQu1ljgcJOuXb4KYE6hQRG2mrzCFf9l6/L3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727348783; a=rsa-sha256; cv=none; b=EryYGgr1BVpTHpGnLzTWJN/o1tWjyyVZsUthdn5690pOylIN3ITWfr4LJmuoZzFQeBmvKi xY9fna+/L3Ztz4wiI2gjcVBPmztc/RxsMwFdYYA2HJ8ZsswZWDi8PXfqEcBUAWG86KWzNr YZWOb4CrdSzSROhFXv0kOzJqqMFoFUDa0Yke7H8coD8U1meREfXR71YMp7i7LWo9nXxUgm 3XRNtZ2TRXYhOjLh/gIz1VRa8ii7kevf4uHSywCygJcujk+7rvlnyQ63b8Li3CHyn+E/kh r/PtCHSHJMOG/OrqBfiXj8oUVk6Fc09WauxLXIm3pFt0vw3m02R4D8FtarG+OA== 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 4XDrPp6PwTzttJ; Thu, 26 Sep 2024 11:06:22 +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 48QB6MK3063678; Thu, 26 Sep 2024 11:06:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QB6Mmn063675; Thu, 26 Sep 2024 11:06:22 GMT (envelope-from git) Date: Thu, 26 Sep 2024 11:06:22 GMT Message-Id: <202409261106.48QB6Mmn063675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 120740221fd4 - main - release: basic-cloudinit improve default image 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: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 120740221fd4a4577e63e6c279f9873cabe449d0 Auto-Submitted: auto-generated The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=120740221fd4a4577e63e6c279f9873cabe449d0 commit 120740221fd4a4577e63e6c279f9873cabe449d0 Author: Jose Luis Duran AuthorDate: 2024-07-30 04:47:04 +0000 Commit: Baptiste Daroussin CommitDate: 2024-09-26 11:01:03 +0000 release: basic-cloudinit improve default image - Add the firstboot-freebsd-update package, as long as we do not have pkgbase, this is needed - Support SLAAC by default to complement DHCPv4 (use SYNCDHP instead) Signed-off-by: Jose Luis Duran --- release/tools/basic-cloudinit.conf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/release/tools/basic-cloudinit.conf b/release/tools/basic-cloudinit.conf index da4bed5ea5b5..a03c11603ed6 100644 --- a/release/tools/basic-cloudinit.conf +++ b/release/tools/basic-cloudinit.conf @@ -1,6 +1,4 @@ #!/bin/sh -# -# # Should be enough for base image, image can be resized in needed export VMSIZE=5g @@ -9,13 +7,17 @@ export VMSIZE=5g export CONFIG_DRIVE=YES export CONFIG_DRIVE_SIZE=1M +# Packages to install into the image we're creating. +# * firstboot-freebsd-update, to install security updates at first boot. +export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} firstboot-freebsd-update" + # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="sshd growfs nuageinit" +export VM_RC_LIST="${VM_RC_LIST} firstboot_freebsd_update growfs sshd nuageinit" vm_extra_pre_umount() { cat << EOF >> ${DESTDIR}/etc/rc.conf dumpdev="AUTO" -ifconfig_DEFAULT="DHCP" +ifconfig_DEFAULT="SYNCDHCP accept_rtadv" sshd_enable="YES" EOF @@ -25,7 +27,8 @@ beastie_disable="YES" loader_logo="none" console="comconsole,vidconsole" EOF - cat <> ${DESTDIR}/etc/ssh/sshd_config + + cat << EOF >> ${DESTDIR}/etc/ssh/sshd_config PasswordAuthentication yes UsePAM no EOF From nobody Thu Sep 26 14:06:07 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 4XDwPC5Y8Sz5XLQ2; Thu, 26 Sep 2024 14:06:07 +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 4XDwPC50dlz4WwB; Thu, 26 Sep 2024 14:06:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727359567; 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=wHP49xdt/yXE5Muip5GdaZknh2S+Wozvf7nhKBo1YcM=; b=Kg4A2kMLdp7K4ZSYd0WzPJSCEbwVs6RcujpF2OwPS7BPnWuNoy76czYmeM56yHEQQxSTBB 8JluaRsQNbaR7QM/fjbfB6CarDrGOZKftXFVTEWMoVzwypyBNw0tQXiO2z4viAPjlsSNY1 C4bAxbP7Bi2SsPnju7ZMUsbiP62cTpRm5a4D2bBUa9gnqzhYGsRRvGq/doX4VSVgX3+qdB wdH1cwoO73lrXR/tz85+7XayGtwn01ogekAajAbC4Og9jPfrHHCmFx0qvamROB3y7KQ2po YdwvL6ChULcXlRu4jbwBeTojgVrpTbWbNHovTcJr0WnfgL1nvz97DJmBP+JioA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727359567; 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=wHP49xdt/yXE5Muip5GdaZknh2S+Wozvf7nhKBo1YcM=; b=f4WAgH34mMUy6iacXKsSZCWp6EQsF71l+lgaC+2s+nuJVZvW9M90PyzrgxZit4IyntALZF ufJ8/bThiWWsFM/sF4s6wwn/5HL0C5BQS6K9fdl200ju75Z87SuS1DvRv91YASZp2FoIP2 OOnoW/z9z3v6HzBVGcHh4p6M3UD6gACXwbtba8sBnOD3hbGayN/ta7RUXCRIi+gGYzzEBV AnTcFjdiW58oB4kdTjX9UudGYtt3qFWs4V+4Qyxk5ySKnhq/MuRF5j7JSJdqRwH9gQt2JK vanwfGvvcZXnWj6OlkSqew4S7+eGZPWsJSGacVvHInsScnnmvcF1KyZWjwLzsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727359567; a=rsa-sha256; cv=none; b=RKzEJieh1kPqVlPp462j5rxwVxRka7cVAPqSul3oGcbKxyt9GSrcC6vjtrP4aFhIuZUgug 2SBMouMmenUAEvnmvHEZyAOdmGqeJzkc24vYGQP2webQhghIEuEHFZv+7h3kGJDNR5Lzvv YEcP3e6t9yoq3EX9wznfutj3PAZ8ESMJbzJdWBZ50qIBPe3yLGtWW7DivbB8MeKtTsmYM+ 7ft63dnxiOehqU400DyAl7FiJO7u1uvJppFCUqQWT+LEa7Qj0+bbjAfqe9uDFvUY2dPgHx ebVSOzlxKQSxRcic8NsJyynOgoW2Jym/Xu2MENaK1YJ3cQ4pdLWjOeoqV+3ewg== 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 4XDwPC4Sqyz108D; Thu, 26 Sep 2024 14:06:07 +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 48QE67CR069162; Thu, 26 Sep 2024 14:06:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QE6723069159; Thu, 26 Sep 2024 14:06:07 GMT (envelope-from git) Date: Thu, 26 Sep 2024 14:06:07 GMT Message-Id: <202409261406.48QE6723069159@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 21525fe03c05 - main - sdhci: Add sysctl to report quirks on the slot 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: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21525fe03c05cebb951214e78e411a3040e8a798 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=21525fe03c05cebb951214e78e411a3040e8a798 commit 21525fe03c05cebb951214e78e411a3040e8a798 Author: Justin Hibbits AuthorDate: 2024-09-25 21:35:50 +0000 Commit: Justin Hibbits CommitDate: 2024-09-26 13:58:54 +0000 sdhci: Add sysctl to report quirks on the slot Summary: It can be useful to see what quirks are applied on an SDHCI slot. Obtained from: Juniper Networks, Inc. Reviewed By: manu Differential Revision: https://reviews.freebsd.org/D46790 --- sys/dev/sdhci/sdhci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/sdhci/sdhci.c b/sys/dev/sdhci/sdhci.c index c747f54cb32c..0be20e7aa523 100644 --- a/sys/dev/sdhci/sdhci.c +++ b/sys/dev/sdhci/sdhci.c @@ -1149,6 +1149,9 @@ no_tuning: SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, node_name, CTLFLAG_RW, 0, "slot specific node"); + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(node_oid), + OID_AUTO, "quirks", CTLFLAG_RD, &slot->quirks, 0, "Slot quirks"); + node_oid = SYSCTL_ADD_NODE(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(node_oid), OID_AUTO, "debug", CTLFLAG_RW, 0, "Debugging node"); From nobody Thu Sep 26 14:47: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 4XDxK00zZxz5XNs2; Thu, 26 Sep 2024 14:47: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 4XDxK00TF6z4f5k; Thu, 26 Sep 2024 14:47:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727362052; 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=MJhXwBfqVrmd+8ntgpeYgdAT7tbsp4jZbcqL4wAYdpc=; b=pSLg/ifa1YTPxxKUNJ5MMCdlZ19f00Ze2M3oK0zJqTs1Ydj/EYCo25gh8DCWSTI5Zow2n8 WvSpMPt1enOMEAWaf2s2F/xueoYrxyEoXBBB2nm4kNnOeXwglz8b1JfgNJhyQUp6do+LHN 1GBJ2a+x9/7ld3zi/N6RHGAdHQMqH0leIAzrAVwLBz8XpIb49KkUY+4amMLc1ghRhus7N9 9I9Ca9pFe6cwLtwNRKpnhkoVpIueySmbPuyHtvPQEHb12xyEfVxzqeSzuQi93ge09Ly2pB csNkKHlH5Oesx9km2zahXrlHbesagIKf4kkemAUDdrRr8Z2LS9wP0PTcucfkzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727362052; 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=MJhXwBfqVrmd+8ntgpeYgdAT7tbsp4jZbcqL4wAYdpc=; b=cyr2vVWJ50RffKgNBqvat6yEUtym49UWn3dAB4xkQJfIRzBiES9iPYy/fDqTQp8T+5aJK9 0j+otB5LMXsdmSN3c0XrsDQSxysGUu5eV73hd0uTIFrAUfSTmeadN/YrGnpErVy+9XQybr uhCgHdRuHdq/W4azeTxYdgsys98U0CI8E269X9+a95MRx5Upp6lorc8l4LsgOTOTNpe+7Y 3Rjma2Mof4yUxWF9d/ihuq0JMHz5PXFGz6xAOedJjZ27EXSuneTbS7a4K+5OK/UB0KSHwp ZN9TTxwXaHu2crYUimrvhUoel7ZTQ90n/2jQLUth+gi9If506CVsTdqjaJ+TGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727362052; a=rsa-sha256; cv=none; b=gM0jPKspOzX2+JqrcI4fJi52Yjt7lXMHAVTMBB+VZN9Hz2A1SVNDj+PKOaFVp57U6kW80R 4coGRxpkmorV5nWR1OgE0P2ORC+J05Xu2j1SrxMVyoJ/728GxNJ79AKyBWHXuHELS2kItl bhkoRPOJelSnuzob4IChgL+S88rRHh7Pd12SRUgsvyZAK7gZtqC6Rn5iAzMvZy0XYeQrm7 hMckUU9rM9ihGkwAe31iLVpzuxs3zz2jBUpFoiMALuyCRmo5eD7Gija0P0TwVMf484Jykc omON9jdvQGhc4tZeV5mZ0WFkAAA+OGcXpH+2Ora8of8tUJtiX4tIdb+hqBBkOg== 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 4XDxK0002sz119K; Thu, 26 Sep 2024 14:47:31 +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 48QElVqc036936; Thu, 26 Sep 2024 14:47:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QElVSq036933; Thu, 26 Sep 2024 14:47:31 GMT (envelope-from git) Date: Thu, 26 Sep 2024 14:47:31 GMT Message-Id: <202409261447.48QElVSq036933@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ddbbc129ae0f - stable/14 - faccessat(2): Honor AT_SYMLINK_NOFOLLOW 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ddbbc129ae0fc35cef2834b308097ae1490176e3 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ddbbc129ae0fc35cef2834b308097ae1490176e3 commit ddbbc129ae0fc35cef2834b308097ae1490176e3 Author: Fernando Apesteguía AuthorDate: 2024-08-11 15:43:04 +0000 Commit: Ed Maste CommitDate: 2024-09-26 13:13:50 +0000 faccessat(2): Honor AT_SYMLINK_NOFOLLOW Make the system call honor `AT_SYMLINK_NOFOLLOW`. Also enable this from `linux_faccessat2` where the issue arised the first time. Update manual pages accordingly. PR: 275295 Reported by: kenrap@kennethraplee.com Approved by: kib@ Differential Revision: https://reviews.freebsd.org/D46267 (cherry picked from commit 5ab6ed93cd3680f8b69dd4d05823f4740a2bdef9) --- bin/ln/symlink.7 | 5 ++--- lib/libc/sys/access.2 | 8 +++++--- sys/compat/linux/linux_file.c | 6 ++++-- sys/kern/vfs_syscalls.c | 7 ++++--- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/bin/ln/symlink.7 b/bin/ln/symlink.7 index 5c5d0a64026c..28d9908f2053 100644 --- a/bin/ln/symlink.7 +++ b/bin/ln/symlink.7 @@ -26,9 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)symlink.7 8.3 (Berkeley) 3/31/94 -.\" -.Dd February 16, 2015 +.Dd August 11, 2024 .Dt SYMLINK 7 .Os .Sh NAME @@ -146,6 +144,7 @@ unless given the .Dv AT_SYMLINK_NOFOLLOW flag: .Xr chflagsat 2 , +.Xr faccessat 2 , .Xr fchmodat 2 , .Xr fchownat 2 , .Xr fstatat 2 diff --git a/lib/libc/sys/access.2 b/lib/libc/sys/access.2 index 8595444720b1..94a13dcc4dcf 100644 --- a/lib/libc/sys/access.2 +++ b/lib/libc/sys/access.2 @@ -25,9 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)access.2 8.2 (Berkeley) 4/1/94 -.\" -.Dd May 21, 2024 +.Dd August 11, 2024 .Dt ACCESS 2 .Os .Sh NAME @@ -156,6 +154,10 @@ If is equal to .Dv AT_FDCWD , operate on the current working directory. +.It Dv AT_SYMLINK_NOFOLLOW +If +.Fa path +names a symbolic link, access of the symbolic link is evaluated. .El .Pp Even if a process's real or effective user has appropriate privileges diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 1279490ae8be..1341df8bc7fc 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -636,8 +636,8 @@ linux_faccessat2(struct thread *td, struct linux_faccessat2_args *args) { int flags, unsupported; - /* XXX. AT_SYMLINK_NOFOLLOW is not supported by kern_accessat */ - unsupported = args->flags & ~(LINUX_AT_EACCESS | LINUX_AT_EMPTY_PATH); + unsupported = args->flags & ~(LINUX_AT_EACCESS | LINUX_AT_EMPTY_PATH | + LINUX_AT_SYMLINK_NOFOLLOW); if (unsupported != 0) { linux_msg(td, "faccessat2 unsupported flag 0x%x", unsupported); return (EINVAL); @@ -647,6 +647,8 @@ linux_faccessat2(struct thread *td, struct linux_faccessat2_args *args) AT_EACCESS; flags |= (args->flags & LINUX_AT_EMPTY_PATH) == 0 ? 0 : AT_EMPTY_PATH; + flags |= (args->flags & LINUX_AT_SYMLINK_NOFOLLOW) == 0 ? 0 : + AT_SYMLINK_NOFOLLOW; return (linux_do_accessat(td, args->dfd, args->filename, args->amode, flags)); } diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 0915751785f4..fbb1e1cdda92 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2153,7 +2153,8 @@ kern_accessat(struct thread *td, int fd, const char *path, struct nameidata nd; int error; - if ((flag & ~(AT_EACCESS | AT_RESOLVE_BENEATH | AT_EMPTY_PATH)) != 0) + if ((flag & ~(AT_EACCESS | AT_RESOLVE_BENEATH | AT_EMPTY_PATH | + AT_SYMLINK_NOFOLLOW)) != 0) return (EINVAL); if (amode != F_OK && (amode & ~(R_OK | W_OK | X_OK)) != 0) return (EINVAL); @@ -2173,8 +2174,8 @@ kern_accessat(struct thread *td, int fd, const char *path, } else usecred = cred; AUDIT_ARG_VALUE(amode); - NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | - AUDITVNODE1 | at2cnpflags(flag, AT_RESOLVE_BENEATH | + NDINIT_ATRIGHTS(&nd, LOOKUP, LOCKSHARED | LOCKLEAF | + AUDITVNODE1 | at2cnpflags(flag, AT_RESOLVE_BENEATH | AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH), pathseg, path, fd, &cap_fstat_rights); if ((error = namei(&nd)) != 0) goto out; From nobody Thu Sep 26 15:18:41 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 4XDy0x73JBz5XQG1; Thu, 26 Sep 2024 15:18: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDy0x6TwMz4jmd; Thu, 26 Sep 2024 15:18:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727363921; 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=yY5swstHorbRrfwmRL2NHyQ4QFUHfQ5R738mDpXbAUk=; b=GAH5f3m2FZJeNsoZqU2Ebrr4bBrQoQEiShqt72hYwG9Chzd+Vw7y0AblRJOyEmTLP87HWT AQd4iaAVXjJljHSORNcJu2U05cc00xW69CjlbpabaC0pV4ys01DWVA/w7rYV0Vfn5k8wzg Nzb0r5KcI+MneIPjrx1/X3ZeZ1PmA1UiOnsaLuVwNA83+lP9HwdvuB1Vo9j6/k4dT81MIV PY1gj0GHWOErTKJo/rumoebL0UjynlFnBYLhHrZloxm+aOtcHot6PY2CsaKffVywxDuln2 XQpcKwFcGWywCs5QYQq8STiUOBwOMyU7uyOMD5ifxm0BEecPoL6OrjoSABvJog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727363921; 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=yY5swstHorbRrfwmRL2NHyQ4QFUHfQ5R738mDpXbAUk=; b=l6Sj0ug15Duz/ulJJkQo4CF7NVHD7ErcsoEUshw+7ToWLpUQe7eiJAkOIerFjQec7wSNr0 pJmvem6N/f9VvvcW1lUYOmo8rwpBjGBoTJ1y1L4hUcEvT29hpybmICFuDfiyZ6THOLYITX Cu7Eqy0yuOdm5iGHmfDYzN1IT89d6sZ1L+fr4GkP6sFJrCC9ST1SXZmPGFxHiMmtCQ3rQn DwUL2ScoTde1wY5+Atop5WGC1hlxvUKCVO9BPVmOhVHqJsTdiazMa8WMHac8nuPoW9tQZG DW98Tut0iIVsF0yA2tsHYQseJg9JN8+RmfeI1z2NEBEWMzYLVmbgSZMjQDEmOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727363921; a=rsa-sha256; cv=none; b=OHah5TrK/ShiTrFr7sVLz4X5k0b+heOGAMHmirLXzk7Zv+hIlEb+HtoZbfrctE2vNUNFkj Ujj9z1dUcuM2SN6nadPH/4f3hg5zacDoHA7MYI1Khdrg/wuF4QsIUlFrDxjnOIR+rQT+Ky nfuMpXqkPXejp7CzpyVQP2sm2BIBNpgpHnzTKigSsvyU6MEWmOyTD9tRC975YB7RmmDAaB zXCyyUzf4BXXRNQSCY/iEJs45xbSfdDvxmL34OCRusclan4z20FGHQRq4CJy0qWFEqMrWY Su/+fk3TvR9mMtCuCsCOA50GLxTNqb3O3Hz4UOnNO0mULzdRY5pCRB8kj1YHPQ== 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 4XDy0x5zZhz12HJ; Thu, 26 Sep 2024 15:18: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 48QFIfWA088340; Thu, 26 Sep 2024 15:18:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QFIfWb088337; Thu, 26 Sep 2024 15:18:41 GMT (envelope-from git) Date: Thu, 26 Sep 2024 15:18:41 GMT Message-Id: <202409261518.48QFIfWb088337@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f28d5ac5c4a4 - main - pf tests: fix max_states test 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f28d5ac5c4a498883b626db163c86b5112889078 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f28d5ac5c4a498883b626db163c86b5112889078 commit f28d5ac5c4a498883b626db163c86b5112889078 Author: Kajetan Staszkiewicz AuthorDate: 2024-09-26 14:48:57 +0000 Commit: Kristof Provost CommitDate: 2024-09-26 14:50:45 +0000 pf tests: fix max_states test Ensure our rule with '(max 3)' only matches the TCP states we're counting. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D46795 --- tests/sys/netpfil/pf/max_states.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/sys/netpfil/pf/max_states.sh b/tests/sys/netpfil/pf/max_states.sh index 677d6f473d97..03142eeaffa6 100755 --- a/tests/sys/netpfil/pf/max_states.sh +++ b/tests/sys/netpfil/pf/max_states.sh @@ -39,14 +39,14 @@ max_states_body() pft_set_rules router \ "block" \ - "pass quick inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ - "pass in on ${epair_tester}b keep state (max 3)" \ - "pass out on ${epair_server}a keep state" + "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ + "pass in on ${epair_tester}b inet6 proto tcp keep state (max 3)" \ + "pass out on ${epair_server}a inet6 proto tcp keep state" - # The exact limit is off by 1 ping_dummy_check_request exit:0 --ping-type=tcpsyn --send-sport=4201 ping_dummy_check_request exit:0 --ping-type=tcpsyn --send-sport=4202 - ping_dummy_check_request exit:1 --ping-type=tcpsyn --send-sport=4203 + ping_dummy_check_request exit:0 --ping-type=tcpsyn --send-sport=4203 + ping_dummy_check_request exit:1 --ping-type=tcpsyn --send-sport=4204 } max_states_cleanup() From nobody Thu Sep 26 15:23:26 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 4XDy6Q5pSHz5XQtF; Thu, 26 Sep 2024 15:23:26 +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 4XDy6Q5Dtnz4kc4; Thu, 26 Sep 2024 15:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727364206; 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=GcvwuZ3hqj5S3Zwqyh93LFDpRq7cTd5UXi1Sz6GqE6Q=; b=k2NAB+qYkl5MlQkUTcZgKX5Ym4tn67L3qTstEwFUtIXIxksZXE6MZXbUl4RPZXHkSbEcw+ yf8uTibaFtyk34D2iZ2XnuYQGzm3x261Ls38oHB6QPWLqKQmfZMMkBi74EgIisjwtsqaf1 24C7soEMBOfkH58TjxP1/6WDexE4Yr59DhyLizQlD7bu/NXNHD2FcGt6VFAqTHENX3MFyv bFbGa2eouCM+jE+XoDQjk1SnySSEi+x3U/x8rpWTspJY2Mye1ifxkj4VuoE0ANj0bZMc46 K6N8QyT+GKDRuob9oHKB6Ll54F0WDT8vYygKj3OczwxPpIOKtVX3R0XDi0LVWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727364206; 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=GcvwuZ3hqj5S3Zwqyh93LFDpRq7cTd5UXi1Sz6GqE6Q=; b=FPwS9iiSo1avgga9xHOBE9Z0grsNt/ojaB3HiQnxTzgk2XBFhgus8F1DGDUlspM7Ma9YfE f1FFhX6FIHXWC6mUQj5jTReRIKaAoUWp0JnC9MSqadktXYmWSnaopV+U1ZRmt0KE4UF4VS TCVgOeeY9/ZPliQNDusYgSDHrAt1tYPKu2XU5uK1lM3pTlzpvt3xXBKQWv6oDCbJlx9ofI lTL3XUFhWn1fFy/QI8xLvN0p/sKSpYS2QQ/6Vf8N2av+Gs/aI2i5MyAQHqz/OnVCkus9vI 9NQZi8EJRqzp5TK/LQcfgk0vh3EnhGZw+5xbRHJybnNjhvvVexA41wsNg9jfVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727364206; a=rsa-sha256; cv=none; b=JKMuU6kpyXSDJm+NYmk2+7kFQYBX7xev9PGWDcAL/AdrfyISbERtBokvFMYbHRTh97Ok/Z DZghWYoHLlnznYdazdF4/nauLzU23oJ2fJdbJvoyvULdbFSxFMGFncB618sR7o86kgwC4A PZS9+/O458BNmmM1oFNUu/p1om3RCnp1Ws/P1S2vAUnXevQPrLDmOuzW87C1o2XJmZIeE7 AMLeQgSPJpvwbp6TCOvm4Pm0amgVMSgBgDxrqAGiECJubmpmqR+0lPljpvJE1amK1SUI1F 9Sogr/H721sYRDr8poC8TJDmdIBPOZU4u0vXk4UooM1Kxxi5poD+gFmdD0M0IA== 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 4XDy6Q4lBPz12JC; Thu, 26 Sep 2024 15:23:26 +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 48QFNQWB004463; Thu, 26 Sep 2024 15:23:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QFNQ0u004460; Thu, 26 Sep 2024 15:23:26 GMT (envelope-from git) Date: Thu, 26 Sep 2024 15:23:26 GMT Message-Id: <202409261523.48QFNQ0u004460@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Rabson Subject: git: a3d5dec42007 - main - release(7): fix the spelling of git.FreeBSD.org 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: dfr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3d5dec42007a74bfc38a0210a80a3f77efb8cb7 Auto-Submitted: auto-generated The branch main has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=a3d5dec42007a74bfc38a0210a80a3f77efb8cb7 commit a3d5dec42007a74bfc38a0210a80a3f77efb8cb7 Author: Doug Rabson AuthorDate: 2024-09-26 15:20:42 +0000 Commit: Doug Rabson CommitDate: 2024-09-26 15:20:42 +0000 release(7): fix the spelling of git.FreeBSD.org --- share/man/man7/release.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man7/release.7 b/share/man/man7/release.7 index 0a56f0762591..c81f540d9463 100644 --- a/share/man/man7/release.7 +++ b/share/man/man7/release.7 @@ -150,7 +150,7 @@ The .Xr git 1 host used to check out the various trees. Defaults to -.Pa https://git.FreeeBSD.org . +.Pa https://git.FreeBSD.org . .It Va SRCBRANCH The .Li src/ From nobody Thu Sep 26 20:38:01 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 4XF55P57q4z5Xkw5; Thu, 26 Sep 2024 20:38:01 +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 4XF55P4ddhz4G7L; Thu, 26 Sep 2024 20:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727383081; 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=7et0GZSfrFZOaCgzCclb/BQ0by4QPdiE0W54n+yy4LM=; b=V5iitLLxpgrQmHAA2ILgjvczdHJO8wlDpf09I205CF9nvnwKU3aksXbX77EXGXQ6Gz62DR 2sOgpTtksTFgf0WnQ31G5xzSagvmcEj6PsCjDOwoWk1BlP1g971GsAsH8eMi60UharDa9s E1+IKNBixB4TjRSp+2MO1MHwdZHbAwBI7KDnGzUZHdQ39HZy9aYDf8ti+ekHzemkX0f7U5 jo8H3MCaLj1SCGKbOosZZEYZAJLmAEV0NWj1HGKdT4gFJ6R7Yt6ZQqJNIz4+6e9d+MWiI/ RBxzto/neNM5/Ka1sWhMNC7fkVxBLqIrndyFdN6w35m1+gSvaqh92cnrYuoCnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727383081; 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=7et0GZSfrFZOaCgzCclb/BQ0by4QPdiE0W54n+yy4LM=; b=b1n1+imuIewFG11EFMSD7HNuTrQYfuFbF6aGhQW+d2mz3G3dDkVeQLPMHLs5w060D5t9JO qw7iDobIzEe7ZYlibN/fhx2D01bK3K9wavnvWz0CInwOEGCD1QhCjIPljNIEbx6+3bxH2L 6mzonexNwpG45bL3GEWdf47xlcKzyI+tYreZEhgmdIE5IHqTpLdqXO7amFpUG/PiVyiWtE PvHQk+wTOkq7EkjRWV6vHMbpyrEaCQx2fRtcoAM5D+2lwN9/kc+pLP5IVaZIaHpK/75XER 0HubjIygZP33M83neC/schG4wPD4UMyZWkmyftMcHz+OebhZ8zMVUG6WYGg+9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727383081; a=rsa-sha256; cv=none; b=Li6oMAWupgwl8as2S9JgKi5pzpja36N3oxLRRQrhq8U8FU/zxPFlY93qOH18Vnt0Wq10qc aq10AQlWG/XtHvhfNSnitZAZmaDCwTWgFmIGCveq0KXOyNk2ROod06yUZQLkudPgyYARYd Fkmnv6uHUowS4X+5NxiRY5RfL6Y56hVx8gpWnZwQux7F407Rj0nVlt0YMxVwYQbHYx/50y gi/rQtvDebNiimHR/yBg4e3t8HRkITFbF62C9tm/TrVtXhRmV20bnEc38rXjX7es/0EFs+ hYvgmJ6v+wPWEH7jfjFzwPVG7WBKr0pJA4cZvZNGhS3vT0YqGdAZdEU1/o4n2g== 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 4XF55P448Cz19S1; Thu, 26 Sep 2024 20:38:01 +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 48QKc1wq029148; Thu, 26 Sep 2024 20:38:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QKc17r029145; Thu, 26 Sep 2024 20:38:01 GMT (envelope-from git) Date: Thu, 26 Sep 2024 20:38:01 GMT Message-Id: <202409262038.48QKc17r029145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 71fa171c6480 - main - bhyve: Initialize stack buffer in pci_ahci 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 71fa171c6480d60f4d9c01dea1c71a7249e7b8ab Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=71fa171c6480d60f4d9c01dea1c71a7249e7b8ab commit 71fa171c6480d60f4d9c01dea1c71a7249e7b8ab Author: Pierre Pronchery AuthorDate: 2024-07-23 14:34:03 +0000 Commit: Ed Maste CommitDate: 2024-09-26 18:06:10 +0000 bhyve: Initialize stack buffer in pci_ahci In the function ahci_handle_dsm_trim, if the call to read_prdt fails, the variable buf[512] is used while it contains uninitialized data. It is easy to make the call to read_prdt fail, for instance if hdr->prdtl == NULL, the function will return without writing anything in buf. In addition, this code could be hardened by checking the value of done before accessing &buf[done]. Reported by: Synacktiv Reviewed by: markj Security: HYP-15 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46090 --- usr.sbin/bhyve/pci_ahci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/pci_ahci.c b/usr.sbin/bhyve/pci_ahci.c index 636df5c6e9b1..87a8212b9fb7 100644 --- a/usr.sbin/bhyve/pci_ahci.c +++ b/usr.sbin/bhyve/pci_ahci.c @@ -781,7 +781,7 @@ ahci_handle_flush(struct ahci_port *p, int slot, uint8_t *cfis) assert(err == 0); } -static inline void +static inline unsigned int read_prdt(struct ahci_port *p, int slot, uint8_t *cfis, void *buf, unsigned int size) { @@ -808,6 +808,7 @@ read_prdt(struct ahci_port *p, int slot, uint8_t *cfis, void *buf, to += sublen; prdt++; } + return (size - len); } static void @@ -820,6 +821,7 @@ ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done uint32_t len, elen; int err, first, ncq; uint8_t buf[512]; + unsigned int written; first = (done == 0); if (cfis[2] == ATA_DATA_SET_MANAGEMENT) { @@ -831,9 +833,12 @@ ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done len *= 512; ncq = 1; } - read_prdt(p, slot, cfis, buf, sizeof(buf)); + written = read_prdt(p, slot, cfis, buf, sizeof(buf)); + memset(buf + written, 0, sizeof(buf) - written); next: + if (done >= sizeof(buf) - 8) + return; entry = &buf[done]; elba = ((uint64_t)entry[5] << 40) | ((uint64_t)entry[4] << 32) | From nobody Thu Sep 26 20:56:01 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 4XF5VF15dRz5Xltv; Thu, 26 Sep 2024 20:56:05 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XF5VD5bTVz4Jv4; Thu, 26 Sep 2024 20:56:04 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727384164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I3WBCbvr48rbEtut0OH6zcjmuTM5z6WyyYJzi+nQtrA=; b=lKVQdtSq3+dAAuzfB0qhZgN2ytrWNcLUDYqWmLITLvYenBwiT7nYAvXQkqtRxxFg9+GUAi aEMH8JQy9op9JED4NC7f42hQyfSaBvF224QiiLW8YqL0PJqKfTb+OjiY5nzmoIex1zvz4y B3X8qgLE2VIIOIMN5t3zy15by6bEhzGOqfb8EkV0yVl/+I0Wm/8HwRZ1kgiQmTOQjPhT7o sgCZpAbUhsCT8zu6Aabyi+KowC2Y7TxYKPtAVMo5pzvH+PE6RqqYjmeWmGbSv9sea1LL78 AnwCtEqGWyeTtO6ugCu0vRJoQHujN8AgWeb6DMF5cbid14DciSnWYgc2mZsfGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727384164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I3WBCbvr48rbEtut0OH6zcjmuTM5z6WyyYJzi+nQtrA=; b=LdER6LjdDnENrPe2wu2oMFSrbDDVspFx3kecllGDOqiDvb3BC7YdKlnuNTAoQrLhtuB/5J 8dZaVjUTHyNQQ0/+/n87TykiICIIwCrK4ByYwO3G0LzMZCwSYlUFIStvEyS+KNSXKYKJK6 S8+Mtqt5pSM8I+qtCjVvQlY0GWg6yzbwL+Sqiarom3RAxIL2yOWvh4ry6uedbUJTWLwdN7 sQVAiPwB2AHL75a3G3s1K2bI6kQ/SE1HqChyd9y6i1m59HNlKjj1kwStRmAPwlRlfuC/uy eYE1QQffFx0dNEiVuU6+K+mnSOGTjG8uDTlVxF14ZeUsS67KJ+CNFLzn199U4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727384164; a=rsa-sha256; cv=none; b=LJw8fU1g0A7Mn0Jzdtl27e+xfEwQNZKrDEuuOXWeSzCteE2A324OukldRlsNCstm48pbE3 gTxv+5exPp8QEzTchQVlZdjdZtnTEcpBj5okdOTMN70xeiqKfZxUhIegeZejzBsOSMkE/x FLIua2JbBgC0xJqeE/C8ODkpkYHVMxRIHWg8KVPRY+lTLvfWrUbXRYEYz3Gt4PUW38b69B OcDoZCqF/lbnCXlD3h//xuZ+L5ObnouHwmi8qjRZGoHZLuTg1X7nBHqDwglDKYadqtjTUi IZDv/3MqFxwqdXBNqOeM+eseP0maC4+yAP2VHcRXP1dzj/lUsrshfElN/F0iVA== Received: from aniel.nours.eu (nours.eu [IPv6:2001:41d0:8:3a4d::1]) (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) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XF5VD3ZynzSlL; Thu, 26 Sep 2024 20:56:04 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 8F152120BDC; Thu, 26 Sep 2024 22:56:01 +0200 (CEST) Date: Thu, 26 Sep 2024 22:56:01 +0200 From: Baptiste Daroussin To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: cf73401c4f7a - main - diff3: Fix merge mode. Message-ID: References: <202409251715.48PHFLuQ047265@gitrepo.freebsd.org> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <202409251715.48PHFLuQ047265@gitrepo.freebsd.org> On Wed 25 Sep 17:15, Dag-Erling Smørgrav wrote: > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=cf73401c4f7af063c91a0c8e4d5b46e08f06db87 > > commit cf73401c4f7af063c91a0c8e4d5b46e08f06db87 > Author: Dag-Erling Smørgrav > AuthorDate: 2024-09-25 17:14:32 +0000 > Commit: Dag-Erling Smørgrav > CommitDate: 2024-09-25 17:14:55 +0000 > > diff3: Fix merge mode. > > This is mostly thj@'s work, with some tweaks and cleanup by me. There > are still some cases where our output differs from GNU diff3, but it's > much better than before and I'd rather commit what I have now than let > it continue to languish in a metaphorical drawer. > > MFC after 3 weeks > Sponsored by: Klara, Inc. > Reviewed by: thj > Differential Revision: https://reviews.freebsd.org/D46762 > --- > usr.bin/diff3/diff3.c | 255 +++++++++++++++++++++++++++++++++++--------------- > 1 file changed, 179 insertions(+), 76 deletions(-) > > diff --git a/usr.bin/diff3/diff3.c b/usr.bin/diff3/diff3.c > index c72ea0747589..f20b1d74678d 100644 > --- a/usr.bin/diff3/diff3.c > +++ b/usr.bin/diff3/diff3.c > @@ -79,7 +79,6 @@ > #include > #include > > - > /* > * "from" is first in range of changed lines; "to" is last+1 > * from=to=line after point of insertion for added lines. > @@ -90,6 +89,7 @@ struct range { > }; > > struct diff { > +#define DIFF_TYPE1 1 > #define DIFF_TYPE2 2 > #define DIFF_TYPE3 3 > int type; > @@ -147,6 +147,7 @@ static void keep(int, struct range *); > static void merge(int, int); > static void prange(struct range *, bool); > static void repos(int); > +static void separate(const char *); > static void edscript(int) __dead2; > static void Ascript(int) __dead2; > static void mergescript(int) __dead2; > @@ -154,7 +155,7 @@ static void increase(void); > static void usage(void); > static void printrange(FILE *, struct range *); > > -static const char diff3_version[] = "FreeBSD diff3 20220517"; > +static const char diff3_version[] = "FreeBSD diff3 20240925"; > > enum { > DIFFPROG_OPT, > @@ -189,49 +190,110 @@ usage(void) > "[-L label3] file1 file2 file3\n"); > } > > +static int > +strtoi(char *str, char **end) > +{ > + intmax_t num; > + > + errno = 0; > + num = strtoimax(str, end, 10); > + if ((end != NULL && *end == str) || > + num < 0 || num > INT_MAX || > + errno == EINVAL || errno == ERANGE) > + err(1, "error in diff output"); > + return (int)num; > +} > + > +/* > + * Read diff hunks into the array pointed to by *dd. > + * > + * The output from `diff foo bar` consists of a series of hunks describing > + * an addition (lines in bar not present in foo), change (lines in bar > + * different from lines in foo), or deletion (lines in foo not present in > + * bar). Each record starts with a line of the form: > + * > + * a[,b]xc[,d] > + * > + * where a, b, c, and d are nonnegative integers (b and d are printed only > + * if they differ from a and c, respectively), and x is either 'a' for an > + * addition, 'c' for a change, or 'd' for a deletion. This is then > + * followed by a series of lines (which we ignore) giving the added, > + * changed, or deleted text. > + * > + * For an addition, a == b is the last line in 'foo' before the addition, > + * while c through d is the range of lines in 'bar' to be added to 'foo'. > + * > + * For a change, a through b is the range of lines in 'foo' to be replaced > + * and c through d is the range of lines in 'bar' to replace them with. > + * > + * For a deletion, a through b is the range of lines in 'foo' to remove > + * and c == d is the line in 'bar' which corresponds to the last line > + * before the deletion. > + * > + * The observant reader will have noticed that x is not really needed and > + * that we can fully describe any hunk using only a, b, c, and d: > + * > + * - an addition replaces a zero-length range in one file with a > + * non-zero-length range from the other > + * > + * - a change replaces a non-zero-length range in one file with a > + * non-zero-length range from the other > + * > + * - a deletion replaces a non-zero-length range in one file with a > + * zero-length range from the other > + */ > static int > readin(int fd, struct diff **dd) > { > int a, b, c, d; > - size_t i; > + int i; > char kind, *p; > FILE *f; > > f = fdopen(fd, "r"); > if (f == NULL) > err(2, "fdopen"); > - for (i = 0; (p = getchange(f)); i++) { > + for (i = 0; (p = getchange(f)) != NULL; i++) { > + if ((size_t)i >= szchanges - 1) > + increase(); > #if DEBUG > (*dd)[i].line = strdup(p); > #endif /* DEBUG */ > > - if (i >= szchanges - 1) > - increase(); > - a = b = (int)strtoimax(p, &p, 10); > - if (*p == ',') { > - p++; > - b = (int)strtoimax(p, &p, 10); > - } > + a = b = strtoi(p, &p); > + if (*p == ',') > + b = strtoi(p + 1, &p); > kind = *p++; > - c = d = (int)strtoimax(p, &p, 10); > - if (*p == ',') { > - p++; > - d = (int)strtoimax(p, &p, 10); > - } > + c = d = strtoi(p, &p); > + if (*p == ',') > + d = strtoi(p + 1, &p); > + if (*p != '\n') > + errx(1, "error in diff output"); > if (kind == 'a') > a++; > - if (kind == 'd') > + else if (kind == 'c') > + /* nothing */ ; > + else if (kind == 'd') > c++; > + else > + errx(1, "error in diff output"); > b++; > d++; > + if (b < a || d < c) > + errx(1, "error in diff output"); > (*dd)[i].old.from = a; > (*dd)[i].old.to = b; > (*dd)[i].new.from = c; > (*dd)[i].new.to = d; > + if (i > 0) { > + if ((*dd)[i].old.from < (*dd)[i - 1].old.to || > + (*dd)[i].new.from < (*dd)[i - 1].new.to) > + errx(1, "diff output out of order"); > + } > } > - if (i) { > - (*dd)[i].old.from = (*dd)[i - 1].old.to; > - (*dd)[i].new.from = (*dd)[i - 1].new.to; > + if (i > 0) { > + (*dd)[i].old.from = (*dd)[i].old.to = (*dd)[i - 1].old.to; > + (*dd)[i].new.from = (*dd)[i].new.to = (*dd)[i - 1].new.to; > } > fclose(f); > return (i); > @@ -264,7 +326,7 @@ getchange(FILE *b) > { > char *line; > > - while ((line = get_line(b, NULL))) { > + while ((line = get_line(b, NULL)) != NULL) { > if (isdigit((unsigned char)line[0])) > return (line); > } > @@ -305,15 +367,23 @@ merge(int m1, int m2) > d2 = d23; > j = 0; > > - while (t1 = d1 < d13 + m1, t2 = d2 < d23 + m2, t1 || t2) { > + for (;;) { > + t1 = (d1 < d13 + m1); > + t2 = (d2 < d23 + m2); > + if (!t1 && !t2) > + break; > + > /* first file is different from the others */ > if (!t2 || (t1 && d1->new.to < d2->new.from)) { > /* stuff peculiar to 1st file */ > if (eflag == EFLAG_NONE) { > - printf("====1\n"); > + separate("1"); > change(1, &d1->old, false); > keep(2, &d1->new); > change(3, &d1->new, false); > + } else if (eflag == EFLAG_OVERLAP) { > + j = edit(d2, dup, j, DIFF_TYPE1); > + printdiff(d2); This is defined nowhere, so the code does not build. Best regards, Bapt From nobody Thu Sep 26 21:13:15 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 4XF5t32Ktnz5XmVV; Thu, 26 Sep 2024 21:13:15 +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 4XF5t31pL6z4Kcl; Thu, 26 Sep 2024 21:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727385195; 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=W1apw//GmYBfdtlk0qxrNF7YEYy1NB4/UOH12MzZIPE=; b=glCu2UDBq9bzPQlQEyN1Lft6RxI/MvLtyB6iD4DDvzBSW6hBONVW6rLbCjlYTgNY/4sZRc w51i9TVo9XebWOyTpUwB4tY5xHPMBu/E4v0djLadQWJZPrcQvmcNPcMAZR/bakLVEA5MSG rzeW6kulpwuiTIT908pxKTXAOt36Q8952I5x8IxrjlTly8+o40jVu1RcXALfocw7nsjkPP 9KbIl1I1YeLUQNvoBmmygGTPYGICYYO630i1RdBRffmKd0Jm/YHaR2L2YnSDA0rXcjy+zI waUbf1TEmMRR9Jv+vwG62U7f9SOfE1MpfX5gbCIuA0NVN9r5F0FuGqgmbOln/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727385195; 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=W1apw//GmYBfdtlk0qxrNF7YEYy1NB4/UOH12MzZIPE=; b=mizS6OOCg40RKHFctsGVRkHF0c8Gnb4WSv+U/wACeMpa4yYhneYVubiTZJtI/ldNRB+xNQ jy34gaSDrP/VCm6TJpNVrrbFiWHhd+5D7Z5/ipdnbTu4VYZytOlpfiKvfyTLVCe6fgf3XD neyC14EuMJlQb59us2XFGLZQ9DurRHTJquY11hzNjdGOSSZcvSsp/sDoF+s0h+r44xIA5g 143NwoX7W/e3AJE1ruJ41YfcRngjyLeqNcDShUlglGdpUAdI39CdLP+qtP9KvbTjwpD2BK MTP8Dte9+byvwXNlkGO6meo/66dFfk4pz0joZFEaL28saKiGrFFbxZaVIUXqhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727385195; a=rsa-sha256; cv=none; b=cPQD+cKF3ymKFzRnr2rZik/J2jN+QsykIpN3B9nAU+mFvQPFNja/TpgnZQLGpjdvR4VkWf qn9K8XuWxtiZK4BTL19wXIssUBtzv7+96Vm09zRNKxHJ9ssXXXSKfLDOcH3oVeKj6X/+Um l2cOORB04lpqvpE3hAqDaACC0CDFePQraYniN8vK901+TCHVUki9vxp5vLWo85eRcewKJn hxGH776W195pfuDfNoeHlTZvbcfptplAP/jIVfC95FsDeXe6fKLBTsOZ+OHU1/6X/uT5t7 AVYvdQXRQnYGrKM9oBuMsfqhmaFedAjAaQ6iQUnh8q/QM6y0v/FFPKzsrsgmgA== 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 4XF5t31Pdsz1CLd; Thu, 26 Sep 2024 21:13:15 +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 48QLDFLT096498; Thu, 26 Sep 2024 21:13:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QLDFqi096495; Thu, 26 Sep 2024 21:13:15 GMT (envelope-from git) Date: Thu, 26 Sep 2024 21:13:15 GMT Message-Id: <202409262113.48QLDFqi096495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: f10f288faf08 - main - diff3: Remove debugging remnant. 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f10f288faf0808ca91aedab6fbb2c82d3a3b6532 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f10f288faf0808ca91aedab6fbb2c82d3a3b6532 commit f10f288faf0808ca91aedab6fbb2c82d3a3b6532 Author: Dag-Erling Smørgrav AuthorDate: 2024-09-26 21:11:02 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-09-26 21:12:39 +0000 diff3: Remove debugging remnant. Fixes: cf73401c4f7a MFC after: 3 weeks --- usr.bin/diff3/diff3.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.bin/diff3/diff3.c b/usr.bin/diff3/diff3.c index f20b1d74678d..39523f6e6b38 100644 --- a/usr.bin/diff3/diff3.c +++ b/usr.bin/diff3/diff3.c @@ -383,7 +383,6 @@ merge(int m1, int m2) change(3, &d1->new, false); } else if (eflag == EFLAG_OVERLAP) { j = edit(d2, dup, j, DIFF_TYPE1); - printdiff(d2); } d1++; continue; From nobody Thu Sep 26 23:17:45 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 4XF8dk1v3Xz5X9Ct; Thu, 26 Sep 2024 23:17:46 +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 4XF8dk1Jqkz4VnW; Thu, 26 Sep 2024 23:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727392666; 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=dO7FcmIKjyul1h8O4/U1jdHemSS0B9Nf3HtBV6VGGpU=; b=x+fc3oPM0xF0Nwd8VsosuTchL9UL9p5eUhADihf6FqzMsKPlkfjAFC0vHTkRq6tdpoj21Q x2oqVCggw+DbYlnozqDUTDxVup7g7NF9Jy2LQefeAg3hkQ45e2usUjN7C0tkdBYfFEeM9E kEAipXv3TVvt2MSb/HTdUs0V8yYmalmpug8KiCBDvfYilJfYxMvpRE5YM0yDw3GrGla5wh /7kswSjneh06oQQMW1jd6UZsElniMUTv3vau2assmARY3Z8IGOX+COBquMP4Vh5z14q8Ga 6dR3LrG0ve34uT1GW8Ybq/rCqUyU/aF1VYMkd+X3iPGZtky1VWCOtoyMHg2lJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727392666; 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=dO7FcmIKjyul1h8O4/U1jdHemSS0B9Nf3HtBV6VGGpU=; b=C3bfOCDdXqfS5mcwi8ZBUkRB3rQD+Z+G8w0Ny1UzpSC0ubLei47sC3X169H5Vg+SQIqsyL kenkR/1wPXgS87/S5Tg3nxnVc5qBJacs6ZW65f9qLwkRYq3XIdhNW2Lo1zKG39tzNCZ2tT csaJYE3CrbQusWy2pYOeH607P/EJ+8Ahz64vVoMXJC4dYYg5Ihz/jYIV9s4KqExPhvYhVt hM8bM9eC+go2vSiSq0rNUH9+nT7n6167Wfld9+no26PyFetOMWsKAXw/1JGSdqiB8ayWI3 0ygldjDegiBg+cSPlwPZKremJ/v39Jf/mk4RM6xVuTnglycFb5csBjP20p/GVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727392666; a=rsa-sha256; cv=none; b=hXlSqViwSDaqzVre7Nv9wrqgcTniyW0RI8+tIGqc8lY4Tq6QAZMLotKZ57btKXmltQqmeq +sniniPy1HEuBeWLc5Y0Ha6kB7WrLfjqr+UzDhQdrOw3RoxVM/TcEZSB5XkiLBldf5fNnc 2/gvu5N0PU96572+nYTF7ovJL0/kWO2sjDVdEILm38FAQ9x11yKK7w+LaJxqzCB4H/dweZ qfSsMikrKYyPbRW01yaS2pt1ePMkzuVe98jlb5DkrDlCVLrwdt8upM1Boc8QGWCvSXaAx5 kLV7kq7F+tT+rpG2AnXE6eqxWUM9n/bvRqraUKDYGidnyfzvGEW8bn4tFHY9Zw== 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 4XF8dk0Y2CzFx1; Thu, 26 Sep 2024 23:17:46 +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 48QNHjAB099747; Thu, 26 Sep 2024 23:17:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QNHjUR099744; Thu, 26 Sep 2024 23:17:45 GMT (envelope-from git) Date: Thu, 26 Sep 2024 23:17:45 GMT Message-Id: <202409262317.48QNHjUR099744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: eade2001aa9d - main - jemalloc: set LG_VADDR to 64 on amd64 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eade2001aa9d91440886de8359a4dec9edcde2a9 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=eade2001aa9d91440886de8359a4dec9edcde2a9 commit eade2001aa9d91440886de8359a4dec9edcde2a9 Author: Konstantin Belousov AuthorDate: 2024-09-16 21:09:03 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-26 22:54:25 +0000 jemalloc: set LG_VADDR to 64 on amd64 and allow to revert it back to 48 with WITHOUT_JEMALLOC_LG_VADDR_WIDE build option. Reviewed by: andrew, emaste Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46686 --- contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h | 4 ++++ lib/libc/stdlib/malloc/jemalloc/Makefile.inc | 3 +++ share/mk/src.opts.mk | 1 + tools/build/options/WITHOUT_JEMALLOC_LG_VADDR_WIDE | 5 +++++ 4 files changed, 13 insertions(+) diff --git a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h index dee4679838d8..e733906bc146 100644 --- a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h +++ b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h @@ -39,7 +39,11 @@ # define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) #endif #ifdef __amd64__ +#ifdef _USE_LG_VADDR_WIDE +# define LG_VADDR 64 +#else # define LG_VADDR 48 +#endif # define LG_SIZEOF_PTR 3 # define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) #endif diff --git a/lib/libc/stdlib/malloc/jemalloc/Makefile.inc b/lib/libc/stdlib/malloc/jemalloc/Makefile.inc index 1ba7725fe8a8..d916d69f471f 100644 --- a/lib/libc/stdlib/malloc/jemalloc/Makefile.inc +++ b/lib/libc/stdlib/malloc/jemalloc/Makefile.inc @@ -5,6 +5,9 @@ JEMALLOCSRCS:= jemalloc.c arena.c background_thread.c base.c bin.c bitmap.c \ test_hooks.c ticker.c tsd.c witness.c CFLAGS+=-I${SRCTOP}/contrib/jemalloc/include +.if ${MK_JEMALLOC_LG_VADDR_WIDE} != no +CFLAGS+=-D_USE_LG_VADDR_WIDE +.endif .for src in ${JEMALLOCSRCS} MISRCS+=jemalloc_${src} diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index f9d94ab663b0..95801cdeecc5 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -116,6 +116,7 @@ __DEFAULT_YES_OPTIONS = \ IPFW \ ISCSI \ JAIL \ + JEMALLOC_LG_VADDR_WIDE \ KDUMP \ KVM \ LDNS \ diff --git a/tools/build/options/WITHOUT_JEMALLOC_LG_VADDR_WIDE b/tools/build/options/WITHOUT_JEMALLOC_LG_VADDR_WIDE new file mode 100644 index 000000000000..9efc4022e9cf --- /dev/null +++ b/tools/build/options/WITHOUT_JEMALLOC_LG_VADDR_WIDE @@ -0,0 +1,5 @@ +Disallow programs to use more than 48 address bits on amd64. +Incompatible with LA57 mode. +Enabling this option might result in a slight reduction in memory +consumption for jemalloc metadata, but also requires disabling LA57 +(if hardware supports it). From nobody Thu Sep 26 23:17:47 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 4XF8dl2kkrz5X9Nc; Thu, 26 Sep 2024 23:17:47 +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 4XF8dl1zDnz4VXC; Thu, 26 Sep 2024 23:17:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727392667; 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=HOYhXEm77ki3/syf/WtO8HQrVdBYSQCbPuoUWhCqLEw=; b=R0rMRlrJ8ipScd2wChyDH86RnLCGKBNXqraR1kKVXwrqJzBwE0+qQ2aM0KWVYR57XM+AOK eDW/A++WwDDjnXdeTJ7F1WOQRU7T+HO7zU1+jlsf/efS6U/1Kw0rIHusZbTdYgWmO/sTzk 33tEJeA8N9IM5U1XOUhA4c3TkCj4DCpy/zBrEe0LEsyFK5JydJPKuzLveho5cJPa/FilkH QahA8Cu+oLOo+j61cl3PDuyBWNEC4+rAsjtigp3E0InZCGBYQvV9eJDE1xBqgF64fBXSPF C8HVPLx+QeKbXwykkXg0jl4d8qCDqAcPbZbKaoA13VTlLgptTipKOYMe5QtfWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727392667; 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=HOYhXEm77ki3/syf/WtO8HQrVdBYSQCbPuoUWhCqLEw=; b=AMAyDibwFp6PtkpbS8jEbxjmEfVFGQjm/IMpEt1Tb3v+ZuOEN3OcGkaIujCWSITgxcBPOa eotys8jAbyJhtlHH009qnLneFQtSkO7YhR/j42em07KfQiNWjHt3ArwxAhCE6E9pNWnfAQ 8CWDaOYQuLJDwVHLGjEOnMnA82iGf7PW8GWpfF5KEfo01MVDIgsI2uOBRO+El52CEFy7tb tgcb/igT4oQq3pd/KPtgTV4h6ayfU8tzKMQK0IhL4T/qX2/IVpr/wX9FPJjdjnd0gJoxIE XMHRGDzDVzAGO+I4Mdg05iG0/vboSlcVHT2vzxZFvgo69HNjDnC7whYTc1MXKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727392667; a=rsa-sha256; cv=none; b=yknDhKlnfxdDzyNqkiKIy9ODBbSYjqIAs64HCGkp2YIQH1mWumNUo7zOe5YRY0B1Tg5Mw8 g1fT6Sg3GSAPRVospBQ15+XZ0XtnlmBNMXQAD+eE5q7WPZNuirV6f7+5Xqz39/TUaN6aaC SBpLmiCJ3hwFoHx7tAsQ3sv+eJBtZLElLErADbJnHZl/lIjOvDGkhEkZFB3isVySktLakd DQ1pM3eQaorSD+F4MZr1WLCLO/dTQLHodMN/3rQcyhdpNnUMmtgaFiLRxPiTZMbm26SL/f AtmhsI1s/EU0ZsoqM7/LSHrJh8UL8ZiiZAqsRK/OuHm6eMVnH0+oD3n3voQjjQ== 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 4XF8dl1J53zGmk; Thu, 26 Sep 2024 23:17:47 +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 48QNHlQL099777; Thu, 26 Sep 2024 23:17:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48QNHlo6099774; Thu, 26 Sep 2024 23:17:47 GMT (envelope-from git) Date: Thu, 26 Sep 2024 23:17:47 GMT Message-Id: <202409262317.48QNHlo6099774@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: b0f9f970ec10 - main - Regen 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0f9f970ec104e1df22ece7c7cdf12240e3c6713 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b0f9f970ec104e1df22ece7c7cdf12240e3c6713 commit b0f9f970ec104e1df22ece7c7cdf12240e3c6713 Author: Konstantin Belousov AuthorDate: 2024-09-26 17:16:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-26 22:54:25 +0000 Regen --- share/man/man5/src.conf.5 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 303697c6efb5..c259e05af807 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd September 21, 2024 +.Dd September 26, 2024 .Dt SRC.CONF 5 .Os .Sh NAME @@ -819,6 +819,12 @@ and related utilities. .It Va WITHOUT_JAIL Do not build tools for the support of jails; e.g., .Xr jail 8 . +.It Va WITHOUT_JEMALLOC_LG_VADDR_WIDE +Disallow programs to use more than 48 address bits on amd64. +Incompatible with LA57 mode. +Enabling this option might result in a slight reduction in memory +consumption for jemalloc metadata, but also requires disabling LA57 +(if hardware supports it). .It Va WITHOUT_KDUMP Do not build .Xr kdump 1 From nobody Fri Sep 27 03:36:11 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 4XFGMw3crcz5XPxQ; Fri, 27 Sep 2024 03:36:12 +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 4XFGMw3JHRz4nSd; Fri, 27 Sep 2024 03:36:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408172; 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=ByA/cbrOwigKbSYdDcRQ53mF1dxuGn8fi6xViKFSITk=; b=klD+26wxh0oXl/2TjHr711zzpb2+GldBKQeA+jSpEaUEKjAI+Yw9pdiexCrmKb7sDYdGBe 3Z7LPFKhUANFYzHBx/W0LmrsS5NJZjizeDWjQlGyGiz6pcwJh0LPxFh3jw1MhwcgpkIzQL W4RhP1pbAzz9IZ/BHohMg3Z2BRKdZyzWFMl+XEACVUL4d7vi5zZAD1NFPym+4qOliJ4/p+ NCbmNQ/1EJ3cL6UnsKwJddV1JLkzzf73VTlFumwDac3bwOxFLf9OTbPsA3JSXw5jpyP4EM jKijd0EGGrGxNJfwkCgtCgDYndmuEjEW8Qk/d5WceGOojPMyleKEarWCqnqQvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408172; 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=ByA/cbrOwigKbSYdDcRQ53mF1dxuGn8fi6xViKFSITk=; b=RZ3UZmOEgKrnbRhuS4mG/ygyOrshjL9419kZ9Xh/5UVEU8w1WmQnzCbFmQPynTd7OOgLro ptjGStoylk7jT2Yw7G7wJA9Ziur2WgI2SW3U8wgFg2y7Z8TxSElRVvkE7wpoAOcrM1OOtI bEXQ3FxeXF7z0Pbkow1EwuNyK4yNRSoWm4SQlyQuDAVEoNBc81xNb/SRcUkAvOEkYB1hlC Xpa/sQSgEHgt5567iHp153/DOcbgi87FYD8Zs85QGN7zaYEkFLwawUztEKWWQoVRk/O82w AVrwlA1DzeDmAxEeqT29xbhBwcdkcgfz3W0Leaj5raN68XQnXsrcm8iVU/Hl6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408172; a=rsa-sha256; cv=none; b=J9gtmmoaUAoo4FbJCccc6qvQ7Eifwx5MjTsurDt4ZdLttK9y+HV8+slRYWBHKd0ofOhc9l ilctkUteweBmsvtye4RcD20icaQMl6vAEavKRBw7gMZx50M4ha+d+pS0qf/Xg/x7ziQIgZ DZOAiyfy5fuXOOEmcD9Ny4M3cjAVMLIqLeht1mL7ezUybA3kpTUGwlUyqdyVijRaBib8DM X5+MoLTHyTTGg4Kohixd4vOJouez6DaxjnKQH68AAmMvkMJGSwJ7HzGvT3W9IWm786NGSp PUh9O3kw02ZflmkJbYrdBEnKRiCPcNlQ5Kyq1rCBagNPaHVxGPix+wZypz1LHg== 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 4XFGMw2v8czNx1; Fri, 27 Sep 2024 03:36:12 +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 48R3aBgI038780; Fri, 27 Sep 2024 03:36:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aBPD038777; Fri, 27 Sep 2024 03:36:11 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:11 GMT Message-Id: <202409270336.48R3aBPD038777@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: 8abae0be0fce - stable/14 - ixgbe: introduce new mailbox API 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: 8abae0be0fcec059dba0682def252995f38bc300 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=8abae0be0fcec059dba0682def252995f38bc300 commit 8abae0be0fcec059dba0682def252995f38bc300 Author: Jakub Chylkowski AuthorDate: 2024-09-20 02:30:39 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:32:06 +0000 ixgbe: introduce new mailbox API DPDK commit message Current mailbox API does not work as described in documentation and is prone to errors (for example, it is doing locks on read). Introduce new mailbox API and provide compatibility functions with old API. New error codes have been introduced: - IXGBE_ERR_CONFIG - ixgbe_mbx_operations is not correctly set - IXGBE_ERR_TIMEOUT - mailbox operation, e.g. poll for message, timedout - IXGBE_ERR_MBX_NOMSG - no message available on read In addition, some refactoring has been done: mailbox structures were defined twice: in ixgbe_type.h and ixgbe_vf.h. Move them into ixgbe_mbx.h as this header is dedicated for mailbox. Signed-off-by: Jakub Chylkowski Reviewed-by: Alice Michael Reviewed-by: Piotr Pietruszewski Tested-by: Alice Michael Tested-by: Piotr Skajewski Obtained from: DPDK (6d243d2) Reapply message This reverts commit d80c12ba682a6f23791f3d6e657f9e603b152aa2. (cherry picked from commit 7234c3099947d202702e98d844ecd2d649c834d2) --- sys/dev/ixgbe/if_ix.c | 8 +- sys/dev/ixgbe/ixgbe_82599.c | 4 +- sys/dev/ixgbe/ixgbe_mbx.c | 839 ++++++++++++++++++++++++++++++++------------ sys/dev/ixgbe/ixgbe_mbx.h | 59 +++- sys/dev/ixgbe/ixgbe_type.h | 32 +- sys/dev/ixgbe/ixgbe_vf.c | 42 ++- sys/dev/ixgbe/ixgbe_x540.c | 4 +- 7 files changed, 699 insertions(+), 289 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 17f1f73a526e..f2b41e19a15e 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -879,6 +879,7 @@ ixgbe_if_attach_pre(if_ctx_t ctx) struct ixgbe_hw *hw; int error = 0; u32 ctrl_ext; + size_t i; INIT_DEBUGOUT("ixgbe_attach: begin"); @@ -928,8 +929,11 @@ ixgbe_if_attach_pre(if_ctx_t ctx) goto err_pci; } - if (hw->mbx.ops.init_params) - hw->mbx.ops.init_params(hw); + /* 82598 Does not support SR-IOV, initialize everything else */ + if (hw->mac.type >= ixgbe_mac_82599_vf) { + for (i = 0; i < sc->num_vfs; i++) + hw->mbx.ops[i].init_params(hw); + } hw->allow_unsupported_sfp = allow_unsupported_sfp; diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index 8c3df0fd4f59..70b4cdc5c6ca 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -324,6 +324,7 @@ s32 ixgbe_init_ops_82599(struct ixgbe_hw *hw) struct ixgbe_phy_info *phy = &hw->phy; struct ixgbe_eeprom_info *eeprom = &hw->eeprom; s32 ret_val; + u16 i; DEBUGFUNC("ixgbe_init_ops_82599"); @@ -385,7 +386,8 @@ s32 ixgbe_init_ops_82599(struct ixgbe_hw *hw) mac->arc_subsystem_valid = !!(IXGBE_READ_REG(hw, IXGBE_FWSM_BY_MAC(hw)) & IXGBE_FWSM_MODE_MASK); - hw->mbx.ops.init_params = ixgbe_init_mbx_params_pf; + for (i = 0; i < 64; i++) + hw->mbx.ops[i].init_params = ixgbe_init_mbx_params_pf; /* EEPROM */ eeprom->ops.read = ixgbe_read_eeprom_82599; diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c index c8f839fce85a..0a0c5abde157 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.c +++ b/sys/dev/ixgbe/ixgbe_mbx.c @@ -35,6 +35,9 @@ #include "ixgbe_type.h" #include "ixgbe_mbx.h" +static s32 ixgbe_poll_for_msg(struct ixgbe_hw *hw, u16 mbx_id); +static s32 ixgbe_poll_for_ack(struct ixgbe_hw *hw, u16 mbx_id); + /** * ixgbe_read_mbx - Reads a message from the mailbox * @hw: pointer to the HW structure @@ -47,42 +50,91 @@ s32 ixgbe_read_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) { struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; DEBUGFUNC("ixgbe_read_mbx"); /* limit read to size of mailbox */ - if (size > mbx->size) + if (size > mbx->size) { + ERROR_REPORT3(IXGBE_ERROR_ARGUMENT, + "Invalid mailbox message size %u, changing to %u", + size, mbx->size); + size = mbx->size; + } + + if (mbx->ops[mbx_id].read) + return mbx->ops[mbx_id].read(hw, msg, size, mbx_id); + + return IXGBE_ERR_CONFIG; +} + +/** + * ixgbe_poll_mbx - Wait for message and read it from the mailbox + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to read + * + * returns SUCCESS if it successfully read message from buffer + **/ +s32 ixgbe_poll_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) +{ + struct ixgbe_mbx_info *mbx = &hw->mbx; + s32 ret_val; + + DEBUGFUNC("ixgbe_poll_mbx"); + + if (!mbx->ops[mbx_id].read || !mbx->ops[mbx_id].check_for_msg || + !mbx->timeout) + return IXGBE_ERR_CONFIG; + + /* limit read to size of mailbox */ + if (size > mbx->size) { + ERROR_REPORT3(IXGBE_ERROR_ARGUMENT, + "Invalid mailbox message size %u, changing to %u", + size, mbx->size); size = mbx->size; + } - if (mbx->ops.read) - ret_val = mbx->ops.read(hw, msg, size, mbx_id); + ret_val = ixgbe_poll_for_msg(hw, mbx_id); + /* if ack received read message, otherwise we timed out */ + if (!ret_val) + return mbx->ops[mbx_id].read(hw, msg, size, mbx_id); return ret_val; } /** - * ixgbe_write_mbx - Write a message to the mailbox + * ixgbe_write_mbx - Write a message to the mailbox and wait for ACK * @hw: pointer to the HW structure * @msg: The message buffer * @size: Length of buffer * @mbx_id: id of mailbox to write * - * returns SUCCESS if it successfully copied message into the buffer + * returns SUCCESS if it successfully copied message into the buffer and + * received an ACK to that message within specified period **/ s32 ixgbe_write_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) { struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_SUCCESS; + s32 ret_val = IXGBE_ERR_MBX; DEBUGFUNC("ixgbe_write_mbx"); + /* + * exit if either we can't write, release + * or there is no timeout defined + */ + if (!mbx->ops[mbx_id].write || !mbx->ops[mbx_id].check_for_ack || + !mbx->ops[mbx_id].release || !mbx->timeout) + return IXGBE_ERR_CONFIG; + if (size > mbx->size) { - ret_val = IXGBE_ERR_MBX; + ret_val = IXGBE_ERR_PARAM; ERROR_REPORT2(IXGBE_ERROR_ARGUMENT, - "Invalid mailbox message size %d", size); - } else if (mbx->ops.write) - ret_val = mbx->ops.write(hw, msg, size, mbx_id); + "Invalid mailbox message size %u", size); + } else { + ret_val = mbx->ops[mbx_id].write(hw, msg, size, mbx_id); + } return ret_val; } @@ -97,12 +149,12 @@ s32 ixgbe_write_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) s32 ixgbe_check_for_msg(struct ixgbe_hw *hw, u16 mbx_id) { struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; + s32 ret_val = IXGBE_ERR_CONFIG; DEBUGFUNC("ixgbe_check_for_msg"); - if (mbx->ops.check_for_msg) - ret_val = mbx->ops.check_for_msg(hw, mbx_id); + if (mbx->ops[mbx_id].check_for_msg) + ret_val = mbx->ops[mbx_id].check_for_msg(hw, mbx_id); return ret_val; } @@ -117,12 +169,12 @@ s32 ixgbe_check_for_msg(struct ixgbe_hw *hw, u16 mbx_id) s32 ixgbe_check_for_ack(struct ixgbe_hw *hw, u16 mbx_id) { struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; + s32 ret_val = IXGBE_ERR_CONFIG; DEBUGFUNC("ixgbe_check_for_ack"); - if (mbx->ops.check_for_ack) - ret_val = mbx->ops.check_for_ack(hw, mbx_id); + if (mbx->ops[mbx_id].check_for_ack) + ret_val = mbx->ops[mbx_id].check_for_ack(hw, mbx_id); return ret_val; } @@ -137,12 +189,12 @@ s32 ixgbe_check_for_ack(struct ixgbe_hw *hw, u16 mbx_id) s32 ixgbe_check_for_rst(struct ixgbe_hw *hw, u16 mbx_id) { struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; + s32 ret_val = IXGBE_ERR_CONFIG; DEBUGFUNC("ixgbe_check_for_rst"); - if (mbx->ops.check_for_rst) - ret_val = mbx->ops.check_for_rst(hw, mbx_id); + if (mbx->ops[mbx_id].check_for_rst) + ret_val = mbx->ops[mbx_id].check_for_rst(hw, mbx_id); return ret_val; } @@ -161,22 +213,23 @@ static s32 ixgbe_poll_for_msg(struct ixgbe_hw *hw, u16 mbx_id) DEBUGFUNC("ixgbe_poll_for_msg"); - if (!countdown || !mbx->ops.check_for_msg) - goto out; + if (!countdown || !mbx->ops[mbx_id].check_for_msg) + return IXGBE_ERR_CONFIG; - while (countdown && mbx->ops.check_for_msg(hw, mbx_id)) { + while (countdown && mbx->ops[mbx_id].check_for_msg(hw, mbx_id)) { countdown--; if (!countdown) break; usec_delay(mbx->usec_delay); } - if (countdown == 0) + if (countdown == 0) { ERROR_REPORT2(IXGBE_ERROR_POLLING, - "Polling for VF%d mailbox message timedout", mbx_id); + "Polling for VF%u mailbox message timedout", mbx_id); + return IXGBE_ERR_TIMEOUT; + } -out: - return countdown ? IXGBE_SUCCESS : IXGBE_ERR_MBX; + return IXGBE_SUCCESS; } /** @@ -193,115 +246,71 @@ static s32 ixgbe_poll_for_ack(struct ixgbe_hw *hw, u16 mbx_id) DEBUGFUNC("ixgbe_poll_for_ack"); - if (!countdown || !mbx->ops.check_for_ack) - goto out; + if (!countdown || !mbx->ops[mbx_id].check_for_ack) + return IXGBE_ERR_CONFIG; - while (countdown && mbx->ops.check_for_ack(hw, mbx_id)) { + while (countdown && mbx->ops[mbx_id].check_for_ack(hw, mbx_id)) { countdown--; if (!countdown) break; usec_delay(mbx->usec_delay); } - if (countdown == 0) + if (countdown == 0) { ERROR_REPORT2(IXGBE_ERROR_POLLING, - "Polling for VF%d mailbox ack timedout", mbx_id); + "Polling for VF%u mailbox ack timedout", mbx_id); + return IXGBE_ERR_TIMEOUT; + } -out: - return countdown ? IXGBE_SUCCESS : IXGBE_ERR_MBX; + return IXGBE_SUCCESS; } /** - * ixgbe_read_posted_mbx - Wait for message notification and receive message + * ixgbe_read_mailbox_vf - read VF's mailbox register * @hw: pointer to the HW structure - * @msg: The message buffer - * @size: Length of buffer - * @mbx_id: id of mailbox to write * - * returns SUCCESS if it successfully received a message notification and - * copied it into the receive buffer. + * This function is used to read the mailbox register dedicated for VF without + * losing the read to clear status bits. **/ -s32 ixgbe_read_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, - u16 mbx_id) +static u32 ixgbe_read_mailbox_vf(struct ixgbe_hw *hw) { - struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; - - DEBUGFUNC("ixgbe_read_posted_mbx"); - - if (!mbx->ops.read) - goto out; + u32 vf_mailbox = IXGBE_READ_REG(hw, IXGBE_VFMAILBOX); - ret_val = ixgbe_poll_for_msg(hw, mbx_id); + vf_mailbox |= hw->mbx.vf_mailbox; + hw->mbx.vf_mailbox |= vf_mailbox % IXGBE_VFMAILBOX_R2C_BITS; - /* if ack received read message, otherwise we timed out */ - if (!ret_val) - ret_val = mbx->ops.read(hw, msg, size, mbx_id); -out: - return ret_val; + return vf_mailbox; } -/** - * ixgbe_write_posted_mbx - Write a message to the mailbox, wait for ack - * @hw: pointer to the HW structure - * @msg: The message buffer - * @size: Length of buffer - * @mbx_id: id of mailbox to write - * - * returns SUCCESS if it successfully copied message into the buffer and - * received an ack to that message within delay * timeout period - **/ -s32 ixgbe_write_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, - u16 mbx_id) +static void ixgbe_clear_msg_vf(struct ixgbe_hw *hw) { - struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; - - DEBUGFUNC("ixgbe_write_posted_mbx"); - - /* exit if either we can't write or there isn't a defined timeout */ - if (!mbx->ops.write || !mbx->timeout) - goto out; - - /* send msg */ - ret_val = mbx->ops.write(hw, msg, size, mbx_id); + u32 vf_mailbox = ixgbe_read_mailbox_vf(hw); - /* if msg sent wait until we receive an ack */ - if (!ret_val) - ret_val = ixgbe_poll_for_ack(hw, mbx_id); -out: - return ret_val; + if (vf_mailbox & IXGBE_VFMAILBOX_PFSTS) { + hw->mbx.stats.reqs++; + hw->mbx.vf_mailbox &= ~IXGBE_VFMAILBOX_PFSTS; + } } -/** - * ixgbe_init_mbx_ops_generic - Initialize MB function pointers - * @hw: pointer to the HW structure - * - * Setups up the mailbox read and write message function pointers - **/ -void ixgbe_init_mbx_ops_generic(struct ixgbe_hw *hw) +static void ixgbe_clear_ack_vf(struct ixgbe_hw *hw) { - struct ixgbe_mbx_info *mbx = &hw->mbx; + u32 vf_mailbox = ixgbe_read_mailbox_vf(hw); - mbx->ops.read_posted = ixgbe_read_posted_mbx; - mbx->ops.write_posted = ixgbe_write_posted_mbx; + if (vf_mailbox & IXGBE_VFMAILBOX_PFACK) { + hw->mbx.stats.acks++; + hw->mbx.vf_mailbox &= ~IXGBE_VFMAILBOX_PFACK; + } } -/** - * ixgbe_read_v2p_mailbox - read v2p mailbox - * @hw: pointer to the HW structure - * - * This function is used to read the v2p mailbox without losing the read to - * clear status bits. - **/ -static u32 ixgbe_read_v2p_mailbox(struct ixgbe_hw *hw) +static void ixgbe_clear_rst_vf(struct ixgbe_hw *hw) { - u32 v2p_mailbox = IXGBE_READ_REG(hw, IXGBE_VFMAILBOX); - - v2p_mailbox |= hw->mbx.v2p_mailbox; - hw->mbx.v2p_mailbox |= v2p_mailbox & IXGBE_VFMAILBOX_R2C_BITS; + u32 vf_mailbox = ixgbe_read_mailbox_vf(hw); - return v2p_mailbox; + if (vf_mailbox & (IXGBE_VFMAILBOX_RSTI | IXGBE_VFMAILBOX_RSTD)) { + hw->mbx.stats.rsts++; + hw->mbx.vf_mailbox &= ~(IXGBE_VFMAILBOX_RSTI | + IXGBE_VFMAILBOX_RSTD); + } } /** @@ -314,15 +323,12 @@ static u32 ixgbe_read_v2p_mailbox(struct ixgbe_hw *hw) **/ static s32 ixgbe_check_for_bit_vf(struct ixgbe_hw *hw, u32 mask) { - u32 v2p_mailbox = ixgbe_read_v2p_mailbox(hw); - s32 ret_val = IXGBE_ERR_MBX; + u32 vf_mailbox = ixgbe_read_mailbox_vf(hw); - if (v2p_mailbox & mask) - ret_val = IXGBE_SUCCESS; + if (vf_mailbox & mask) + return IXGBE_SUCCESS; - hw->mbx.v2p_mailbox &= ~mask; - - return ret_val; + return IXGBE_ERR_MBX; } /** @@ -334,17 +340,13 @@ static s32 ixgbe_check_for_bit_vf(struct ixgbe_hw *hw, u32 mask) **/ static s32 ixgbe_check_for_msg_vf(struct ixgbe_hw *hw, u16 mbx_id) { - s32 ret_val = IXGBE_ERR_MBX; - UNREFERENCED_1PARAMETER(mbx_id); DEBUGFUNC("ixgbe_check_for_msg_vf"); - if (!ixgbe_check_for_bit_vf(hw, IXGBE_VFMAILBOX_PFSTS)) { - ret_val = IXGBE_SUCCESS; - hw->mbx.stats.reqs++; - } + if (!ixgbe_check_for_bit_vf(hw, IXGBE_VFMAILBOX_PFSTS)) + return IXGBE_SUCCESS; - return ret_val; + return IXGBE_ERR_MBX; } /** @@ -356,17 +358,16 @@ static s32 ixgbe_check_for_msg_vf(struct ixgbe_hw *hw, u16 mbx_id) **/ static s32 ixgbe_check_for_ack_vf(struct ixgbe_hw *hw, u16 mbx_id) { - s32 ret_val = IXGBE_ERR_MBX; - UNREFERENCED_1PARAMETER(mbx_id); DEBUGFUNC("ixgbe_check_for_ack_vf"); if (!ixgbe_check_for_bit_vf(hw, IXGBE_VFMAILBOX_PFACK)) { - ret_val = IXGBE_SUCCESS; - hw->mbx.stats.acks++; + /* TODO: should this be autocleared? */ + ixgbe_clear_ack_vf(hw); + return IXGBE_SUCCESS; } - return ret_val; + return IXGBE_ERR_MBX; } /** @@ -378,18 +379,17 @@ static s32 ixgbe_check_for_ack_vf(struct ixgbe_hw *hw, u16 mbx_id) **/ static s32 ixgbe_check_for_rst_vf(struct ixgbe_hw *hw, u16 mbx_id) { - s32 ret_val = IXGBE_ERR_MBX; - UNREFERENCED_1PARAMETER(mbx_id); DEBUGFUNC("ixgbe_check_for_rst_vf"); - if (!ixgbe_check_for_bit_vf(hw, (IXGBE_VFMAILBOX_RSTD | - IXGBE_VFMAILBOX_RSTI))) { - ret_val = IXGBE_SUCCESS; - hw->mbx.stats.rsts++; + if (!ixgbe_check_for_bit_vf(hw, IXGBE_VFMAILBOX_RSTI | + IXGBE_VFMAILBOX_RSTD)) { + /* TODO: should this be autocleared? */ + ixgbe_clear_rst_vf(hw); + return IXGBE_SUCCESS; } - return ret_val; + return IXGBE_ERR_MBX; } /** @@ -400,20 +400,114 @@ static s32 ixgbe_check_for_rst_vf(struct ixgbe_hw *hw, u16 mbx_id) **/ static s32 ixgbe_obtain_mbx_lock_vf(struct ixgbe_hw *hw) { + struct ixgbe_mbx_info *mbx = &hw->mbx; + int countdown = mbx->timeout; s32 ret_val = IXGBE_ERR_MBX; + u32 vf_mailbox; DEBUGFUNC("ixgbe_obtain_mbx_lock_vf"); - /* Take ownership of the buffer */ - IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_VFU); + if (!mbx->timeout) + return IXGBE_ERR_CONFIG; - /* reserve mailbox for vf use */ - if (ixgbe_read_v2p_mailbox(hw) & IXGBE_VFMAILBOX_VFU) - ret_val = IXGBE_SUCCESS; + while (countdown--) { + /* Reserve mailbox for VF use */ + vf_mailbox = ixgbe_read_mailbox_vf(hw); + vf_mailbox |= IXGBE_VFMAILBOX_VFU; + IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, vf_mailbox); + + /* Verify that VF is the owner of the lock */ + if (ixgbe_read_mailbox_vf(hw) & IXGBE_VFMAILBOX_VFU) { + ret_val = IXGBE_SUCCESS; + break; + } + + /* Wait a bit before trying again */ + usec_delay(mbx->usec_delay); + } + + if (ret_val != IXGBE_SUCCESS) { + ERROR_REPORT1(IXGBE_ERROR_INVALID_STATE, + "Failed to obtain mailbox lock"); + ret_val = IXGBE_ERR_TIMEOUT; + } return ret_val; } +/** + * ixgbe_release_mbx_lock_dummy - release mailbox lock + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to read + **/ +static void ixgbe_release_mbx_lock_dummy(struct ixgbe_hw *hw, u16 mbx_id) +{ + UNREFERENCED_2PARAMETER(hw, mbx_id); + + DEBUGFUNC("ixgbe_release_mbx_lock_dummy"); +} + +/** + * ixgbe_release_mbx_lock_vf - release mailbox lock + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to read + **/ +static void ixgbe_release_mbx_lock_vf(struct ixgbe_hw *hw, u16 mbx_id) +{ + u32 vf_mailbox; + + UNREFERENCED_1PARAMETER(mbx_id); + + DEBUGFUNC("ixgbe_release_mbx_lock_vf"); + + /* Return ownership of the buffer */ + vf_mailbox = ixgbe_read_mailbox_vf(hw); + vf_mailbox &= ~IXGBE_VFMAILBOX_VFU; + IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, vf_mailbox); +} + +/** + * ixgbe_write_mbx_vf_legacy - Write a message to the mailbox + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to write + * + * returns SUCCESS if it successfully copied message into the buffer + **/ +static s32 ixgbe_write_mbx_vf_legacy(struct ixgbe_hw *hw, u32 *msg, u16 size, + u16 mbx_id) +{ + s32 ret_val; + u16 i; + + UNREFERENCED_1PARAMETER(mbx_id); + DEBUGFUNC("ixgbe_write_mbx_vf_legacy"); + + /* lock the mailbox to prevent pf/vf race condition */ + ret_val = ixgbe_obtain_mbx_lock_vf(hw); + if (ret_val) + return ret_val; + + /* flush msg and acks as we are overwriting the message buffer */ + ixgbe_check_for_msg_vf(hw, 0); + ixgbe_clear_msg_vf(hw); + ixgbe_check_for_ack_vf(hw, 0); + ixgbe_clear_ack_vf(hw); + + /* copy the caller specified message to the mailbox memory buffer */ + for (i = 0; i < size; i++) + IXGBE_WRITE_REG_ARRAY(hw, IXGBE_VFMBMEM, i, msg[i]); + + /* update stats */ + hw->mbx.stats.msgs_tx++; + + /* interrupt the PF to tell it a message has been sent */ + IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_REQ); + + return IXGBE_SUCCESS; +} + /** * ixgbe_write_mbx_vf - Write a message to the mailbox * @hw: pointer to the HW structure @@ -426,6 +520,7 @@ static s32 ixgbe_obtain_mbx_lock_vf(struct ixgbe_hw *hw) static s32 ixgbe_write_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) { + u32 vf_mailbox; s32 ret_val; u16 i; @@ -436,11 +531,11 @@ static s32 ixgbe_write_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, /* lock the mailbox to prevent pf/vf race condition */ ret_val = ixgbe_obtain_mbx_lock_vf(hw); if (ret_val) - goto out_no_write; + goto out; /* flush msg and acks as we are overwriting the message buffer */ - ixgbe_check_for_msg_vf(hw, 0); - ixgbe_check_for_ack_vf(hw, 0); + ixgbe_clear_msg_vf(hw); + ixgbe_clear_ack_vf(hw); /* copy the caller specified message to the mailbox memory buffer */ for (i = 0; i < size; i++) @@ -449,15 +544,22 @@ static s32 ixgbe_write_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, /* update stats */ hw->mbx.stats.msgs_tx++; - /* Drop VFU and interrupt the PF to tell it a message has been sent */ - IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_REQ); + /* interrupt the PF to tell it a message has been sent */ + vf_mailbox = ixgbe_read_mailbox_vf(hw); + vf_mailbox |= IXGBE_VFMAILBOX_REQ; + IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, vf_mailbox); + + /* if msg sent wait until we receive an ack */ + ixgbe_poll_for_ack(hw, mbx_id); + +out: + hw->mbx.ops[mbx_id].release(hw, mbx_id); -out_no_write: return ret_val; } /** - * ixgbe_read_mbx_vf - Reads a message from the inbox intended for vf + * ixgbe_read_mbx_vf_legacy - Reads a message from the inbox intended for vf * @hw: pointer to the HW structure * @msg: The message buffer * @size: Length of buffer @@ -465,19 +567,19 @@ out_no_write: * * returns SUCCESS if it successfully read message from buffer **/ -static s32 ixgbe_read_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, - u16 mbx_id) +static s32 ixgbe_read_mbx_vf_legacy(struct ixgbe_hw *hw, u32 *msg, u16 size, + u16 mbx_id) { - s32 ret_val = IXGBE_SUCCESS; + s32 ret_val; u16 i; - DEBUGFUNC("ixgbe_read_mbx_vf"); + DEBUGFUNC("ixgbe_read_mbx_vf_legacy"); UNREFERENCED_1PARAMETER(mbx_id); /* lock the mailbox to prevent pf/vf race condition */ ret_val = ixgbe_obtain_mbx_lock_vf(hw); if (ret_val) - goto out_no_read; + return ret_val; /* copy the message from the mailbox memory buffer */ for (i = 0; i < size; i++) @@ -489,34 +591,73 @@ static s32 ixgbe_read_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, /* update stats */ hw->mbx.stats.msgs_rx++; -out_no_read: - return ret_val; + return IXGBE_SUCCESS; +} + +/** + * ixgbe_read_mbx_vf - Reads a message from the inbox intended for vf + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to read + * + * returns SUCCESS if it successfully read message from buffer + **/ +static s32 ixgbe_read_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, + u16 mbx_id) +{ + u32 vf_mailbox; + s32 ret_val; + u16 i; + + DEBUGFUNC("ixgbe_read_mbx_vf"); + UNREFERENCED_1PARAMETER(mbx_id); + + /* check if there is a message from PF */ + ret_val = ixgbe_check_for_msg_vf(hw, 0); + if (ret_val != IXGBE_SUCCESS) + return IXGBE_ERR_MBX_NOMSG; + + ixgbe_clear_msg_vf(hw); + + /* copy the message from the mailbox memory buffer */ + for (i = 0; i < size; i++) + msg[i] = IXGBE_READ_REG_ARRAY(hw, IXGBE_VFMBMEM, i); + + /* Acknowledge receipt */ + vf_mailbox = ixgbe_read_mailbox_vf(hw); + vf_mailbox |= IXGBE_VFMAILBOX_ACK; + IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, vf_mailbox); + + /* update stats */ + hw->mbx.stats.msgs_rx++; + + return IXGBE_SUCCESS; } /** * ixgbe_init_mbx_params_vf - set initial values for vf mailbox * @hw: pointer to the HW structure * - * Initializes the hw->mbx struct to correct values for vf mailbox + * Initializes single set the hw->mbx struct to correct values for vf mailbox + * Set of legacy functions is being used here */ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) { struct ixgbe_mbx_info *mbx = &hw->mbx; - /* start mailbox as timed out and let the reset_hw call set the timeout - * value to begin communications */ - mbx->timeout = 0; + mbx->timeout = IXGBE_VF_MBX_INIT_TIMEOUT; mbx->usec_delay = IXGBE_VF_MBX_INIT_DELAY; mbx->size = IXGBE_VFMAILBOX_SIZE; - mbx->ops.read = ixgbe_read_mbx_vf; - mbx->ops.write = ixgbe_write_mbx_vf; - mbx->ops.read_posted = ixgbe_read_posted_mbx; - mbx->ops.write_posted = ixgbe_write_posted_mbx; - mbx->ops.check_for_msg = ixgbe_check_for_msg_vf; - mbx->ops.check_for_ack = ixgbe_check_for_ack_vf; - mbx->ops.check_for_rst = ixgbe_check_for_rst_vf; + /* VF has only one mailbox connection, no need for more IDs */ + mbx->ops[0].release = ixgbe_release_mbx_lock_dummy; + mbx->ops[0].read = ixgbe_read_mbx_vf_legacy; + mbx->ops[0].write = ixgbe_write_mbx_vf_legacy; + mbx->ops[0].check_for_msg = ixgbe_check_for_msg_vf; + mbx->ops[0].check_for_ack = ixgbe_check_for_ack_vf; + mbx->ops[0].check_for_rst = ixgbe_check_for_rst_vf; mbx->stats.msgs_tx = 0; mbx->stats.msgs_rx = 0; @@ -525,54 +666,110 @@ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) mbx->stats.rsts = 0; } +/** + * ixgbe_upgrade_mbx_params_vf - set initial values for vf mailbox + * @hw: pointer to the HW structure + * + * Initializes the hw->mbx struct to correct values for vf mailbox + */ +void ixgbe_upgrade_mbx_params_vf(struct ixgbe_hw *hw) +{ + struct ixgbe_mbx_info *mbx = &hw->mbx; + + mbx->timeout = IXGBE_VF_MBX_INIT_TIMEOUT; + mbx->usec_delay = IXGBE_VF_MBX_INIT_DELAY; + + mbx->size = IXGBE_VFMAILBOX_SIZE; + + /* VF has only one mailbox connection, no need for more IDs */ + mbx->ops[0].release = ixgbe_release_mbx_lock_vf; + mbx->ops[0].read = ixgbe_read_mbx_vf; + mbx->ops[0].write = ixgbe_write_mbx_vf; + mbx->ops[0].check_for_msg = ixgbe_check_for_msg_vf; + mbx->ops[0].check_for_ack = ixgbe_check_for_ack_vf; + mbx->ops[0].check_for_rst = ixgbe_check_for_rst_vf; + mbx->ops[0].clear = NULL; + + mbx->stats.msgs_tx = 0; + mbx->stats.msgs_rx = 0; + mbx->stats.reqs = 0; + mbx->stats.acks = 0; + mbx->stats.rsts = 0; +} + +static void ixgbe_clear_msg_pf(struct ixgbe_hw *hw, u16 vf_id) +{ + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_id); + s32 index = IXGBE_PFMBICR_INDEX(vf_id); + u32 pfmbicr; + + pfmbicr = IXGBE_READ_REG(hw, IXGBE_PFMBICR(index)); + + if (pfmbicr & (IXGBE_PFMBICR_VFREQ_VF1 << vf_shift)) + hw->mbx.stats.reqs++; + + IXGBE_WRITE_REG(hw, IXGBE_PFMBICR(index), + IXGBE_PFMBICR_VFREQ_VF1 << vf_shift); +} + +static void ixgbe_clear_ack_pf(struct ixgbe_hw *hw, u16 vf_id) +{ + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_id); + s32 index = IXGBE_PFMBICR_INDEX(vf_id); + u32 pfmbicr; + + pfmbicr = IXGBE_READ_REG(hw, IXGBE_PFMBICR(index)); + + if (pfmbicr & (IXGBE_PFMBICR_VFACK_VF1 << vf_shift)) + hw->mbx.stats.acks++; + + IXGBE_WRITE_REG(hw, IXGBE_PFMBICR(index), + IXGBE_PFMBICR_VFACK_VF1 << vf_shift); +} + static s32 ixgbe_check_for_bit_pf(struct ixgbe_hw *hw, u32 mask, s32 index) { u32 pfmbicr = IXGBE_READ_REG(hw, IXGBE_PFMBICR(index)); - s32 ret_val = IXGBE_ERR_MBX; if (pfmbicr & mask) { - ret_val = IXGBE_SUCCESS; - IXGBE_WRITE_REG(hw, IXGBE_PFMBICR(index), mask); + return IXGBE_SUCCESS; } - return ret_val; + return IXGBE_ERR_MBX; } /** * ixgbe_check_for_msg_pf - checks to see if the VF has sent mail * @hw: pointer to the HW structure - * @vf_number: the VF index + * @vf_id: the VF index * * returns SUCCESS if the VF has set the Status bit or else ERR_MBX **/ -static s32 ixgbe_check_for_msg_pf(struct ixgbe_hw *hw, u16 vf_number) +static s32 ixgbe_check_for_msg_pf(struct ixgbe_hw *hw, u16 vf_id) { - u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_number); - s32 index = IXGBE_PFMBICR_INDEX(vf_number); - s32 ret_val = IXGBE_ERR_MBX; + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_id); + s32 index = IXGBE_PFMBICR_INDEX(vf_id); DEBUGFUNC("ixgbe_check_for_msg_pf"); if (!ixgbe_check_for_bit_pf(hw, IXGBE_PFMBICR_VFREQ_VF1 << vf_shift, - index)) { - ret_val = IXGBE_SUCCESS; - hw->mbx.stats.reqs++; - } + index)) + return IXGBE_SUCCESS; - return ret_val; + return IXGBE_ERR_MBX; } /** * ixgbe_check_for_ack_pf - checks to see if the VF has ACKed * @hw: pointer to the HW structure - * @vf_number: the VF index + * @vf_id: the VF index * * returns SUCCESS if the VF has set the Status bit or else ERR_MBX **/ -static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_number) +static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_id) { - u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_number); - s32 index = IXGBE_PFMBICR_INDEX(vf_number); + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_id); + s32 index = IXGBE_PFMBICR_INDEX(vf_id); s32 ret_val = IXGBE_ERR_MBX; DEBUGFUNC("ixgbe_check_for_ack_pf"); @@ -580,7 +777,8 @@ static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_number) if (!ixgbe_check_for_bit_pf(hw, IXGBE_PFMBICR_VFACK_VF1 << vf_shift, index)) { ret_val = IXGBE_SUCCESS; - hw->mbx.stats.acks++; + /* TODO: should this be autocleared? */ + ixgbe_clear_ack_pf(hw, vf_id); } return ret_val; @@ -589,14 +787,14 @@ static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_number) /** * ixgbe_check_for_rst_pf - checks to see if the VF has reset * @hw: pointer to the HW structure - * @vf_number: the VF index + * @vf_id: the VF index * * returns SUCCESS if the VF has set the Status bit or else ERR_MBX **/ -static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number) +static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_id) { - u32 vf_shift = IXGBE_PFVFLRE_SHIFT(vf_number); - u32 index = IXGBE_PFVFLRE_INDEX(vf_number); + u32 vf_shift = IXGBE_PFVFLRE_SHIFT(vf_id); + u32 index = IXGBE_PFVFLRE_INDEX(vf_id); s32 ret_val = IXGBE_ERR_MBX; u32 vflre = 0; @@ -628,121 +826,268 @@ static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number) /** * ixgbe_obtain_mbx_lock_pf - obtain mailbox lock * @hw: pointer to the HW structure - * @vf_number: the VF index + * @vf_id: the VF index * * return SUCCESS if we obtained the mailbox lock **/ -static s32 ixgbe_obtain_mbx_lock_pf(struct ixgbe_hw *hw, u16 vf_number) +static s32 ixgbe_obtain_mbx_lock_pf(struct ixgbe_hw *hw, u16 vf_id) { + struct ixgbe_mbx_info *mbx = &hw->mbx; *** 667 LINES SKIPPED *** From nobody Fri Sep 27 03:36:13 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 4XFGMx32KRz5XQLY; Fri, 27 Sep 2024 03:36:13 +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 4XFGMx1dRRz4nDC; Fri, 27 Sep 2024 03:36:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408173; 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=c5nX3tvJZSkfzk6B+izK1fzjYG+khnreJHSnk1TI29s=; b=RMyyBKMbVafNZkzF+PrgAxq1QMFg+5Jeguxzjfx6mX8HgRwXlPZKnZtBjhxeCnyW1V1dnG MJ2/hZ9P9F+SGKHQP52Xd8esZ5xphUxiMv5MU84x60Gp3Eo/EFu1873psCBAn8W8FnkjMz zBBxW5CDtkgA4pwmBoModpSoMg/aOvfcJJdqOdUrFQWqJa+Ptb1Ei4CrIwNMAWoXj92rs1 fajVMWjpLui5FxNTq0MgTnZpCHGy7C7e+DljnlhZjSxaqBlnkiAmC71WdW6H4z6NA/dehr 3pkmZ/uWIO3KEUD3YpaYiC/et52NoR6i0Bvj8Jy6a1nqaSDpX3SUz1sBA73whA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408173; 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=c5nX3tvJZSkfzk6B+izK1fzjYG+khnreJHSnk1TI29s=; b=pw9y4kGgPiHOzymhe6m6pxpMHi9t1TWIVQBfxqB1Y6dWDDoXKywNoZNoxrAo2ppKU9V71N 3cGzrd+LjW2DVhW9EdnbuqsACNDWu2y5cG+9lvJixjGtw0b3iFPEVaUAZAHdHVX+nQJfV8 SAh4EBkTOGNE3h2XaASqqFaMaL+BVJ7nleD99N8o4MwflMk5l52TsH39u/6+SH5uhDCjE4 J6qhJY2S93RXNEX7KqYi28x0/Lz+5BlWvL4pfykbXdChdK5Oj1Umf6aCfHo1K+3yIOTxnl I9qtRxdNSflMXcqO0y10zqdG5wK39XiIYxzrZMN02di1CSRNfU8Sk9ko6r6yxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408173; a=rsa-sha256; cv=none; b=L+sEcjSh4TOp6fd3kO+Mm1Zl0KUDn7pSAXQNL+V3+ConNf+Ecuok8N6UMBPHLb+C9oe1WK Q9s6tIBJ7G17xIEZ3NKxCGC9JuhXlYvaq3tei+Ait8SJCSSyErx7K8vqv60QmtRsJFWYx3 ffRESDStxPfWvP5XfD4t+xRY01ue5tNdAk+Ita4JsfMlnzFkH2vlZUpLJTFOreh75MAxqM Vz4XWAohodo+UsI1FjOf8mBEAegLE2nrQ3CyojqxZAxZl7tGrzZHgZcx9kkXDEoOYXaiQ9 An0SlMvlCIhFzq5B3sFdaCLLfoftfYUB5N7AJNVz4b6kolPUpg55paZCI/9F2Q== 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 4XFGMx0x34zNx2; Fri, 27 Sep 2024 03:36:13 +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 48R3aDLF038828; Fri, 27 Sep 2024 03:36:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aD9l038825; Fri, 27 Sep 2024 03:36:13 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:13 GMT Message-Id: <202409270336.48R3aD9l038825@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: 004a73f51df4 - stable/14 - ixgbe: increase DCB BW calculation for MTU 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: 004a73f51df49fd4f17148f123f7776fb35de3ab Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=004a73f51df49fd4f17148f123f7776fb35de3ab commit 004a73f51df49fd4f17148f123f7776fb35de3ab Author: Radoslaw Tyl AuthorDate: 2024-09-20 02:42:39 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:32:25 +0000 ixgbe: increase DCB BW calculation for MTU Change max credit and credit refill to a maximum possible value, 9128. Too small values cause the incorrect calculation of the bandwidth limits to each traffic class for frames larger than 4088 bytes. Signed-off-by: Radoslaw Tyl Reviewed-by: Piotr Skajewski Reviewed-by: Slawomir Mrozowicz Reviewed-by: Alice Michael Tested-by: Piotr Skajewski Obtained from: DPDK (440823f) (cherry picked from commit 1b80ac6fa64eaa575b99521cbd71a3780bf5139b) --- sys/dev/ixgbe/ixgbe_dcb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_dcb.h b/sys/dev/ixgbe/ixgbe_dcb.h index b31dfae0cdfa..54decd4d081d 100644 --- a/sys/dev/ixgbe/ixgbe_dcb.h +++ b/sys/dev/ixgbe/ixgbe_dcb.h @@ -40,9 +40,9 @@ /* DCB defines */ /* DCB credit calculation defines */ #define IXGBE_DCB_CREDIT_QUANTUM 64 -#define IXGBE_DCB_MAX_CREDIT_REFILL 200 /* 200 * 64B = 12800B */ +#define IXGBE_DCB_MAX_CREDIT_REFILL 511 /* 0x1FF * 64B = 32704B */ #define IXGBE_DCB_MAX_TSO_SIZE (32 * 1024) /* Max TSO pkt size in DCB*/ -#define IXGBE_DCB_MAX_CREDIT (2 * IXGBE_DCB_MAX_CREDIT_REFILL) +#define IXGBE_DCB_MAX_CREDIT 4095 /* Maximum credit supported: 256KB * 1024 / 64B */ /* 513 for 32KB TSO packet */ #define IXGBE_DCB_MIN_TSO_CREDIT \ From nobody Fri Sep 27 03:36:14 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 4XFGMz02npz5XQ1M; Fri, 27 Sep 2024 03:36:15 +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 4XFGMy2RXlz4nDK; Fri, 27 Sep 2024 03:36:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408174; 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=UIOIpm/SJWFkIiKlexGZuKp2YyJ/wNIZSvn9OcKwqWw=; b=K28h8l9AHACY8CxNSKIT1kVNn2t6UIgi/dQRFnm+fcdEINkL53RclCCwEdeJlAeEB2UQR3 XZlFwPs3cn4U/+PVldC413VQmdJJxEbHvuB5LNWdyv+yHG/I8yaq/g5kfOW6Kko8151sgf fJBIJyU8zCovam9ugp7XByXcnKUfP3+C8oXCAzlN54mNPe9UZt4zvu4WGJdcH+QLzNHU45 hsn5UwLjWPgmi5SpSsx2/R4FYUvz5Tph+itbPYffyw0neef3gibGXAJbffhU3dxkX/TjpL L/r0bf4zBZdtYlicebkocAMcqwPJBSrzTwd3mje285CY6AYHWi5Zblb9HDCU0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408174; 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=UIOIpm/SJWFkIiKlexGZuKp2YyJ/wNIZSvn9OcKwqWw=; b=iuUTcXnImDf49UYMPDq0YjcXM1mukn5PkNUWIAbDWuekrNR6Rb/Zwav+9IGGVdOVR3OriC jP+9nDaEOayI0TJeBaMqPPhkyzzQcV0zsKTxww1pI7lf+wH1yC7ISIedDQ+ADCN67bq4cB 0cygzuwJO6Qw9u5ozLSPDmPIJ/pAJ4TaSodYaRhc3fdmLloLqDcTN8/2CPMwFyVCFLRVz/ wYSGNBvBCK42j93zPsMS97o2mgS/vtqq5Gd63ZK/Lb0yUHRte1fiOJypJO/YuTEQnuRiPX +HCpU7uarqNHbpfCw9nGYcStGqKQjhvPjg9YxTUWzVf0yXln86e1HzVZkRYp+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408174; a=rsa-sha256; cv=none; b=CnZ4SEXKsoOPrVOrpuhnEs1ZeyQ+/96ay2TaP/Wob8OnZZLNo61mChg5tchcfXJInJvdk5 8qSAHBh6S6PmUiIr+OtcKWDzmY1shYiJWpUQVLXU/+9LcH8tGRLk2bkW8yyHsud/rDMhm7 CAxtb89M4CyevGolPnP6FR/zWbgVIKZZbxMUzV+oNwnamRVp0Hs4nXMj3QMXNm+cVJeOx5 NdhHh+yXV0u1hI989PoCKYyCoDZ/maNeWbBxuDDyR6Gy1sf3DfLylfzZokQkMDe07hS6zM Yc/IvE9UEB386ePyGYEBzW2YOAugUidi12sWzp3o+aIZTihfzPM/ZU8poFsNXA== 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 4XFGMy1ycMzNyY; Fri, 27 Sep 2024 03:36:14 +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 48R3aExx038869; Fri, 27 Sep 2024 03:36:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aEFN038866; Fri, 27 Sep 2024 03:36:14 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:14 GMT Message-Id: <202409270336.48R3aEFN038866@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: dc3f0089b141 - stable/14 - ixgbe: improve function comments 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: dc3f0089b14134f3eb0646de2cdf7ff57f39b2db Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=dc3f0089b14134f3eb0646de2cdf7ff57f39b2db commit dc3f0089b14134f3eb0646de2cdf7ff57f39b2db Author: Radoslaw Tyl AuthorDate: 2024-09-20 02:50:23 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:32:39 +0000 ixgbe: improve function comments Some function comments have mismatches between actual function names and function name in comments, which causes warnings with kernel-doc. Fix comments to match function names. Signed-off-by: Radoslaw Tyl Reviewed-by: Piotr Skajewski Reviewed-by: Slawomir Mrozowicz Reviewed-by: Alice Michael Obtained from: DPDK (7b5bc85) (cherry picked from commit edef2769483b29457f028a508ea96fc1099a0a21) --- sys/dev/ixgbe/ixgbe_82599.c | 2 +- sys/dev/ixgbe/ixgbe_api.c | 2 +- sys/dev/ixgbe/ixgbe_common.c | 11 ++++++----- sys/dev/ixgbe/ixgbe_dcb.c | 2 +- sys/dev/ixgbe/ixgbe_phy.c | 2 +- sys/dev/ixgbe/ixgbe_x550.c | 12 ++++++------ 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index 70b4cdc5c6ca..a1d8b299bf80 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -1537,7 +1537,7 @@ u32 ixgbe_atr_compute_sig_hash_82599(union ixgbe_atr_hash_dword input, } /** - * ixgbe_atr_add_signature_filter_82599 - Adds a signature hash filter + * ixgbe_fdir_add_signature_filter_82599 - Adds a signature hash filter * @hw: pointer to hardware structure * @input: unique input dword * @common: compressed common input dword diff --git a/sys/dev/ixgbe/ixgbe_api.c b/sys/dev/ixgbe/ixgbe_api.c index eded950e2881..7767e9a5571c 100644 --- a/sys/dev/ixgbe/ixgbe_api.c +++ b/sys/dev/ixgbe/ixgbe_api.c @@ -904,7 +904,7 @@ s32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val) } /** - * ixgbe_eeprom_update_checksum - Updates the EEPROM checksum + * ixgbe_update_eeprom_checksum - Updates the EEPROM checksum * @hw: pointer to hardware structure **/ s32 ixgbe_update_eeprom_checksum(struct ixgbe_hw *hw) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 6c1396ad964f..a7adf079f248 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -3866,14 +3866,15 @@ s32 ixgbe_set_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq) } /** + * ixgbe_set_vmdq_san_mac_generic - Associate default VMDq pool index with + * a rx address + * @hw: pointer to hardware struct + * @vmdq: VMDq pool index + * * This function should only be involved in the IOV mode. * In IOV mode, Default pool is next pool after the number of * VFs advertized and not 0. * MPSAR table needs to be updated for SAN_MAC RAR [hw->mac.san_mac_rar_index] - * - * ixgbe_set_vmdq_san_mac - Associate default VMDq pool index with a rx address - * @hw: pointer to hardware struct - * @vmdq: VMDq pool index **/ s32 ixgbe_set_vmdq_san_mac_generic(struct ixgbe_hw *hw, u32 vmdq) { @@ -4880,7 +4881,7 @@ static const u8 ixgbe_emc_therm_limit[4] = { }; /** - * ixgbe_get_thermal_sensor_data - Gathers thermal sensor data + * ixgbe_get_thermal_sensor_data_generic - Gathers thermal sensor data * @hw: pointer to hardware structure * * Returns the thermal sensor data structure diff --git a/sys/dev/ixgbe/ixgbe_dcb.c b/sys/dev/ixgbe/ixgbe_dcb.c index 0ebc5456eda5..29ee3117edcb 100644 --- a/sys/dev/ixgbe/ixgbe_dcb.c +++ b/sys/dev/ixgbe/ixgbe_dcb.c @@ -293,7 +293,7 @@ void ixgbe_dcb_unpack_map_cee(struct ixgbe_dcb_config *cfg, int direction, } /** - * ixgbe_dcb_config - Struct containing DCB settings. + * ixgbe_dcb_check_config_cee - Struct containing DCB settings. * @dcb_config: Pointer to DCB config structure * * This function checks DCB rules for DCB settings. diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index 00f396283879..c2f23179476b 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -587,7 +587,7 @@ void ixgbe_restart_auto_neg(struct ixgbe_hw *hw) } /** - * ixgbe_read_phy_mdi - Reads a value from a specified PHY register without + * ixgbe_read_phy_reg_mdi - Reads a value from a specified PHY register without * the SWFW lock * @hw: pointer to hardware structure * @reg_addr: 32 bit address of PHY register to read diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index ad7e7abd7a12..65a87883025e 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -750,7 +750,7 @@ static s32 ixgbe_setup_fw_link(struct ixgbe_hw *hw) } /** - * ixgbe_fc_autoneg_fw _ Set up flow control for FW-controlled PHYs + * ixgbe_fc_autoneg_fw - Set up flow control for FW-controlled PHYs * @hw: pointer to hardware structure * * Called at init time to set up flow control. @@ -1876,7 +1876,7 @@ void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw) } /** - * ixgbe_get_link_capabilities_x550em - Determines link capabilities + * ixgbe_get_link_capabilities_X550em - Determines link capabilities * @hw: pointer to hardware structure * @speed: pointer to link speed * @autoneg: true when autoneg or autotry is enabled @@ -3236,7 +3236,7 @@ out: } /** - * ixgbe_write_ee_hostif_X550 - Write EEPROM word using hostif + * ixgbe_write_ee_hostif_data_X550 - Write EEPROM word using hostif * @hw: pointer to hardware structure * @offset: offset of word in the EEPROM to write * @data: word write to the EEPROM @@ -3704,7 +3704,7 @@ u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) } /** - * ixgbe_get_bus_info_x550em - Set PCI bus info + * ixgbe_get_bus_info_X550em - Set PCI bus info * @hw: pointer to hardware structure * * Sets bus link width and speed to unknown because X550em is @@ -3769,7 +3769,7 @@ void ixgbe_disable_rx_x550(struct ixgbe_hw *hw) } /** - * ixgbe_enter_lplu_x550em - Transition to low power states + * ixgbe_enter_lplu_t_x550em - Transition to low power states * @hw: pointer to hardware structure * * Configures Low Power Link Up on transition to low power states @@ -3877,7 +3877,7 @@ s32 ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw) } /** - * ixgbe_get_lcd_x550em - Determine lowest common denominator + * ixgbe_get_lcd_t_x550em - Determine lowest common denominator * @hw: pointer to hardware structure * @lcd_speed: pointer to lowest common link speed * From nobody Fri Sep 27 03:36:15 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 4XFGMz750Sz5XQNh; Fri, 27 Sep 2024 03:36:15 +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 4XFGMz3cH3z4nT5; Fri, 27 Sep 2024 03:36:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408175; 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=irmxpzdfC5Xjkj6wuxk/fWaAMH0KXAlauy2u1po0hPA=; b=yNqeSgoTmJiZcW8GveOE4OLkOGLd6/5xxjSyjlIU1F3StKh9M9cEZFObDZVy2rZzNN87WS 9D2z/5EcaxXI4ke17kox+CNbEsomkqbdjRPJBCLukX11Ci7TcILqmUmPKwbttDYrVJVgnq CvmmhaGDNTnNxfGANFTgLYh8L9cY/GYdjEmAcXl1S2FTO9vvER3bgfmZrmkf6402m9UpVr c8zdsQX/EVjMQoC0GxvnIqInl094tR0dSW/ccet6q8pcqEsymTPNjrXU7W38ht7HOX8+Nb LKoaQxG14IwNucwTuOP8Pp1hRsdmfnZhiDTnjwf/Dqn73XleEYpuw+2bIe7Njg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408175; 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=irmxpzdfC5Xjkj6wuxk/fWaAMH0KXAlauy2u1po0hPA=; b=a/MVWQipqFrx60AstA80j59JymsTyJnHWS4x+HemKc4pHLbHWOg1fAOaqHGssi++Nzr6hg fJ10Wt/txuNul4F1XJjjOwrtPy17P+NgRGW6LBLZroYlWcArs/7+n20LlTHzwyeFAQPhVT hQpAjJjyBZnDwLVn/jLko8Ip92K3GQGgHm6o1WIyXcLY4rLh3MYbhllVjDJaf9N7w/tSe9 iU4VD/oXeeSmzJoXxbFt1GyTIcylfS1EpOfLXRnEsBsDekplSvZV4+Yls+4ESTfecgXI7V lRm1N0KFLgd1KvzWmILfdttnUYCXtRMbkz+jZoRksXpIuf0/sKHr1kMzlS/wgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408175; a=rsa-sha256; cv=none; b=RPUiafbep6+W2B9Iitk2sRMTRBg2fcktINw4SuqNRma16vH2qhqZgTp9Lf74G17mQ4Fo55 5bYCWYzVbQawPkrLJoYPnP2sZohadQeD51L62Lg2SiIviQD8c/sS5o2olfF6EuEo4aAt1B YdBh3PXCYgFohoVsLqSkmAGSI8gXXlNHor9Y4JuRMhEimHUSBISbFMZzo8PUGZx6jl08cs UqXZKCwjQIoCUcFnNYNhNa0TW+cwDwb0VpE0FjWIl6VWT8gsa/0QLBcaOzbx/rZN9kH8CO KadhoVj6nCy35olwz4ZWK5BBO89dVZXQilDyRDAvnjrVFpnUUJ4g0dMGQZJzKQ== 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 4XFGMz2zrGzP1s; Fri, 27 Sep 2024 03:36:15 +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 48R3aFJ8038927; Fri, 27 Sep 2024 03:36:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aFSl038924; Fri, 27 Sep 2024 03:36:15 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:15 GMT Message-Id: <202409270336.48R3aFSl038924@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: 3e34560b17c7 - stable/14 - ixgbe: add reset count field to HW struct 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: 3e34560b17c7209982dada156851ff4944426411 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=3e34560b17c7209982dada156851ff4944426411 commit 3e34560b17c7209982dada156851ff4944426411 Author: Radoslaw Tyl AuthorDate: 2024-09-20 02:54:21 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:32:53 +0000 ixgbe: add reset count field to HW struct DPDK commit message net/ixgbe/base: add reset count field to HW struct Add fw_rst_cnt to store the number of resets after fw update. This value is required to detect if the EICR.MNG event occurred after firmware update reset. Signed-off-by: Radoslaw Tyl Reviewed-by: Piotr Skajewski Reviewed-by: Slawomir Mrozowicz Reviewed-by: Alice Michael Obtained from: DPDK (9ab0e9c) (cherry picked from commit 224f7ab8b4706653c7d3f78e624bc36c97679f30) --- sys/dev/ixgbe/ixgbe_type.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index ccfce45500d9..56d4863c8e07 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -4201,6 +4201,7 @@ struct ixgbe_hw { bool allow_unsupported_sfp; bool wol_enabled; bool need_crosstalk_fix; + u32 fw_rst_cnt; }; #define ixgbe_call_func(hw, func, params, error) \ From nobody Fri Sep 27 03:36:16 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 4XFGN10pPzz5XQ63; Fri, 27 Sep 2024 03:36:17 +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 4XFGN041MQz4n9x; Fri, 27 Sep 2024 03:36:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408176; 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=HfprpT0MyESskz+NAflFNVHGHViSuKQjrXLXb3XJH5w=; b=f9XVtw0X6z0vsWnHiVxGlNkwfRi5ZzFnx2TPnLMdowkaLElNhqEHRGM4jZJwBgaXIF2lQ0 Z1ihqRzYPtLX4MuJ83VGC8XT0BnnQLGyzimyIPLB3ZwdN4Gtbo4d027oTx4KwHRsxHVztQ emkLiH4VDmB7aYOSBGDpB5iKmppQaSKFoTN7648qYXPzpApT9iB+Gnd6nVS+9znC4Csk/H lNDpGRuBPbwy+nQZwV+HtDev8l4y4S/x0U1N3CPEdV5sCSrAkStR+eQso4B+0Q7wWjdPNX /IeO7m7O5xGHV09bLY38kYgQM8pAKjcoVsVGcpSHpbfpl6tk7hlwOJtjNsTSIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408176; 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=HfprpT0MyESskz+NAflFNVHGHViSuKQjrXLXb3XJH5w=; b=U/ATmymk5z8HjpioqL4avYgjsueMpoydKDiOn/n9Mn3ZizhPEJYJ/JTP/UzZeSCuoNDO2J /XWKyOaBMTBqZ1n1gy6xgmYJbtAlcB02YRivrXygqQlIXnk+xp6nkNj+E5uycrhmuh0FM+ 5rbFuQK82grGKlsgKiu4OHH6ryBULcAOjBy+Noi7qTB8c2vnYpH6aYKhxXiZHZW/7yoB5t mylaH8iCpyu0ALzSwSppmIa8Hk0kTlniiQhlCbdJkTBfrcpTWzxmZR0ijUeV/F9rlaN1Pk SrE5YpzYLEm6l+3ChTKWhVVty0atq8/UeM+ouF8Jh0zOjjUnsPmup/Ug7u8juA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408176; a=rsa-sha256; cv=none; b=lIX+txgHrw0Ml0Ub1Z804YKWKuC6kYut7V2aip+iX+gzyEcytE3FmJLn5bBo90sIApS+jM MAsmyIsVq0yLZNfaAAKNX5H67u8t0a80BXZoot2/YK9cF3HfKWTrfkBfaXCGh1wEdE/x+r vxVRoAoUry92Rwr7YmsZT2YnNnyJqDnwv9bFTNygrOJHUEjAbdZxcZqs5hyzWg5pvlKKWz W4b9hzNI2BrBZZCELzVEV7b5ollET0gup0aHllVsJcb6EiAEISElHlEqYLtnGluN8c0Ui+ pYBpkuidK+RF9sN1PEWDAhfST36OCTh0Nig4gQVr87bfj7XqTSRV8/oG8gRqbA== 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 4XFGN03bMDzP57; Fri, 27 Sep 2024 03:36:16 +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 48R3aGRN038978; Fri, 27 Sep 2024 03:36:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aGhD038975; Fri, 27 Sep 2024 03:36:16 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:16 GMT Message-Id: <202409270336.48R3aGhD038975@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: c7bdf0c5e19b - stable/14 - ixgbe: Remove Atom C3000 HIC FW access 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: c7bdf0c5e19bcf5ec0a6c591646f35ca5dd7b4dc Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=c7bdf0c5e19bcf5ec0a6c591646f35ca5dd7b4dc commit c7bdf0c5e19bcf5ec0a6c591646f35ca5dd7b4dc Author: Marek Mical AuthorDate: 2024-09-20 02:59:05 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:33:17 +0000 ixgbe: Remove Atom C3000 HIC FW access DPDK commit message net/ixgbe/base: replace HIC with direct register access Unify FW access method to direct register read/writes across all Atom(R) C3000 products. Atom(R) C3000 fiber exhibited an issue with the Host Interface Command execution being locked when another LAN function attempted to acquire the SWFW sync on Manageability Host. This resulted in HIC atomicity break and bogus data being read since the other LAN function cleared all semaphores on timeout whereas HIC execution continued after unlock. Direct register IOSF access showed higher stability and reliability. Signed-off-by: Marek Mical Reviewed-by: Krzysztof Galazka Reviewed-by: Eryk Rybak Reviewed-by: Francis Racicot Reviewed-by: Alice Michael Obtained from: DPDK (e947f1e) (cherry picked from commit f56311e37d4c39b1deab6aa8523f3332c29e1ad3) --- sys/dev/ixgbe/ixgbe_x550.c | 76 ++-------------------------------------------- sys/dev/ixgbe/ixgbe_x550.h | 4 --- 2 files changed, 2 insertions(+), 78 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 65a87883025e..8fe8d037cf31 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -799,14 +799,8 @@ s32 ixgbe_init_ops_X550EM_a(struct ixgbe_hw *hw) /* Start with generic X550EM init */ ret_val = ixgbe_init_ops_X550EM(hw); - if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII || - hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L) { - mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550; - mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550; - } else { - mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550a; - mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550a; - } + mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550; + mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550; mac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550a; mac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550a; @@ -1287,72 +1281,6 @@ s32 ixgbe_put_phy_token(struct ixgbe_hw *hw) return IXGBE_ERR_FW_RESP_INVALID; } -/** - * ixgbe_write_iosf_sb_reg_x550a - Writes a value to specified register - * of the IOSF device - * @hw: pointer to hardware structure - * @reg_addr: 32 bit PHY register to write - * @device_type: 3 bit device type - * @data: Data to write to the register - **/ -s32 ixgbe_write_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 data) -{ - struct ixgbe_hic_internal_phy_req write_cmd; - s32 status; - UNREFERENCED_1PARAMETER(device_type); - - memset(&write_cmd, 0, sizeof(write_cmd)); - write_cmd.hdr.cmd = FW_INT_PHY_REQ_CMD; - write_cmd.hdr.buf_len = FW_INT_PHY_REQ_LEN; - write_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM; - write_cmd.port_number = hw->bus.lan_id; - write_cmd.command_type = FW_INT_PHY_REQ_WRITE; - write_cmd.address = IXGBE_CPU_TO_BE16(reg_addr); - write_cmd.write_data = IXGBE_CPU_TO_BE32(data); - - status = ixgbe_host_interface_command(hw, (u32 *)&write_cmd, - sizeof(write_cmd), - IXGBE_HI_COMMAND_TIMEOUT, false); - - return status; -} - -/** - * ixgbe_read_iosf_sb_reg_x550a - Reads specified register of the IOSF device - * @hw: pointer to hardware structure - * @reg_addr: 32 bit PHY register to write - * @device_type: 3 bit device type - * @data: Pointer to read data from the register - **/ -s32 ixgbe_read_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 *data) -{ - union { - struct ixgbe_hic_internal_phy_req cmd; - struct ixgbe_hic_internal_phy_resp rsp; - } hic; - s32 status; - UNREFERENCED_1PARAMETER(device_type); - - memset(&hic, 0, sizeof(hic)); - hic.cmd.hdr.cmd = FW_INT_PHY_REQ_CMD; - hic.cmd.hdr.buf_len = FW_INT_PHY_REQ_LEN; - hic.cmd.hdr.checksum = FW_DEFAULT_CHECKSUM; - hic.cmd.port_number = hw->bus.lan_id; - hic.cmd.command_type = FW_INT_PHY_REQ_READ; - hic.cmd.address = IXGBE_CPU_TO_BE16(reg_addr); - - status = ixgbe_host_interface_command(hw, (u32 *)&hic.cmd, - sizeof(hic.cmd), - IXGBE_HI_COMMAND_TIMEOUT, true); - - /* Extract the register value from the response. */ - *data = IXGBE_BE32_TO_CPU(hic.rsp.read_data); - - return status; -} - /** * ixgbe_disable_mdd_X550 * @hw: pointer to hardware structure diff --git a/sys/dev/ixgbe/ixgbe_x550.h b/sys/dev/ixgbe/ixgbe_x550.h index 245e128266aa..45e4cad9f1f7 100644 --- a/sys/dev/ixgbe/ixgbe_x550.h +++ b/sys/dev/ixgbe/ixgbe_x550.h @@ -69,10 +69,6 @@ s32 ixgbe_set_fw_drv_ver_x550(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build, u8 ver, u16 len, const char *str); s32 ixgbe_get_phy_token(struct ixgbe_hw *); s32 ixgbe_put_phy_token(struct ixgbe_hw *); -s32 ixgbe_write_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 data); -s32 ixgbe_read_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 *data); void ixgbe_disable_mdd_X550(struct ixgbe_hw *hw); void ixgbe_enable_mdd_X550(struct ixgbe_hw *hw); void ixgbe_mdd_event_X550(struct ixgbe_hw *hw, u32 *vf_bitmap); From nobody Fri Sep 27 03:36:17 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 4XFGN21r7dz5XPw9; Fri, 27 Sep 2024 03:36:18 +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 4XFGN14xQfz4nbT; Fri, 27 Sep 2024 03:36:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408177; 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=zcW97EfNQgN7weJJVt+pxRJVlEzuYgkESg2H/nsH6Mk=; b=CYJuifvs8bEyaPMnqgmnlq561LjxoPLYWkdHYhnsXCt3c0phjsp5K1a8tvwnlQbejkBd/8 Pfwzomkq1803WR82zSB3c/dGRAY3mC39aOEL/y2z0+h58cdQdw40iEn4Qzi07Nfb1ESmob 94UZNM0+3oNw0JbOdHo8qyiZwtX+CvOUq6SDgrUuNRsRfPLa162dTXtFZhyHN2m//hVsSV l1hadmQqzLPP4FM5x7mfJ5qRaf0FA6dB5C1SLCykU7jyYdHgSbaF5roSASniAVQO6nDcfe vUhg/7E0W/gsdRcQw6E75s9mE8uXNFFSbrBZ9w788Cmz/7d8VZJDdnEFoXQCeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408177; 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=zcW97EfNQgN7weJJVt+pxRJVlEzuYgkESg2H/nsH6Mk=; b=uZn9RrpbohcajGkRJxOSGWuE0yvWllT3r+oNj7ydaHqFoz/y7wtLIzhl6k8Uq924RdxyS7 7xW7HF6Ek5nptySXMEzXisnr8jYRqV74z2kVln+kVMsbBqLnvAgtZaAsrp+iZqs0QywuCe teUDS6CjVpxdPOzCbNuN8DXxWhI9JD+kYo/jxnBkQVKA+/ESnM8K6OlIhbzP+vt47B3rOt 6jSHfCYgwxIRRjJjEtVAVhFreeXHxufWzm+IwUcXhKr4mQNfCbyQD3XLjoA5JAxy2e4w32 neLokNNXj1b0SUauFPTiPhePEidZx6tiNxiKmncUdCpStQxCZ7JFIpXhOWFMkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408177; a=rsa-sha256; cv=none; b=uIYy+Sjx6dXJn1iHVnmmwyRPhhXTx3lx2ARODCYnIdoh/XZzf48j0v/OBJE3YfCIyLYiuW LYLGos1ORL2QnUuZUPKY7vMs72ZWOCWdFVxOMaL5akitqJyZ6gM7cGUNRxw1Fq+wL/XLZQ W6vLsfilphgp5kqZzY4prrWUKOHNvd4Y4SNeSkAGxPQX5HMHewLl5vVBiGQ9UGLq3U26RT nxKOK7uF3/RNXoMT9BWgj8ll6QpnfqXJLY2bK/8jH74fuCQSkcglR0bimt7NoyKZxU5/qP u12bdacTVJqyOO0wccE1Ycdlym1UDsqRXBElKbzSuRHgm44HuzkDbRv0ci4fFg== 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 4XFGN14PbNzP58; Fri, 27 Sep 2024 03:36:17 +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 48R3aHD6039020; Fri, 27 Sep 2024 03:36:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aHaO039017; Fri, 27 Sep 2024 03:36:17 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:17 GMT Message-Id: <202409270336.48R3aHaO039017@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: fc143df91260 - stable/14 - ixgbe: replace implicit fall-through comments 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: fc143df912602c4609dac52358f5ea29f19a7bda Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=fc143df912602c4609dac52358f5ea29f19a7bda commit fc143df912602c4609dac52358f5ea29f19a7bda Author: Piotr Skajewski AuthorDate: 2024-09-20 03:12:41 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:33:33 +0000 ixgbe: replace implicit fall-through comments DPDK commit message Convert all "fall-through" comments to actual code. This aligns the code with the kernel which no longer allows implicit fallthrough. Signed-off-by: Piotr Skajewski Reviewed-by: Alice Michael Obtained from: DPDK (ae8211f) (cherry picked from commit 50455f73c28114c665551cba267ec964491ccf21) --- sys/dev/ixgbe/ixgbe_82599.c | 8 ++++++-- sys/dev/ixgbe/ixgbe_common.c | 10 ++++++---- sys/dev/ixgbe/ixgbe_x550.c | 11 +++++++---- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index a1d8b299bf80..1ecab83a4e92 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -1759,7 +1759,9 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw, case 0x0000: /* mask VLAN ID */ fdirm |= IXGBE_FDIRM_VLANID; - /* FALLTHROUGH */ + /* mask VLAN priority */ + fdirm |= IXGBE_FDIRM_VLANP; + break; case 0x0FFF: /* mask VLAN priority */ fdirm |= IXGBE_FDIRM_VLANP; @@ -2049,7 +2051,9 @@ s32 ixgbe_fdir_add_perfect_filter_82599(struct ixgbe_hw *hw, DEBUGOUT(" Error on src/dst port\n"); return IXGBE_ERR_CONFIG; } - /* FALLTHROUGH */ + input_mask->formatted.flow_type = IXGBE_ATR_L4TYPE_IPV6_MASK | + IXGBE_ATR_L4TYPE_MASK; + break; case IXGBE_ATR_FLOW_TYPE_TCPV4: case IXGBE_ATR_FLOW_TYPE_TUNNELED_TCPV4: case IXGBE_ATR_FLOW_TYPE_UDPV4: diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index a7adf079f248..ff422a01c741 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -268,8 +268,8 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw) if (ret_val != IXGBE_SUCCESS) goto out; - /* only backplane uses autoc */ - /* FALLTHROUGH */ + reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA); + break; case ixgbe_media_type_fiber_fixed: case ixgbe_media_type_fiber_qsfp: case ixgbe_media_type_fiber: @@ -4779,8 +4779,10 @@ void ixgbe_set_rxpba_generic(struct ixgbe_hw *hw, int num_pb, u32 headroom, rxpktsize <<= IXGBE_RXPBSIZE_SHIFT; for (; i < (num_pb / 2); i++) IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(i), rxpktsize); - /* configure remaining packet buffers */ - /* FALLTHROUGH */ + rxpktsize = (pbsize / (num_pb - i)) << IXGBE_RXPBSIZE_SHIFT; + for (; i < num_pb; i++) + IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(i), rxpktsize); + break; case PBA_STRATEGY_EQUAL: rxpktsize = (pbsize / (num_pb - i)) << IXGBE_RXPBSIZE_SHIFT; for (; i < num_pb; i++) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 8fe8d037cf31..961d5c285e51 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -355,8 +355,7 @@ static s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw) /* set up for CS4227 usage */ ixgbe_setup_mux_ctl(hw); ixgbe_check_cs4227(hw); - /* Fallthrough */ - + return ixgbe_identify_sfp_module_X550em(hw); case IXGBE_DEV_ID_X550EM_A_SFP_N: return ixgbe_identify_sfp_module_X550em(hw); break; @@ -1869,7 +1868,9 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, break; } } - /* fall through */ + *speed = IXGBE_LINK_SPEED_10GB_FULL | + IXGBE_LINK_SPEED_1GB_FULL; + break; default: *speed = IXGBE_LINK_SPEED_10GB_FULL | IXGBE_LINK_SPEED_1GB_FULL; @@ -3589,7 +3590,9 @@ u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) break; } } - /* fall through */ + physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_KR | + IXGBE_PHYSICAL_LAYER_1000BASE_KX; + break; case ixgbe_phy_x550em_xfi: physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_KR | IXGBE_PHYSICAL_LAYER_1000BASE_KX; From nobody Fri Sep 27 03:36:18 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 4XFGN315kSz5XQSr; Fri, 27 Sep 2024 03:36:19 +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 4XFGN25xTCz4nbY; Fri, 27 Sep 2024 03:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408178; 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=36AFJX//FldsnrbkvbSeK+Oblw/xlgc3cJsL+URNyq8=; b=P/LK4sIOEaVxLioZidncbenQHhgQONly1A9D+bnGZPJZOEgYQkAD70pEBkaqjiz/ECeu89 ju3pDRLusp8Rk+xG4AAW+DrYCpy6POOXIB8WpmKXwiemmX+D9tv1meCO+LFL8+VUJ8oTon 9zQx9avIjQ/mgKPM5Jb/ImqnckVgmECHSTbK0ONg+gyc5WM64zFPA5X3yDxi7Ajv2ic0Ih FTh/FL28uEBK1PCyN3a470fPhGatPesEY6sMdfdNHDucb+s9rYcbS5FvvvXuVd5MECgw83 9vEuvKB+JBRL77xOni9hTqKUmBTtjao5HAtwLcvQXGWuHVcsMMjdA+/9dA0uxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408178; 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=36AFJX//FldsnrbkvbSeK+Oblw/xlgc3cJsL+URNyq8=; b=AR62KatUKx/czKH+ZaFL9Wd4bk/W4/gPoBeQkRy+CSXmt7qW4y6ZU7v4+KaWJ4WNt90yc/ zI/ADBFIWao29QR2Cl29Wu3jJKrNcpnhFN4OVkErW2rDlcA6WHXT1Dtj2ITWznGmN5SHkP HwGml2jz+9ipKQiz8CAluYPs72jKBZFbd008z13qTvfjXkEoK34CZJ0DptMz69xeDFC2/3 1VZdMPtZSci7RxnvZKT9NTMXZ9ww7lSaKtXluGn+uOk1xRqu1yoSosQGKAPjsuAPjfGLYC qIkHgNvMSLt1pfRVF2oy66Rhb1NZrclOgsq0hgyX+2Fx5EI9QiDYQsW+CRV3rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408178; a=rsa-sha256; cv=none; b=kVLdb+sOoxLO/EgqZchDssEgRbxSBc6uAYiGtWFdNP4Z9JVBWWP4SE/fa4XthRnHeCDYEH lkX1vrczg6fkE8l3f9lX8suvl3UgeJrrxaM+EJbaMLCGZiZ0LVMeusB2IS/WfiwLkrSiXV MFQB8haY8wxXmsCcYrRjuoscj2nCmwypHh+mnO6b0Iu+GeohPn9QL3CwGeWag1YfAcbF/w O2/+hyDpY7WsCvgIoErX7tmJ6njYmeDor5RCeWJiQ7FmUnCsyGzl8OsGJ+lFuwYI/lI3QP KWnE3DAd+fyjHWfmX1arB5GEKUCZ7SnYLNtXOcFsilcztPyCIf1CzW1dTe9yvw== 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 4XFGN25W9VzNyZ; Fri, 27 Sep 2024 03:36:18 +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 48R3aIUt039065; Fri, 27 Sep 2024 03:36:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aIG9039062; Fri, 27 Sep 2024 03:36:18 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:18 GMT Message-Id: <202409270336.48R3aIG9039062@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: ccd265610908 - stable/14 - ixgbe: use primary and block terminology 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: ccd26561090812a4ead648487d51eac2e9a07aab Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=ccd26561090812a4ead648487d51eac2e9a07aab commit ccd26561090812a4ead648487d51eac2e9a07aab Author: Marcin Jurczak AuthorDate: 2024-09-20 03:18:00 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:33:47 +0000 ixgbe: use primary and block terminology DPDK commit message net/ixgbe/base: replace non-inclusive language This patch removes non-inclusive language from code, user interface and comments. Signed-off-by: Marcin Jurczak Reviewed-by: Alice Michael Obtained from: DPDK (f12a4bd) (cherry picked from commit 4530d49e68d331e9168d3a216d8a4b8e0d547578) --- sys/dev/ixgbe/ixgbe_common.c | 34 +++++++++++++++++----------------- sys/dev/ixgbe/ixgbe_common.h | 2 +- sys/dev/ixgbe/ixgbe_type.h | 10 +++++----- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index ff422a01c741..7cf9b8d05127 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -171,7 +171,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw) case ixgbe_media_type_fiber_fixed: case ixgbe_media_type_fiber_qsfp: case ixgbe_media_type_fiber: - /* flow control autoneg black list */ + /* flow control autoneg block list */ switch (hw->device_id) { case IXGBE_DEV_ID_X550EM_A_SFP: case IXGBE_DEV_ID_X550EM_A_SFP_N: @@ -1146,10 +1146,10 @@ s32 ixgbe_stop_adapter_generic(struct ixgbe_hw *hw) msec_delay(2); /* - * Prevent the PCI-E bus from hanging by disabling PCI-E master + * Prevent the PCI-E bus from hanging by disabling PCI-E primary * access and verify no pending requests */ - return ixgbe_disable_pcie_master(hw); + return ixgbe_disable_pcie_primary(hw); } /** @@ -3208,32 +3208,32 @@ static u32 ixgbe_pcie_timeout_poll(struct ixgbe_hw *hw) } /** - * ixgbe_disable_pcie_master - Disable PCI-express master access + * ixgbe_disable_pcie_primary - Disable PCI-express primary access * @hw: pointer to hardware structure * - * Disables PCI-Express master access and verifies there are no pending - * requests. IXGBE_ERR_MASTER_REQUESTS_PENDING is returned if master disable - * bit hasn't caused the master requests to be disabled, else IXGBE_SUCCESS - * is returned signifying master requests disabled. + * Disables PCI-Express primary access and verifies there are no pending + * requests. IXGBE_ERR_PRIMARY_REQUESTS_PENDING is returned if primary disable + * bit hasn't caused the primary requests to be disabled, else IXGBE_SUCCESS + * is returned signifying primary requests disabled. **/ -s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw) +s32 ixgbe_disable_pcie_primary(struct ixgbe_hw *hw) { s32 status = IXGBE_SUCCESS; u32 i, poll; u16 value; - DEBUGFUNC("ixgbe_disable_pcie_master"); + DEBUGFUNC("ixgbe_disable_pcie_primary"); /* Always set this bit to ensure any future transactions are blocked */ IXGBE_WRITE_REG(hw, IXGBE_CTRL, IXGBE_CTRL_GIO_DIS); - /* Exit if master requests are blocked */ + /* Exit if primary requests are blocked */ if (!(IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_GIO) || IXGBE_REMOVED(hw->hw_addr)) goto out; - /* Poll for master request bit to clear */ - for (i = 0; i < IXGBE_PCI_MASTER_DISABLE_TIMEOUT; i++) { + /* Poll for primary request bit to clear */ + for (i = 0; i < IXGBE_PCI_PRIMARY_DISABLE_TIMEOUT; i++) { usec_delay(100); if (!(IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_GIO)) goto out; @@ -3241,13 +3241,13 @@ s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw) /* * Two consecutive resets are required via CTRL.RST per datasheet - * 5.2.5.3.2 Master Disable. We set a flag to inform the reset routine - * of this need. The first reset prevents new master requests from + * 5.2.5.3.2 Primary Disable. We set a flag to inform the reset routine + * of this need. The first reset prevents new primary requests from * being issued by our device. We then must wait 1usec or more for any * remaining completions from the PCIe bus to trickle in, and then reset * again to clear out any effects they may have had on our device. */ - DEBUGOUT("GIO Master Disable bit didn't clear - requesting resets\n"); + DEBUGOUT("GIO Primary Disable bit didn't clear - requesting resets\n"); hw->mac.flags |= IXGBE_FLAGS_DOUBLE_RESET_REQUIRED; if (hw->mac.type >= ixgbe_mac_X550) @@ -3269,7 +3269,7 @@ s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw) ERROR_REPORT1(IXGBE_ERROR_POLLING, "PCIe transaction pending bit also did not clear.\n"); - status = IXGBE_ERR_MASTER_REQUESTS_PENDING; + status = IXGBE_ERR_PRIMARY_REQUESTS_PENDING; out: return status; diff --git a/sys/dev/ixgbe/ixgbe_common.h b/sys/dev/ixgbe/ixgbe_common.h index a55003b4cfe4..0ff5c60d40af 100644 --- a/sys/dev/ixgbe/ixgbe_common.h +++ b/sys/dev/ixgbe/ixgbe_common.h @@ -118,7 +118,7 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw); s32 ixgbe_validate_mac_addr(u8 *mac_addr); s32 ixgbe_acquire_swfw_sync(struct ixgbe_hw *hw, u32 mask); void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u32 mask); -s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw); +s32 ixgbe_disable_pcie_primary(struct ixgbe_hw *hw); s32 prot_autoc_read_generic(struct ixgbe_hw *hw, bool *, u32 *reg_val); s32 prot_autoc_write_generic(struct ixgbe_hw *hw, u32 reg_val, bool locked); diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index 56d4863c8e07..f34bf8dace64 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -1488,7 +1488,7 @@ struct ixgbe_dmac_config { #define IXGBE_PSRTYPE_RQPL_SHIFT 29 /* CTRL Bit Masks */ -#define IXGBE_CTRL_GIO_DIS 0x00000004 /* Global IO Master Disable bit */ +#define IXGBE_CTRL_GIO_DIS 0x00000004 /* Global IO Primary Disable bit */ #define IXGBE_CTRL_LNK_RST 0x00000008 /* Link Reset. Resets everything. */ #define IXGBE_CTRL_RST 0x04000000 /* Reset (SW) */ #define IXGBE_CTRL_RST_MASK (IXGBE_CTRL_LNK_RST | IXGBE_CTRL_RST) @@ -2136,7 +2136,7 @@ enum { /* STATUS Bit Masks */ #define IXGBE_STATUS_LAN_ID 0x0000000C /* LAN ID */ #define IXGBE_STATUS_LAN_ID_SHIFT 2 /* LAN ID Shift*/ -#define IXGBE_STATUS_GIO 0x00080000 /* GIO Master Ena Status */ +#define IXGBE_STATUS_GIO 0x00080000 /* GIO Primary Ena Status */ #define IXGBE_STATUS_LAN_ID_0 0x00000000 /* LAN ID 0 */ #define IXGBE_STATUS_LAN_ID_1 0x00000004 /* LAN ID 1 */ @@ -2546,8 +2546,8 @@ enum { #define IXGBE_PCIDEVCTRL2_4_8s 0xd #define IXGBE_PCIDEVCTRL2_17_34s 0xe -/* Number of 100 microseconds we wait for PCI Express master disable */ -#define IXGBE_PCI_MASTER_DISABLE_TIMEOUT 800 +/* Number of 100 microseconds we wait for PCI Express primary disable */ +#define IXGBE_PCI_PRIMARY_DISABLE_TIMEOUT 800 /* Check whether address is multicast. This is little-endian specific check.*/ #define IXGBE_IS_MULTICAST(Address) \ @@ -4221,7 +4221,7 @@ struct ixgbe_hw { #define IXGBE_ERR_ADAPTER_STOPPED -9 #define IXGBE_ERR_INVALID_MAC_ADDR -10 #define IXGBE_ERR_DEVICE_NOT_SUPPORTED -11 -#define IXGBE_ERR_MASTER_REQUESTS_PENDING -12 +#define IXGBE_ERR_PRIMARY_REQUESTS_PENDING -12 #define IXGBE_ERR_INVALID_LINK_SETTINGS -13 #define IXGBE_ERR_AUTONEG_NOT_COMPLETE -14 #define IXGBE_ERR_RESET_FAILED -15 From nobody Fri Sep 27 03:36:19 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 4XFGN41ymWz5XQSw; Fri, 27 Sep 2024 03:36:20 +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 4XFGN4092Gz4nbn; Fri, 27 Sep 2024 03:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408180; 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=WjxJk7yDirKDx1/M97zxoxf9AQo3GqMkGplCGa0ltVQ=; b=w8VzlfEpoL/m954fhqxRe/Nl8+7KZlR6vJ2De683yJdH9Qq4FF2ExeyDbBFx9/6/Xfo/oP MnK0aMJq9qZAVvJfBTN+qZuxZGcp+h/2zgld+qiKwiZgleyui4ex+9E6BWE/k/obXqXPj8 FxrOgZvf5qk3iCqUk4ZrNR0eZg9A1qjCrx5xGafCKxBDGSJ3YVPA0LcMkRYhyzYpMPYgf5 nRChK7N4AAASs14/w5AkVfiyBXnZrBNG0I6H/1B5NpH09B529l2O6JMMHZKpNIg2v5Z/xS xpX5jb++nzwz27JpIgUa09PXqAb7yFTsy0/UWOk1F9NlGnhCarmY16QXyGoK2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408180; 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=WjxJk7yDirKDx1/M97zxoxf9AQo3GqMkGplCGa0ltVQ=; b=VNZ4CiKtGqk5bH+gUvu010jh50AlVtJyjc7i16Rt+9l4PPPeksyW9ONUqmccu795JietYd aPEpV2Xmpp+GOA+M8kcT0P76TK1OprMnbPBpA5V78ZDICCmozWvQEEOnGg7SLlQ5yb9llJ Z87UP6BLg0coG4qyUvYML57BjGAoX1z6O9DKLa4wYkENW+E5A293qv/xwKzvzzrwwnpZC+ ajBDqSpwv66nteZam78j0ajxUA4c1WH6xJmZN7pYZuq1b9AsC4H4gABAZsDSIrr8qPE1Yi V4ji5P8Eyv5bjAfg23e1XvFUSpsBLziBv66qLfbu/u18QJS83ls37Q74PzHKDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408180; a=rsa-sha256; cv=none; b=NPustT3j7nVFOq7YIYTnxEMLuPP8tX3ACMXJEIkkIqpXHA5xcun6PSZVMw4Zbe2FM8NLnv Bp3a+NYg1qctEup9LC8vkCSXCV97N47f5vTDFAZL+lzaLl/I0VovtnmCknVNrr/CUkmsiq OmA7yu5UcTk55ilpZkEa0RKLQC/0yoNTvqIiIZfqiOFF+7JHhZ1jzLpMa94I9zQTMljzA6 Wa3XHbmU61ttKOfv9RsragLy7kz7/CUKZffpuhgsj3VIZ0NKrp/2iGqrbA3KNqWZQ2Gouu 1ZT1RjOHcpZQURirCSWycxr4KSl5hhI2Se65l7/3uuX33wk3HyzVv5kQTD/YLQ== 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 4XFGN36GtnzPVD; Fri, 27 Sep 2024 03:36:19 +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 48R3aJkk039110; Fri, 27 Sep 2024 03:36:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aJOF039107; Fri, 27 Sep 2024 03:36:19 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:19 GMT Message-Id: <202409270336.48R3aJOF039107@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: a160f29c69be - stable/14 - ixgbe: remove circular dependency in ixgbe_mbx.h 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: a160f29c69be620b2b6b4e02aa00c1b573e3989b Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a160f29c69be620b2b6b4e02aa00c1b573e3989b commit a160f29c69be620b2b6b4e02aa00c1b573e3989b Author: Barbara Skobiej AuthorDate: 2024-09-20 03:22:35 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:34:00 +0000 ixgbe: remove circular dependency in ixgbe_mbx.h DPDK commit message net/ixgbe/base: remove circular header dependency Including one header file in second header file should be avoided, so fix it by forward declaring the struct instead. Signed-off-by: Barbara Skobiej Obtained from: DPDK (0bc2af5) (cherry picked from commit 3167854b9d2188c4039239f741870e044b7507ac) --- sys/dev/ixgbe/ixgbe_mbx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_mbx.h b/sys/dev/ixgbe/ixgbe_mbx.h index 7a982ce89f93..3a9bd34a137f 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.h +++ b/sys/dev/ixgbe/ixgbe_mbx.h @@ -35,7 +35,7 @@ #ifndef _IXGBE_MBX_H_ #define _IXGBE_MBX_H_ -#include "ixgbe_type.h" +struct ixgbe_hw; struct ixgbe_mbx_operations { void (*init_params)(struct ixgbe_hw *hw); From nobody Fri Sep 27 03:36:20 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 4XFGN53vQ4z5XQLh; Fri, 27 Sep 2024 03:36:21 +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 4XFGN50frwz4nfC; Fri, 27 Sep 2024 03:36:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408181; 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=7ts6ZxJ2KaBnp+fH6bUROG7psSO27fhP/ptQhGstGec=; b=FFMqTn3eemRbpRlli1fd6N6kzfe3dU9sJvr6vQiE/23dm1LFn6Z6Ik6sMc0BqretETcANV vRQ0hGDfrkhSAEjYi4DyPRXI3eIRw0WZTNkkJVjX6GxSDp6rPUkt/sRWkHZrxHC+MI/WOY xXSc1j0IHk6pS9ieKqDij+Y6CotLAK4Ld392VtFGvCge8UKcjeSy6bv01gV9rsZXocOFKc WHaiadcsOIFyg8qkIxETV3EHHInQaJlBJNiViFeP7QtDJRa2WeeBqC3NsdVuREVznJk2hc /XywsWjAi5BtpnG1hpTQ0kKVEf9jX680UFKn3apj1uJnfRA+3h8Bj6dud3gVow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408181; 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=7ts6ZxJ2KaBnp+fH6bUROG7psSO27fhP/ptQhGstGec=; b=jM0/uQ6+5BS2gsXtQXULGXf7EMPzdq0SLJpe3JgIRipdtqX4b8I4Yvvqq9Pg6qEN9bxR8U VEbWLp1RcrplhG94k4e0bkhFpi7/mxNTIgRzzAx8A/M+KqLoFEcHeCSqkNAvXoaSj87cc1 uou9eaa6R17XAZR3zsBB7CpHzFGde6yR1IHOPyWhV9I51rSLm7xHYh4EXiFgETpzxfdxFr 8OSF5DAAv+b4jmOp3Fxw2DmY6f2aWZiJxwszRAtWw9bwtrxLIMZkPHKLSu131cVg66LU0+ /5k2YhHe+Z8II/LqbILUa5wlb0SxhuZOV7fiwxlpgdNtj/vnlV8etZZaTc+MuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408181; a=rsa-sha256; cv=none; b=ETXwJstE3yznFQGfAHKEE5g6OdndVQ65ANDGtxjf4DrwTr+ZopuxrUiP4/kImnY1dF7RMK peXedfu0imoemuLsynNZHzLPRTnaHiFZP3jatHSA00ZtgWHY10BVsQczTpFpgsYTQ8w8da R9A9TFjyaTsLw7u0y3BJ6rXzxgSKxrtvC5S9Q/o40Hzla6h1R7CvMP5QZE3dIxKLMqJZEe +/fhySlWbMsUB02U4+cgHjCHKR+ke5xxKOE0F1sDPg75bHiUYLEsDRAXcJSb/DpfG90FYl TdZKc2ybiP64kRRL7Kq2rRDhQwyaeSTGoJeRCAS9JGpnLgfKZz8Sslw3ZYf6YQ== 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 4XFGN50D95zP59; Fri, 27 Sep 2024 03:36:21 +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 48R3aKuP039154; Fri, 27 Sep 2024 03:36:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aKIg039151; Fri, 27 Sep 2024 03:36:20 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:20 GMT Message-Id: <202409270336.48R3aKIg039151@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: 64945a6b4b9e - stable/14 - ixgbe: add missing QV defines 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: 64945a6b4b9e130a37db2d6d86048d93754badbc Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=64945a6b4b9e130a37db2d6d86048d93754badbc commit 64945a6b4b9e130a37db2d6d86048d93754badbc Author: Barbara Skobiej AuthorDate: 2024-09-20 03:27:21 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:34:14 +0000 ixgbe: add missing QV defines DPDK commit message net/ixgbe/base: add missing QV defines This patch adds missing QV defines: - offset of ANVM data - Immediate Field module pointer offset - 2.5GBASE-T and 5GBASE-T physical layer types for X550 Signed-off-by: Barbara Skobiej Signed-off-by: Jan Sokolowski Obtained from: DPDK (a730b83) (cherry picked from commit bfa48c32bc4099cb58b9fe7efab7f376475539ef) --- sys/dev/ixgbe/ixgbe_type.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index f34bf8dace64..dbcc6544133e 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -3105,6 +3105,7 @@ enum ixgbe_fdir_pballoc_type { #define FW_SHADOW_RAM_DUMP_LEN 0 #define FW_DEFAULT_CHECKSUM 0xFF /* checksum always 0xFF */ #define FW_NVM_DATA_OFFSET 3 +#define FW_ANVM_DATA_OFFSET 3 #define FW_MAX_READ_BUFFER_SIZE 1024 #define FW_DISABLE_RXEN_CMD 0xDE #define FW_DISABLE_RXEN_LEN 0x1 @@ -3176,6 +3177,8 @@ enum ixgbe_fdir_pballoc_type { #define FW_PHY_INFO_ID_HI_MASK 0xFFFF0000u #define FW_PHY_INFO_ID_LO_MASK 0x0000FFFFu +#define IXGBE_SR_IMMEDIATE_VALUES_PTR 0x4E + /* Host Interface Command Structures */ #pragma pack(push, 1) @@ -3479,6 +3482,8 @@ typedef u64 ixgbe_physical_layer; #define IXGBE_PHYSICAL_LAYER_1000BASE_SX 0x04000 #define IXGBE_PHYSICAL_LAYER_10BASE_T 0x08000 #define IXGBE_PHYSICAL_LAYER_2500BASE_KX 0x10000 +#define IXGBE_PHYSICAL_LAYER_2500BASE_T 0x20000 +#define IXGBE_PHYSICAL_LAYER_5000BASE_T 0x40000 /* Flow Control Data Sheet defined values * Calculation and defines taken from 802.1bb Annex O From nobody Fri Sep 27 03:36:22 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 4XFGN62z7Mz5XQ3g; Fri, 27 Sep 2024 03:36:22 +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 4XFGN6252Sz4nhw; Fri, 27 Sep 2024 03:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408182; 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=DMBBw0cqhkPxr4BgT+G1wOP3XWbPD59DHtfq/jiIZqk=; b=ecKt45Rr5LfaoNDwLh55EGNMPDA3HU6KtxvjwILaTl17LhD81gfTv1/8M694rw6S3Na2DF RBG+4yK5zWKZBukCu2G6OPmCdvGTGVk3PWAHYpFPVLWMpTMIURM0rlVInyFVUrsEEZgSnH l/7+AsWhDOsCSapEjrkFMyMjer7znnhCNOeDs6BgQshHKtxvxIRc5tPo6OCRqmgd93L0fQ ayhi+jNRdGiHsEB7x2prcGiF4qThZy5ror+rA5+9oD614USAPYr6wGn5k8CjRQtcWphQ6A IFOQ+UF93cBW6WY0SQl2uf/jN7rTlg9sGsWGBEluTuzhD8UaFTbC8pJAz5iGJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408182; 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=DMBBw0cqhkPxr4BgT+G1wOP3XWbPD59DHtfq/jiIZqk=; b=PrR/YN30Q6BhMHkT+/k+57DkaWl/R8YYk9TdN/x5kBKN8kjCu4ZJfOGOU0i8YHWrOffkCg 9LwuV+yBKVEiqyMXmLZ2wFWJkTOTjvWMDwno2RxOUcRQaJiA1KHQ/yhU2gotNDV+zsd6L+ AQjkc/YYuX+wmEYJij/cRNyEciNRu/KPgfTI9A7+F0seNDidA3n/nA+hfWpnlNN6mX1VLn vLce0r8BjbCrJZ5U5bizW/tXsaDCH66TOniMzer8Vaz3SMWwjuIEdt3m8q3FwFSmrvyypL vUU/zmv8KhxH8eUlQGQDoAZuuzoEdQ1CM+j93jZ38tRxyjUCtqRcdTAF/rHjXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408182; a=rsa-sha256; cv=none; b=LMnUIfV7A9kqIZlXFKzx7jAZEL4Dj9yuR+mjc04ty3li7GDtynNYHVDFf9sPrTReT5/M4Z JuIex/X5LCNGCrsJxQTf1PJyfQqI+zNsQE1oPkeCC3ROJw64ZGoTf7tahBB0GochpUNmVD KNDdbVnZC2xssBjZxk9erlH1YNCtuknyWRL5SYu/mHZv4CrbIGbiaAW0sJDiiO01W7q0dx uFOQ7EbJ7/YIcBNlnhuOXQZb9Os0ewskgxvgNEKZVvzlzP8kVaEgGMaW6N8dHmQRZTu067 NuvZk6ZoDGzoyyQ2zCPKmFNje5YZHv1kRVWrfqc/mR4b9y0UUu85QnzpCs1Gkg== 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 4XFGN610SFzP5B; Fri, 27 Sep 2024 03:36:22 +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 48R3aMjG039202; Fri, 27 Sep 2024 03:36:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aMHr039199; Fri, 27 Sep 2024 03:36:22 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:22 GMT Message-Id: <202409270336.48R3aMHr039199@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: 2bff788d32d1 - stable/14 - ixgbe: improve Atom C3000 SWFW semaphore acq 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: 2bff788d32d12ceb1e82866234b183aef30dc697 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2bff788d32d12ceb1e82866234b183aef30dc697 commit 2bff788d32d12ceb1e82866234b183aef30dc697 Author: Barbara Skobiej AuthorDate: 2024-09-20 03:29:36 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:34:27 +0000 ixgbe: improve Atom C3000 SWFW semaphore acq DPDK commit message net/ixgbe/base: improve SWFW semaphore acquisition HWSW semaphore acquisition in Atom C3000 NIC is a two stage process. Each time two semaphore acquisitions are required. Each second semaphore failure requires re-acquisition of first semaphore. This patch decouples the two acquisitions preventing potentially hundreds of thousands of unnecessary loop iterations. Signed-off-by: Barbara Skobiej Obtained from: DPDK (99f960c) (cherry picked from commit cc9944183187308a71489651b11342d293aac7d1) --- sys/dev/ixgbe/ixgbe_x550.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 961d5c285e51..ba72b5d1366e 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -4242,36 +4242,39 @@ static s32 ixgbe_acquire_swfw_sync_X550a(struct ixgbe_hw *hw, u32 mask) DEBUGFUNC("ixgbe_acquire_swfw_sync_X550a"); - while (--retries) { - status = IXGBE_SUCCESS; - if (hmask) - status = ixgbe_acquire_swfw_sync_X540(hw, hmask); - if (status) { - DEBUGOUT1("Could not acquire SWFW semaphore, Status = %d\n", - status); - return status; - } - if (!(mask & IXGBE_GSSR_TOKEN_SM)) - return IXGBE_SUCCESS; + status = IXGBE_SUCCESS; + if (hmask) + status = ixgbe_acquire_swfw_sync_X540(hw, hmask); + + if (status) { + DEBUGOUT1("Could not acquire SWFW semaphore, Status = %d\n", status); + return status; + } + + if (!(mask & IXGBE_GSSR_TOKEN_SM)) + return IXGBE_SUCCESS; + while (--retries) { status = ixgbe_get_phy_token(hw); - if (status == IXGBE_ERR_TOKEN_RETRY) - DEBUGOUT1("Could not acquire PHY token, Status = %d\n", - status); if (status == IXGBE_SUCCESS) return IXGBE_SUCCESS; - if (hmask) - ixgbe_release_swfw_sync_X540(hw, hmask); - if (status != IXGBE_ERR_TOKEN_RETRY) { - DEBUGOUT1("Unable to retry acquiring the PHY token, Status = %d\n", - status); + DEBUGOUT1("Retry acquiring the PHY token failed, Status = %d\n", status); + if (hmask) + ixgbe_release_swfw_sync_X540(hw, hmask); return status; } + + if (status == IXGBE_ERR_TOKEN_RETRY) + DEBUGOUT1("Could not acquire PHY token, Status = %d\n", + status); } + if (hmask) + ixgbe_release_swfw_sync_X540(hw, hmask); + DEBUGOUT1("Semaphore acquisition retries failed!: PHY ID = 0x%08X\n", hw->phy.id); return status; From nobody Fri Sep 27 03:36: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 4XFGN751Thz5XQQV; Fri, 27 Sep 2024 03:36:23 +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 4XFGN72ksgz4nZ7; Fri, 27 Sep 2024 03:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408183; 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=OlZ/IB5wD112JsDPzN1Cmgn+1fhcWQIVbpIqz/745do=; b=Aa1AGHkA8PSQG0+uY/RzTBmIWNeh2Lj47HOYHbMu2V6dMpEyM0Eo8fzifDZTGyTeQjkVbb wq75RaahIKUWA1y/bgeFRuRaD+lXtgG+unj5wdMwTyzvve6imM3GEAa5Lw7XNqW4WrcA1Z 8t2vWtPqXG43zZeJC/IvDZXUQf0Q+MC/HAlsMOqFTajwa/ydy7kBbf/JxY0fiXhdswqysZ xJzKg1ZELtVhZk3v8ucVs6ykOkSHvCUYvNwebUHqYU5pBNE5iU+8AfGu9i1fL9TZh/Q9TU GiV8oX8uBBxvQLUMlqiO3exCJtaTg17V8zKZ6qdg1z7KV3/0YGWCWy913WzmzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408183; 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=OlZ/IB5wD112JsDPzN1Cmgn+1fhcWQIVbpIqz/745do=; b=N3fC1E51AAHlhNSjZvLp8dwb3vOU7LgBE41sTnsMZAGMzG2FI7UBNC8IfrBBdsidPZTFx8 r3O+rp2+wJLUBX//odTw2vFujcbyFr0b2Llw72tGBBi+6g4SxDDbgiG5P3aK6f7X92/Cg/ cIBrG8Nt9zca9i1/o+lcgjA+DfR1O0w4zcOLWjCq8m+BvzH0GCkM+QpXR19iujX5avIDjV i3pYZzxTg5C3lMgQosnCi9Cef2ZAq4DYmlv3yr0I821kjezgJsKlHbNQtWaMPdJu68OwQF 5waTL+620p7WYeg7OUTJD0+ETGjJatr2wGt0srxaMXtw4Ocn7ENM8GXwV9VlEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408183; a=rsa-sha256; cv=none; b=rSc43hM2yxOiFjkXKjmurWXL1Zue/B3DNrcdL/tIkkIdgq7BdyFdLTz0HIMXxVymtxIHnl aphR+Mdy2ZWUz4Z1lu9UA43BwhgTQObsClQGrYJZEm7cbrpAGRATKfSFCElTfXsJWfcbiG 8vMfvmks4eBk2y7r+RsEU3KCYhttPawvRW/dXLeLGyFcj9VCMF651YcDL2usIsvSWBHNn1 eagJatzhXa3o0dhFaXa4QrOwJr8djqsa1s5NsuO4cYkEh39J2mnzgvSDpY92JnTYninBm+ 0I8PcmXxpJzc/meHSwukRa5yNxnuK9CveAlT62Xpd0BsVD1P/kOClIasYOqf8A== 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 4XFGN729VXzNx3; Fri, 27 Sep 2024 03:36:23 +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 48R3aNrb039261; Fri, 27 Sep 2024 03:36:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aNiY039258; Fri, 27 Sep 2024 03:36:23 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:23 GMT Message-Id: <202409270336.48R3aNiY039258@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: 0ea3d1ca5e27 - stable/14 - ixgbe: prevent PBA read over eeprom word size 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: 0ea3d1ca5e27b0af2573e0d7ca83ba5d113ed1c5 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=0ea3d1ca5e27b0af2573e0d7ca83ba5d113ed1c5 commit 0ea3d1ca5e27b0af2573e0d7ca83ba5d113ed1c5 Author: Dawid Zielinski AuthorDate: 2024-09-20 03:33:37 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:34:39 +0000 ixgbe: prevent PBA read over eeprom word size DPDK commit message net/ixgbe/base: prevent untrusted loop bound Added length check against EEPROM size in words to prevent untrusted loop bound reported by static code analysis. Signed-off-by: Dawid Zielinski Obtained from: DPDK (6b58617) (cherry picked from commit 25771c8c1ae606436823854de01fc2b23178e353) --- sys/dev/ixgbe/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 7cf9b8d05127..7643d4028529 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -713,7 +713,7 @@ s32 ixgbe_read_pba_string_generic(struct ixgbe_hw *hw, u8 *pba_num, return ret_val; } - if (length == 0xFFFF || length == 0) { + if (length == 0xFFFF || length == 0 || length > hw->eeprom.word_size) { DEBUGOUT("NVM PBA number section invalid length\n"); return IXGBE_ERR_PBA_SECTION; } From nobody Fri Sep 27 03:36:24 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 4XFGN84pSCz5XPxj; Fri, 27 Sep 2024 03:36: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 4XFGN83tn5z4nfk; Fri, 27 Sep 2024 03:36:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408184; 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=1eFN6YxNtOOaryyDU7hezHfipeYUoKx438w/3BqcNNw=; b=R1GXm12JHxNpqkhw9Ncg3bHpX4MIvJaDu/ZLa0/MMrzlq7jSPZ0mUH4Jv4FAKseLy6SmLs /tBWxNLQDyi7Z+wliywOTxRWim9KeOdOcPpxIDQHAlBF/uq86GIqp7kYP4Hs7+4m8BsKrN kOyWClI0QJ3AQ+wBcu5yAklh8/WOLnaDXj8TlTHF3jbNeDKnbtJBrSB/RMBjOq3eFEdGOC 4tMGIF/ElVBitUmToJRlBuiu8YdscvMuPpaZUmLBUw2zZk4bFjCaZGHeP+ioRYdu2yYlEp yhOTycCtH9YyO00WafLbTN+/NN7ehtw5BXOhFDwQ2t47SCD68PgLAC7L1WU6ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408184; 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=1eFN6YxNtOOaryyDU7hezHfipeYUoKx438w/3BqcNNw=; b=yzuCkIEwVPktKXIYhQjNe+qw8p0ES4vsIj2BnT1dfC0QXEBK20/HzDQja1EzTHIDPCnFIr rusiWWtmGwBR+4piPqNl0c09ji4zfCj2nw3NEPBB9VfoOuKLG3mrIJ1sz0xYNNhrCcAmUP e1E12kuYTEdZvvMtSpxWllX7JnYUCpblRJ3oLEvmaC1Zlwdu0bJlpRzXca2JD4tSqITRL1 RZeJIlhxk9UQc0REl2eoctGBiCvfHN0n2M1Wlrzl0PdLIriq2Cx5D4RBXLUgS0T5tREeFF tjDPJIm9ACvntGgH4klOiTAghhED4vnFTb46fBU+VoLcgh006V4Y6HLTGx/MKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408184; a=rsa-sha256; cv=none; b=R0doOIGRVvPtLJkP4pg7JLpreoHS62dWQQPoi96Nhlk55kV4b+bIyFMoVB+IKml7+Gz/M3 GINvPNk69lWbfBvq+ekCh8kmcT1Uo4BvXoy4K+N8pzJgcGF9PO9TK4BrRkqd60nqD4vX8L XxXi+2YdRvmfhn2uuJ6V9TKR6el+vFyqbeyYm06lNLOzdCcCNjTrFDdvXh3N3L3l9bGIT0 72r7JwgSyAvj9WP/87CSWjJgQpB9rq2jJq9oWFpFa/StFzpM5J6NoSF5nuJQFSLkyKCnj6 T4zhNg31Xf11dcMR1Ofwm9/arb+tlpikbLRf8b1299XdxIAMgYPfAOcs3m7NLg== 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 4XFGN83R9rzP5C; Fri, 27 Sep 2024 03:36: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 48R3aOcc039303; Fri, 27 Sep 2024 03:36:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aOB1039300; Fri, 27 Sep 2024 03:36:24 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:24 GMT Message-Id: <202409270336.48R3aOB1039300@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: 744014e62d6e - stable/14 - ixgbe: remove unused function prototypes 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: 744014e62d6ee5bd16c8ad92293b51e377c5df77 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=744014e62d6ee5bd16c8ad92293b51e377c5df77 commit 744014e62d6ee5bd16c8ad92293b51e377c5df77 Author: Chinh Cao AuthorDate: 2024-09-20 03:36:14 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:34:51 +0000 ixgbe: remove unused function prototypes DPDK commit message net/ixgbe/base: remove unused function prototypes There are some function prototypes that were introduced at some point but were never implemented, so remove them. Signed-off-by: Chinh Cao Obtained from: DPDK (e9cc1b4) (cherry picked from commit 420c984470270e0f7200124d8015236584aef243) --- sys/dev/ixgbe/ixgbe_api.h | 1 - sys/dev/ixgbe/ixgbe_x550.h | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_api.h b/sys/dev/ixgbe/ixgbe_api.h index 9134971d9c98..33c1cd1baeaf 100644 --- a/sys/dev/ixgbe/ixgbe_api.h +++ b/sys/dev/ixgbe/ixgbe_api.h @@ -148,7 +148,6 @@ u64 ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw); s32 ixgbe_enable_rx_dma(struct ixgbe_hw *hw, u32 regval); s32 ixgbe_disable_sec_rx_path(struct ixgbe_hw *hw); s32 ixgbe_enable_sec_rx_path(struct ixgbe_hw *hw); -s32 ixgbe_mng_fw_enabled(struct ixgbe_hw *hw); s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw); s32 ixgbe_init_fdir_signature_82599(struct ixgbe_hw *hw, u32 fdirctrl); s32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 fdirctrl, diff --git a/sys/dev/ixgbe/ixgbe_x550.h b/sys/dev/ixgbe/ixgbe_x550.h index 45e4cad9f1f7..8bff5e3d2bf6 100644 --- a/sys/dev/ixgbe/ixgbe_x550.h +++ b/sys/dev/ixgbe/ixgbe_x550.h @@ -103,7 +103,6 @@ s32 ixgbe_write_phy_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, u16 phy_data); s32 ixgbe_setup_fc_fiber_x550em_a(struct ixgbe_hw *hw); s32 ixgbe_setup_fc_backplane_x550em_a(struct ixgbe_hw *hw); -s32 ixgbe_setup_fc_sgmii_x550em_a(struct ixgbe_hw *hw); void ixgbe_fc_autoneg_fiber_x550em_a(struct ixgbe_hw *hw); void ixgbe_fc_autoneg_backplane_x550em_a(struct ixgbe_hw *hw); void ixgbe_fc_autoneg_sgmii_x550em_a(struct ixgbe_hw *hw); From nobody Fri Sep 27 03:36:25 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 4XFGNB0Cz2z5XQ3l; Fri, 27 Sep 2024 03:36:26 +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 4XFGN94pMNz4nrd; Fri, 27 Sep 2024 03:36:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408185; 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=lvjmdwODhyYoJ0QEJGBln7erkYj3vNveV153QuGF3qc=; b=MmollUnMY4dp9/l7WmsX6sZjaHrxOtnyyhrrccgLh2OizEgbIuyEuEaIhQHn5DWG0dP7xi Jv69hvz9Si9I3cpHZN+pFRnqQSEJH9N+aOH6rvCcq6wrt6utZiw1hdyrfuHjaOIIsvgrEA DJteabWaAA5D1/7GGBuIN9bYUGOjjxTE0bGEfMtPbsH8yrfUoxeQ5XJG91c2jrcEMAMg8a MYQmhwyOrvEJES5DT0ElVdcSCbeLYNA/zDwGoq8a43Xu5GcX/I77U8/RVR7IO2woMbIF0t jrfMUXcJskxWFESWoklM5rTH/K8SgxAki7URgcUSiomDx4QuVgNvOPMpV7Qqcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408185; 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=lvjmdwODhyYoJ0QEJGBln7erkYj3vNveV153QuGF3qc=; b=t5ivy9paKnQ5vb/BLkU2ik1rvvVdTYwT1qz9pQppZTo2jSHABCBpgzxqGrDkck8W5b2XWC +DJKv4zpMdlfo9mZJqUkw9PT6qsCeIY5P5vUVA25IYeAbeBhBSPS+hUq+SaoGUB2FVpePV f9XTnJY+g8/T18wsaG3HAZrTSRRY2XK5EalfdQsfzIvIjPKnl+Mz4g4gJeSoPCETN45Wvu u2EOLUIjKGZ5Ealv39N8YWCnDZ+/1aknRoB4frOaNMp3HUrLusLrk7iKOnx1zmDVxlK8zp dzEXj8edo2e3P73SHBCh4J3fmFdb0ZcCZsiDN/Hl2QgkItlEMdNg4Qmq/Io+NQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408185; a=rsa-sha256; cv=none; b=aEX2CgKoCTbEyT/0LAC1BHJEwrPCjbVDnvuiK+c8tneRo8uU3DZ8tWsXGNWoz2GftFrOeL DrOre3e5IYLTf7+yLBr6EfCi0fISlIIL102uqyVagVzEHRFYcArqQkBl6DIY7+3mAz1yNG gCOTSGtI8J8XWwXCJ/8VVSgrRiN9YPpgdXiGl4IRAV8m03Vx4JyOwmE0TKI1Jx3eNHB8h4 C7/tVXnI3jGviGsR2T8+0+uS5eVwBZe7zYlUFYNEkEbrHKQeYkmSPFqf8ZXGUbr3cNFzCP 1BgsBIqLstK26wqrYRLirRLPOynbLre42cxtsvdQCS5GEjMLadvix8JrTT/TTQ== 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 4XFGN94QblzNx4; Fri, 27 Sep 2024 03:36:25 +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 48R3aP3i039345; Fri, 27 Sep 2024 03:36:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aPKg039342; Fri, 27 Sep 2024 03:36:25 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:25 GMT Message-Id: <202409270336.48R3aPKg039342@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: dcf7b92d48b6 - stable/14 - ixgbe: fix compilation for VF 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: dcf7b92d48b6db30851b8b73cff8c8ef34f8f97a Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=dcf7b92d48b6db30851b8b73cff8c8ef34f8f97a commit dcf7b92d48b6db30851b8b73cff8c8ef34f8f97a Author: Doug Moore AuthorDate: 2024-09-20 07:54:48 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:35:06 +0000 ixgbe: fix compilation for VF The mailbox API changed in version 15 and these array ops were left out of the recent code import as applicable to FreeBSD. Reported by: vishwin, yasu Differential Revision: https://reviews.freebsd.org/D46708 (cherry picked from commit 267f223f622fdbf779cc43b5a564bb02e2b59ecd) --- sys/dev/ixgbe/if_sriov.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index a16092c9f688..112c34849e65 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -100,7 +100,7 @@ ixgbe_send_vf_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) if (vf->flags & IXGBE_VF_CTS) msg |= IXGBE_VT_MSGTYPE_CTS; - sc->hw.mbx.ops.write(&sc->hw, &msg, 1, vf->pool); + sc->hw.mbx.ops[0].write(&sc->hw, &msg, 1, vf->pool); } static inline void @@ -374,7 +374,7 @@ ixgbe_vf_reset_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) resp[0] = IXGBE_VF_RESET | ack | IXGBE_VT_MSGTYPE_CTS; bcopy(vf->ether_addr, &resp[1], ETHER_ADDR_LEN); resp[3] = hw->mac.mc_filter_type; - hw->mbx.ops.write(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN, vf->pool); + hw->mbx.ops[0].write(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN, vf->pool); } /* ixgbe_vf_reset_msg */ @@ -565,7 +565,7 @@ ixgbe_vf_get_queues(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) resp[IXGBE_VF_TRANS_VLAN] = (vf->default_vlan != 0); resp[IXGBE_VF_DEF_QUEUE] = 0; - hw->mbx.ops.write(hw, resp, IXGBE_VF_GET_QUEUES_RESP_LEN, vf->pool); + hw->mbx.ops[0].write(hw, resp, IXGBE_VF_GET_QUEUES_RESP_LEN, vf->pool); } /* ixgbe_vf_get_queues */ @@ -582,7 +582,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) hw = &sc->hw; - error = hw->mbx.ops.read(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); + error = hw->mbx.ops[0].read(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); if (error != 0) return; @@ -643,13 +643,13 @@ ixgbe_handle_mbx(void *context) vf = &sc->vfs[i]; if (vf->flags & IXGBE_VF_ACTIVE) { - if (hw->mbx.ops.check_for_rst(hw, vf->pool) == 0) + if (hw->mbx.ops[0].check_for_rst(hw, vf->pool) == 0) ixgbe_process_vf_reset(sc, vf); - if (hw->mbx.ops.check_for_msg(hw, vf->pool) == 0) + if (hw->mbx.ops[0].check_for_msg(hw, vf->pool) == 0) ixgbe_process_vf_msg(ctx, vf); - if (hw->mbx.ops.check_for_ack(hw, vf->pool) == 0) + if (hw->mbx.ops[0].check_for_ack(hw, vf->pool) == 0) ixgbe_process_vf_ack(sc, vf); } } From nobody Fri Sep 27 03:36:26 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 4XFGNB6yZ3z5XQ3m; Fri, 27 Sep 2024 03:36:26 +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 4XFGNB5dFdz4nb4; Fri, 27 Sep 2024 03:36:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408186; 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=HqG1IgzZ+d+YxVIzm9RgOGZP29qhxe/0GVrquvunU6M=; b=nU8vzXLh2Hup16MOGYx7M/QI31K1Ied6GIMeNXoD+x42eNB1TQX94NU2Az9R5ehsCiJf/i VhkrWaYoPWMoLHUPS99Lk71y9GCO/boJat+F6px30YPt5/MfdxnI6FVsf/hfcrw0PdhY9t de07KqautUh6Lx53roGyjmXDxSGzoOJ8M+6faHJ6fFzbSge8vqRzFtNzaRMk35TQ8eyf9R 1YxgSPMNqXJGC8UC8JLRgL+U/jVuRozJktBXY4EECBqYyNniRcjGMOvsOba9vsLdAEwWNu mEO2Q358Tcsupdk/idg0Fbp3XHDXQYLC7/wushzhf/9n2F6H4FECOxfyS0xpdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408186; 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=HqG1IgzZ+d+YxVIzm9RgOGZP29qhxe/0GVrquvunU6M=; b=h4GYG9lmB1Hz3j3auk/XG0O2fFdX3n2IBDaNlnGmEf5Xgpr8Ib9fGaepYZ3JceGV+gbV5t swkEO2BuT6i9QRxW5LzbR2/Z4uMao5mvWk7b8N251zDwg5bS/k0RGsbNknrLBWQ5VFUP3T IihWudXrc3Gh/m96sbu0W0WtE5lYVlMrqC/YDbzczIoOgVc8gael4BdLYXF4lmtGUPi8cP VmZZD8uGX6nxc0aA/8Ax20JHWBt8VTfeEmzlJS6ehowqTaQtAGU83+xEZqVcyPbnKMwZMC Pqa1oInokjwVK+h8tpxWPQ5OLoMvRfvWYUF0YnNJn88/k8pVnDI2WwUFFfhpwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408186; a=rsa-sha256; cv=none; b=ND37+c0/W6kKjs41J3vE8ytLyGX/zeQo8md+mAlDeC33cDx96ZAcejWCzkpv+GG+ALHZes 9EboXqubcWxfdFq3a1YnilOxJTfFaSXI+zeE/qtGRPXldGt8bUamFB7L+AIFZ813QsLRnD YqoXryt3raW+isuqaNHsQP5zrKGIeo7u5DMWWI4RVa4A+WVyNMi4ZaCtFgZOg8BVVW4v/F Sk5qXvR+FGS7SRoCCBTw0GVvKKXOG4kGvy6KmLWcz7EhzduzOM7NY3XxNxH8P3wI++zZpC gwXzWWVeMY0ETc4rx5Rl2oRLL7CgRtzePEA5gCuRWR2q3cVcoNgMK5Apgk0fvw== 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 4XFGNB56DDzNx5; Fri, 27 Sep 2024 03:36:26 +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 48R3aQZi039400; Fri, 27 Sep 2024 03:36:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3aQ6k039396; Fri, 27 Sep 2024 03:36:26 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:36:26 GMT Message-Id: <202409270336.48R3aQ6k039396@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: 6828020a6b9a - stable/14 - ixgbe: update if_sriov to use the new mailbox apis 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: 6828020a6b9a869ccc15c02fa9571357b3bcc2a6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=6828020a6b9a869ccc15c02fa9571357b3bcc2a6 commit 6828020a6b9a869ccc15c02fa9571357b3bcc2a6 Author: Kevin Bowling AuthorDate: 2024-09-21 03:26:42 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:35:24 +0000 ixgbe: update if_sriov to use the new mailbox apis This fixes a page fault when creating VFs and updates to the new mailbox API and naming conventions. The functionality works to the same level that it did before my recent changes. In particular on my 82599 it creates both passthru and ixv interfaces. In either case, the PF seems to lose the ability to pass traffic. The ixv driver fails to attach. These issues are present with or without my updates. If you use SR-IOV on ixgbe I would be interested in hearing what does or does not work for you. (cherry picked from commit 36c516b31136f645472c12d8597534656272acd6) --- sys/dev/ixgbe/if_sriov.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index 112c34849e65..eab5ff8f5da0 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -100,18 +100,18 @@ ixgbe_send_vf_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) if (vf->flags & IXGBE_VF_CTS) msg |= IXGBE_VT_MSGTYPE_CTS; - sc->hw.mbx.ops[0].write(&sc->hw, &msg, 1, vf->pool); + ixgbe_write_mbx(&sc->hw, &msg, 1, vf->pool); } static inline void -ixgbe_send_vf_ack(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) +ixgbe_send_vf_success(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) { msg &= IXGBE_VT_MSG_MASK; ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_SUCCESS); } static inline void -ixgbe_send_vf_nack(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) +ixgbe_send_vf_failure(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) { msg &= IXGBE_VT_MSG_MASK; ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_FAILURE); @@ -121,7 +121,7 @@ static inline void ixgbe_process_vf_ack(struct ixgbe_softc *sc, struct ixgbe_vf *vf) { if (!(vf->flags & IXGBE_VF_CTS)) - ixgbe_send_vf_nack(sc, vf, 0); + ixgbe_send_vf_failure(sc, vf, 0); } static inline boolean_t @@ -374,7 +374,7 @@ ixgbe_vf_reset_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) resp[0] = IXGBE_VF_RESET | ack | IXGBE_VT_MSGTYPE_CTS; bcopy(vf->ether_addr, &resp[1], ETHER_ADDR_LEN); resp[3] = hw->mac.mc_filter_type; - hw->mbx.ops[0].write(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN, vf->pool); + ixgbe_write_mbx(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN, vf->pool); } /* ixgbe_vf_reset_msg */ @@ -387,12 +387,12 @@ ixgbe_vf_set_mac(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) /* Check that the VF has permission to change the MAC address. */ if (!(vf->flags & IXGBE_VF_CAP_MAC) && ixgbe_vf_mac_changed(vf, mac)) { - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); return; } if (ixgbe_validate_mac_addr(mac) != 0) { - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); return; } @@ -401,7 +401,7 @@ ixgbe_vf_set_mac(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) ixgbe_set_rar(&sc->hw, vf->rar_index, vf->ether_addr, vf->pool, true); - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); } /* ixgbe_vf_set_mac */ @@ -435,7 +435,7 @@ ixgbe_vf_set_mc_addr(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 *msg) vmolr |= IXGBE_VMOLR_ROMPE; IXGBE_WRITE_REG(&sc->hw, IXGBE_VMOLR(vf->pool), vmolr); - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); } /* ixgbe_vf_set_mc_addr */ @@ -451,18 +451,18 @@ ixgbe_vf_set_vlan(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) tag = msg[1] & IXGBE_VLVF_VLANID_MASK; if (!(vf->flags & IXGBE_VF_CAP_VLAN)) { - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); return; } /* It is illegal to enable vlan tag 0. */ if (tag == 0 && enable != 0) { - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); return; } ixgbe_set_vfta(hw, tag, vf->pool, enable, false); - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); } /* ixgbe_vf_set_vlan */ @@ -477,7 +477,7 @@ ixgbe_vf_set_lpe(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) if (vf_max_size < ETHER_CRC_LEN) { /* We intentionally ACK invalid LPE requests. */ - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); return; } @@ -485,7 +485,7 @@ ixgbe_vf_set_lpe(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) if (vf_max_size > IXGBE_MAX_FRAME_SIZE) { /* We intentionally ACK invalid LPE requests. */ - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); return; } @@ -507,7 +507,7 @@ ixgbe_vf_set_lpe(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) IXGBE_WRITE_REG(hw, IXGBE_MHADD, mhadd); } - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); } /* ixgbe_vf_set_lpe */ @@ -516,7 +516,7 @@ ixgbe_vf_set_macvlan(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) { //XXX implement this - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); } /* ixgbe_vf_set_macvlan */ @@ -529,11 +529,11 @@ ixgbe_vf_api_negotiate(struct ixgbe_softc *sc, struct ixgbe_vf *vf, case IXGBE_API_VER_1_0: case IXGBE_API_VER_1_1: vf->api_ver = msg[1]; - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); break; default: vf->api_ver = IXGBE_API_VER_UNKNOWN; - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); break; } } /* ixgbe_vf_api_negotiate */ @@ -552,7 +552,7 @@ ixgbe_vf_get_queues(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) switch (msg[0]) { case IXGBE_API_VER_1_0: case IXGBE_API_VER_UNKNOWN: - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); return; } @@ -565,7 +565,7 @@ ixgbe_vf_get_queues(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) resp[IXGBE_VF_TRANS_VLAN] = (vf->default_vlan != 0); resp[IXGBE_VF_DEF_QUEUE] = 0; - hw->mbx.ops[0].write(hw, resp, IXGBE_VF_GET_QUEUES_RESP_LEN, vf->pool); + ixgbe_write_mbx(hw, resp, IXGBE_VF_GET_QUEUES_RESP_LEN, vf->pool); } /* ixgbe_vf_get_queues */ @@ -582,7 +582,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) hw = &sc->hw; - error = hw->mbx.ops[0].read(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); + error = ixgbe_read_mbx(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); if (error != 0) return; @@ -595,7 +595,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) } if (!(vf->flags & IXGBE_VF_CTS)) { - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); return; } @@ -622,7 +622,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) ixgbe_vf_get_queues(sc, vf, msg); break; default: - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); } } /* ixgbe_process_vf_msg */ From nobody Fri Sep 27 03:41:33 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 4XFGV551T8z5XQft; Fri, 27 Sep 2024 03:41:33 +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 4XFGV54pRtz4rqf; Fri, 27 Sep 2024 03:41:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408493; 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=XkONyva/zBrzBZqm6r0zy4N8lpoTOsY48JQ2OiTlb4U=; b=mmutAsD9cDN1ymM1VquriVt5fsRi/G6SQftFMkwW1wmXUQa7lSCfEa+F6sOH1IGw2jLbuE LgUj3Fnzc8nDuQ8Rax2cRV8oZ3c8otkuPNpImLCRlp0q0k9r8U7JjTxOKXfXe0WcAHzrom Dxn0YwcuSdxVvuAZZ5y7Xo9T9YZo0wi5QG3/L1q496UAcc1e9Z3J3rpRZiHBUW1IOrjLJS CeoLWtXpics6j2pX7UOTwEMBsTEoCnTCpdb9o316Fb0KnoXjB2EFprt1Ginu06RZT3YiiL Gyeqz0fXCRxZSLymPo6wjL6YM+THbPwZMc5LZUqZFqszzg0U8dSBR0vz2hn+Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408493; 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=XkONyva/zBrzBZqm6r0zy4N8lpoTOsY48JQ2OiTlb4U=; b=wga5aUzkFehqXGVnmUcgN2aUWqvnRDloil609XE7+H1MfEmL/mYRj7A6XaExAvk8dRC+Jc NG91Xu89wLptOv6BXi7FxJzFhSCEaMLe42tCjAxNAdhT16NIsyyG+uiD9TYgiTgJpTlwbm zlAm9nkbS/8IkTfXg8tkq/9nS2nX26kA8RLPLF6yC3HpVcdRpSnst2AlBIA/1PUaStHiV0 8m5obJX4Qu6VQ01OhKTRYKmjZUPsHlmgHR9L6JBZratglh2G8ETTZJiq+NxjwES1grGoEB Lb8Pw5o0Hh4dJYlbjhtk9o+4NtV6AROrtos+NXPnahLLVFMef6/QAVpEBIQxlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408493; a=rsa-sha256; cv=none; b=YnHsl8lx2wHrsZD5KFFBys6qipTRouXaNEGgv3WPuIXXYr5a0iesdYp+UZSvxrZkTPPgcG +PqLVbXHMZjof4giSZTRS3hBnr14rWmcVWClFSMsvlwdBkb2jiKCuuwdX0UwkukUd+4m9F GqisQMQbLhlM1K/MK/tNdt4/h22U3LEVHgN13GtjUpx6lGA0zqz4E8QH+AQE06QtupzSUu 1eFAmTSjxZTrCZWChHMlObLtc8LYc90BrmJFMFgGk81mK+PrOd9bg+q8HCxWHqDQ61bq5r TzA4TRKXc/Pin4tveFUG15bmBzDSus0xhXYNfi8/oCt7HaI86jljoXjNS31awQ== 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 4XFGV54PWDzP5X; Fri, 27 Sep 2024 03:41:33 +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 48R3fXgQ055184; Fri, 27 Sep 2024 03:41:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fXYD055181; Fri, 27 Sep 2024 03:41:33 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:33 GMT Message-Id: <202409270341.48R3fXYD055181@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: 1b7b58a07a65 - stable/13 - ixgbe: introduce new mailbox API 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/13 X-Git-Reftype: branch X-Git-Commit: 1b7b58a07a65506f2b4d38bc0567874c4794f312 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1b7b58a07a65506f2b4d38bc0567874c4794f312 commit 1b7b58a07a65506f2b4d38bc0567874c4794f312 Author: Jakub Chylkowski AuthorDate: 2024-09-20 02:30:39 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:38:29 +0000 ixgbe: introduce new mailbox API DPDK commit message Current mailbox API does not work as described in documentation and is prone to errors (for example, it is doing locks on read). Introduce new mailbox API and provide compatibility functions with old API. New error codes have been introduced: - IXGBE_ERR_CONFIG - ixgbe_mbx_operations is not correctly set - IXGBE_ERR_TIMEOUT - mailbox operation, e.g. poll for message, timedout - IXGBE_ERR_MBX_NOMSG - no message available on read In addition, some refactoring has been done: mailbox structures were defined twice: in ixgbe_type.h and ixgbe_vf.h. Move them into ixgbe_mbx.h as this header is dedicated for mailbox. Signed-off-by: Jakub Chylkowski Reviewed-by: Alice Michael Reviewed-by: Piotr Pietruszewski Tested-by: Alice Michael Tested-by: Piotr Skajewski Obtained from: DPDK (6d243d2) Reapply message This reverts commit d80c12ba682a6f23791f3d6e657f9e603b152aa2. (cherry picked from commit 7234c3099947d202702e98d844ecd2d649c834d2) --- sys/dev/ixgbe/if_ix.c | 8 +- sys/dev/ixgbe/ixgbe_82599.c | 4 +- sys/dev/ixgbe/ixgbe_mbx.c | 839 ++++++++++++++++++++++++++++++++------------ sys/dev/ixgbe/ixgbe_mbx.h | 59 +++- sys/dev/ixgbe/ixgbe_type.h | 32 +- sys/dev/ixgbe/ixgbe_vf.c | 42 ++- sys/dev/ixgbe/ixgbe_x540.c | 4 +- 7 files changed, 699 insertions(+), 289 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index e265fa77ba4b..e9e5ae980b42 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -880,6 +880,7 @@ ixgbe_if_attach_pre(if_ctx_t ctx) struct ixgbe_hw *hw; int error = 0; u32 ctrl_ext; + size_t i; INIT_DEBUGOUT("ixgbe_attach: begin"); @@ -929,8 +930,11 @@ ixgbe_if_attach_pre(if_ctx_t ctx) goto err_pci; } - if (hw->mbx.ops.init_params) - hw->mbx.ops.init_params(hw); + /* 82598 Does not support SR-IOV, initialize everything else */ + if (hw->mac.type >= ixgbe_mac_82599_vf) { + for (i = 0; i < sc->num_vfs; i++) + hw->mbx.ops[i].init_params(hw); + } hw->allow_unsupported_sfp = allow_unsupported_sfp; diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index 8c3df0fd4f59..70b4cdc5c6ca 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -324,6 +324,7 @@ s32 ixgbe_init_ops_82599(struct ixgbe_hw *hw) struct ixgbe_phy_info *phy = &hw->phy; struct ixgbe_eeprom_info *eeprom = &hw->eeprom; s32 ret_val; + u16 i; DEBUGFUNC("ixgbe_init_ops_82599"); @@ -385,7 +386,8 @@ s32 ixgbe_init_ops_82599(struct ixgbe_hw *hw) mac->arc_subsystem_valid = !!(IXGBE_READ_REG(hw, IXGBE_FWSM_BY_MAC(hw)) & IXGBE_FWSM_MODE_MASK); - hw->mbx.ops.init_params = ixgbe_init_mbx_params_pf; + for (i = 0; i < 64; i++) + hw->mbx.ops[i].init_params = ixgbe_init_mbx_params_pf; /* EEPROM */ eeprom->ops.read = ixgbe_read_eeprom_82599; diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c index c8f839fce85a..0a0c5abde157 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.c +++ b/sys/dev/ixgbe/ixgbe_mbx.c @@ -35,6 +35,9 @@ #include "ixgbe_type.h" #include "ixgbe_mbx.h" +static s32 ixgbe_poll_for_msg(struct ixgbe_hw *hw, u16 mbx_id); +static s32 ixgbe_poll_for_ack(struct ixgbe_hw *hw, u16 mbx_id); + /** * ixgbe_read_mbx - Reads a message from the mailbox * @hw: pointer to the HW structure @@ -47,42 +50,91 @@ s32 ixgbe_read_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) { struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; DEBUGFUNC("ixgbe_read_mbx"); /* limit read to size of mailbox */ - if (size > mbx->size) + if (size > mbx->size) { + ERROR_REPORT3(IXGBE_ERROR_ARGUMENT, + "Invalid mailbox message size %u, changing to %u", + size, mbx->size); + size = mbx->size; + } + + if (mbx->ops[mbx_id].read) + return mbx->ops[mbx_id].read(hw, msg, size, mbx_id); + + return IXGBE_ERR_CONFIG; +} + +/** + * ixgbe_poll_mbx - Wait for message and read it from the mailbox + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to read + * + * returns SUCCESS if it successfully read message from buffer + **/ +s32 ixgbe_poll_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) +{ + struct ixgbe_mbx_info *mbx = &hw->mbx; + s32 ret_val; + + DEBUGFUNC("ixgbe_poll_mbx"); + + if (!mbx->ops[mbx_id].read || !mbx->ops[mbx_id].check_for_msg || + !mbx->timeout) + return IXGBE_ERR_CONFIG; + + /* limit read to size of mailbox */ + if (size > mbx->size) { + ERROR_REPORT3(IXGBE_ERROR_ARGUMENT, + "Invalid mailbox message size %u, changing to %u", + size, mbx->size); size = mbx->size; + } - if (mbx->ops.read) - ret_val = mbx->ops.read(hw, msg, size, mbx_id); + ret_val = ixgbe_poll_for_msg(hw, mbx_id); + /* if ack received read message, otherwise we timed out */ + if (!ret_val) + return mbx->ops[mbx_id].read(hw, msg, size, mbx_id); return ret_val; } /** - * ixgbe_write_mbx - Write a message to the mailbox + * ixgbe_write_mbx - Write a message to the mailbox and wait for ACK * @hw: pointer to the HW structure * @msg: The message buffer * @size: Length of buffer * @mbx_id: id of mailbox to write * - * returns SUCCESS if it successfully copied message into the buffer + * returns SUCCESS if it successfully copied message into the buffer and + * received an ACK to that message within specified period **/ s32 ixgbe_write_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) { struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_SUCCESS; + s32 ret_val = IXGBE_ERR_MBX; DEBUGFUNC("ixgbe_write_mbx"); + /* + * exit if either we can't write, release + * or there is no timeout defined + */ + if (!mbx->ops[mbx_id].write || !mbx->ops[mbx_id].check_for_ack || + !mbx->ops[mbx_id].release || !mbx->timeout) + return IXGBE_ERR_CONFIG; + if (size > mbx->size) { - ret_val = IXGBE_ERR_MBX; + ret_val = IXGBE_ERR_PARAM; ERROR_REPORT2(IXGBE_ERROR_ARGUMENT, - "Invalid mailbox message size %d", size); - } else if (mbx->ops.write) - ret_val = mbx->ops.write(hw, msg, size, mbx_id); + "Invalid mailbox message size %u", size); + } else { + ret_val = mbx->ops[mbx_id].write(hw, msg, size, mbx_id); + } return ret_val; } @@ -97,12 +149,12 @@ s32 ixgbe_write_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) s32 ixgbe_check_for_msg(struct ixgbe_hw *hw, u16 mbx_id) { struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; + s32 ret_val = IXGBE_ERR_CONFIG; DEBUGFUNC("ixgbe_check_for_msg"); - if (mbx->ops.check_for_msg) - ret_val = mbx->ops.check_for_msg(hw, mbx_id); + if (mbx->ops[mbx_id].check_for_msg) + ret_val = mbx->ops[mbx_id].check_for_msg(hw, mbx_id); return ret_val; } @@ -117,12 +169,12 @@ s32 ixgbe_check_for_msg(struct ixgbe_hw *hw, u16 mbx_id) s32 ixgbe_check_for_ack(struct ixgbe_hw *hw, u16 mbx_id) { struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; + s32 ret_val = IXGBE_ERR_CONFIG; DEBUGFUNC("ixgbe_check_for_ack"); - if (mbx->ops.check_for_ack) - ret_val = mbx->ops.check_for_ack(hw, mbx_id); + if (mbx->ops[mbx_id].check_for_ack) + ret_val = mbx->ops[mbx_id].check_for_ack(hw, mbx_id); return ret_val; } @@ -137,12 +189,12 @@ s32 ixgbe_check_for_ack(struct ixgbe_hw *hw, u16 mbx_id) s32 ixgbe_check_for_rst(struct ixgbe_hw *hw, u16 mbx_id) { struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; + s32 ret_val = IXGBE_ERR_CONFIG; DEBUGFUNC("ixgbe_check_for_rst"); - if (mbx->ops.check_for_rst) - ret_val = mbx->ops.check_for_rst(hw, mbx_id); + if (mbx->ops[mbx_id].check_for_rst) + ret_val = mbx->ops[mbx_id].check_for_rst(hw, mbx_id); return ret_val; } @@ -161,22 +213,23 @@ static s32 ixgbe_poll_for_msg(struct ixgbe_hw *hw, u16 mbx_id) DEBUGFUNC("ixgbe_poll_for_msg"); - if (!countdown || !mbx->ops.check_for_msg) - goto out; + if (!countdown || !mbx->ops[mbx_id].check_for_msg) + return IXGBE_ERR_CONFIG; - while (countdown && mbx->ops.check_for_msg(hw, mbx_id)) { + while (countdown && mbx->ops[mbx_id].check_for_msg(hw, mbx_id)) { countdown--; if (!countdown) break; usec_delay(mbx->usec_delay); } - if (countdown == 0) + if (countdown == 0) { ERROR_REPORT2(IXGBE_ERROR_POLLING, - "Polling for VF%d mailbox message timedout", mbx_id); + "Polling for VF%u mailbox message timedout", mbx_id); + return IXGBE_ERR_TIMEOUT; + } -out: - return countdown ? IXGBE_SUCCESS : IXGBE_ERR_MBX; + return IXGBE_SUCCESS; } /** @@ -193,115 +246,71 @@ static s32 ixgbe_poll_for_ack(struct ixgbe_hw *hw, u16 mbx_id) DEBUGFUNC("ixgbe_poll_for_ack"); - if (!countdown || !mbx->ops.check_for_ack) - goto out; + if (!countdown || !mbx->ops[mbx_id].check_for_ack) + return IXGBE_ERR_CONFIG; - while (countdown && mbx->ops.check_for_ack(hw, mbx_id)) { + while (countdown && mbx->ops[mbx_id].check_for_ack(hw, mbx_id)) { countdown--; if (!countdown) break; usec_delay(mbx->usec_delay); } - if (countdown == 0) + if (countdown == 0) { ERROR_REPORT2(IXGBE_ERROR_POLLING, - "Polling for VF%d mailbox ack timedout", mbx_id); + "Polling for VF%u mailbox ack timedout", mbx_id); + return IXGBE_ERR_TIMEOUT; + } -out: - return countdown ? IXGBE_SUCCESS : IXGBE_ERR_MBX; + return IXGBE_SUCCESS; } /** - * ixgbe_read_posted_mbx - Wait for message notification and receive message + * ixgbe_read_mailbox_vf - read VF's mailbox register * @hw: pointer to the HW structure - * @msg: The message buffer - * @size: Length of buffer - * @mbx_id: id of mailbox to write * - * returns SUCCESS if it successfully received a message notification and - * copied it into the receive buffer. + * This function is used to read the mailbox register dedicated for VF without + * losing the read to clear status bits. **/ -s32 ixgbe_read_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, - u16 mbx_id) +static u32 ixgbe_read_mailbox_vf(struct ixgbe_hw *hw) { - struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; - - DEBUGFUNC("ixgbe_read_posted_mbx"); - - if (!mbx->ops.read) - goto out; + u32 vf_mailbox = IXGBE_READ_REG(hw, IXGBE_VFMAILBOX); - ret_val = ixgbe_poll_for_msg(hw, mbx_id); + vf_mailbox |= hw->mbx.vf_mailbox; + hw->mbx.vf_mailbox |= vf_mailbox % IXGBE_VFMAILBOX_R2C_BITS; - /* if ack received read message, otherwise we timed out */ - if (!ret_val) - ret_val = mbx->ops.read(hw, msg, size, mbx_id); -out: - return ret_val; + return vf_mailbox; } -/** - * ixgbe_write_posted_mbx - Write a message to the mailbox, wait for ack - * @hw: pointer to the HW structure - * @msg: The message buffer - * @size: Length of buffer - * @mbx_id: id of mailbox to write - * - * returns SUCCESS if it successfully copied message into the buffer and - * received an ack to that message within delay * timeout period - **/ -s32 ixgbe_write_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, - u16 mbx_id) +static void ixgbe_clear_msg_vf(struct ixgbe_hw *hw) { - struct ixgbe_mbx_info *mbx = &hw->mbx; - s32 ret_val = IXGBE_ERR_MBX; - - DEBUGFUNC("ixgbe_write_posted_mbx"); - - /* exit if either we can't write or there isn't a defined timeout */ - if (!mbx->ops.write || !mbx->timeout) - goto out; - - /* send msg */ - ret_val = mbx->ops.write(hw, msg, size, mbx_id); + u32 vf_mailbox = ixgbe_read_mailbox_vf(hw); - /* if msg sent wait until we receive an ack */ - if (!ret_val) - ret_val = ixgbe_poll_for_ack(hw, mbx_id); -out: - return ret_val; + if (vf_mailbox & IXGBE_VFMAILBOX_PFSTS) { + hw->mbx.stats.reqs++; + hw->mbx.vf_mailbox &= ~IXGBE_VFMAILBOX_PFSTS; + } } -/** - * ixgbe_init_mbx_ops_generic - Initialize MB function pointers - * @hw: pointer to the HW structure - * - * Setups up the mailbox read and write message function pointers - **/ -void ixgbe_init_mbx_ops_generic(struct ixgbe_hw *hw) +static void ixgbe_clear_ack_vf(struct ixgbe_hw *hw) { - struct ixgbe_mbx_info *mbx = &hw->mbx; + u32 vf_mailbox = ixgbe_read_mailbox_vf(hw); - mbx->ops.read_posted = ixgbe_read_posted_mbx; - mbx->ops.write_posted = ixgbe_write_posted_mbx; + if (vf_mailbox & IXGBE_VFMAILBOX_PFACK) { + hw->mbx.stats.acks++; + hw->mbx.vf_mailbox &= ~IXGBE_VFMAILBOX_PFACK; + } } -/** - * ixgbe_read_v2p_mailbox - read v2p mailbox - * @hw: pointer to the HW structure - * - * This function is used to read the v2p mailbox without losing the read to - * clear status bits. - **/ -static u32 ixgbe_read_v2p_mailbox(struct ixgbe_hw *hw) +static void ixgbe_clear_rst_vf(struct ixgbe_hw *hw) { - u32 v2p_mailbox = IXGBE_READ_REG(hw, IXGBE_VFMAILBOX); - - v2p_mailbox |= hw->mbx.v2p_mailbox; - hw->mbx.v2p_mailbox |= v2p_mailbox & IXGBE_VFMAILBOX_R2C_BITS; + u32 vf_mailbox = ixgbe_read_mailbox_vf(hw); - return v2p_mailbox; + if (vf_mailbox & (IXGBE_VFMAILBOX_RSTI | IXGBE_VFMAILBOX_RSTD)) { + hw->mbx.stats.rsts++; + hw->mbx.vf_mailbox &= ~(IXGBE_VFMAILBOX_RSTI | + IXGBE_VFMAILBOX_RSTD); + } } /** @@ -314,15 +323,12 @@ static u32 ixgbe_read_v2p_mailbox(struct ixgbe_hw *hw) **/ static s32 ixgbe_check_for_bit_vf(struct ixgbe_hw *hw, u32 mask) { - u32 v2p_mailbox = ixgbe_read_v2p_mailbox(hw); - s32 ret_val = IXGBE_ERR_MBX; + u32 vf_mailbox = ixgbe_read_mailbox_vf(hw); - if (v2p_mailbox & mask) - ret_val = IXGBE_SUCCESS; + if (vf_mailbox & mask) + return IXGBE_SUCCESS; - hw->mbx.v2p_mailbox &= ~mask; - - return ret_val; + return IXGBE_ERR_MBX; } /** @@ -334,17 +340,13 @@ static s32 ixgbe_check_for_bit_vf(struct ixgbe_hw *hw, u32 mask) **/ static s32 ixgbe_check_for_msg_vf(struct ixgbe_hw *hw, u16 mbx_id) { - s32 ret_val = IXGBE_ERR_MBX; - UNREFERENCED_1PARAMETER(mbx_id); DEBUGFUNC("ixgbe_check_for_msg_vf"); - if (!ixgbe_check_for_bit_vf(hw, IXGBE_VFMAILBOX_PFSTS)) { - ret_val = IXGBE_SUCCESS; - hw->mbx.stats.reqs++; - } + if (!ixgbe_check_for_bit_vf(hw, IXGBE_VFMAILBOX_PFSTS)) + return IXGBE_SUCCESS; - return ret_val; + return IXGBE_ERR_MBX; } /** @@ -356,17 +358,16 @@ static s32 ixgbe_check_for_msg_vf(struct ixgbe_hw *hw, u16 mbx_id) **/ static s32 ixgbe_check_for_ack_vf(struct ixgbe_hw *hw, u16 mbx_id) { - s32 ret_val = IXGBE_ERR_MBX; - UNREFERENCED_1PARAMETER(mbx_id); DEBUGFUNC("ixgbe_check_for_ack_vf"); if (!ixgbe_check_for_bit_vf(hw, IXGBE_VFMAILBOX_PFACK)) { - ret_val = IXGBE_SUCCESS; - hw->mbx.stats.acks++; + /* TODO: should this be autocleared? */ + ixgbe_clear_ack_vf(hw); + return IXGBE_SUCCESS; } - return ret_val; + return IXGBE_ERR_MBX; } /** @@ -378,18 +379,17 @@ static s32 ixgbe_check_for_ack_vf(struct ixgbe_hw *hw, u16 mbx_id) **/ static s32 ixgbe_check_for_rst_vf(struct ixgbe_hw *hw, u16 mbx_id) { - s32 ret_val = IXGBE_ERR_MBX; - UNREFERENCED_1PARAMETER(mbx_id); DEBUGFUNC("ixgbe_check_for_rst_vf"); - if (!ixgbe_check_for_bit_vf(hw, (IXGBE_VFMAILBOX_RSTD | - IXGBE_VFMAILBOX_RSTI))) { - ret_val = IXGBE_SUCCESS; - hw->mbx.stats.rsts++; + if (!ixgbe_check_for_bit_vf(hw, IXGBE_VFMAILBOX_RSTI | + IXGBE_VFMAILBOX_RSTD)) { + /* TODO: should this be autocleared? */ + ixgbe_clear_rst_vf(hw); + return IXGBE_SUCCESS; } - return ret_val; + return IXGBE_ERR_MBX; } /** @@ -400,20 +400,114 @@ static s32 ixgbe_check_for_rst_vf(struct ixgbe_hw *hw, u16 mbx_id) **/ static s32 ixgbe_obtain_mbx_lock_vf(struct ixgbe_hw *hw) { + struct ixgbe_mbx_info *mbx = &hw->mbx; + int countdown = mbx->timeout; s32 ret_val = IXGBE_ERR_MBX; + u32 vf_mailbox; DEBUGFUNC("ixgbe_obtain_mbx_lock_vf"); - /* Take ownership of the buffer */ - IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_VFU); + if (!mbx->timeout) + return IXGBE_ERR_CONFIG; - /* reserve mailbox for vf use */ - if (ixgbe_read_v2p_mailbox(hw) & IXGBE_VFMAILBOX_VFU) - ret_val = IXGBE_SUCCESS; + while (countdown--) { + /* Reserve mailbox for VF use */ + vf_mailbox = ixgbe_read_mailbox_vf(hw); + vf_mailbox |= IXGBE_VFMAILBOX_VFU; + IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, vf_mailbox); + + /* Verify that VF is the owner of the lock */ + if (ixgbe_read_mailbox_vf(hw) & IXGBE_VFMAILBOX_VFU) { + ret_val = IXGBE_SUCCESS; + break; + } + + /* Wait a bit before trying again */ + usec_delay(mbx->usec_delay); + } + + if (ret_val != IXGBE_SUCCESS) { + ERROR_REPORT1(IXGBE_ERROR_INVALID_STATE, + "Failed to obtain mailbox lock"); + ret_val = IXGBE_ERR_TIMEOUT; + } return ret_val; } +/** + * ixgbe_release_mbx_lock_dummy - release mailbox lock + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to read + **/ +static void ixgbe_release_mbx_lock_dummy(struct ixgbe_hw *hw, u16 mbx_id) +{ + UNREFERENCED_2PARAMETER(hw, mbx_id); + + DEBUGFUNC("ixgbe_release_mbx_lock_dummy"); +} + +/** + * ixgbe_release_mbx_lock_vf - release mailbox lock + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to read + **/ +static void ixgbe_release_mbx_lock_vf(struct ixgbe_hw *hw, u16 mbx_id) +{ + u32 vf_mailbox; + + UNREFERENCED_1PARAMETER(mbx_id); + + DEBUGFUNC("ixgbe_release_mbx_lock_vf"); + + /* Return ownership of the buffer */ + vf_mailbox = ixgbe_read_mailbox_vf(hw); + vf_mailbox &= ~IXGBE_VFMAILBOX_VFU; + IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, vf_mailbox); +} + +/** + * ixgbe_write_mbx_vf_legacy - Write a message to the mailbox + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to write + * + * returns SUCCESS if it successfully copied message into the buffer + **/ +static s32 ixgbe_write_mbx_vf_legacy(struct ixgbe_hw *hw, u32 *msg, u16 size, + u16 mbx_id) +{ + s32 ret_val; + u16 i; + + UNREFERENCED_1PARAMETER(mbx_id); + DEBUGFUNC("ixgbe_write_mbx_vf_legacy"); + + /* lock the mailbox to prevent pf/vf race condition */ + ret_val = ixgbe_obtain_mbx_lock_vf(hw); + if (ret_val) + return ret_val; + + /* flush msg and acks as we are overwriting the message buffer */ + ixgbe_check_for_msg_vf(hw, 0); + ixgbe_clear_msg_vf(hw); + ixgbe_check_for_ack_vf(hw, 0); + ixgbe_clear_ack_vf(hw); + + /* copy the caller specified message to the mailbox memory buffer */ + for (i = 0; i < size; i++) + IXGBE_WRITE_REG_ARRAY(hw, IXGBE_VFMBMEM, i, msg[i]); + + /* update stats */ + hw->mbx.stats.msgs_tx++; + + /* interrupt the PF to tell it a message has been sent */ + IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_REQ); + + return IXGBE_SUCCESS; +} + /** * ixgbe_write_mbx_vf - Write a message to the mailbox * @hw: pointer to the HW structure @@ -426,6 +520,7 @@ static s32 ixgbe_obtain_mbx_lock_vf(struct ixgbe_hw *hw) static s32 ixgbe_write_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id) { + u32 vf_mailbox; s32 ret_val; u16 i; @@ -436,11 +531,11 @@ static s32 ixgbe_write_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, /* lock the mailbox to prevent pf/vf race condition */ ret_val = ixgbe_obtain_mbx_lock_vf(hw); if (ret_val) - goto out_no_write; + goto out; /* flush msg and acks as we are overwriting the message buffer */ - ixgbe_check_for_msg_vf(hw, 0); - ixgbe_check_for_ack_vf(hw, 0); + ixgbe_clear_msg_vf(hw); + ixgbe_clear_ack_vf(hw); /* copy the caller specified message to the mailbox memory buffer */ for (i = 0; i < size; i++) @@ -449,15 +544,22 @@ static s32 ixgbe_write_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, /* update stats */ hw->mbx.stats.msgs_tx++; - /* Drop VFU and interrupt the PF to tell it a message has been sent */ - IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_REQ); + /* interrupt the PF to tell it a message has been sent */ + vf_mailbox = ixgbe_read_mailbox_vf(hw); + vf_mailbox |= IXGBE_VFMAILBOX_REQ; + IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, vf_mailbox); + + /* if msg sent wait until we receive an ack */ + ixgbe_poll_for_ack(hw, mbx_id); + +out: + hw->mbx.ops[mbx_id].release(hw, mbx_id); -out_no_write: return ret_val; } /** - * ixgbe_read_mbx_vf - Reads a message from the inbox intended for vf + * ixgbe_read_mbx_vf_legacy - Reads a message from the inbox intended for vf * @hw: pointer to the HW structure * @msg: The message buffer * @size: Length of buffer @@ -465,19 +567,19 @@ out_no_write: * * returns SUCCESS if it successfully read message from buffer **/ -static s32 ixgbe_read_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, - u16 mbx_id) +static s32 ixgbe_read_mbx_vf_legacy(struct ixgbe_hw *hw, u32 *msg, u16 size, + u16 mbx_id) { - s32 ret_val = IXGBE_SUCCESS; + s32 ret_val; u16 i; - DEBUGFUNC("ixgbe_read_mbx_vf"); + DEBUGFUNC("ixgbe_read_mbx_vf_legacy"); UNREFERENCED_1PARAMETER(mbx_id); /* lock the mailbox to prevent pf/vf race condition */ ret_val = ixgbe_obtain_mbx_lock_vf(hw); if (ret_val) - goto out_no_read; + return ret_val; /* copy the message from the mailbox memory buffer */ for (i = 0; i < size; i++) @@ -489,34 +591,73 @@ static s32 ixgbe_read_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, /* update stats */ hw->mbx.stats.msgs_rx++; -out_no_read: - return ret_val; + return IXGBE_SUCCESS; +} + +/** + * ixgbe_read_mbx_vf - Reads a message from the inbox intended for vf + * @hw: pointer to the HW structure + * @msg: The message buffer + * @size: Length of buffer + * @mbx_id: id of mailbox to read + * + * returns SUCCESS if it successfully read message from buffer + **/ +static s32 ixgbe_read_mbx_vf(struct ixgbe_hw *hw, u32 *msg, u16 size, + u16 mbx_id) +{ + u32 vf_mailbox; + s32 ret_val; + u16 i; + + DEBUGFUNC("ixgbe_read_mbx_vf"); + UNREFERENCED_1PARAMETER(mbx_id); + + /* check if there is a message from PF */ + ret_val = ixgbe_check_for_msg_vf(hw, 0); + if (ret_val != IXGBE_SUCCESS) + return IXGBE_ERR_MBX_NOMSG; + + ixgbe_clear_msg_vf(hw); + + /* copy the message from the mailbox memory buffer */ + for (i = 0; i < size; i++) + msg[i] = IXGBE_READ_REG_ARRAY(hw, IXGBE_VFMBMEM, i); + + /* Acknowledge receipt */ + vf_mailbox = ixgbe_read_mailbox_vf(hw); + vf_mailbox |= IXGBE_VFMAILBOX_ACK; + IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, vf_mailbox); + + /* update stats */ + hw->mbx.stats.msgs_rx++; + + return IXGBE_SUCCESS; } /** * ixgbe_init_mbx_params_vf - set initial values for vf mailbox * @hw: pointer to the HW structure * - * Initializes the hw->mbx struct to correct values for vf mailbox + * Initializes single set the hw->mbx struct to correct values for vf mailbox + * Set of legacy functions is being used here */ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) { struct ixgbe_mbx_info *mbx = &hw->mbx; - /* start mailbox as timed out and let the reset_hw call set the timeout - * value to begin communications */ - mbx->timeout = 0; + mbx->timeout = IXGBE_VF_MBX_INIT_TIMEOUT; mbx->usec_delay = IXGBE_VF_MBX_INIT_DELAY; mbx->size = IXGBE_VFMAILBOX_SIZE; - mbx->ops.read = ixgbe_read_mbx_vf; - mbx->ops.write = ixgbe_write_mbx_vf; - mbx->ops.read_posted = ixgbe_read_posted_mbx; - mbx->ops.write_posted = ixgbe_write_posted_mbx; - mbx->ops.check_for_msg = ixgbe_check_for_msg_vf; - mbx->ops.check_for_ack = ixgbe_check_for_ack_vf; - mbx->ops.check_for_rst = ixgbe_check_for_rst_vf; + /* VF has only one mailbox connection, no need for more IDs */ + mbx->ops[0].release = ixgbe_release_mbx_lock_dummy; + mbx->ops[0].read = ixgbe_read_mbx_vf_legacy; + mbx->ops[0].write = ixgbe_write_mbx_vf_legacy; + mbx->ops[0].check_for_msg = ixgbe_check_for_msg_vf; + mbx->ops[0].check_for_ack = ixgbe_check_for_ack_vf; + mbx->ops[0].check_for_rst = ixgbe_check_for_rst_vf; mbx->stats.msgs_tx = 0; mbx->stats.msgs_rx = 0; @@ -525,54 +666,110 @@ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) mbx->stats.rsts = 0; } +/** + * ixgbe_upgrade_mbx_params_vf - set initial values for vf mailbox + * @hw: pointer to the HW structure + * + * Initializes the hw->mbx struct to correct values for vf mailbox + */ +void ixgbe_upgrade_mbx_params_vf(struct ixgbe_hw *hw) +{ + struct ixgbe_mbx_info *mbx = &hw->mbx; + + mbx->timeout = IXGBE_VF_MBX_INIT_TIMEOUT; + mbx->usec_delay = IXGBE_VF_MBX_INIT_DELAY; + + mbx->size = IXGBE_VFMAILBOX_SIZE; + + /* VF has only one mailbox connection, no need for more IDs */ + mbx->ops[0].release = ixgbe_release_mbx_lock_vf; + mbx->ops[0].read = ixgbe_read_mbx_vf; + mbx->ops[0].write = ixgbe_write_mbx_vf; + mbx->ops[0].check_for_msg = ixgbe_check_for_msg_vf; + mbx->ops[0].check_for_ack = ixgbe_check_for_ack_vf; + mbx->ops[0].check_for_rst = ixgbe_check_for_rst_vf; + mbx->ops[0].clear = NULL; + + mbx->stats.msgs_tx = 0; + mbx->stats.msgs_rx = 0; + mbx->stats.reqs = 0; + mbx->stats.acks = 0; + mbx->stats.rsts = 0; +} + +static void ixgbe_clear_msg_pf(struct ixgbe_hw *hw, u16 vf_id) +{ + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_id); + s32 index = IXGBE_PFMBICR_INDEX(vf_id); + u32 pfmbicr; + + pfmbicr = IXGBE_READ_REG(hw, IXGBE_PFMBICR(index)); + + if (pfmbicr & (IXGBE_PFMBICR_VFREQ_VF1 << vf_shift)) + hw->mbx.stats.reqs++; + + IXGBE_WRITE_REG(hw, IXGBE_PFMBICR(index), + IXGBE_PFMBICR_VFREQ_VF1 << vf_shift); +} + +static void ixgbe_clear_ack_pf(struct ixgbe_hw *hw, u16 vf_id) +{ + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_id); + s32 index = IXGBE_PFMBICR_INDEX(vf_id); + u32 pfmbicr; + + pfmbicr = IXGBE_READ_REG(hw, IXGBE_PFMBICR(index)); + + if (pfmbicr & (IXGBE_PFMBICR_VFACK_VF1 << vf_shift)) + hw->mbx.stats.acks++; + + IXGBE_WRITE_REG(hw, IXGBE_PFMBICR(index), + IXGBE_PFMBICR_VFACK_VF1 << vf_shift); +} + static s32 ixgbe_check_for_bit_pf(struct ixgbe_hw *hw, u32 mask, s32 index) { u32 pfmbicr = IXGBE_READ_REG(hw, IXGBE_PFMBICR(index)); - s32 ret_val = IXGBE_ERR_MBX; if (pfmbicr & mask) { - ret_val = IXGBE_SUCCESS; - IXGBE_WRITE_REG(hw, IXGBE_PFMBICR(index), mask); + return IXGBE_SUCCESS; } - return ret_val; + return IXGBE_ERR_MBX; } /** * ixgbe_check_for_msg_pf - checks to see if the VF has sent mail * @hw: pointer to the HW structure - * @vf_number: the VF index + * @vf_id: the VF index * * returns SUCCESS if the VF has set the Status bit or else ERR_MBX **/ -static s32 ixgbe_check_for_msg_pf(struct ixgbe_hw *hw, u16 vf_number) +static s32 ixgbe_check_for_msg_pf(struct ixgbe_hw *hw, u16 vf_id) { - u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_number); - s32 index = IXGBE_PFMBICR_INDEX(vf_number); - s32 ret_val = IXGBE_ERR_MBX; + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_id); + s32 index = IXGBE_PFMBICR_INDEX(vf_id); DEBUGFUNC("ixgbe_check_for_msg_pf"); if (!ixgbe_check_for_bit_pf(hw, IXGBE_PFMBICR_VFREQ_VF1 << vf_shift, - index)) { - ret_val = IXGBE_SUCCESS; - hw->mbx.stats.reqs++; - } + index)) + return IXGBE_SUCCESS; - return ret_val; + return IXGBE_ERR_MBX; } /** * ixgbe_check_for_ack_pf - checks to see if the VF has ACKed * @hw: pointer to the HW structure - * @vf_number: the VF index + * @vf_id: the VF index * * returns SUCCESS if the VF has set the Status bit or else ERR_MBX **/ -static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_number) +static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_id) { - u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_number); - s32 index = IXGBE_PFMBICR_INDEX(vf_number); + u32 vf_shift = IXGBE_PFMBICR_SHIFT(vf_id); + s32 index = IXGBE_PFMBICR_INDEX(vf_id); s32 ret_val = IXGBE_ERR_MBX; DEBUGFUNC("ixgbe_check_for_ack_pf"); @@ -580,7 +777,8 @@ static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_number) if (!ixgbe_check_for_bit_pf(hw, IXGBE_PFMBICR_VFACK_VF1 << vf_shift, index)) { ret_val = IXGBE_SUCCESS; - hw->mbx.stats.acks++; + /* TODO: should this be autocleared? */ + ixgbe_clear_ack_pf(hw, vf_id); } return ret_val; @@ -589,14 +787,14 @@ static s32 ixgbe_check_for_ack_pf(struct ixgbe_hw *hw, u16 vf_number) /** * ixgbe_check_for_rst_pf - checks to see if the VF has reset * @hw: pointer to the HW structure - * @vf_number: the VF index + * @vf_id: the VF index * * returns SUCCESS if the VF has set the Status bit or else ERR_MBX **/ -static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number) +static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_id) { - u32 vf_shift = IXGBE_PFVFLRE_SHIFT(vf_number); - u32 index = IXGBE_PFVFLRE_INDEX(vf_number); + u32 vf_shift = IXGBE_PFVFLRE_SHIFT(vf_id); + u32 index = IXGBE_PFVFLRE_INDEX(vf_id); s32 ret_val = IXGBE_ERR_MBX; u32 vflre = 0; @@ -628,121 +826,268 @@ static s32 ixgbe_check_for_rst_pf(struct ixgbe_hw *hw, u16 vf_number) /** * ixgbe_obtain_mbx_lock_pf - obtain mailbox lock * @hw: pointer to the HW structure - * @vf_number: the VF index + * @vf_id: the VF index * * return SUCCESS if we obtained the mailbox lock **/ -static s32 ixgbe_obtain_mbx_lock_pf(struct ixgbe_hw *hw, u16 vf_number) +static s32 ixgbe_obtain_mbx_lock_pf(struct ixgbe_hw *hw, u16 vf_id) { + struct ixgbe_mbx_info *mbx = &hw->mbx; *** 667 LINES SKIPPED *** From nobody Fri Sep 27 03:41:34 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 4XFGV66WKBz5XQZM; Fri, 27 Sep 2024 03:41:34 +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 4XFGV65VNqz4s3Y; Fri, 27 Sep 2024 03:41:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408494; 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=t7wDVv/Mkbc3LjO+ImJ+CbBRPqygDxpMQfsheW/PTlE=; b=n/UbBsbkRlo54CGZ8mHT1QV+IL0ZW9giKjf1zADzXbsXxpG1VvkiwbLT7SmEzh3NwjHcvN f6Nx7tJO0CKelCROSKGR9U8FEyEBagQczTmA6jDxVz0Lr9BYvnHpXO+3Zm2u8lg5++9jZR 9utLnaUQvg8Jvuk1FWwXRWh4yd+LIzlJnuGQuJRL6I1HZkQO1Yo0GIg5uz9r9ixH1rb19U 9dsT6Lld/SMqzBq8zuTN7sMCAQaOM5gG+qeE5C8dGTedtpvdheP4GZZCrywtHj21DylFk0 mwuQUlkFPt5E5nojpZIrqvEm7GL7cMegA05tTlb0hGaVFTFwOLCu5IE9+UExKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408494; 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=t7wDVv/Mkbc3LjO+ImJ+CbBRPqygDxpMQfsheW/PTlE=; b=kykYTatz8SQprE0Ux1WsQlGuquJXOhroeZwnhtqBmpyUU3AKZ4uLkVriph6kW9zWelaAAt PqjNMn+QcNTGhLB6Uh4QiTVkyoyDRo9X15x7X4K/BmUWN0PjUcj0sdvLtthGX4pkYyTdRh JBqJACUEs9gjzZjzfGxrs5ghHCiY8QFgWBaU887xqjmCFGC0EkPcogVfBiqTcAXiMyUjkp /9oJz/Jl+C0iyqh/RGOn/X/uw/LEXYeA59hMuza/Ew+1OkpvbT+QXfzlo/k272v87mXWKx K2AeawffS41qiLzN1PlxEnIciA6A07nU/UlI0PqWnRtoMbKC4MJxCHy+rPSjbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408494; a=rsa-sha256; cv=none; b=mqZiLBKgA13cf8HvM6eZQaLcb2KpPabpQPIJ7mSC7lNb8uMmecvYLd6t8dxTGpGyHvZG85 cJ7b+ErjwmBz843Eg4mHlb5z5OWqgFqMs7NsWSzxxc9jQj6wPZsWgJ6LbqdVbkJI4/xr/b KUxJ4njrjUtcMCJBGA3gzV1t7G2/w2At4MX5nYrAWdtxPi61trCAOtARxSbHlopHSLm4fq GsRjoz8vW6qPZnCJj73wxRAbFRQfYaO0jtLH8xEjb3oDyiJtnsZFQzi8jVVoZFr2NSr6ww rok9BdaYbsa+nzo/PQ9j1C2gioFSMDIrzcoGHrx45pJVxWUMoMFTJav13NQrPg== 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 4XFGV655rqzPb6; Fri, 27 Sep 2024 03:41:34 +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 48R3fYYu055232; Fri, 27 Sep 2024 03:41:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fYF0055229; Fri, 27 Sep 2024 03:41:34 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:34 GMT Message-Id: <202409270341.48R3fYF0055229@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: 980e6b7fd537 - stable/13 - ixgbe: increase DCB BW calculation for MTU 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/13 X-Git-Reftype: branch X-Git-Commit: 980e6b7fd537665a3ff72f1e03b2a902abf6b876 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=980e6b7fd537665a3ff72f1e03b2a902abf6b876 commit 980e6b7fd537665a3ff72f1e03b2a902abf6b876 Author: Radoslaw Tyl AuthorDate: 2024-09-20 02:42:39 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:38:50 +0000 ixgbe: increase DCB BW calculation for MTU Change max credit and credit refill to a maximum possible value, 9128. Too small values cause the incorrect calculation of the bandwidth limits to each traffic class for frames larger than 4088 bytes. Signed-off-by: Radoslaw Tyl Reviewed-by: Piotr Skajewski Reviewed-by: Slawomir Mrozowicz Reviewed-by: Alice Michael Tested-by: Piotr Skajewski Obtained from: DPDK (440823f) (cherry picked from commit 1b80ac6fa64eaa575b99521cbd71a3780bf5139b) --- sys/dev/ixgbe/ixgbe_dcb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_dcb.h b/sys/dev/ixgbe/ixgbe_dcb.h index b31dfae0cdfa..54decd4d081d 100644 --- a/sys/dev/ixgbe/ixgbe_dcb.h +++ b/sys/dev/ixgbe/ixgbe_dcb.h @@ -40,9 +40,9 @@ /* DCB defines */ /* DCB credit calculation defines */ #define IXGBE_DCB_CREDIT_QUANTUM 64 -#define IXGBE_DCB_MAX_CREDIT_REFILL 200 /* 200 * 64B = 12800B */ +#define IXGBE_DCB_MAX_CREDIT_REFILL 511 /* 0x1FF * 64B = 32704B */ #define IXGBE_DCB_MAX_TSO_SIZE (32 * 1024) /* Max TSO pkt size in DCB*/ -#define IXGBE_DCB_MAX_CREDIT (2 * IXGBE_DCB_MAX_CREDIT_REFILL) +#define IXGBE_DCB_MAX_CREDIT 4095 /* Maximum credit supported: 256KB * 1024 / 64B */ /* 513 for 32KB TSO packet */ #define IXGBE_DCB_MIN_TSO_CREDIT \ From nobody Fri Sep 27 03:41:35 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 4XFGV83MS6z5XQfx; Fri, 27 Sep 2024 03:41:36 +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 4XFGV76swvz4rqq; Fri, 27 Sep 2024 03:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408496; 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=8AFfFW/DuPOT0LaahT+5FqkL1sMBMYXq9XZz93449rE=; b=Wc/NMnSuWczxcXDPfo7VRB6CLZqgCfOVef7ZQa+21Dph2FBD3j4F77DvBSczsJfDfN4LN/ OMwPxPazc4khjACy8d6lEV3iCDcoeEAMNLDIy06I6lYj61L1u1KeUu6/4Vs5u73soYLaG3 TG7nuTCUAeG1HLWGzwC2emb86Asm57rdxrZNmE2XNSfJdvUFsTqvVXNyaWHX1Yo/2Rps5V YKqwc8zOepULeHlN1V6jDq/vJzLSa7YRNnnD6ej3TPb58G/2jiWNM1pCUDp6X5MlxDDr9O H6R3mpcehxY4hjlBYPV8cbihsgZg9lY0AjUAuTWSrmTMijuQp2OGQ65CqG5Trw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408496; 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=8AFfFW/DuPOT0LaahT+5FqkL1sMBMYXq9XZz93449rE=; b=su2SNufviwNyaphKT4bGelSiwjMP/FVwA1LmskyC0Sp6PnCZHgDu2RCmdo3V3FyHAA0P9E Pz8SqRbgefROY2zIIhXSR+CxuPa16tOYgEC3CTp26sj2cQ9JU2QqLLf/KU7qCYv72sTksK UzmQrBJgu1BjIA5izty27zWgAkJNiWZeQtu1834bp1XfrRadJTxk6BHCiA4g85ARnT/7E0 C3PGqrbDbNj2ZQvP9/sz3Y1NVCCAGF5ANCblyvMom2fH/C2SWPSGc6yXhs3OJ4lCQhW61h +AZePM9UtLNo/G0x4Z26UPI4OwEzyO2c7ceB3ubDIukOi7X2Kqyv8nndGoMCqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408496; a=rsa-sha256; cv=none; b=R2nuiYuD9gDbwd1+lefe2/Vl3XiW3YsDrXgg5WTNAY5cCpB58LGNffLMRKcNtDa3yLatLu zkVpcYCcI+cpiWsfaZyNtzZaBo+Cp+LHonNo3NPiEDOZEesKfpAw1wvzZb7p62+Cu5Vbqy NtMqa7G+CBcvOuteHS/HkekrDS17d6Cy1GpjItggm7HIqpinc2+VzfXk+oRrEwJZ+OcjAw JKeGj96itce8ZqC7YV3J9cNo2WtFSbzPQTCpa2QLBgGxXkyIHixwL8M9IgOA68ypj5MP1W PogTg6V8T7CRqegfoeiydJoyNCWJ4iZCWVxKP+mAXomLROwxUr7ubPI6cpANHA== 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 4XFGV76RJZzPkM; Fri, 27 Sep 2024 03:41:35 +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 48R3fZtG055280; Fri, 27 Sep 2024 03:41:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fZLE055277; Fri, 27 Sep 2024 03:41:35 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:35 GMT Message-Id: <202409270341.48R3fZLE055277@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: 8bb9fe07c7da - stable/13 - ixgbe: improve function comments 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/13 X-Git-Reftype: branch X-Git-Commit: 8bb9fe07c7daaf8a3d88aa3578cbd5e6e55bbeba Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=8bb9fe07c7daaf8a3d88aa3578cbd5e6e55bbeba commit 8bb9fe07c7daaf8a3d88aa3578cbd5e6e55bbeba Author: Radoslaw Tyl AuthorDate: 2024-09-20 02:50:23 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:39:01 +0000 ixgbe: improve function comments Some function comments have mismatches between actual function names and function name in comments, which causes warnings with kernel-doc. Fix comments to match function names. Signed-off-by: Radoslaw Tyl Reviewed-by: Piotr Skajewski Reviewed-by: Slawomir Mrozowicz Reviewed-by: Alice Michael Obtained from: DPDK (7b5bc85) (cherry picked from commit edef2769483b29457f028a508ea96fc1099a0a21) --- sys/dev/ixgbe/ixgbe_82599.c | 2 +- sys/dev/ixgbe/ixgbe_api.c | 2 +- sys/dev/ixgbe/ixgbe_common.c | 11 ++++++----- sys/dev/ixgbe/ixgbe_dcb.c | 2 +- sys/dev/ixgbe/ixgbe_phy.c | 2 +- sys/dev/ixgbe/ixgbe_x550.c | 12 ++++++------ 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index 70b4cdc5c6ca..a1d8b299bf80 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -1537,7 +1537,7 @@ u32 ixgbe_atr_compute_sig_hash_82599(union ixgbe_atr_hash_dword input, } /** - * ixgbe_atr_add_signature_filter_82599 - Adds a signature hash filter + * ixgbe_fdir_add_signature_filter_82599 - Adds a signature hash filter * @hw: pointer to hardware structure * @input: unique input dword * @common: compressed common input dword diff --git a/sys/dev/ixgbe/ixgbe_api.c b/sys/dev/ixgbe/ixgbe_api.c index eded950e2881..7767e9a5571c 100644 --- a/sys/dev/ixgbe/ixgbe_api.c +++ b/sys/dev/ixgbe/ixgbe_api.c @@ -904,7 +904,7 @@ s32 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val) } /** - * ixgbe_eeprom_update_checksum - Updates the EEPROM checksum + * ixgbe_update_eeprom_checksum - Updates the EEPROM checksum * @hw: pointer to hardware structure **/ s32 ixgbe_update_eeprom_checksum(struct ixgbe_hw *hw) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 6c1396ad964f..a7adf079f248 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -3866,14 +3866,15 @@ s32 ixgbe_set_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq) } /** + * ixgbe_set_vmdq_san_mac_generic - Associate default VMDq pool index with + * a rx address + * @hw: pointer to hardware struct + * @vmdq: VMDq pool index + * * This function should only be involved in the IOV mode. * In IOV mode, Default pool is next pool after the number of * VFs advertized and not 0. * MPSAR table needs to be updated for SAN_MAC RAR [hw->mac.san_mac_rar_index] - * - * ixgbe_set_vmdq_san_mac - Associate default VMDq pool index with a rx address - * @hw: pointer to hardware struct - * @vmdq: VMDq pool index **/ s32 ixgbe_set_vmdq_san_mac_generic(struct ixgbe_hw *hw, u32 vmdq) { @@ -4880,7 +4881,7 @@ static const u8 ixgbe_emc_therm_limit[4] = { }; /** - * ixgbe_get_thermal_sensor_data - Gathers thermal sensor data + * ixgbe_get_thermal_sensor_data_generic - Gathers thermal sensor data * @hw: pointer to hardware structure * * Returns the thermal sensor data structure diff --git a/sys/dev/ixgbe/ixgbe_dcb.c b/sys/dev/ixgbe/ixgbe_dcb.c index 0ebc5456eda5..29ee3117edcb 100644 --- a/sys/dev/ixgbe/ixgbe_dcb.c +++ b/sys/dev/ixgbe/ixgbe_dcb.c @@ -293,7 +293,7 @@ void ixgbe_dcb_unpack_map_cee(struct ixgbe_dcb_config *cfg, int direction, } /** - * ixgbe_dcb_config - Struct containing DCB settings. + * ixgbe_dcb_check_config_cee - Struct containing DCB settings. * @dcb_config: Pointer to DCB config structure * * This function checks DCB rules for DCB settings. diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index 00f396283879..c2f23179476b 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -587,7 +587,7 @@ void ixgbe_restart_auto_neg(struct ixgbe_hw *hw) } /** - * ixgbe_read_phy_mdi - Reads a value from a specified PHY register without + * ixgbe_read_phy_reg_mdi - Reads a value from a specified PHY register without * the SWFW lock * @hw: pointer to hardware structure * @reg_addr: 32 bit address of PHY register to read diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 710c33247938..1b0999258713 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -750,7 +750,7 @@ static s32 ixgbe_setup_fw_link(struct ixgbe_hw *hw) } /** - * ixgbe_fc_autoneg_fw _ Set up flow control for FW-controlled PHYs + * ixgbe_fc_autoneg_fw - Set up flow control for FW-controlled PHYs * @hw: pointer to hardware structure * * Called at init time to set up flow control. @@ -1876,7 +1876,7 @@ void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw) } /** - * ixgbe_get_link_capabilities_x550em - Determines link capabilities + * ixgbe_get_link_capabilities_X550em - Determines link capabilities * @hw: pointer to hardware structure * @speed: pointer to link speed * @autoneg: true when autoneg or autotry is enabled @@ -3236,7 +3236,7 @@ out: } /** - * ixgbe_write_ee_hostif_X550 - Write EEPROM word using hostif + * ixgbe_write_ee_hostif_data_X550 - Write EEPROM word using hostif * @hw: pointer to hardware structure * @offset: offset of word in the EEPROM to write * @data: word write to the EEPROM @@ -3704,7 +3704,7 @@ u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) } /** - * ixgbe_get_bus_info_x550em - Set PCI bus info + * ixgbe_get_bus_info_X550em - Set PCI bus info * @hw: pointer to hardware structure * * Sets bus link width and speed to unknown because X550em is @@ -3769,7 +3769,7 @@ void ixgbe_disable_rx_x550(struct ixgbe_hw *hw) } /** - * ixgbe_enter_lplu_x550em - Transition to low power states + * ixgbe_enter_lplu_t_x550em - Transition to low power states * @hw: pointer to hardware structure * * Configures Low Power Link Up on transition to low power states @@ -3877,7 +3877,7 @@ s32 ixgbe_enter_lplu_t_x550em(struct ixgbe_hw *hw) } /** - * ixgbe_get_lcd_x550em - Determine lowest common denominator + * ixgbe_get_lcd_t_x550em - Determine lowest common denominator * @hw: pointer to hardware structure * @lcd_speed: pointer to lowest common link speed * From nobody Fri Sep 27 03:41:36 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 4XFGV91pHcz5XQWH; Fri, 27 Sep 2024 03:41:37 +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 4XFGV90K11z4rw4; Fri, 27 Sep 2024 03:41:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408497; 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=bhEE4gloQ4MM5F6Ki+rj2t0OkTjCa/BsaQhWe3Li6cQ=; b=ndovU3z2IM6thV43fOw8OwA7EMCaZ1w5/Ckp+amCKoHdNpbHlZuDhAiC8NvekmD1Cl8skm H2l0vtj08diDh3D7/OISASAqn4FZHMoxVcQFARfhL93NB4NIjhVOvEH2eVlbhgOqnn6D2P 7dIkEU7HxL5506LJXh7M9xpIRpTnfxjD+rwN80zJN6EvYvBgzfurl92JSFZMinh/Cx9LJE IAAty/JKpDbaarNYsp3j4O28m65sfD7rp7ekQvF6TSibfrISGFn+jCyXGnH8QiqC0LA5Yp J7FR/g58mouj5l8s87O8Zch0GKh4IoS4hmHQ1MuABuNLYnxfrRQwnoKpIlVveA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408497; 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=bhEE4gloQ4MM5F6Ki+rj2t0OkTjCa/BsaQhWe3Li6cQ=; b=gYRgv54LdqYHX2eF5uA76NWPgOyUZsK6zZbI5s8xdTxNUgkNMLh+7PQzkx77mkk6CzcKnz SCQhnn9qbsqOVf1HbSbr9R1XZshI5sPRoxkV7t9mpkMLxdx6Ynw3qzhpi0Cj0TZByFbOap M90UgwGH42RNsuD9NJITuePYusF/w8bI5skrV1NuZIlxo5qjEqyP3sZMEAOWfK+HbA09/W qlwlc6zTDxx1sxAk9wCohd+cHpC2CaHjDMnGnA2orYimob3GORmM8lx+UpPnE6kt7LPDVy MaORQAcABlvGvyWAu2s0zM/MxyUZmRIvFkyywHMkoYdYGZgSPGS6tht1U6ZrcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408497; a=rsa-sha256; cv=none; b=o9tOAJpaFuBOhyNGxN+iZuciLsFSE36MA/Dg893VWu5o6OCdUvd7czfGFPedN25R9Ez7nw MVMNJTPb7N/BfTISkhiOgl+lzeWauMS27HzsmIm3yu0qCYeoUe8lfQCP8NUYSS2ssr3R0F /k+Q/Xx5vbzXhn/v3MemQkGWFyUigSCnTfqWD1itofEVGKWuPppW6565zaFLPFRLdxYCwl dQVzH19CuxQgFDHAuk/1R/ZgAE6+EpLGnefkVTOCqTZXOKqqo1R5C6qCObOSjRCgisQcNr WpdiO7cmMvCyxo8MHOzTx5/ItM/7QBGlHKPowML0PZq68v2nOP49FQkj92eDmA== 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 4XFGV870XyzP2H; Fri, 27 Sep 2024 03:41:36 +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 48R3fahR055345; Fri, 27 Sep 2024 03:41:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fasx055342; Fri, 27 Sep 2024 03:41:36 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:36 GMT Message-Id: <202409270341.48R3fasx055342@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: 0243ac046ff7 - stable/13 - ixgbe: add reset count field to HW struct 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/13 X-Git-Reftype: branch X-Git-Commit: 0243ac046ff77b79566197a7c8587872adc3a2b9 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=0243ac046ff77b79566197a7c8587872adc3a2b9 commit 0243ac046ff77b79566197a7c8587872adc3a2b9 Author: Radoslaw Tyl AuthorDate: 2024-09-20 02:54:21 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:39:13 +0000 ixgbe: add reset count field to HW struct DPDK commit message net/ixgbe/base: add reset count field to HW struct Add fw_rst_cnt to store the number of resets after fw update. This value is required to detect if the EICR.MNG event occurred after firmware update reset. Signed-off-by: Radoslaw Tyl Reviewed-by: Piotr Skajewski Reviewed-by: Slawomir Mrozowicz Reviewed-by: Alice Michael Obtained from: DPDK (9ab0e9c) (cherry picked from commit 224f7ab8b4706653c7d3f78e624bc36c97679f30) --- sys/dev/ixgbe/ixgbe_type.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index ccfce45500d9..56d4863c8e07 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -4201,6 +4201,7 @@ struct ixgbe_hw { bool allow_unsupported_sfp; bool wol_enabled; bool need_crosstalk_fix; + u32 fw_rst_cnt; }; #define ixgbe_call_func(hw, func, params, error) \ From nobody Fri Sep 27 03:41:38 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 4XFGVB3GJlz5XQvX; Fri, 27 Sep 2024 03:41:38 +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 4XFGVB1K8yz4s98; Fri, 27 Sep 2024 03:41:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408498; 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=SsZBgObCWfj/gPQReGxB6L3GHhlY0WzF/wxXtP9UJ5I=; b=BHVuNyjEw9/+v+ES4P/a1rw5XpVTfd1a+EFcG8wAd6H9arkQcM5V8TFpF9bz2kI+cTOx8d VNGjZ0PEDEDH34MP2DoFydVqgquvlfik5/rHSjuzKXywxFiUUgEpRJUJbFhlMsUBFYNXU5 Pa0HFt5689NQItA5MophyGuMiUn/JKOGqTvG9sk42VGkrQtbARH11UN4c+j/hIJlBonOcG 1K7dbPBOpt+Hj7f4Wz5SLQ+BibjMwBiXlsYh6WXjNfVfT6T0NK0RU8XmVXnyjRCMR84hIN 5XYOkPFpJ3kV9AhKyG/d+fGR61FThb/aj2A4tZHFekFWp1exWDRJSBBQNWVHaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408498; 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=SsZBgObCWfj/gPQReGxB6L3GHhlY0WzF/wxXtP9UJ5I=; b=Ak6LL0HkKO1NUz5kUBv5ywmUOAfUHZIwC3p76iUZsDAmrRhNOhuSoa6WiW++Ijtl12kKT9 Nat7rh1PNgNzttShAM89g/0BSN8wD7rCCXCmPi5KADw0OcueCXEfiLJJmxAgxNbas1Jzez wyfW8ASBMyprB47p7Rxs7wMz1BAJhWimgUisw7rcXBAxEEOaeqg+ZDoVOTBWDzf858pmlE AHVC8tXZ4xQEKNtaF+x+5mDbjBWAQiVGFBPiZRN0To+MXSbg54kzigdnj8BoUPbTidfCff TOi1lfZibJG1wnUKhPlkQCJGqkJQOARpSdhZYgBgmq6YdjaQ20StO6XAU+Bf9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408498; a=rsa-sha256; cv=none; b=CpBRh1wi7ShbDB5263cNR9+aBCadOBFXaEN4TQzxFRujhJIRAoElXuxb+sSyF9taFxQ6/0 ZO5kgRS3SXXgWHVNlpd4XYITZSlnAFyirqF9B6bu0SbKLDSx7a5NQQX/x5OJ/zQ/PRjtZC rqWt7ksIUvQxBn3r44IhrTm3WUi4GzKLLHyJvTZ62B3WelUnjaLBTPaZMhq44u8XwgF7ki oXcpDN2OFGlwNLCnYuc/sat4HcFWIAWHinHn1bvADUqExpBwUUO8xSxx2puZM5rXWDElZr PeX61+Aqtfvwv1bLucsaAzHjZdvrvY5D8XE+crandsUi4ENLfdwHMYJrEG+doQ== 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 4XFGVB0vqmzPb9; Fri, 27 Sep 2024 03:41:38 +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 48R3fc1E055395; Fri, 27 Sep 2024 03:41:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fcF3055392; Fri, 27 Sep 2024 03:41:38 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:38 GMT Message-Id: <202409270341.48R3fcF3055392@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: cc9bb638837a - stable/13 - ixgbe: Remove Atom C3000 HIC FW access 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/13 X-Git-Reftype: branch X-Git-Commit: cc9bb638837aa940a0e0fd5a15562dc72a522eeb Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=cc9bb638837aa940a0e0fd5a15562dc72a522eeb commit cc9bb638837aa940a0e0fd5a15562dc72a522eeb Author: Marek Mical AuthorDate: 2024-09-20 02:59:05 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:39:26 +0000 ixgbe: Remove Atom C3000 HIC FW access DPDK commit message net/ixgbe/base: replace HIC with direct register access Unify FW access method to direct register read/writes across all Atom(R) C3000 products. Atom(R) C3000 fiber exhibited an issue with the Host Interface Command execution being locked when another LAN function attempted to acquire the SWFW sync on Manageability Host. This resulted in HIC atomicity break and bogus data being read since the other LAN function cleared all semaphores on timeout whereas HIC execution continued after unlock. Direct register IOSF access showed higher stability and reliability. Signed-off-by: Marek Mical Reviewed-by: Krzysztof Galazka Reviewed-by: Eryk Rybak Reviewed-by: Francis Racicot Reviewed-by: Alice Michael Obtained from: DPDK (e947f1e) (cherry picked from commit f56311e37d4c39b1deab6aa8523f3332c29e1ad3) --- sys/dev/ixgbe/ixgbe_x550.c | 76 ++-------------------------------------------- sys/dev/ixgbe/ixgbe_x550.h | 4 --- 2 files changed, 2 insertions(+), 78 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 1b0999258713..b9a5c08b2d51 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -799,14 +799,8 @@ s32 ixgbe_init_ops_X550EM_a(struct ixgbe_hw *hw) /* Start with generic X550EM init */ ret_val = ixgbe_init_ops_X550EM(hw); - if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII || - hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L) { - mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550; - mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550; - } else { - mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550a; - mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550a; - } + mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550; + mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550; mac->ops.acquire_swfw_sync = ixgbe_acquire_swfw_sync_X550a; mac->ops.release_swfw_sync = ixgbe_release_swfw_sync_X550a; @@ -1287,72 +1281,6 @@ s32 ixgbe_put_phy_token(struct ixgbe_hw *hw) return IXGBE_ERR_FW_RESP_INVALID; } -/** - * ixgbe_write_iosf_sb_reg_x550a - Writes a value to specified register - * of the IOSF device - * @hw: pointer to hardware structure - * @reg_addr: 32 bit PHY register to write - * @device_type: 3 bit device type - * @data: Data to write to the register - **/ -s32 ixgbe_write_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 data) -{ - struct ixgbe_hic_internal_phy_req write_cmd; - s32 status; - UNREFERENCED_1PARAMETER(device_type); - - memset(&write_cmd, 0, sizeof(write_cmd)); - write_cmd.hdr.cmd = FW_INT_PHY_REQ_CMD; - write_cmd.hdr.buf_len = FW_INT_PHY_REQ_LEN; - write_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM; - write_cmd.port_number = hw->bus.lan_id; - write_cmd.command_type = FW_INT_PHY_REQ_WRITE; - write_cmd.address = IXGBE_CPU_TO_BE16(reg_addr); - write_cmd.write_data = IXGBE_CPU_TO_BE32(data); - - status = ixgbe_host_interface_command(hw, (u32 *)&write_cmd, - sizeof(write_cmd), - IXGBE_HI_COMMAND_TIMEOUT, false); - - return status; -} - -/** - * ixgbe_read_iosf_sb_reg_x550a - Reads specified register of the IOSF device - * @hw: pointer to hardware structure - * @reg_addr: 32 bit PHY register to write - * @device_type: 3 bit device type - * @data: Pointer to read data from the register - **/ -s32 ixgbe_read_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 *data) -{ - union { - struct ixgbe_hic_internal_phy_req cmd; - struct ixgbe_hic_internal_phy_resp rsp; - } hic; - s32 status; - UNREFERENCED_1PARAMETER(device_type); - - memset(&hic, 0, sizeof(hic)); - hic.cmd.hdr.cmd = FW_INT_PHY_REQ_CMD; - hic.cmd.hdr.buf_len = FW_INT_PHY_REQ_LEN; - hic.cmd.hdr.checksum = FW_DEFAULT_CHECKSUM; - hic.cmd.port_number = hw->bus.lan_id; - hic.cmd.command_type = FW_INT_PHY_REQ_READ; - hic.cmd.address = IXGBE_CPU_TO_BE16(reg_addr); - - status = ixgbe_host_interface_command(hw, (u32 *)&hic.cmd, - sizeof(hic.cmd), - IXGBE_HI_COMMAND_TIMEOUT, true); - - /* Extract the register value from the response. */ - *data = IXGBE_BE32_TO_CPU(hic.rsp.read_data); - - return status; -} - /** * ixgbe_disable_mdd_X550 * @hw: pointer to hardware structure diff --git a/sys/dev/ixgbe/ixgbe_x550.h b/sys/dev/ixgbe/ixgbe_x550.h index 245e128266aa..45e4cad9f1f7 100644 --- a/sys/dev/ixgbe/ixgbe_x550.h +++ b/sys/dev/ixgbe/ixgbe_x550.h @@ -69,10 +69,6 @@ s32 ixgbe_set_fw_drv_ver_x550(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build, u8 ver, u16 len, const char *str); s32 ixgbe_get_phy_token(struct ixgbe_hw *); s32 ixgbe_put_phy_token(struct ixgbe_hw *); -s32 ixgbe_write_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 data); -s32 ixgbe_read_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, - u32 device_type, u32 *data); void ixgbe_disable_mdd_X550(struct ixgbe_hw *hw); void ixgbe_enable_mdd_X550(struct ixgbe_hw *hw); void ixgbe_mdd_event_X550(struct ixgbe_hw *hw, u32 *vf_bitmap); From nobody Fri Sep 27 03:41:39 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 4XFGVC4RR7z5XQxw; Fri, 27 Sep 2024 03:41:39 +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 4XFGVC2RFwz4rsp; Fri, 27 Sep 2024 03:41:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408499; 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=2E2bDRS1/eHkzNaYyPisati1q+aKwusKVd2oRjTVK3U=; b=VbgWEt+GVesjUvpYYDUBf/1mwUeb4wVZKFa392Y147AdBbkiq/DSkKlLMbvs7BPzPPeeES G/BvqxFnZKzneQQhtORGl4pldDmeLAoBFDDoIo6A6fR76hsEe23z3ue01OUJ6hauTmGeo+ 4AaiiI5MuN5d3Y6QBlfzX6yJpb0XAt1GUrAERy/4W4IxX3tuTJngzaSdrLXrsxL0n66kI7 DwMU1UIKOKoGXtuFcAFG0lmprbGzRUykNJjkyecFrDCSCvdEmLcSA/mfPsDqlf1t6CtpxI CeybQFFM4jgWB32da8Z8L84Xb228OWqrJNaZcwn0fv5PsbcOhqB24Ce8+TCS2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408499; 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=2E2bDRS1/eHkzNaYyPisati1q+aKwusKVd2oRjTVK3U=; b=YMxvWcZmaO5f1CeRQyehBMfHx9I7rSfSruARXDTmHowBdoRuaM+QeQfpt6iOBUCHvyQEXK vXnyhAI8PlZTL/DV5SGrCjliVCzYh35UwonKcFbvWpyT8nr41JjxysMpabcfPStaG8KxU6 BRYS/ROmsKTqIpR+shup8Ww9kSfPKXolEmv1NuHFZy8CpORcmglf2dOX+36QWeNN/1tOJQ 3jX4Q7LNuqf3OTRYMSMGF5wbH/78rClHF6uMWy0iEYt6LvmarN6rSbvAgJDLrvod0DiAoT j2isMm0+dwrm5KfLW+lOxAMOsB8vK1sYruzG7pLyaltjQ22panNLT0ep6Yr6Ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408499; a=rsa-sha256; cv=none; b=mdPOOS9i3/z6tER0iQmmm6JbeqhSkvrA44Gf6V5EwUcL/BqCuosQomBIEUO/UXSchynqgr y/hPSoILRDFzelBalEnAb7cLQjj4ovFakDguJ0ngjst2XJEk2kI87mFyjU0ouXQqshNNF2 WuhAaJkrxL9k8HdzDg92VCFH8XHjmRJMr1hYhWwuS0k2HEVwvqGpFYCAI2ZMH/hRd+739k RqO/CFGGsXcslOCLembWpwzl4XM3nbXZlBlluynvEmgndUVKl0WIUvgd3WyeH9ugHzwrE4 xZt3NLgHUSMIWtl/EXFTFwF0S00fJ2myxmEqgtkNXerY14ovMioq9tD515f2PQ== 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 4XFGVC1szMzPbB; Fri, 27 Sep 2024 03:41:39 +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 48R3fdGd055437; Fri, 27 Sep 2024 03:41:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fdk5055434; Fri, 27 Sep 2024 03:41:39 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:39 GMT Message-Id: <202409270341.48R3fdk5055434@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: 2ef13a10a8ee - stable/13 - ixgbe: replace implicit fall-through comments 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/13 X-Git-Reftype: branch X-Git-Commit: 2ef13a10a8eee5ee1f4ff33b5575aff044c3cd99 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2ef13a10a8eee5ee1f4ff33b5575aff044c3cd99 commit 2ef13a10a8eee5ee1f4ff33b5575aff044c3cd99 Author: Piotr Skajewski AuthorDate: 2024-09-20 03:12:41 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:39:39 +0000 ixgbe: replace implicit fall-through comments DPDK commit message Convert all "fall-through" comments to actual code. This aligns the code with the kernel which no longer allows implicit fallthrough. Signed-off-by: Piotr Skajewski Reviewed-by: Alice Michael Obtained from: DPDK (ae8211f) (cherry picked from commit 50455f73c28114c665551cba267ec964491ccf21) --- sys/dev/ixgbe/ixgbe_82599.c | 8 ++++++-- sys/dev/ixgbe/ixgbe_common.c | 10 ++++++---- sys/dev/ixgbe/ixgbe_x550.c | 11 +++++++---- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_82599.c b/sys/dev/ixgbe/ixgbe_82599.c index a1d8b299bf80..1ecab83a4e92 100644 --- a/sys/dev/ixgbe/ixgbe_82599.c +++ b/sys/dev/ixgbe/ixgbe_82599.c @@ -1759,7 +1759,9 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw, case 0x0000: /* mask VLAN ID */ fdirm |= IXGBE_FDIRM_VLANID; - /* FALLTHROUGH */ + /* mask VLAN priority */ + fdirm |= IXGBE_FDIRM_VLANP; + break; case 0x0FFF: /* mask VLAN priority */ fdirm |= IXGBE_FDIRM_VLANP; @@ -2049,7 +2051,9 @@ s32 ixgbe_fdir_add_perfect_filter_82599(struct ixgbe_hw *hw, DEBUGOUT(" Error on src/dst port\n"); return IXGBE_ERR_CONFIG; } - /* FALLTHROUGH */ + input_mask->formatted.flow_type = IXGBE_ATR_L4TYPE_IPV6_MASK | + IXGBE_ATR_L4TYPE_MASK; + break; case IXGBE_ATR_FLOW_TYPE_TCPV4: case IXGBE_ATR_FLOW_TYPE_TUNNELED_TCPV4: case IXGBE_ATR_FLOW_TYPE_UDPV4: diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index a7adf079f248..ff422a01c741 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -268,8 +268,8 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw) if (ret_val != IXGBE_SUCCESS) goto out; - /* only backplane uses autoc */ - /* FALLTHROUGH */ + reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA); + break; case ixgbe_media_type_fiber_fixed: case ixgbe_media_type_fiber_qsfp: case ixgbe_media_type_fiber: @@ -4779,8 +4779,10 @@ void ixgbe_set_rxpba_generic(struct ixgbe_hw *hw, int num_pb, u32 headroom, rxpktsize <<= IXGBE_RXPBSIZE_SHIFT; for (; i < (num_pb / 2); i++) IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(i), rxpktsize); - /* configure remaining packet buffers */ - /* FALLTHROUGH */ + rxpktsize = (pbsize / (num_pb - i)) << IXGBE_RXPBSIZE_SHIFT; + for (; i < num_pb; i++) + IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(i), rxpktsize); + break; case PBA_STRATEGY_EQUAL: rxpktsize = (pbsize / (num_pb - i)) << IXGBE_RXPBSIZE_SHIFT; for (; i < num_pb; i++) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index b9a5c08b2d51..275a3ff8c808 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -355,8 +355,7 @@ static s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw) /* set up for CS4227 usage */ ixgbe_setup_mux_ctl(hw); ixgbe_check_cs4227(hw); - /* Fallthrough */ - + return ixgbe_identify_sfp_module_X550em(hw); case IXGBE_DEV_ID_X550EM_A_SFP_N: return ixgbe_identify_sfp_module_X550em(hw); break; @@ -1869,7 +1868,9 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, break; } } - /* fall through */ + *speed = IXGBE_LINK_SPEED_10GB_FULL | + IXGBE_LINK_SPEED_1GB_FULL; + break; default: *speed = IXGBE_LINK_SPEED_10GB_FULL | IXGBE_LINK_SPEED_1GB_FULL; @@ -3589,7 +3590,9 @@ u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) break; } } - /* fall through */ + physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_KR | + IXGBE_PHYSICAL_LAYER_1000BASE_KX; + break; case ixgbe_phy_x550em_xfi: physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_KR | IXGBE_PHYSICAL_LAYER_1000BASE_KX; From nobody Fri Sep 27 03:41:40 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 4XFGVD4c3Zz5XQ5Q; Fri, 27 Sep 2024 03:41:40 +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 4XFGVD3D0jz4s2L; Fri, 27 Sep 2024 03:41:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408500; 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=sjHjfHNr9OTsfp2FQAE23032J6GeDzA+LKhGtp7EADY=; b=c5ct8+O3BYM8TUrlGPO5q3hpDWvy4CEXeBN0xT2fNxYLH5MRHP1gQbOeCKnQ+e5imBINRt phbuKt3nFZ0NMkAZDWICsINX5nSzx0HbRXRp67VtX8+hROqKec4014RSpqjnwCULQmoRIa TCAuxJPaIpynfAW0WugtIU6NgRUY2nQGs792j/vakZluB0HxEcWWYok2KMCrLm5rjdOP+I /Iw3R9zB+1Q818/6U+WpNGt+YQGUntEjMZOye2C4rdomvsgDoLhQeOHZTi29pd2896SrkK 36DDIHox7MjTR8jQ5qiQ3BGb49uVoGt+uoOWvQcyL5+/9EJ2Uazbpvlv++zvXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408500; 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=sjHjfHNr9OTsfp2FQAE23032J6GeDzA+LKhGtp7EADY=; b=AU1YOzkKejhGwcgIKDb4DUOU0E6iGY5opw2dfOKcBde03G1/x47YzR9jriTWpp9iATrUS/ W2EG//6T42D6rsODg4MkMhP2w+jzP8VBjJa9n+UVGdCzzXqnS6QCXnDCf3p+cVTFASWBWr pP/PaMauEdBXNxXQk8/64SHOKDhnCx4J8AvgnXKIKvpVnzK6oYAdNGJWCHr+yYO+NvcWLr Y5fAfo3/f4EbtR5ydzoWaYgOHAe/rwLOAF4um0+AYlbE8KndPlXkiPT2Q90p8Se2bV6YFq j8jFtGeCdIWJVFeNezh1GqOCcWPj8E1Xm7CJwgvZ1RZAgXnykwHJlL5UzegQtg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408500; a=rsa-sha256; cv=none; b=J0RdZ1T2FqXha49+5gTIC62c/uX/9wPSWAIGxzvlum/FTzKLhJ+8uEyp2481O5c0EHAkvM eMn0ANLf277IkgPzoRq45GSXVEue2Lpc3kfgEV/Y6KFibXnVsp/LOnCKjK9we8F/K285Pc 8TeZvROyIBfYDHmfz1XDsz+nfwsyCKOr97DESmaRGmm2yUgT6oDYk9h/aEz1O3LY++HS2A eQ7Oqzdmtm4SzP96xqUsJxmajlLMpX0tbBAsN/MOsGmEBmVULXzykN4NBHclc78Xr0Z5XY uQ5D6LppmhbYCdv4/A8cAhyTV+/mXGthjgDG9p6PUujxOzwfAkW2QS1MahoyVQ== 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 4XFGVD2rBTzP5d; Fri, 27 Sep 2024 03:41:40 +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 48R3feJe055482; Fri, 27 Sep 2024 03:41:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fePM055479; Fri, 27 Sep 2024 03:41:40 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:40 GMT Message-Id: <202409270341.48R3fePM055479@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: ea1afe5766c9 - stable/13 - ixgbe: use primary and block terminology 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/13 X-Git-Reftype: branch X-Git-Commit: ea1afe5766c97477c1ed010b1e1606ee8b5ddc9d Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=ea1afe5766c97477c1ed010b1e1606ee8b5ddc9d commit ea1afe5766c97477c1ed010b1e1606ee8b5ddc9d Author: Marcin Jurczak AuthorDate: 2024-09-20 03:18:00 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:39:53 +0000 ixgbe: use primary and block terminology DPDK commit message net/ixgbe/base: replace non-inclusive language This patch removes non-inclusive language from code, user interface and comments. Signed-off-by: Marcin Jurczak Reviewed-by: Alice Michael Obtained from: DPDK (f12a4bd) (cherry picked from commit 4530d49e68d331e9168d3a216d8a4b8e0d547578) --- sys/dev/ixgbe/ixgbe_common.c | 34 +++++++++++++++++----------------- sys/dev/ixgbe/ixgbe_common.h | 2 +- sys/dev/ixgbe/ixgbe_type.h | 10 +++++----- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index ff422a01c741..7cf9b8d05127 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -171,7 +171,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw) case ixgbe_media_type_fiber_fixed: case ixgbe_media_type_fiber_qsfp: case ixgbe_media_type_fiber: - /* flow control autoneg black list */ + /* flow control autoneg block list */ switch (hw->device_id) { case IXGBE_DEV_ID_X550EM_A_SFP: case IXGBE_DEV_ID_X550EM_A_SFP_N: @@ -1146,10 +1146,10 @@ s32 ixgbe_stop_adapter_generic(struct ixgbe_hw *hw) msec_delay(2); /* - * Prevent the PCI-E bus from hanging by disabling PCI-E master + * Prevent the PCI-E bus from hanging by disabling PCI-E primary * access and verify no pending requests */ - return ixgbe_disable_pcie_master(hw); + return ixgbe_disable_pcie_primary(hw); } /** @@ -3208,32 +3208,32 @@ static u32 ixgbe_pcie_timeout_poll(struct ixgbe_hw *hw) } /** - * ixgbe_disable_pcie_master - Disable PCI-express master access + * ixgbe_disable_pcie_primary - Disable PCI-express primary access * @hw: pointer to hardware structure * - * Disables PCI-Express master access and verifies there are no pending - * requests. IXGBE_ERR_MASTER_REQUESTS_PENDING is returned if master disable - * bit hasn't caused the master requests to be disabled, else IXGBE_SUCCESS - * is returned signifying master requests disabled. + * Disables PCI-Express primary access and verifies there are no pending + * requests. IXGBE_ERR_PRIMARY_REQUESTS_PENDING is returned if primary disable + * bit hasn't caused the primary requests to be disabled, else IXGBE_SUCCESS + * is returned signifying primary requests disabled. **/ -s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw) +s32 ixgbe_disable_pcie_primary(struct ixgbe_hw *hw) { s32 status = IXGBE_SUCCESS; u32 i, poll; u16 value; - DEBUGFUNC("ixgbe_disable_pcie_master"); + DEBUGFUNC("ixgbe_disable_pcie_primary"); /* Always set this bit to ensure any future transactions are blocked */ IXGBE_WRITE_REG(hw, IXGBE_CTRL, IXGBE_CTRL_GIO_DIS); - /* Exit if master requests are blocked */ + /* Exit if primary requests are blocked */ if (!(IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_GIO) || IXGBE_REMOVED(hw->hw_addr)) goto out; - /* Poll for master request bit to clear */ - for (i = 0; i < IXGBE_PCI_MASTER_DISABLE_TIMEOUT; i++) { + /* Poll for primary request bit to clear */ + for (i = 0; i < IXGBE_PCI_PRIMARY_DISABLE_TIMEOUT; i++) { usec_delay(100); if (!(IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_GIO)) goto out; @@ -3241,13 +3241,13 @@ s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw) /* * Two consecutive resets are required via CTRL.RST per datasheet - * 5.2.5.3.2 Master Disable. We set a flag to inform the reset routine - * of this need. The first reset prevents new master requests from + * 5.2.5.3.2 Primary Disable. We set a flag to inform the reset routine + * of this need. The first reset prevents new primary requests from * being issued by our device. We then must wait 1usec or more for any * remaining completions from the PCIe bus to trickle in, and then reset * again to clear out any effects they may have had on our device. */ - DEBUGOUT("GIO Master Disable bit didn't clear - requesting resets\n"); + DEBUGOUT("GIO Primary Disable bit didn't clear - requesting resets\n"); hw->mac.flags |= IXGBE_FLAGS_DOUBLE_RESET_REQUIRED; if (hw->mac.type >= ixgbe_mac_X550) @@ -3269,7 +3269,7 @@ s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw) ERROR_REPORT1(IXGBE_ERROR_POLLING, "PCIe transaction pending bit also did not clear.\n"); - status = IXGBE_ERR_MASTER_REQUESTS_PENDING; + status = IXGBE_ERR_PRIMARY_REQUESTS_PENDING; out: return status; diff --git a/sys/dev/ixgbe/ixgbe_common.h b/sys/dev/ixgbe/ixgbe_common.h index a55003b4cfe4..0ff5c60d40af 100644 --- a/sys/dev/ixgbe/ixgbe_common.h +++ b/sys/dev/ixgbe/ixgbe_common.h @@ -118,7 +118,7 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw); s32 ixgbe_validate_mac_addr(u8 *mac_addr); s32 ixgbe_acquire_swfw_sync(struct ixgbe_hw *hw, u32 mask); void ixgbe_release_swfw_sync(struct ixgbe_hw *hw, u32 mask); -s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw); +s32 ixgbe_disable_pcie_primary(struct ixgbe_hw *hw); s32 prot_autoc_read_generic(struct ixgbe_hw *hw, bool *, u32 *reg_val); s32 prot_autoc_write_generic(struct ixgbe_hw *hw, u32 reg_val, bool locked); diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index 56d4863c8e07..f34bf8dace64 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -1488,7 +1488,7 @@ struct ixgbe_dmac_config { #define IXGBE_PSRTYPE_RQPL_SHIFT 29 /* CTRL Bit Masks */ -#define IXGBE_CTRL_GIO_DIS 0x00000004 /* Global IO Master Disable bit */ +#define IXGBE_CTRL_GIO_DIS 0x00000004 /* Global IO Primary Disable bit */ #define IXGBE_CTRL_LNK_RST 0x00000008 /* Link Reset. Resets everything. */ #define IXGBE_CTRL_RST 0x04000000 /* Reset (SW) */ #define IXGBE_CTRL_RST_MASK (IXGBE_CTRL_LNK_RST | IXGBE_CTRL_RST) @@ -2136,7 +2136,7 @@ enum { /* STATUS Bit Masks */ #define IXGBE_STATUS_LAN_ID 0x0000000C /* LAN ID */ #define IXGBE_STATUS_LAN_ID_SHIFT 2 /* LAN ID Shift*/ -#define IXGBE_STATUS_GIO 0x00080000 /* GIO Master Ena Status */ +#define IXGBE_STATUS_GIO 0x00080000 /* GIO Primary Ena Status */ #define IXGBE_STATUS_LAN_ID_0 0x00000000 /* LAN ID 0 */ #define IXGBE_STATUS_LAN_ID_1 0x00000004 /* LAN ID 1 */ @@ -2546,8 +2546,8 @@ enum { #define IXGBE_PCIDEVCTRL2_4_8s 0xd #define IXGBE_PCIDEVCTRL2_17_34s 0xe -/* Number of 100 microseconds we wait for PCI Express master disable */ -#define IXGBE_PCI_MASTER_DISABLE_TIMEOUT 800 +/* Number of 100 microseconds we wait for PCI Express primary disable */ +#define IXGBE_PCI_PRIMARY_DISABLE_TIMEOUT 800 /* Check whether address is multicast. This is little-endian specific check.*/ #define IXGBE_IS_MULTICAST(Address) \ @@ -4221,7 +4221,7 @@ struct ixgbe_hw { #define IXGBE_ERR_ADAPTER_STOPPED -9 #define IXGBE_ERR_INVALID_MAC_ADDR -10 #define IXGBE_ERR_DEVICE_NOT_SUPPORTED -11 -#define IXGBE_ERR_MASTER_REQUESTS_PENDING -12 +#define IXGBE_ERR_PRIMARY_REQUESTS_PENDING -12 #define IXGBE_ERR_INVALID_LINK_SETTINGS -13 #define IXGBE_ERR_AUTONEG_NOT_COMPLETE -14 #define IXGBE_ERR_RESET_FAILED -15 From nobody Fri Sep 27 03:41:41 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 4XFGVF5TXGz5XQg0; Fri, 27 Sep 2024 03:41: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XFGVF4LTnz4s2c; Fri, 27 Sep 2024 03:41:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408501; 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=OOQ4946PDmJJ1jIyo7BX3C5KWHX8hXMafNqjonh9CMg=; b=m0mUnupHLen2Bcuwv8JHiFhIBjsm2Q/qHtUPIFPQKSVxNpqrFOlJjP2VScVT+Zheh/SDuT 5psL/TiWRq7vmBAJ0Hm2HQnMEYAAKm/yhQyyAxCl/mPovpCWVlol2qxHvB8OER+tKLpiyg /v8q52iMJszzgSplFvYuX3YegiTTBMmCNh6eXfuWdnu4m+uuVzVZGt7kRVVpLMgEA+3WDE zEnMsphwieviAWeMvtKrUBL+2+OazBQwuNwOLfzQJQu3HvUhBJ6AYb6STp+dvlw4LRq131 +UnaX1IkUCqQ8QXVwE/AQmF+H06S6elvg6fNWt1dhnFcn8rjaS59FOZy4oFFiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408501; 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=OOQ4946PDmJJ1jIyo7BX3C5KWHX8hXMafNqjonh9CMg=; b=NNIQ3/dGqLoRopjhbrGsY/OWTfVL3O+7mRJwICYIzBnAGHSvUXuvSdFi8FAixuPfiWQ0q1 BYMrGSBydmzE9YxRPtqDSrR4QrmVMZh7zegKxUpCagsLvy5L+Ga4ajAx2dkd/DHgyuSekH mS0kjSY/JRnVkpGnY5BoSbyK97ZvdnocDszO0qSSRXxprtU+dtrqnrDHRWl4jhq2LOjcGL uGo0tXLMlsTxFRmWGenKJYtz+WVBY2chTDpVQzYOSLH7lh9m0dAgxW7d6GDzZAH5u1Hhon QiQFV+O1W9ZDBMRFYLilfeykfeRIcYaCUPv1GXXMEi03gx00oPLowsJiPShA6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408501; a=rsa-sha256; cv=none; b=i23Ob17n9UO2zcDFWitBGE9jy+E3XEv+DBBow36DArsSzZvDwEcrIMIvTugQ7J8gsTF6mQ PrE5SRPBFz8i3YdjstUaQ/VZ7i8zd+ShFxC8fEEqz52BA1shPaqH37Z0FqDZvo5vCbtYSV iEtFhAolrVOAeJAe0/u3aR2Z/PDySDhZW/bO3LpiPHa2hWQ3KjmWEX/H4RDcxEJBvWJ0w+ X6O2p9CEahVwQipRp7brrkedia2oaovtagIhx8S7rwS4GFxSYsL0WwzW8l7S87PejuJZaM V411f6rSPKP8FMZSZT9mBvLvBL5MW1/aROlfJeiCLdh+9DMpec5ta6n6sgKGaQ== 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 4XFGVF3rZNzP2L; Fri, 27 Sep 2024 03:41: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 48R3ffdV055527; Fri, 27 Sep 2024 03:41:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3ffPZ055524; Fri, 27 Sep 2024 03:41:41 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:41 GMT Message-Id: <202409270341.48R3ffPZ055524@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: f4f5b965273e - stable/13 - ixgbe: remove circular dependency in ixgbe_mbx.h 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/13 X-Git-Reftype: branch X-Git-Commit: f4f5b965273e1115479bdfde90d4ae918e874a3b Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=f4f5b965273e1115479bdfde90d4ae918e874a3b commit f4f5b965273e1115479bdfde90d4ae918e874a3b Author: Barbara Skobiej AuthorDate: 2024-09-20 03:22:35 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:40:06 +0000 ixgbe: remove circular dependency in ixgbe_mbx.h DPDK commit message net/ixgbe/base: remove circular header dependency Including one header file in second header file should be avoided, so fix it by forward declaring the struct instead. Signed-off-by: Barbara Skobiej Obtained from: DPDK (0bc2af5) (cherry picked from commit 3167854b9d2188c4039239f741870e044b7507ac) --- sys/dev/ixgbe/ixgbe_mbx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_mbx.h b/sys/dev/ixgbe/ixgbe_mbx.h index 7a982ce89f93..3a9bd34a137f 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.h +++ b/sys/dev/ixgbe/ixgbe_mbx.h @@ -35,7 +35,7 @@ #ifndef _IXGBE_MBX_H_ #define _IXGBE_MBX_H_ -#include "ixgbe_type.h" +struct ixgbe_hw; struct ixgbe_mbx_operations { void (*init_params)(struct ixgbe_hw *hw); From nobody Fri Sep 27 03:41:42 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 4XFGVH0RzMz5XQy6; Fri, 27 Sep 2024 03:41:43 +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 4XFGVG5DhVz4s9y; Fri, 27 Sep 2024 03:41:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408502; 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=fCoRgEAzSxR5cvjq1PzN4sD5r7F0gl3KWR4A+JUobTs=; b=bl3sqw0JFeFXRzHwFb6yTbWS5T1UxgqXtHh7VLIugG+8FaaSDuv/JGlfzUkDQWFhrJt3UP DOAumhPy6ksyzNTIuZRY05gkmjvzmWCFJgJF6vADY4ww+ChH7CkZ0sKlJiNEB9FXKA8Jgt m5BSqOStPJtpQOZXgh1/vCRemu+aoPreb2PZmIOIXxDk5qy5yy8B28TiIwka46WC3uxlFg ewr0e2IS3m1UfTtTiPkJ4JY5Dxw6ruDWWvsIrcLEV0hjd4Y0vExcx8tCem+GnzZ06S9fzN zKi75ZgSQvqdmaLRJiAApNuClFUn3qr/UlTpXIr/yb/oNbwGfyG6wYzLJ5zLHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408502; 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=fCoRgEAzSxR5cvjq1PzN4sD5r7F0gl3KWR4A+JUobTs=; b=REZss/pxr1Ax/Op7j2p24qCAAS9stqyamT/3Dz3UzrxfLIOIvDm4v086TxGpeVot5wnFSA TOX6ZfWUdQo+sMDudUdNLjGvR0iTSqBaUdbIQO4u5Lqhz3UympBEhCaXyg7WAVNVWBCSvT JN9DCNE20kh50SW6vKFkqtcDlaFLRCh8o2dflg4LC0cw7ksHXk1M3h7L31ehzPUEuMve0+ 9VEdhf+v1+fDidI7ST0R+CvdtwsOStpoMWgNwLzo9HvAoxHnmhN3oRBlf3CEvRt1LWrxYk rxoMQpZxdJ+TLcDpFWQaA7Yyal9OPhsu1R70z3YT3Wo3g9GdH65nqLlI8pZulQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408502; a=rsa-sha256; cv=none; b=kQKM4N7kUAiqgizmdNc098s+k01GVWi+ze2Iu0M0Vwphf6Dx1O00MJ5+/4D50FJo0Rp6N/ LEU434sNWYVLjlZ5eR7NOnFiocsHwQhkRUjSTMiPlX1tgfyO1voQ3hXwE/rtaQemt4QOs5 7XJjoGazHyJiqNTKs/r17LMkjiH3v6rkHHB/lG+AnFqymCDk4Srb9UeOyaRJOHb0p+IJgF uBrWvMqKJV+UShiyNU04//Dlt+z6oZSXToA7qCGMi9KCbLyB5nQqYESiOXNq6eBN114ZFG 6Dqfx3pBoTtSjOshMzzmcX2RKs1yEcqL1cEJGDySdwmpfTCTlsg7Lh7SFb0/LA== 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 4XFGVG4s5nzPj6; Fri, 27 Sep 2024 03:41:42 +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 48R3fgFo055575; Fri, 27 Sep 2024 03:41:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fgl1055572; Fri, 27 Sep 2024 03:41:42 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:42 GMT Message-Id: <202409270341.48R3fgl1055572@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: c282c2929859 - stable/13 - ixgbe: add missing QV defines 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/13 X-Git-Reftype: branch X-Git-Commit: c282c2929859a4f1b72c65b095b54804c731a27c Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=c282c2929859a4f1b72c65b095b54804c731a27c commit c282c2929859a4f1b72c65b095b54804c731a27c Author: Barbara Skobiej AuthorDate: 2024-09-20 03:27:21 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:40:20 +0000 ixgbe: add missing QV defines DPDK commit message net/ixgbe/base: add missing QV defines This patch adds missing QV defines: - offset of ANVM data - Immediate Field module pointer offset - 2.5GBASE-T and 5GBASE-T physical layer types for X550 Signed-off-by: Barbara Skobiej Signed-off-by: Jan Sokolowski Obtained from: DPDK (a730b83) (cherry picked from commit bfa48c32bc4099cb58b9fe7efab7f376475539ef) --- sys/dev/ixgbe/ixgbe_type.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index f34bf8dace64..dbcc6544133e 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -3105,6 +3105,7 @@ enum ixgbe_fdir_pballoc_type { #define FW_SHADOW_RAM_DUMP_LEN 0 #define FW_DEFAULT_CHECKSUM 0xFF /* checksum always 0xFF */ #define FW_NVM_DATA_OFFSET 3 +#define FW_ANVM_DATA_OFFSET 3 #define FW_MAX_READ_BUFFER_SIZE 1024 #define FW_DISABLE_RXEN_CMD 0xDE #define FW_DISABLE_RXEN_LEN 0x1 @@ -3176,6 +3177,8 @@ enum ixgbe_fdir_pballoc_type { #define FW_PHY_INFO_ID_HI_MASK 0xFFFF0000u #define FW_PHY_INFO_ID_LO_MASK 0x0000FFFFu +#define IXGBE_SR_IMMEDIATE_VALUES_PTR 0x4E + /* Host Interface Command Structures */ #pragma pack(push, 1) @@ -3479,6 +3482,8 @@ typedef u64 ixgbe_physical_layer; #define IXGBE_PHYSICAL_LAYER_1000BASE_SX 0x04000 #define IXGBE_PHYSICAL_LAYER_10BASE_T 0x08000 #define IXGBE_PHYSICAL_LAYER_2500BASE_KX 0x10000 +#define IXGBE_PHYSICAL_LAYER_2500BASE_T 0x20000 +#define IXGBE_PHYSICAL_LAYER_5000BASE_T 0x40000 /* Flow Control Data Sheet defined values * Calculation and defines taken from 802.1bb Annex O From nobody Fri Sep 27 03:41:43 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 4XFGVJ1JTmz5XQg2; Fri, 27 Sep 2024 03:41:44 +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 4XFGVH6N7Rz4sLB; Fri, 27 Sep 2024 03:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408503; 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=YoAimCH19Ld6c1l3vBrh9AZRa64J4cDMdfFsk7x5Pn8=; b=PMP2vlrqn8QguAINCzjm6ZWFBcwmYJRl3dZcjiluC0XB9rhO4SKFztmgessL/Klg80iwKB nNZX06wLvBdPD/3IuGhwprEEAJOXA7cWX7kJ5xa2zXb4ouyIai+htWkpZSwsiJPyAKwDjb l1ABURxPgt5ApCDYra0R3KAlZIA2ElGrNFrNCFr79Tv5KP416Uzs7DsOx6oZVhkdmv5o0O m7Y4ikkFQ+JC+D0X0MySex7uHyymPs8yUs8xSWpOHsK14T/xB/kvtu2KF5iFCeAYVX6bc/ WqVv6msZhn7iCatMeRpfpWTvMnifO54dj/7Q/6p9+e62OpZ6XIZUAbAvjxzhJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408503; 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=YoAimCH19Ld6c1l3vBrh9AZRa64J4cDMdfFsk7x5Pn8=; b=pCX7g7YsJh+eJw5qiJskr6r3WnUE/5qXLjmFuYA34d901rS/xl5oWW9EJ+0A5OlIiFqug6 wKLLk2zTxurpuAVRCphJ1zciOVlO85Cs1dGJDMhiUlL9pJtrv363dphby309efYo3ykSzw TpdOYxoRiSdvp4SqihsMgkc6sP8lLGjlC3lgB5kEBOHubnec/NnPHg0/li2NB40Qy/wZnN 7hFDYByfWB8tNZ0pqv2zQD73uiTzAF678URgtgXppubWTS8DPExOLzdYd2iBUh/fkLGBg9 bqML3jMHeP8F5pBpjtumVqZHObsthSrwFqZ8xyXTGbd88AVL4OEu5iPnvxOmyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408503; a=rsa-sha256; cv=none; b=WVhmEaKnthACUXXadxJTgCXZU8Lt23wJ9c3RNCazj6lrMwbu90knpXOSJnzEYyPEPGUocC MTS7XALrLeI38CpKCoib9qYYbH2FhU0bjJVevWBK1fyvToqwxwJu2ppmVsezw0xw55Dmxw uvuf7bgQ9aHwyKxDtcpGsMxKA6MfKSHWyk2ampBLxxmSiXxgHxtGoqrZNbZtyAf6LYSJA7 BwXSSCQwcsay7d9EiVVuD0IlnFkPRzYFJVt73QANWyi7A1Y6mpPO3MR+Nkr7i/welFaOU6 rbrGfxHRBgSUhjLBUmxEpFkaFHMq3lXcvVEChnOOGG2Gq6bdRAxFof6NV2ujyw== 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 4XFGVH5syczPJj; Fri, 27 Sep 2024 03:41:43 +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 48R3fhEV055623; Fri, 27 Sep 2024 03:41:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fhWM055620; Fri, 27 Sep 2024 03:41:43 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:43 GMT Message-Id: <202409270341.48R3fhWM055620@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: e4b9ac53e3ae - stable/13 - ixgbe: improve Atom C3000 SWFW semaphore acq 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/13 X-Git-Reftype: branch X-Git-Commit: e4b9ac53e3ae3d8c36d8a19e5ed826bcac90faa4 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=e4b9ac53e3ae3d8c36d8a19e5ed826bcac90faa4 commit e4b9ac53e3ae3d8c36d8a19e5ed826bcac90faa4 Author: Barbara Skobiej AuthorDate: 2024-09-20 03:29:36 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:40:32 +0000 ixgbe: improve Atom C3000 SWFW semaphore acq DPDK commit message net/ixgbe/base: improve SWFW semaphore acquisition HWSW semaphore acquisition in Atom C3000 NIC is a two stage process. Each time two semaphore acquisitions are required. Each second semaphore failure requires re-acquisition of first semaphore. This patch decouples the two acquisitions preventing potentially hundreds of thousands of unnecessary loop iterations. Signed-off-by: Barbara Skobiej Obtained from: DPDK (99f960c) (cherry picked from commit cc9944183187308a71489651b11342d293aac7d1) --- sys/dev/ixgbe/ixgbe_x550.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c index 275a3ff8c808..2c9ead8fd247 100644 --- a/sys/dev/ixgbe/ixgbe_x550.c +++ b/sys/dev/ixgbe/ixgbe_x550.c @@ -4242,36 +4242,39 @@ static s32 ixgbe_acquire_swfw_sync_X550a(struct ixgbe_hw *hw, u32 mask) DEBUGFUNC("ixgbe_acquire_swfw_sync_X550a"); - while (--retries) { - status = IXGBE_SUCCESS; - if (hmask) - status = ixgbe_acquire_swfw_sync_X540(hw, hmask); - if (status) { - DEBUGOUT1("Could not acquire SWFW semaphore, Status = %d\n", - status); - return status; - } - if (!(mask & IXGBE_GSSR_TOKEN_SM)) - return IXGBE_SUCCESS; + status = IXGBE_SUCCESS; + if (hmask) + status = ixgbe_acquire_swfw_sync_X540(hw, hmask); + + if (status) { + DEBUGOUT1("Could not acquire SWFW semaphore, Status = %d\n", status); + return status; + } + + if (!(mask & IXGBE_GSSR_TOKEN_SM)) + return IXGBE_SUCCESS; + while (--retries) { status = ixgbe_get_phy_token(hw); - if (status == IXGBE_ERR_TOKEN_RETRY) - DEBUGOUT1("Could not acquire PHY token, Status = %d\n", - status); if (status == IXGBE_SUCCESS) return IXGBE_SUCCESS; - if (hmask) - ixgbe_release_swfw_sync_X540(hw, hmask); - if (status != IXGBE_ERR_TOKEN_RETRY) { - DEBUGOUT1("Unable to retry acquiring the PHY token, Status = %d\n", - status); + DEBUGOUT1("Retry acquiring the PHY token failed, Status = %d\n", status); + if (hmask) + ixgbe_release_swfw_sync_X540(hw, hmask); return status; } + + if (status == IXGBE_ERR_TOKEN_RETRY) + DEBUGOUT1("Could not acquire PHY token, Status = %d\n", + status); } + if (hmask) + ixgbe_release_swfw_sync_X540(hw, hmask); + DEBUGOUT1("Semaphore acquisition retries failed!: PHY ID = 0x%08X\n", hw->phy.id); return status; From nobody Fri Sep 27 03:41:44 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 4XFGVK1hmjz5XQsx; Fri, 27 Sep 2024 03:41:45 +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 4XFGVK0F8Nz4s5Q; Fri, 27 Sep 2024 03:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408505; 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=BLlPJxK85BibQaRTvLCdGFRbmBiTo8ScIOJ5zUybc6c=; b=IDxLGE8g1yC6dtBiXmqrXCzQscYqGeeKmLh8VQJMe7uK+tCqJt1o+77VhSjLU2/orwg+ea CJJjqYr2PGP4TV9diYFQMC2R50MPT+al38MqiptkhrVSvBd24BnWj1AbNwTwigsN2e3GS8 IM3Fj1BazMd4lNNsQto5LZmBFlOCsGZs5LbBcGoKqvxsLTt8Z4MPAVJ0tBAZdeuhb0EZfM oxfOsGVR/mWFovHAZ8cegqIjk2vXIUxP0yqqkREdCyGpuSPOEQ4eyeycc5Cas1pGRZSvgx 8vdzsyu/8Mvx2eGnKsOUu8JA4YXwJ/sDIhUUixQRSxkzlzEN3okWSrZGifTxNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408505; 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=BLlPJxK85BibQaRTvLCdGFRbmBiTo8ScIOJ5zUybc6c=; b=E3q7XOlrFb/StoXBXYEfHg0uhPhiIfYrD1F4BsW7NIjKID/6vJcVv7N5OfJRI44i07qrH9 tl1/VrpQLTVC+Z3ENxuDzgdBD2ETNijwzyeNCoRAbix/6ZQVYus9oINoXcELDuaMp+0NBg Y0TilicH8APAmgJQCyjgEiSVbjbiQd75J92ab6DvveRUwtVwaoZsy2+qw+up9yYTd0+9OG pX03oFYh3kGnHFSJ8NVTIKgYqiB+de8uaALfuvGdvu2PSB/sZYSvcyaTGgwYOJMC9pZT8l R0OiiRdtXgdMTPwVtD4zuM/x9BstMnOQfjCXsvn+CHI+ArEwlm/1z7cfvdgoxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408505; a=rsa-sha256; cv=none; b=i06/CcV2Yna8e+BTAmZyk9xjiFnyokDaogWJ7k3ydmYrX+ITD+n9RMGy1JV1l3qzv6+jER 8PMTmTEgj5UktDlmdsKTVvaQtRMFIr5o1yKcIWFlSeJogZJMb5/dH5Io3rvxLY7ExGgn0b wTk8diiU7ZttFax4aGIlrzg7DElYo4laBojIakLfzra8J+JC9Xsb6FQrg9QW9oK4TWi49F WNcN2sdw+1UUVv5U+xzybSCFRIwIo1BkofahojSzbh3+J496cTfesxMjwzgjLgvm5X6zY7 3tsT5sQ3k6GHcj8w6DAz1Bot2fS9kBPJZxXISVpM8Wt3wUVl/RyhoOUL9YubIg== 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 4XFGVJ6z9dzPbD; Fri, 27 Sep 2024 03:41:44 +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 48R3fiDq055674; Fri, 27 Sep 2024 03:41:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fibF055671; Fri, 27 Sep 2024 03:41:44 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:44 GMT Message-Id: <202409270341.48R3fibF055671@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: 78cb32166d50 - stable/13 - ixgbe: prevent PBA read over eeprom word size 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/13 X-Git-Reftype: branch X-Git-Commit: 78cb32166d501dd867cced689fc9308798569b1f Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=78cb32166d501dd867cced689fc9308798569b1f commit 78cb32166d501dd867cced689fc9308798569b1f Author: Dawid Zielinski AuthorDate: 2024-09-20 03:33:37 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:40:43 +0000 ixgbe: prevent PBA read over eeprom word size DPDK commit message net/ixgbe/base: prevent untrusted loop bound Added length check against EEPROM size in words to prevent untrusted loop bound reported by static code analysis. Signed-off-by: Dawid Zielinski Obtained from: DPDK (6b58617) (cherry picked from commit 25771c8c1ae606436823854de01fc2b23178e353) --- sys/dev/ixgbe/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 7cf9b8d05127..7643d4028529 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -713,7 +713,7 @@ s32 ixgbe_read_pba_string_generic(struct ixgbe_hw *hw, u8 *pba_num, return ret_val; } - if (length == 0xFFFF || length == 0) { + if (length == 0xFFFF || length == 0 || length > hw->eeprom.word_size) { DEBUGOUT("NVM PBA number section invalid length\n"); return IXGBE_ERR_PBA_SECTION; } From nobody Fri Sep 27 03:41:47 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 4XFGVM36P2z5XQt2; Fri, 27 Sep 2024 03:41:47 +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 4XFGVM22B5z4sDn; Fri, 27 Sep 2024 03:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408507; 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=533xaT1GmfRLGfYA/Gy6zHYbpC4MwhASnLzI4omhS64=; b=ZyaVYY3AX/H+emyfbFCvWyVpUXMyCb6xAwVNiDybZXRBygaKCw/XrWJNeVtKlUCQw7SBXG gn/AvNAhvtnMwXD9zWcIV8nEEQzJSHwl61Q372V9dcKlgqfZTlGddajX2cylGb2peLHlnu En5g3ufCigxdqI/DwEs3DNI8O7jeqgHAuilzAvqj7lafaX3/K955fDX5uxhe+OaJx4ULUM zLJyelwBi97FQsNKorcNwWlg46PZfjOD6W64Sn0C74XgwGTGe5ShKIu+c6syrE1Bb2z8dF UrDLw7B3/nInoBwDjftLj4tb4gPLMimRP6zDZFxL8SLspCL/5PaJkPCWHdtczA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408507; 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=533xaT1GmfRLGfYA/Gy6zHYbpC4MwhASnLzI4omhS64=; b=dMKnTHR0+uevoToYNaHr/UuviZQsQsG8TfF2hbm74tAxZlQLyRwSopefDQJ1kEfcKromr5 EvqPWHxBys8HQ6ZJwgba1ld7eJ7N4kLeWV99YGtBbNGG3xaaLBd9LJC8gVjngvRN9FO2dX nZktLKGoXI1FQQRc0dVy9Zc7gFYX5Bd3K0xJE137xlLkZrp8VwTNl0toYHj1EZobiS9WCR 11ldZdgSIN/1FdomSmvij4uNZHdYSsDzUtQPkaCyZQRB5HKeRQqFAQpFSV0QWzr43CUymc ENO2okTzyPiheyOR7NA4ijfeSDfgkzKlF4jp00hqyBsNpWK8a7fymDNggccHPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408507; a=rsa-sha256; cv=none; b=rz1ru5LIi99I9p+fG3Uw1iQ4hRFeW8itjGfjQMAxmmB7ZcUjys1fSBIuEEnjqOhGioCVzE b8uGaa6DScpJG8V6TGelir07WhI7wefbqiWC392hsScL1mjaiN5UU1+ZmVhiuNG3bKrie/ Yxd+nwfiJd30k2WWwBhrKuHXx5MCpW3iamTHuE3asOq1nQM+JWdWguakPA8J9+Kjo8kuSD FUkjG0nc6gTka/Grv25Lo1DnDMklpdFy70yogzo6ZHCIXpX6u445uQjy8CbDWd6Uoh97U5 fhwzw1eVLw8DwNTUS7OYLsbjoNHU4z5gseMbU4ArxB0s8ZI+YyVPTbA8Zm6MVg== 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 4XFGVM1MfdzPH2; Fri, 27 Sep 2024 03:41:47 +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 48R3fl7M055758; Fri, 27 Sep 2024 03:41:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fl5o055755; Fri, 27 Sep 2024 03:41:47 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:47 GMT Message-Id: <202409270341.48R3fl5o055755@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: ed31e4eca057 - stable/13 - ixgbe: fix compilation for VF 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/13 X-Git-Reftype: branch X-Git-Commit: ed31e4eca0570b19106f9f0d77010fb2f9b0e8e1 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=ed31e4eca0570b19106f9f0d77010fb2f9b0e8e1 commit ed31e4eca0570b19106f9f0d77010fb2f9b0e8e1 Author: Doug Moore AuthorDate: 2024-09-20 07:54:48 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:41:08 +0000 ixgbe: fix compilation for VF The mailbox API changed in version 15 and these array ops were left out of the recent code import as applicable to FreeBSD. Reported by: vishwin, yasu Differential Revision: https://reviews.freebsd.org/D46708 (cherry picked from commit 267f223f622fdbf779cc43b5a564bb02e2b59ecd) --- sys/dev/ixgbe/if_sriov.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index 794f2e0365f5..b9d8fb2ee2fb 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -100,7 +100,7 @@ ixgbe_send_vf_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) if (vf->flags & IXGBE_VF_CTS) msg |= IXGBE_VT_MSGTYPE_CTS; - sc->hw.mbx.ops.write(&sc->hw, &msg, 1, vf->pool); + sc->hw.mbx.ops[0].write(&sc->hw, &msg, 1, vf->pool); } static inline void @@ -374,7 +374,7 @@ ixgbe_vf_reset_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) resp[0] = IXGBE_VF_RESET | ack | IXGBE_VT_MSGTYPE_CTS; bcopy(vf->ether_addr, &resp[1], ETHER_ADDR_LEN); resp[3] = hw->mac.mc_filter_type; - hw->mbx.ops.write(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN, vf->pool); + hw->mbx.ops[0].write(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN, vf->pool); } /* ixgbe_vf_reset_msg */ @@ -565,7 +565,7 @@ ixgbe_vf_get_queues(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) resp[IXGBE_VF_TRANS_VLAN] = (vf->default_vlan != 0); resp[IXGBE_VF_DEF_QUEUE] = 0; - hw->mbx.ops.write(hw, resp, IXGBE_VF_GET_QUEUES_RESP_LEN, vf->pool); + hw->mbx.ops[0].write(hw, resp, IXGBE_VF_GET_QUEUES_RESP_LEN, vf->pool); } /* ixgbe_vf_get_queues */ @@ -582,7 +582,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) hw = &sc->hw; - error = hw->mbx.ops.read(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); + error = hw->mbx.ops[0].read(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); if (error != 0) return; @@ -643,13 +643,13 @@ ixgbe_handle_mbx(void *context) vf = &sc->vfs[i]; if (vf->flags & IXGBE_VF_ACTIVE) { - if (hw->mbx.ops.check_for_rst(hw, vf->pool) == 0) + if (hw->mbx.ops[0].check_for_rst(hw, vf->pool) == 0) ixgbe_process_vf_reset(sc, vf); - if (hw->mbx.ops.check_for_msg(hw, vf->pool) == 0) + if (hw->mbx.ops[0].check_for_msg(hw, vf->pool) == 0) ixgbe_process_vf_msg(ctx, vf); - if (hw->mbx.ops.check_for_ack(hw, vf->pool) == 0) + if (hw->mbx.ops[0].check_for_ack(hw, vf->pool) == 0) ixgbe_process_vf_ack(sc, vf); } } From nobody Fri Sep 27 03:41:45 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 4XFGVL29qsz5XQmh; Fri, 27 Sep 2024 03:41:46 +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 4XFGVL0h13z4s7P; Fri, 27 Sep 2024 03:41:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408506; 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=pkyKHewjHN30OI8m/Z2aGoR12eQosC2fj4PB8ROGehA=; b=Yh+UdXUwujJPVxE1qzjiOshFi5zQTydEfv9HqJuRzOIR1FzOfO03nxzBTq+n9cMlkyAUP6 YMlNkcDszrhzr+p1FRPcdf/q7SHxqS8P3D6McBOTo28oAmXrYQWOxqPKwufyoaCKLO7pu4 gQTELXdL+dBVvfI22hyUB6OofjGigMrozRq28fdMUUfneHsiXJn/MPt8PGDYUAQb+SJ0Uf kCYT7QghsDx3KleD7iApR+NdkUQzMHl6wmuwXTTB7ijC0Lslt6yMoIQ7mYXK8TGfVXipi+ jxJfRHhM4d8NH8H5nab9vFGHW0HQv9m/B59am+nSDmb/VMg9ghRMGjodUF+zxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408506; 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=pkyKHewjHN30OI8m/Z2aGoR12eQosC2fj4PB8ROGehA=; b=spQgZ56t6CClj7UF1ATUoXwGWNM5tFovxh0k0oR2UsoSiKM3EcUzZctGV3tWJdlWP5zQ61 8vl+CnK/a9qdjtWb4UOBOPKMiLsyrQ7r5ZSIHEZeieSpQNHfGWDwAd/SdxZppbacsF4mro eXgJtXdQPTIgltJLR1TAoTsZ7ruJYaB/Hts9NkBgeCGu9pEdV+w0BQCL6vfvs04GjE2G6p 9DS7WbwWxCUoE2IGFeGtOcPLEoAcCLp0KS+o9uApAqmDHN/pgnyeZS39MjbKLYXRNEYUoj PVohfeWZk/+qjygoJz05Oma1FBJr4ISuhhAKA9iCghffNXGxSPj6sg/dYJ+0VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408506; a=rsa-sha256; cv=none; b=md2Fpedk43MiT6r+Sy9GUiQJshx1cif1pNBDYLOQU3+S4PWwi9W36fzQfEpbY+usp4euQ7 ExYOxUiVW8loLBhWpPrNmWjqGXH3cZD7KGCe3D8qfnrF0aw0fhRx6sssnXmRe8S1tacGVE yqmNNBanTFxkECw6M7jT0IDl6YKfSO2RaG67+dBYACxniJbpsg3c3QtPiqpBjfp4L60ihi BRtrV5ix9IsxaSH0pwEu+VS4rHS9XES6ghjIP/tUBEbxAlYvkPK3CBMToAMJC7jjYNHlUE rpp0bJBxU73iahI7DUxgaG+UyM4hoBa7aHmRQU+t2mu4+zLP4KNazTvRYn/gzw== 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 4XFGVL0G56zPj8; Fri, 27 Sep 2024 03:41:46 +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 48R3fjRE055716; Fri, 27 Sep 2024 03:41:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fjCP055713; Fri, 27 Sep 2024 03:41:45 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:45 GMT Message-Id: <202409270341.48R3fjCP055713@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: 6111b7ba5f18 - stable/13 - ixgbe: remove unused function prototypes 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/13 X-Git-Reftype: branch X-Git-Commit: 6111b7ba5f1827130056155b78875cfc7e0f2d7c Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=6111b7ba5f1827130056155b78875cfc7e0f2d7c commit 6111b7ba5f1827130056155b78875cfc7e0f2d7c Author: Chinh Cao AuthorDate: 2024-09-20 03:36:14 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:40:56 +0000 ixgbe: remove unused function prototypes DPDK commit message net/ixgbe/base: remove unused function prototypes There are some function prototypes that were introduced at some point but were never implemented, so remove them. Signed-off-by: Chinh Cao Obtained from: DPDK (e9cc1b4) (cherry picked from commit 420c984470270e0f7200124d8015236584aef243) --- sys/dev/ixgbe/ixgbe_api.h | 1 - sys/dev/ixgbe/ixgbe_x550.h | 1 - 2 files changed, 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_api.h b/sys/dev/ixgbe/ixgbe_api.h index 9134971d9c98..33c1cd1baeaf 100644 --- a/sys/dev/ixgbe/ixgbe_api.h +++ b/sys/dev/ixgbe/ixgbe_api.h @@ -148,7 +148,6 @@ u64 ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw); s32 ixgbe_enable_rx_dma(struct ixgbe_hw *hw, u32 regval); s32 ixgbe_disable_sec_rx_path(struct ixgbe_hw *hw); s32 ixgbe_enable_sec_rx_path(struct ixgbe_hw *hw); -s32 ixgbe_mng_fw_enabled(struct ixgbe_hw *hw); s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw); s32 ixgbe_init_fdir_signature_82599(struct ixgbe_hw *hw, u32 fdirctrl); s32 ixgbe_init_fdir_perfect_82599(struct ixgbe_hw *hw, u32 fdirctrl, diff --git a/sys/dev/ixgbe/ixgbe_x550.h b/sys/dev/ixgbe/ixgbe_x550.h index 45e4cad9f1f7..8bff5e3d2bf6 100644 --- a/sys/dev/ixgbe/ixgbe_x550.h +++ b/sys/dev/ixgbe/ixgbe_x550.h @@ -103,7 +103,6 @@ s32 ixgbe_write_phy_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, u16 phy_data); s32 ixgbe_setup_fc_fiber_x550em_a(struct ixgbe_hw *hw); s32 ixgbe_setup_fc_backplane_x550em_a(struct ixgbe_hw *hw); -s32 ixgbe_setup_fc_sgmii_x550em_a(struct ixgbe_hw *hw); void ixgbe_fc_autoneg_fiber_x550em_a(struct ixgbe_hw *hw); void ixgbe_fc_autoneg_backplane_x550em_a(struct ixgbe_hw *hw); void ixgbe_fc_autoneg_sgmii_x550em_a(struct ixgbe_hw *hw); From nobody Fri Sep 27 03:41:48 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 4XFGVN6XJhz5XQ5f; Fri, 27 Sep 2024 03:41:48 +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 4XFGVN3VFCz4sJr; Fri, 27 Sep 2024 03:41:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408508; 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=TSomqu326zDVwOU9GJFLyZVRy6xXZGFZV2PBC8GvGw8=; b=kXhm1tufnSA6Gjj4pkZKzUDcMSDeDJCmdCUTCdG6nvhcKJNuNaQ59n/6nZMygozToUpEZY 7+m3Z2PzJJMoAsZ/GrbKFpfxrtWlfty7sQ++vu7I3uGbjHSvjJz2yw1PPyQ6g6fW7iATFE NdjRaIw+oG21dgWVjZgHKNBpeEVXXHhmsnFRV0tfPH7AfIPIQK57Syd0+S+Vk2lOd9gD76 GzJxb7eMusgpTJDFW1R8UBfsAOy423XJbInYSHwoXAUT7KljKmkFtYcfp7LseogBO5sKgF X+VjuyK0QVgh5zsGkpUL5AzqId3ARqX9xjZubWEQ56GsattB3h8j1HMNZg1gPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727408508; 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=TSomqu326zDVwOU9GJFLyZVRy6xXZGFZV2PBC8GvGw8=; b=ajYQIYeiIIplrtpZFBC+F3+2aU0QMjl0HALi5gxQbSwvRSbvE7h9CgZ6Lu5TiE/BnAQJuZ 7mLr95eTcnB3V4TEZ5bbay7syWQhQXD5CcLArrg+qTSHwlCBmPmrrDT2tbfX+UIubPV5YD WlejAHeMJ9JEoXqDQdK/8yX8yz7Fd4ZRuJrGyrSSrgQolZbiU7EcvNNqN2EdP+1tWEsZyv Esgx7k9umMtKOCh26QcE6IiI78WZuesctEwDI6CwqJ1bRGZlFYH4oAUiXN0EYyHmigWcOS bLbesoqZSn/RQyEKB0IiRqIafxJnkYJB6x3o6EvMqPJGQqXEOxWcmo6fJ/h0Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727408508; a=rsa-sha256; cv=none; b=aZtOh5OdHARg6X2vXLe6OMFwClxYq83j/QeXjo1Ybx82eEqKn6rxZvcjTHyr4Y9BAjMsbc t7EXxV/wsFtzsp8AyAln+GZMM6ENSO5PBeq/JGu8fBJKbGpomP7RKRxSMvTlohrhxoCMKO 61Gsulmalj2pkmpIEW2rnhWTCl12FQsOMh0+uQJ+chirOBXtil4ZlgabRenq9WjT/BTlRL q4Df0yOMyAoLM9/xrZg6ERr5yOr7DdpZ5kptH+XEvzYgIbUtmgYwB+GGRgKlW6oq+SWYAY pseB905othc0LwSVjYSqWLeB/4Lx+sW8gOTHTVFW7rNZgdTm7ZacwfxIgI2QfQ== 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 4XFGVN2jw1zPJm; Fri, 27 Sep 2024 03:41:48 +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 48R3fmKK055818; Fri, 27 Sep 2024 03:41:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R3fmZQ055815; Fri, 27 Sep 2024 03:41:48 GMT (envelope-from git) Date: Fri, 27 Sep 2024 03:41:48 GMT Message-Id: <202409270341.48R3fmZQ055815@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: 44473083c0a7 - stable/13 - ixgbe: update if_sriov to use the new mailbox apis 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/13 X-Git-Reftype: branch X-Git-Commit: 44473083c0a76fab3b38a066bba6d206f556deca Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=44473083c0a76fab3b38a066bba6d206f556deca commit 44473083c0a76fab3b38a066bba6d206f556deca Author: Kevin Bowling AuthorDate: 2024-09-21 03:26:42 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 03:41:22 +0000 ixgbe: update if_sriov to use the new mailbox apis This fixes a page fault when creating VFs and updates to the new mailbox API and naming conventions. The functionality works to the same level that it did before my recent changes. In particular on my 82599 it creates both passthru and ixv interfaces. In either case, the PF seems to lose the ability to pass traffic. The ixv driver fails to attach. These issues are present with or without my updates. If you use SR-IOV on ixgbe I would be interested in hearing what does or does not work for you. MFC after: 6 days (cherry picked from commit 36c516b31136f645472c12d8597534656272acd6) --- sys/dev/ixgbe/if_sriov.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index b9d8fb2ee2fb..0b94c8626b0e 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -100,18 +100,18 @@ ixgbe_send_vf_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) if (vf->flags & IXGBE_VF_CTS) msg |= IXGBE_VT_MSGTYPE_CTS; - sc->hw.mbx.ops[0].write(&sc->hw, &msg, 1, vf->pool); + ixgbe_write_mbx(&sc->hw, &msg, 1, vf->pool); } static inline void -ixgbe_send_vf_ack(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) +ixgbe_send_vf_success(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) { msg &= IXGBE_VT_MSG_MASK; ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_SUCCESS); } static inline void -ixgbe_send_vf_nack(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) +ixgbe_send_vf_failure(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) { msg &= IXGBE_VT_MSG_MASK; ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_FAILURE); @@ -121,7 +121,7 @@ static inline void ixgbe_process_vf_ack(struct ixgbe_softc *sc, struct ixgbe_vf *vf) { if (!(vf->flags & IXGBE_VF_CTS)) - ixgbe_send_vf_nack(sc, vf, 0); + ixgbe_send_vf_failure(sc, vf, 0); } static inline boolean_t @@ -374,7 +374,7 @@ ixgbe_vf_reset_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) resp[0] = IXGBE_VF_RESET | ack | IXGBE_VT_MSGTYPE_CTS; bcopy(vf->ether_addr, &resp[1], ETHER_ADDR_LEN); resp[3] = hw->mac.mc_filter_type; - hw->mbx.ops[0].write(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN, vf->pool); + ixgbe_write_mbx(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN, vf->pool); } /* ixgbe_vf_reset_msg */ @@ -387,12 +387,12 @@ ixgbe_vf_set_mac(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) /* Check that the VF has permission to change the MAC address. */ if (!(vf->flags & IXGBE_VF_CAP_MAC) && ixgbe_vf_mac_changed(vf, mac)) { - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); return; } if (ixgbe_validate_mac_addr(mac) != 0) { - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); return; } @@ -401,7 +401,7 @@ ixgbe_vf_set_mac(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) ixgbe_set_rar(&sc->hw, vf->rar_index, vf->ether_addr, vf->pool, true); - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); } /* ixgbe_vf_set_mac */ @@ -435,7 +435,7 @@ ixgbe_vf_set_mc_addr(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 *msg) vmolr |= IXGBE_VMOLR_ROMPE; IXGBE_WRITE_REG(&sc->hw, IXGBE_VMOLR(vf->pool), vmolr); - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); } /* ixgbe_vf_set_mc_addr */ @@ -451,18 +451,18 @@ ixgbe_vf_set_vlan(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) tag = msg[1] & IXGBE_VLVF_VLANID_MASK; if (!(vf->flags & IXGBE_VF_CAP_VLAN)) { - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); return; } /* It is illegal to enable vlan tag 0. */ if (tag == 0 && enable != 0) { - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); return; } ixgbe_set_vfta(hw, tag, vf->pool, enable, false); - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); } /* ixgbe_vf_set_vlan */ @@ -477,7 +477,7 @@ ixgbe_vf_set_lpe(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) if (vf_max_size < ETHER_CRC_LEN) { /* We intentionally ACK invalid LPE requests. */ - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); return; } @@ -485,7 +485,7 @@ ixgbe_vf_set_lpe(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) if (vf_max_size > IXGBE_MAX_FRAME_SIZE) { /* We intentionally ACK invalid LPE requests. */ - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); return; } @@ -507,7 +507,7 @@ ixgbe_vf_set_lpe(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) IXGBE_WRITE_REG(hw, IXGBE_MHADD, mhadd); } - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); } /* ixgbe_vf_set_lpe */ @@ -516,7 +516,7 @@ ixgbe_vf_set_macvlan(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) { //XXX implement this - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); } /* ixgbe_vf_set_macvlan */ @@ -529,11 +529,11 @@ ixgbe_vf_api_negotiate(struct ixgbe_softc *sc, struct ixgbe_vf *vf, case IXGBE_API_VER_1_0: case IXGBE_API_VER_1_1: vf->api_ver = msg[1]; - ixgbe_send_vf_ack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); break; default: vf->api_ver = IXGBE_API_VER_UNKNOWN; - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); break; } } /* ixgbe_vf_api_negotiate */ @@ -552,7 +552,7 @@ ixgbe_vf_get_queues(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) switch (msg[0]) { case IXGBE_API_VER_1_0: case IXGBE_API_VER_UNKNOWN: - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); return; } @@ -565,7 +565,7 @@ ixgbe_vf_get_queues(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) resp[IXGBE_VF_TRANS_VLAN] = (vf->default_vlan != 0); resp[IXGBE_VF_DEF_QUEUE] = 0; - hw->mbx.ops[0].write(hw, resp, IXGBE_VF_GET_QUEUES_RESP_LEN, vf->pool); + ixgbe_write_mbx(hw, resp, IXGBE_VF_GET_QUEUES_RESP_LEN, vf->pool); } /* ixgbe_vf_get_queues */ @@ -582,7 +582,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) hw = &sc->hw; - error = hw->mbx.ops[0].read(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); + error = ixgbe_read_mbx(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); if (error != 0) return; @@ -595,7 +595,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) } if (!(vf->flags & IXGBE_VF_CTS)) { - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_success(sc, vf, msg[0]); return; } @@ -622,7 +622,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) ixgbe_vf_get_queues(sc, vf, msg); break; default: - ixgbe_send_vf_nack(sc, vf, msg[0]); + ixgbe_send_vf_failure(sc, vf, msg[0]); } } /* ixgbe_process_vf_msg */ From nobody Fri Sep 27 06:46:25 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 4XFLbP5z52z5Xc0G; Fri, 27 Sep 2024 06:46:25 +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 4XFLbP53kgz4DHS; Fri, 27 Sep 2024 06:46:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727419585; 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=HkggrcomcFA6Uby2zosz7+Hl2TAEAWV/gbsocP24l74=; b=TZOyzDTVN0MaCx2uxBwK2IQVdJHqs5ctbNieNoUgtKRK0sC+uUCVnwlhdbIH6crJ2po2Zg f4lqCiW25hY/dukAc1RA+iplBNxAECs21nFTVP1OsuMug5r5Agj9fUW2iaK4RbuLHg46rS CJ23nS9QA0opITDtd0JKWGr1ghJhHxg1t88idCuyaHQ3GxhJD6BdlCz4yyQ8g1LSlJ2V8d eypVDm91sEua/6arkMsdQpBRz7ZH6WYOW4b7Ilyz1M+TFWHik1RIcgqTVc8FEMJN8UiF/2 T4Z2IpipCiqcsCDvT2JA7Md+nGiN0eeMZ8shGBRFbvX1JpzpreLeUhc/qM0Xyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727419585; 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=HkggrcomcFA6Uby2zosz7+Hl2TAEAWV/gbsocP24l74=; b=K41cAhONKDjCi9laHQWJXOZqvyODEHLXJpW1HxOQoyzi1Vf8Txii9hVpBK6p8UpUP+cuTF gL6i271TeJ9xuQdHCT4EXuNZDlAdPlRR5HTWI2Jy4ARdR/uLEL5hriQK8jX3pbzcAFIyXM cRDLQMCr2WeAcpRAF4pIpVjB7GArMXzZ1cfvcDurdNo9/tjjGrNS6WSUbFyvmZ9vx/ozIU tF7Jwb/T/RRLVst0eiRWulA2Pm0LELWYRCx3MOgb5ox5Rmk5gayZjqtPsMlCLQPOLI3lZ0 WHhDDYUhDUkJJTOK2VQ/7MsJQlteKFa278p0EYRivLOWhfr850zDmMFJkMxE2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727419585; a=rsa-sha256; cv=none; b=aScfqQw1MqDdkB40zXe8QMNi0gP6w18HI4uppOU/fwLCZSwBGlVRd3bkVcp95lkx0oIGEj JEIWRneSXCWxzEFLF+PjxqA6bYGP0rRO2UUt8iWj8SdPEaNO5yXeruDQ0DLaAB4XDx/j0W k+Q/0GvvH7aRy7eUVXS5LtU5Z+261z9Hn2N4BXSiE9ca8mOkaRNOC+d4biSVvi7GylpMGr KpBwi8zZ47n+j2fuqMbbl5rfTLoNiOQXK8W2vUvST+MmmkfRClV724DFu89pOyXvi3veul WkoOEpjjdnv8BspRfnItcAs/ZcD8+CGY1+1B9fq5o8ItrWryjSaQdQQPBDKSZQ== 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 4XFLbP4fvGzW5w; Fri, 27 Sep 2024 06:46:25 +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 48R6kPi1061054; Fri, 27 Sep 2024 06:46:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R6kPPx061051; Fri, 27 Sep 2024 06:46:25 GMT (envelope-from git) Date: Fri, 27 Sep 2024 06:46:25 GMT Message-Id: <202409270646.48R6kPPx061051@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: 1c578f1c9311 - main - e1000: Clean up legacy absolute and packet timers 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: 1c578f1c93112d3d53820f8b6b411488b83f0ab2 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1c578f1c93112d3d53820f8b6b411488b83f0ab2 commit 1c578f1c93112d3d53820f8b6b411488b83f0ab2 Author: Kevin Bowling AuthorDate: 2024-09-27 06:08:01 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 06:45:04 +0000 e1000: Clean up legacy absolute and packet timers The absolute and packet timers only apply to lem and em with some only applying to the later. This cleans up the sysctl tree to only show these where applicable and stops writing to unexpected registers for igb. MFC after: 1 week Sponsored by: BBOX.io --- sys/dev/e1000/if_em.c | 116 +++++++++++++++++++++++++------------------------- 1 file changed, 59 insertions(+), 57 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index ad12171487f6..cdadec17e355 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1033,27 +1033,25 @@ em_if_attach_pre(if_ctx_t ctx) e1000_get_bus_info(hw); /* Set up some sysctls for the tunable interrupt delays */ - em_add_int_delay_sysctl(sc, "rx_int_delay", - "receive interrupt delay in usecs", &sc->rx_int_delay, - E1000_REGISTER(hw, E1000_RDTR), em_rx_int_delay_dflt); - em_add_int_delay_sysctl(sc, "tx_int_delay", - "transmit interrupt delay in usecs", &sc->tx_int_delay, - E1000_REGISTER(hw, E1000_TIDV), em_tx_int_delay_dflt); - em_add_int_delay_sysctl(sc, "rx_abs_int_delay", - "receive interrupt delay limit in usecs", - &sc->rx_abs_int_delay, - E1000_REGISTER(hw, E1000_RADV), - em_rx_abs_int_delay_dflt); - em_add_int_delay_sysctl(sc, "tx_abs_int_delay", - "transmit interrupt delay limit in usecs", - &sc->tx_abs_int_delay, - E1000_REGISTER(hw, E1000_TADV), - em_tx_abs_int_delay_dflt); - em_add_int_delay_sysctl(sc, "itr", - "interrupt delay limit in usecs/4", - &sc->tx_itr, - E1000_REGISTER(hw, E1000_ITR), - DEFAULT_ITR); + if (hw->mac.type < igb_mac_min) { + em_add_int_delay_sysctl(sc, "rx_int_delay", + "receive interrupt delay in usecs", &sc->rx_int_delay, + E1000_REGISTER(hw, E1000_RDTR), em_rx_int_delay_dflt); + em_add_int_delay_sysctl(sc, "tx_int_delay", + "transmit interrupt delay in usecs", &sc->tx_int_delay, + E1000_REGISTER(hw, E1000_TIDV), em_tx_int_delay_dflt); + } + if (hw->mac.type >= e1000_82540 && hw->mac.type < igb_mac_min) { + em_add_int_delay_sysctl(sc, "rx_abs_int_delay", + "receive interrupt delay limit in usecs", &sc->rx_abs_int_delay, + E1000_REGISTER(hw, E1000_RADV), em_rx_abs_int_delay_dflt); + em_add_int_delay_sysctl(sc, "tx_abs_int_delay", + "transmit interrupt delay limit in usecs", &sc->tx_abs_int_delay, + E1000_REGISTER(hw, E1000_TADV), em_tx_abs_int_delay_dflt); + em_add_int_delay_sysctl(sc, "itr", + "interrupt delay limit in usecs/4", &sc->tx_itr, + E1000_REGISTER(hw, E1000_ITR), DEFAULT_ITR); + } hw->mac.autoneg = DO_AUTO_NEG; hw->phy.autoneg_wait_to_complete = false; @@ -2287,18 +2285,19 @@ igb_configure_queues(struct e1000_softc *sc) break; } - /* Set the starting interrupt rate */ - if (em_max_interrupt_rate > 0) + /* Set the igb starting interrupt rate */ + if (em_max_interrupt_rate > 0) { newitr = (4000000 / em_max_interrupt_rate) & 0x7FFC; - if (hw->mac.type == e1000_82575) - newitr |= newitr << 16; - else - newitr |= E1000_EITR_CNT_IGNR; + if (hw->mac.type == e1000_82575) + newitr |= newitr << 16; + else + newitr |= E1000_EITR_CNT_IGNR; - for (int i = 0; i < sc->rx_num_queues; i++) { - rx_que = &sc->rx_queues[i]; - E1000_WRITE_REG(hw, E1000_EITR(rx_que->msix), newitr); + for (int i = 0; i < sc->rx_num_queues; i++) { + rx_que = &sc->rx_queues[i]; + E1000_WRITE_REG(hw, E1000_EITR(rx_que->msix), newitr); + } } return; @@ -3274,12 +3273,16 @@ em_initialize_transmit_unit(if_ctx_t ctx) tipg |= DEFAULT_82543_TIPG_IPGR2 << E1000_TIPG_IPGR2_SHIFT; } - E1000_WRITE_REG(hw, E1000_TIPG, tipg); - E1000_WRITE_REG(hw, E1000_TIDV, sc->tx_int_delay.value); + if (hw->mac.type < igb_mac_min) { + E1000_WRITE_REG(hw, E1000_TIPG, tipg); + E1000_WRITE_REG(hw, E1000_TIDV, sc->tx_int_delay.value); + + if (sc->tx_int_delay.value > 0) + sc->txd_cmd |= E1000_TXD_CMD_IDE; + } - if(hw->mac.type >= e1000_82540) - E1000_WRITE_REG(hw, E1000_TADV, - sc->tx_abs_int_delay.value); + if (hw->mac.type >= e1000_82540) + E1000_WRITE_REG(hw, E1000_TADV, sc->tx_abs_int_delay.value); if (hw->mac.type == e1000_82571 || hw->mac.type == e1000_82572) { tarc = E1000_READ_REG(hw, E1000_TARC(0)); @@ -3304,16 +3307,13 @@ em_initialize_transmit_unit(if_ctx_t ctx) E1000_WRITE_REG(hw, E1000_TARC(0), tarc); } - if (sc->tx_int_delay.value > 0) - sc->txd_cmd |= E1000_TXD_CMD_IDE; - /* Program the Transmit Control Register */ tctl = E1000_READ_REG(hw, E1000_TCTL); tctl &= ~E1000_TCTL_CT; tctl |= (E1000_TCTL_PSP | E1000_TCTL_RTLC | E1000_TCTL_EN | (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT)); - if (hw->mac.type >= e1000_82571) + if (hw->mac.type >= e1000_82571 && hw->mac.type < igb_mac_min) tctl |= E1000_TCTL_MULR; /* This write will effectively turn on the transmit unit. */ @@ -3381,17 +3381,29 @@ em_initialize_receive_unit(if_ctx_t ctx) if (!em_disable_crc_stripping) rctl |= E1000_RCTL_SECRC; - if (hw->mac.type >= e1000_82540) { - E1000_WRITE_REG(hw, E1000_RADV, - sc->rx_abs_int_delay.value); + /* lem/em default interrupt moderation */ + if (hw->mac.type < igb_mac_min) { + if (hw->mac.type >= e1000_82540) { + E1000_WRITE_REG(hw, E1000_RADV, sc->rx_abs_int_delay.value); - /* - * Set the interrupt throttling rate. Value is calculated - * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) + /* + * Set the interrupt throttling rate. Value is calculated + * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) + */ + E1000_WRITE_REG(hw, E1000_ITR, DEFAULT_ITR); + } + + /* XXX TEMPORARY WORKAROUND: on some systems with 82573 + * long latencies are observed, like Lenovo X60. This + * change eliminates the problem, but since having positive + * values in RDTR is a known source of problems on other + * platforms another solution is being sought. */ - E1000_WRITE_REG(hw, E1000_ITR, DEFAULT_ITR); + if (hw->mac.type == e1000_82573) + E1000_WRITE_REG(hw, E1000_RDTR, 0x20); + else + E1000_WRITE_REG(hw, E1000_RDTR, sc->rx_int_delay.value); } - E1000_WRITE_REG(hw, E1000_RDTR, sc->rx_int_delay.value); if (hw->mac.type >= em_mac_min) { uint32_t rfctl; @@ -3441,16 +3453,6 @@ em_initialize_receive_unit(if_ctx_t ctx) } E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum); - /* - * XXX TEMPORARY WORKAROUND: on some systems with 82573 - * long latencies are observed, like Lenovo X60. This - * change eliminates the problem, but since having positive - * values in RDTR is a known source of problems on other - * platforms another solution is being sought. - */ - if (hw->mac.type == e1000_82573) - E1000_WRITE_REG(hw, E1000_RDTR, 0x20); - for (i = 0, que = sc->rx_queues; i < sc->rx_num_queues; i++, que++) { struct rx_ring *rxr = &que->rxr; /* Setup the Base and Length of the Rx Descriptor Ring */ From nobody Fri Sep 27 08:33: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 4XFNyz4vVlz5XjWq; Fri, 27 Sep 2024 08:33:31 +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 4XFNyz3q6Vz4MdC; Fri, 27 Sep 2024 08:33:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727426011; 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=cF5SqEsOM+jDQii+JzCTxm+gP1WLOlvJdDDhPX7mQWA=; b=bADVbdyXar4oh7q4m+DRzoXuNORh15FcEnfrEbVeykqM0i3AK/fKvWZtASf2bQJtEYutFM ed7Okw3fznf5eGMxs6ForusnxpSZfat1XGhWO7KyJzqHmFi48da/wgPFwr0lhrJk8s2fAg wV7zt5tQ39ySUXIk93+B9QTnF072vB3M9h88APwNwf/Zn0+ZXmfoEYY4460ZMmKXkl2MG5 HJT+c2+9qYKtfjs+Dg/pAA2iujXC+ffa0FNDDhH3ZUArcEO/h8Yd7DDrSw8tiicukZdzGU azuOmRkmtmn7MIzY7irmjbWHCjCHGR4LjVte3cW5WqcukYq4hXYzuzWZdVyEXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727426011; 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=cF5SqEsOM+jDQii+JzCTxm+gP1WLOlvJdDDhPX7mQWA=; b=FnXI402qdWF9KGF7VxsUPtC/p7SlqNQLv4IFckdrbwjTfTHTfzThZHPwd8HvoQUtRjPj+k 9vldopy6fkkcIGZAU7XrvPwG6toTG1GVOPHsyQ3KhmlI5LkOBjCQIRB9g1jzUZgYZaWKhc cnSvQJ624+skh/wQhWvQopVQNbP4twmwLYgjo3weYV6fMrKzMsVuHbo++ZiyfLGoeLglH7 VM9y6GZNuB05Z75sriojEzRpCT2foCnCQhvCSbd2edwt/D4XhkbAMGXqkbqsfnv6iwIQcI T/NvcbF2Q9r9X58QkS98n31bq2QpFrQSNSU9MwIvbzCHjJ5aIql6QEDaZHbqYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727426011; a=rsa-sha256; cv=none; b=Tbwhyq+Ut0woZ2BSwF04Eka4vjOPNnYxhSArQSAfsTliv0XSu4eeznh6wxn0n/UWogfqjh HpOu87q2/fKZTlEnHRBrRm9fKqzbHs+6h92oHkMO1leYNDKXJ5SEHtbu+scMtYNVTpUWvX Gb68kHuRaihgdITF38iDa2wx2WFsUO/aE6WL+253VtOGyKo/93NjWlhQZOFmLyjYxH8TWq 0eY/3v070/66LCYVWen4E9uW0Fhve82ig95fMRgnd6j3fxRrMBsPW1u6ibfJYyw8/kxXf8 XW3IcgF5uyqrRbD4RPLlk89tsGW8bTn60Roxh9Mk72HYRsDV7jAdm9K6zEAOTA== 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 4XFNyz3MdQzZ6Z; Fri, 27 Sep 2024 08:33:31 +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 48R8XV5e047281; Fri, 27 Sep 2024 08:33:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48R8XVT1047279; Fri, 27 Sep 2024 08:33:31 GMT (envelope-from git) Date: Fri, 27 Sep 2024 08:33:31 GMT Message-Id: <202409270833.48R8XVT1047279@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: 9bf9164fc8aa - main - e1000: Clean up ITR/EITR in preparation for AIM 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: 9bf9164fc8aad1ca828c725413e06462aef1e4dd Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=9bf9164fc8aad1ca828c725413e06462aef1e4dd commit 9bf9164fc8aad1ca828c725413e06462aef1e4dd Author: Kevin Bowling AuthorDate: 2024-09-27 08:03:31 +0000 Commit: Kevin Bowling CommitDate: 2024-09-27 08:30:05 +0000 e1000: Clean up ITR/EITR in preparation for AIM Provide macros to derive the various needed values and make it a bit more clear the differences between em and igb. The igb default EITR was not landing at the right offset. Respect the 'max_interrupt_rate' tunable. MFC after: 1 week Sponsored by: BBOX.io --- sys/dev/e1000/if_em.c | 20 ++++++++------------ sys/dev/e1000/if_em.h | 11 +++++++++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index cdadec17e355..b9c6131e6741 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -499,9 +499,6 @@ static driver_t igb_if_driver = { #define EM_TICKS_TO_USECS(ticks) ((1024 * (ticks) + 500) / 1000) #define EM_USECS_TO_TICKS(usecs) ((1000 * (usecs) + 512) / 1024) -#define MAX_INTS_PER_SEC 8000 -#define DEFAULT_ITR (1000000000/(MAX_INTS_PER_SEC * 256)) - /* Allow common code without TSO */ #ifndef CSUM_TSO #define CSUM_TSO 0 @@ -551,7 +548,7 @@ SYSCTL_INT(_hw_em, OID_AUTO, eee_setting, CTLFLAG_RDTUN, &eee_setting, 0, /* ** Tuneable Interrupt rate */ -static int em_max_interrupt_rate = 8000; +static int em_max_interrupt_rate = EM_INTS_PER_SEC; SYSCTL_INT(_hw_em, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, &em_max_interrupt_rate, 0, "Maximum interrupts per second"); @@ -1050,7 +1047,8 @@ em_if_attach_pre(if_ctx_t ctx) E1000_REGISTER(hw, E1000_TADV), em_tx_abs_int_delay_dflt); em_add_int_delay_sysctl(sc, "itr", "interrupt delay limit in usecs/4", &sc->tx_itr, - E1000_REGISTER(hw, E1000_ITR), DEFAULT_ITR); + E1000_REGISTER(hw, E1000_ITR), + EM_INTS_TO_ITR(em_max_interrupt_rate)); } hw->mac.autoneg = DO_AUTO_NEG; @@ -2287,7 +2285,7 @@ igb_configure_queues(struct e1000_softc *sc) /* Set the igb starting interrupt rate */ if (em_max_interrupt_rate > 0) { - newitr = (4000000 / em_max_interrupt_rate) & 0x7FFC; + newitr = IGB_INTS_TO_EITR(em_max_interrupt_rate); if (hw->mac.type == e1000_82575) newitr |= newitr << 16; @@ -3386,11 +3384,9 @@ em_initialize_receive_unit(if_ctx_t ctx) if (hw->mac.type >= e1000_82540) { E1000_WRITE_REG(hw, E1000_RADV, sc->rx_abs_int_delay.value); - /* - * Set the interrupt throttling rate. Value is calculated - * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) - */ - E1000_WRITE_REG(hw, E1000_ITR, DEFAULT_ITR); + /* Set the default interrupt throttling rate */ + E1000_WRITE_REG(hw, E1000_ITR, + EM_INTS_TO_ITR(em_max_interrupt_rate)); } /* XXX TEMPORARY WORKAROUND: on some systems with 82573 @@ -3418,7 +3414,7 @@ em_initialize_receive_unit(if_ctx_t ctx) if (hw->mac.type == e1000_82574) { for (int i = 0; i < 4; i++) E1000_WRITE_REG(hw, E1000_EITR_82574(i), - DEFAULT_ITR); + EM_INTS_TO_ITR(em_max_interrupt_rate)); /* Disable accelerated acknowledge */ rfctl |= E1000_RFCTL_ACK_DIS; } diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index 244762e8ed0d..7219dc57c333 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -244,8 +244,15 @@ #define IGB_MEDIA_RESET (1 << 0) /* Define the starting Interrupt rate per Queue */ -#define IGB_INTS_PER_SEC 8000 -#define IGB_DEFAULT_ITR ((1000000/IGB_INTS_PER_SEC) << 2) +#define EM_INTS_PER_SEC 8000 +#define EM_INTS_MULTIPLIER 256 +#define EM_ITR_DIVIDEND 1000000000 +#define EM_INTS_TO_ITR(i) (EM_ITR_DIVIDEND/(i * EM_INTS_MULTIPLIER)) +#define IGB_ITR_DIVIDEND 1000000 +#define IGB_ITR_SHIFT 2 +#define IGB_QVECTOR_MASK 0x7FFC +#define IGB_INTS_TO_EITR(i) (((IGB_ITR_DIVIDEND/i) & IGB_QVECTOR_MASK) << \ + IGB_ITR_SHIFT) #define IGB_LINK_ITR 2000 #define I210_LINK_DELAY 1000 From nobody Fri Sep 27 12:01:10 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 4XFTZZ3FThz5XvRw; Fri, 27 Sep 2024 12:01:10 +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 4XFTZZ2j5Jz4kCX; Fri, 27 Sep 2024 12:01:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727438470; 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=8FH9WtBMW61UlTUVHl0kKsOHZI5Q3WCsvrINPnS9Bcs=; b=xDDruZ7w5YO09t1Vk0JK3U44oJ9AkEmRh24zjaRNinDZYVRl369eaiZlUn8+9Kn/JEW7L7 qfo4NlGZ6HpWEMVSLuNa2Gc0wl1hdQ+hK3D4YRQ89A+9of10ogiCw9g1rMuU6+NJrn8RgC oVvxQv9BbMHgepA8P4/xwvoDhKEnPhU0TH1P1VjcuPzbFxeK+yWngesYRYjaXFfqzjo2P5 WoO5VUt4r0/MzNSboLg5atlKW6FW9hvZI/Qxyh7uXu0dRyQnG0JXTfjQYsrr6kmXEw8ABG mcb3kGvOZznitxbimD0MgPtrZSLl0if5KeZsz34csmxvW3qmemrl/GYOklRzgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727438470; 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=8FH9WtBMW61UlTUVHl0kKsOHZI5Q3WCsvrINPnS9Bcs=; b=Cn2g4WmyCTbwwXfDwwY/9gVf64kasMcg4SGMD6p1GDY1EJvLMPXVWeBcHIA44QOGqlyxBM x0KlJEVRumSyJeBlDtEMy4+y6x2d0Ty04rMjLRAakMt2UMn6JkxT8+yzkbnFpIZpjM4q1r 2zUIzxAsX/rw+6UWi2/pltVNFAQ2C5ZWcx/Q9ZPYpEE1VUmOs5OBxImFQwMhXjf6C4IH+1 IwLE2Xhbb/CfKMGXAnpfSGtNLJHY9ludbtjEN28igStwsfwIDjoutwO8Ez4Bhk3bvYtlAJ DENungBDM/IcnVcQ9qVbKxXx1JNnfZ3FnA12REPwk55E/ZKbxP5zxaUPl+bsww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727438470; a=rsa-sha256; cv=none; b=OPRc48mWI+uJACmB0MJK4GBk+MyR3mVy+ctfu8/o73eRmjx8E78jdSjV6PAg1jC6aGiujx EW1m1d0X2EFp9hQclIqqxcf/x4OmZ1ozs7OIR4V5hp2Qy3Pu2D2daro49czqxGeUGUdoL2 0Di0y5U2r6+b540Q2bARoHX41x1KKO167vjR0EVxmMlJ9LKc8IC5qIfZ1tgUGD6vmiXcYx U9x4Lsj814zK76tq4OpsUKSXgIBLheWUq+bOHJuaQNunZAW0IzkA+xJCxEhLauOo93BdTk lA++rk5X3duyuFS6byeFVhUEXxkml2vPjfotg2RLd1u7LNim5xaD7+7RuXIY5A== 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 4XFTZZ2JhJzfwP; Fri, 27 Sep 2024 12:01:10 +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 48RC1Aw4097822; Fri, 27 Sep 2024 12:01:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RC1Anr097819; Fri, 27 Sep 2024 12:01:10 GMT (envelope-from git) Date: Fri, 27 Sep 2024 12:01:10 GMT Message-Id: <202409271201.48RC1Anr097819@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: e8ff5e565c24 - main - pf: fix incorrect parsing of state export filter 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e8ff5e565c24d7e3fdd607e76769b4c879668759 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e8ff5e565c24d7e3fdd607e76769b4c879668759 commit e8ff5e565c24d7e3fdd607e76769b4c879668759 Author: Kristof Provost AuthorDate: 2024-09-26 18:00:25 +0000 Commit: Kristof Provost CommitDate: 2024-09-27 09:50:00 +0000 pf: fix incorrect parsing of state export filter We saved the af parameter to the proto field. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_nl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 510aac2af48a..62d5972c4abb 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -68,7 +68,7 @@ static const struct nlattr_parser nla_p_state[] = { { .type = PF_ST_ID, .off = _OUT(id), .cb = nlattr_get_uint32 }, { .type = PF_ST_CREATORID, .off = _OUT(creatorid), .cb = nlattr_get_uint32 }, { .type = PF_ST_IFNAME, .arg = (const void *)IFNAMSIZ, .off = _OUT(ifname), .cb = nlattr_get_chara }, - { .type = PF_ST_AF, .off = _OUT(proto), .cb = nlattr_get_uint8 }, + { .type = PF_ST_AF, .off = _OUT(af), .cb = nlattr_get_uint8 }, { .type = PF_ST_PROTO, .off = _OUT(proto), .cb = nlattr_get_uint16 }, { .type = PF_ST_FILTER_ADDR, .off = _OUT(addr), .cb = nlattr_get_in6_addr }, { .type = PF_ST_FILTER_MASK, .off = _OUT(mask), .cb = nlattr_get_in6_addr }, From nobody Fri Sep 27 12:30:07 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 4XFVCz6DHqz5XxHm; Fri, 27 Sep 2024 12:30:07 +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 4XFVCz5jkLz4pSP; Fri, 27 Sep 2024 12:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727440207; 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=76BLAtDFqq+/u8UqKoWUQ5cb5doLPow7qG05lB1Ir2Q=; b=kq+1LOH3RaAU8tdq2yaJpRTUAQSTcm6UnlmUV91YGUs4hZj16VlUenbYhk9RvgsD/y+71f D3n2Rhs54/j6oSl87oJKb1rRzkYXuXbheRtwojqrRKgmYpJ2zeZ29HMJDXWvSV6222VHLJ KjsooB2wpDslgk6CTjsPXMiSulw0IdAOzKOq7YiHQLb5mGMfmKLxlKjdqhCq7PMMZY62qX A0AZZRwxr0A/LGLOJrE2aua4UxrlF4UP1CZ66uAltVCwU7jXLlxtWjOvvX+pScOggJ0+hH oKWcRRczSL/dqkC/6Qy3pAtJzUkqB7pDObjkVeSWjZaQcc8qf867ktmeymjfAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727440207; 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=76BLAtDFqq+/u8UqKoWUQ5cb5doLPow7qG05lB1Ir2Q=; b=cel7met/NZVLQog20WRHUtjqsmQGPiq4y9F5KpZKXtXbs4QQYDN+ljRSbqhlyyqsPIR1QP R0+c8xzsTdgdP5pvPjAZfUzwzDFssk1SAqAKAWBoygTH8YqNsnUFp6sVOkeEv5nZ0xMXRR MxzLeLCjmvseAtK3zqv4M7BiuTfRsy5OT2wb/mXN/AD3rveaKFdnL/sl3YB6tlXwexTgez WsBTn2A6QI/+ew2jqzU3d5WYJblzuJEIGCW/KgWb5rMTI2IttdAUmNP1R24W7FxQuRstCg 1VQ7F6igDc4wZb5Caf6fuHZkcvwLeCqFP8oXAmajyjtTFdw9jVhnplH2IIpFVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727440207; a=rsa-sha256; cv=none; b=YHyKpVQyIqRYIfIpIoip9dHYZDNNCtxEHWWHyyEy8qgaWqvWZzVo4yj5GMr2arCHhhacB/ wS0ISu3y0YSheclFsA8btePRvLAAbof/uCcTbTZI101OSTKecpXzSM13loWFiQF2XyvBDR QSrZrXw2zd4sfcZ86bWFZtWOMslwAzlS4f8MQNVN9ycJPNzkNfxmc0e2lGmsK3EtzjSxIu DFJCm57WXzZ47d45/X1VceHQnEtaGXjbmp2wHYQgTb3k/j/GWJvy9NdWfYpDcMBRRpE0B9 fTdUSZcXF4ECvvFp+O6OtGMI12LPNsw8tAKOxW4VE4ZgUh9S/I9QFlKxbrCsYw== 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 4XFVCz5C7fzgPr; Fri, 27 Sep 2024 12:30:07 +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 48RCU7t1040993; Fri, 27 Sep 2024 12:30:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RCU7CK040988; Fri, 27 Sep 2024 12:30:07 GMT (envelope-from git) Date: Fri, 27 Sep 2024 12:30:07 GMT Message-Id: <202409271230.48RCU7CK040988@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 7fe42038b269 - main - pf: fix max-src-conn when rules are added via netlink 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7fe42038b2691bddd58fdf8783c1b92c527c2352 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7fe42038b2691bddd58fdf8783c1b92c527c2352 commit 7fe42038b2691bddd58fdf8783c1b92c527c2352 Author: Kajetan Staszkiewicz AuthorDate: 2024-09-27 08:21:10 +0000 Commit: Kristof Provost CommitDate: 2024-09-27 12:29:20 +0000 pf: fix max-src-conn when rules are added via netlink Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D46797 --- lib/libpfctl/libpfctl.c | 2 ++ sys/netpfil/pf/pf_nl.c | 2 ++ sys/netpfil/pf/pf_nl.h | 1 + 3 files changed, 5 insertions(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index c8eeb913e912..36b83c480aa7 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1233,6 +1233,7 @@ snl_add_msg_attr_pf_rule(struct snl_writer *nw, uint32_t type, const struct pfct snl_add_msg_attr_u32(nw, PF_RT_MAX_STATES, r->max_states); snl_add_msg_attr_u32(nw, PF_RT_MAX_SRC_NODES, r->max_src_nodes); snl_add_msg_attr_u32(nw, PF_RT_MAX_SRC_STATES, r->max_src_states); + snl_add_msg_attr_u32(nw, PF_RT_MAX_SRC_CONN, r->max_src_conn); snl_add_msg_attr_u32(nw, PF_RT_MAX_SRC_CONN_RATE_LIMIT, r->max_src_conn_rate.limit); snl_add_msg_attr_u32(nw, PF_RT_MAX_SRC_CONN_RATE_SECS, r->max_src_conn_rate.seconds); @@ -1658,6 +1659,7 @@ static struct snl_attr_parser ap_getrule[] = { { .type = PF_RT_SRC_NODES, .off = _OUT(r.src_nodes), .cb = snl_attr_get_uint64 }, { .type = PF_RT_ANCHOR_CALL, .off = _OUT(anchor_call), .arg = (void*)MAXPATHLEN, .cb = snl_attr_copy_string }, { .type = PF_RT_RCV_IFNAME, .off = _OUT(r.rcv_ifname), .arg = (void*)IFNAMSIZ, .cb = snl_attr_copy_string }, + { .type = PF_RT_MAX_SRC_CONN, .off = _OUT(r.max_src_conn), .cb = snl_attr_get_uint32 }, }; static struct snl_field_parser fp_getrule[] = {}; #undef _OUT diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 62d5972c4abb..ca90e0b5b140 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -731,6 +731,7 @@ static const struct nlattr_parser nla_p_rule[] = { { .type = PF_RT_DIVERT_ADDRESS, .off = _OUT(divert.addr), .cb = nlattr_get_in6_addr }, { .type = PF_RT_DIVERT_PORT, .off = _OUT(divert.port), .cb = nlattr_get_uint16 }, { .type = PF_RT_RCV_IFNAME, .off = _OUT(rcv_ifname), .arg = (void *)IFNAMSIZ, .cb = nlattr_get_chara }, + { .type = PF_RT_MAX_SRC_CONN, .off = _OUT(max_src_conn), .cb = nlattr_get_uint32 }, }; NL_DECLARE_ATTR_PARSER(rule_parser, nla_p_rule); #undef _OUT @@ -921,6 +922,7 @@ pf_handle_getrule(struct nlmsghdr *hdr, struct nl_pstate *npt) nlattr_add_u32(nw, PF_RT_MAX_STATES, rule->max_states); nlattr_add_u32(nw, PF_RT_MAX_SRC_NODES, rule->max_src_nodes); nlattr_add_u32(nw, PF_RT_MAX_SRC_STATES, rule->max_src_states); + nlattr_add_u32(nw, PF_RT_MAX_SRC_CONN, rule->max_src_conn); nlattr_add_u32(nw, PF_RT_MAX_SRC_CONN_RATE_LIMIT, rule->max_src_conn_rate.limit); nlattr_add_u32(nw, PF_RT_MAX_SRC_CONN_RATE_SECS, rule->max_src_conn_rate.seconds); diff --git a/sys/netpfil/pf/pf_nl.h b/sys/netpfil/pf/pf_nl.h index bd173c0137ce..acb4b31320c0 100644 --- a/sys/netpfil/pf/pf_nl.h +++ b/sys/netpfil/pf/pf_nl.h @@ -258,6 +258,7 @@ enum pf_rule_type_t { PF_RT_SRC_NODES = 71, /* u64 */ PF_RT_ANCHOR_CALL = 72, /* string */ PF_RT_RCV_IFNAME = 73, /* string */ + PF_RT_MAX_SRC_CONN = 74, /* u32 */ }; enum pf_addrule_type_t { From nobody Fri Sep 27 13:00:14 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 4XFVtk34m3z5XykP; Fri, 27 Sep 2024 13:00:14 +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 4XFVtk2b1zz4wKF; Fri, 27 Sep 2024 13:00:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727442014; 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=nmR544VIpS2A6jsXZ8wgIEzK0Y22Udd5Vwcnm4BbJ/s=; b=cYK/4FKSp5oiiI17agidjE0PkH3ALDRXRjqyaLsFIWU+tiQhDwCKTkuwbvCO6AbE+4TEP7 lEZUVbyc2WJ+MbqeZqxcy28gQFMCauQcbbuz62+/upkzQZjoD3FImoX9fBuuOCbPflEwLu LuDZ/cdHgBLarSb38VFvsgpVZ2UKeuAXP0ZnZ1Wbhb4CXSPQTGxtB8nM+aSD8vg0P2o2CV in5rabe9LyGxMzxvyHAq4Whz7538zmpwyzDnNQK3AMs1cFFvVS5VJjg/A42fY8x6EYawIr bPjre6Ho/yb2jqW49hRAsecyNKhXb5qMVf2pONn1ZIRLH8+fdKmw0+Zi3himtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727442014; 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=nmR544VIpS2A6jsXZ8wgIEzK0Y22Udd5Vwcnm4BbJ/s=; b=uyNYYFyO+S4dJkjHxXuwiFzIqUOCyeckpn2MG79ce8zo7Oo6IyxzHZTBcdZzTIbIf+7R5v vQL2V5/Tb3ekOF57ZWwinbztl/LGP/a2RB7knxXpA7hb4++6CwdEfdjJyRrb4KXrbGbQGK +6bkyu5hXZfpmWBwuvjbJTNUhZNgzp/YFWBzA/at3/Xtvor7gTmaILHFlABW9WfM0aL1zp 3ZrWVUEBo1k289sdqZAHj9Sf5ARNtXaXa0gI8UoqUOv9LgO2EJ2dIlDFw5JNAgo525x5TP S3cdLgzup2fjU8odhJXROAD7INTUy/TsZz0Btu9EmX4yRjV3z4Ku3wZky6J8qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727442014; a=rsa-sha256; cv=none; b=hM4/YyGgY9wiyv+tuK40PHuv2jzLcys7o8kMQZb72CRw7tvE5zjy2TZlKL+tNUjin8ANaz YvEmPUNgiVOSTUm3xm4cdiIHsKfBrILvlDGwnJgNoIGKyKfqx4BFp+kRVVgQYuuYLgB/zA fBH/6GQMFXHVVXEMnK5+F43u+rcQGFT01GNVyEYNAtfVLzvJoRi4oFRmLSGNKH+XlQkGvH XFfqmDUPs04VSzB80SkNdoOKPrxd+m6Sk49J8eYjWjBHsAjCg2qyyey6Sj/4cleRYRXdso nsfxo1E16mfGARKekhFN+q57EAr4ThhBuxBE89b8M9Z6RelJmXnS+2N7cCgP6g== 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 4XFVtk2BJvzhck; Fri, 27 Sep 2024 13:00:14 +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 48RD0EtD095741; Fri, 27 Sep 2024 13:00:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RD0Em6095732; Fri, 27 Sep 2024 13:00:14 GMT (envelope-from git) Date: Fri, 27 Sep 2024 13:00:14 GMT Message-Id: <202409271300.48RD0Em6095732@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 94693ec7c853 - main - bhyve: initialize register value 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94693ec7c85363f9b0098247489cea3efdb183f9 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=94693ec7c85363f9b0098247489cea3efdb183f9 commit 94693ec7c85363f9b0098247489cea3efdb183f9 Author: Pierre Pronchery AuthorDate: 2024-07-24 19:33:26 +0000 Commit: Ed Maste CommitDate: 2024-09-27 12:59:36 +0000 bhyve: initialize register value In case of an error in a code pattern like ``` uint64_t val; error = memread(vcpu, gpa, &val, 1, arg); error = vie_update_register(vcpu, reg, val, size); ``` uninitialized stack data would be used. Reported by: Synacktiv Reviewed by: markj Security: HYP-21 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46107 --- sys/amd64/vmm/vmm_ioport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/vmm_ioport.c b/sys/amd64/vmm/vmm_ioport.c index f036841f4e10..fc1ecab9f209 100644 --- a/sys/amd64/vmm/vmm_ioport.c +++ b/sys/amd64/vmm/vmm_ioport.c @@ -101,7 +101,7 @@ static int emulate_inout_port(struct vcpu *vcpu, struct vm_exit *vmexit, bool *retu) { ioport_handler_func_t handler; - uint32_t mask, val; + uint32_t mask, val = 0; int error; /* From nobody Fri Sep 27 13:57:57 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 4XFX9c02wPz5Y2Tt; Fri, 27 Sep 2024 13:58:12 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XFX9b0clLz52bj; Fri, 27 Sep 2024 13:58:11 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.166.54 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-io1-f54.google.com with SMTP id ca18e2360f4ac-82ceab75c05so95659739f.0; Fri, 27 Sep 2024 06:58:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727445490; x=1728050290; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=i32B/d9oWfKFKfFTJXEkvdxp2HdG07+JJcXjHn+5aaM=; b=Zo4nzxxLtwL8jEFxmOtfwKAAoTNuxk0766bYLvnBdbzd3SNNeZIZSo6wDZg90P8a+B CGSOM/0EsAB33+DiWrsil558lWwlRa6Qht7But5LRLqn7nVBB7vYwHxOAwAxJebCRJ3o ix0nBdvsJh64kQG35tezQD29A/f/dKVUqOGyVktLEoXDZr+n9UvuBKQ4swnZiQju2+1j TfemOzP4oLzCWgg/4Gkq/XNx/PeeDS3n0UXk4XzQn7Zoz3SfSXXuGZ27a3bkvAb03KHX ubmbMYCosyA8gR6LEz+HLpfNrbaxNvUgsljnwMRmfdTfL3gNI9LYm9pOneORMzuhK1E8 6jsg== X-Forwarded-Encrypted: i=1; AJvYcCUfKh88pAdhY+BkXeRWJta9qYZplrGuYNL2wP6N23yhClDjz4OPeSlfT0cni9hiyoAugU62+Ak6pbwf1Fg15kdXmV+RgLU=@freebsd.org, AJvYcCXhu83LEIcx78N8gQBjdIl+6XH+s5FkJzNTEBW5cqAm3XeTY2gBTdC9RpPFX/uoJdzIxKzOA5zyUQhoocOBbGCy2dhN@freebsd.org X-Gm-Message-State: AOJu0YxgdcZlbeaDGvFjRGrE/JZfsb85WP6X1Z5nb/cWMCSRamZmjEu1 Oo946xEniPWCO9wOOhluQrqC2chhsv8RhPkvjkciB+63MiFcO8yXp2po5F8tC7OiwBQRWNuquxv nctOF1EsceNVcj1mPC56mdxhq0JFBkA== X-Google-Smtp-Source: AGHT+IEskKtWI4t1/5pvp9FlRPf/DCODk/xrYslpsyHIxR2HxC7vR6RcmdwOKBvFBOmdAJSYI//ISPudkt4KGO33qw4= X-Received: by 2002:a05:6602:620c:b0:82d:581:8862 with SMTP id ca18e2360f4ac-834932600c7mr359448039f.10.1727445489710; Fri, 27 Sep 2024 06:58:09 -0700 (PDT) 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 References: <202409271300.48RD0Em6095732@gitrepo.freebsd.org> In-Reply-To: <202409271300.48RD0Em6095732@gitrepo.freebsd.org> From: Ed Maste Date: Fri, 27 Sep 2024 09:57:57 -0400 Message-ID: Subject: Re: git: 94693ec7c853 - main - bhyve: initialize register value To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-2.89 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.993]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; FREEFALL_USER(0.00)[carpeddiem]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.166.54:from]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_IN_DNSWL_NONE(0.00)[209.85.166.54:from] X-Rspamd-Queue-Id: 4XFX9b0clLz52bj X-Spamd-Bar: -- On Fri, 27 Sept 2024 at 09:00, Ed Maste wrote: > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=94693ec7c85363f9b0098247489cea3efdb183f9 > > commit 94693ec7c85363f9b0098247489cea3efdb183f9 > Author: Pierre Pronchery > AuthorDate: 2024-07-24 19:33:26 +0000 > Commit: Ed Maste > CommitDate: 2024-09-27 12:59:36 +0000 > > bhyve: initialize register value > > ... > Security: HYP-21 Oops, this is the wrong identifier. This one is HYP-22 in the Synacktiv report (to be shared in the near future). From nobody Fri Sep 27 14:21:14 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 4XFXhB28tKz5Y3Wx; Fri, 27 Sep 2024 14:21:14 +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 4XFXhB1hpKz559V; Fri, 27 Sep 2024 14:21:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727446874; 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=Fekf4nC1CtF0eMimY0t06hPuUUknD+lJhY+ey08+Z2k=; b=EKqqiXNA/5DRtKvX6uvP4EtVQNOeXi8pfAhlitpbpv7RgnTeEEIx3715nGpvYVWOqtGgyk ftZc7T1SlRk8hDzO6wKevIOGOWdp6b2ueewpjik+DiwmkdKBA+X58rBnLJtUJ9OblePkHF VSEpzfzn/rSkXAHp6Vx6jH7u9T6AW6LLn/Saw/97MshNg4L8pauWRza5D2fg+oI1I8NSz2 5ZhOoXyknxN5mboZJKpYBfJUH3T8VuYm0YSmHUKc4FhU7l4GjU4L/6aLCAm3GV1o8xJmV3 Qm3RX+uPm6C8GVdobLPaol5Y8Kl2jyX6mCfoasUBcW9ajN1zNDqFeRtKZyvB0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727446874; 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=Fekf4nC1CtF0eMimY0t06hPuUUknD+lJhY+ey08+Z2k=; b=MZFJUnk+12tbVochtka/AWM3HmYKxgra4/YowY/rJkWwyIax9ZiPaeeyTT9Cs0Eog6SpwR u3OBb5qm29z8ME9K6Hfr0dmisnrWrOFVU9xYae7PvV2uDW1PMo+Fze4uHivXnDOxo9d96B srFT8rtDRc6C8dUCLuCVOltG7/qdwDJMde+JtCDK5z7sByGkIcnqI0HqCaMRTMyfqXKdDm EPpT3Dq9YtX8DsahAAICAOUaDhwpqdju42gOdxz5FugimeymVJJV5EmiQTBuH/YP743Ru8 EhKOWSU8RZfRWmNNs+SCCYdsHBOcirKGyS9k2GLm/UO4jpzFUGOpaTt1MMtGIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727446874; a=rsa-sha256; cv=none; b=ahjYC4j5BH4tH3Xn2R2kwhX8mz9huW23yZ7BiK/Cu/CyPl8ESL+UO1BBdNDYIxM9/bMYDT ps2WL7MUVO7FawMSaH9OIHEJqgQy5HAsoEw9Szk6QeVhLHq1ziIz1qADvrWJErhqC+aRLd I7dM9CEnvaSY3n+eOzcPSSAwc3y6jr/GmGEO/0EfGDMfodB+WBM0d5OALy3mIt4YwDupRp x/1SvPfeAwfB8SHCn/W9a+AP6EQ1Ri1mren1jidULlCJ8pbcjaRoCs+MNEWC1c3JRj7o6g tfyEOyM1Zl8pWu2jXV5j7sv+EuF3H5ZbnYFWWXQv79tTejPFETaqa/p7qrj23Q== 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 4XFXhB1Hm8zjvQ; Fri, 27 Sep 2024 14:21:14 +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 48RELEDS033545; Fri, 27 Sep 2024 14:21:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RELEbQ033542; Fri, 27 Sep 2024 14:21:14 GMT (envelope-from git) Date: Fri, 27 Sep 2024 14:21:14 GMT Message-Id: <202409271421.48RELEbQ033542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 869d760cb9d7 - main - bhyve: avoid TOCTOU on iov_len in virtio_vq_recordon() 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 869d760cb9d7a307faa2fbe8c1c2b238a81b74d4 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=869d760cb9d7a307faa2fbe8c1c2b238a81b74d4 commit 869d760cb9d7a307faa2fbe8c1c2b238a81b74d4 Author: Pierre Pronchery AuthorDate: 2024-08-27 13:57:32 +0000 Commit: Ed Maste CommitDate: 2024-09-27 14:20:53 +0000 bhyve: avoid TOCTOU on iov_len in virtio_vq_recordon() Avoid a race condition when accessing guest memory, by reading memory contents only once. This has also been applied to _vq_record() in sys/dev/beri/virtio/virtio.c, as per markj@'s suggestion. Reported by: Synacktiv Reviewed by: markj Security: HYP-10 Sponsored by: The Alpha-Omega Project Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45735 --- sys/dev/beri/virtio/virtio.c | 11 ++++++++--- usr.sbin/bhyve/virtio.c | 9 +++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/sys/dev/beri/virtio/virtio.c b/sys/dev/beri/virtio/virtio.c index 60239b335020..533a6f1209e1 100644 --- a/sys/dev/beri/virtio/virtio.c +++ b/sys/dev/beri/virtio/virtio.c @@ -106,12 +106,17 @@ paddr_unmap(void *phys, uint32_t size) static inline void _vq_record(uint32_t offs, int i, volatile struct vring_desc *vd, struct iovec *iov, int n_iov, uint16_t *flags) { + uint32_t len; + uint64_t addr; + if (i >= n_iov) return; - iov[i].iov_base = paddr_map(offs, be64toh(vd->addr), - be32toh(vd->len)); - iov[i].iov_len = be32toh(vd->len); + len = atomic_load_32(&vd->len); + addr = atomic_load_64(&vd->addr); + iov[i].iov_base = paddr_map(offs, be64toh(addr), + be32toh(len)); + iov[i].iov_len = be32toh(len); if (flags != NULL) flags[i] = be16toh(vd->flags); } diff --git a/usr.sbin/bhyve/virtio.c b/usr.sbin/bhyve/virtio.c index 26df39ceb5b3..304156bf7416 100644 --- a/usr.sbin/bhyve/virtio.c +++ b/usr.sbin/bhyve/virtio.c @@ -216,10 +216,15 @@ static inline void _vq_record(int i, struct vring_desc *vd, struct vmctx *ctx, struct iovec *iov, int n_iov, struct vi_req *reqp) { + uint32_t len; + uint64_t addr; + if (i >= n_iov) return; - iov[i].iov_base = paddr_guest2host(ctx, vd->addr, vd->len); - iov[i].iov_len = vd->len; + len = atomic_load_32(&vd->len); + addr = atomic_load_64(&vd->addr); + iov[i].iov_len = len; + iov[i].iov_base = paddr_guest2host(ctx, addr, len); if ((vd->flags & VRING_DESC_F_WRITE) == 0) reqp->readable++; else From nobody Fri Sep 27 15:03:25 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 4XFYct1j9Xz5Y5r8; Fri, 27 Sep 2024 15:03:26 +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 4XFYct0qFLz58y0; Fri, 27 Sep 2024 15:03:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449406; 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=eHgnYM/aiegeA+1leYF60pIWH9Ocl0fuW+VW8FYmUWY=; b=OrcjmObsV0JGizZAlyq8DlgroqtHGaNtr04XUDH90Sanz0o+MJAi+oCRwIYK0mCqfbNz13 65PVhO+YfhdtorPpeTcUznJ57gizaoBFx//sJmzJdrdHx328AHWWxKV6ePfsgEP0DLMz63 hYOxoO1DHqqU3fX7sljeruhdrTF5GRgbo6uGn3i8a3pnPV/i2N3Udm/mM1kaY6YQfmevEc DHitL0E+rq6qBAUuRxvwJdwgmayuYjfSxAElL4UeH+YveCL7wi5aTCoc1niOCjCHlvuJr7 be57Ycladm5QjAzhOXJc6uLSJ0IEDLsR2qnvFbYa1F9U2cVHmrNprSjHgAQoRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449406; 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=eHgnYM/aiegeA+1leYF60pIWH9Ocl0fuW+VW8FYmUWY=; b=OBCb5VgzdD6zp8wIaTfptv+VtBnHnPe7M6aVBmU0UkJOdellKlW5R9gVo+V4AcEXMMspdL OI4KefvxNX4ksuTQRDnoMocBXhcrtlb4Ix4bsPhhn0JFVB34HozMefud2eQ7eI0rS+fS8B bfW+7Gv/NJPbWMxijlJ2QrWCWmc9PtP6GWbsBO9XOBL4QECFxaiEw8MJIXcj9LargnRvEC itDeJwlV52m0Mwwvp296iEsY/O1R5AJGn2z4WUiwGYFFBN7GOBv88R1tPSZkHI06iT907y Bgzn2MEHAvGI5elaUkIwXVt17u8DCXJceQQvhQjqZ3V792ToRYn1x8q6sAPTxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727449406; a=rsa-sha256; cv=none; b=gXR8gK9nDWMvCs9uxaqkw9ai0UsiLvY5csX5uP+hzml53H9iICa9CBtchYAYIF1fJdKvCf TO+a+QMrayoThvzP8zGiN1OCMDfQCX1iMRIemXkgpBajiPYpQ8TwfSkFUPRiHvNxU5P6H6 Q/1ji3J47A6O4GVnGd+Xy/aFqJWpq3/tCGB9Gu/paA9TbPN2GpHF2zgaLjd0WoLcgA10xO lnQSjeMeDKbOerdF/j6xgMKJSB/3Y77c54jUmKA/VuitBQ5aXTlhF4rIoYq6dCOhchqSdL yPjOefwtpnqhIEtvIzuZGaek44qrCm9JEEB5ueNFFKdf2J4OQfjxUwInY8G1EQ== 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 4XFYct0QjBzlWw; Fri, 27 Sep 2024 15:03:26 +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 48RF3QeZ009095; Fri, 27 Sep 2024 15:03:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RF3PMu009092; Fri, 27 Sep 2024 15:03:25 GMT (envelope-from git) Date: Fri, 27 Sep 2024 15:03:25 GMT Message-Id: <202409271503.48RF3PMu009092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9c3e516ad081 - main - Add proc_nfiles(9) 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c3e516ad08145ad47248633b54fd1b7fc0ef981 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9c3e516ad08145ad47248633b54fd1b7fc0ef981 commit 9c3e516ad08145ad47248633b54fd1b7fc0ef981 Author: Konstantin Belousov AuthorDate: 2024-09-20 16:28:23 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 15:01:56 +0000 Add proc_nfiles(9) which returns a snapshot of the count of the opened files in the process. Reviewed by: markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46747 --- sys/kern/kern_descrip.c | 44 +++++++++++++++++++++++++++++++++----------- sys/sys/filedesc.h | 2 ++ 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index ef7aea82a609..09eeb158f1f5 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -4329,21 +4329,13 @@ filedesc_to_leader_share(struct filedesc_to_leader *fdtol, struct filedesc *fdp) } static int -sysctl_kern_proc_nfds(SYSCTL_HANDLER_ARGS) +filedesc_nfiles(struct filedesc *fdp) { NDSLOTTYPE *map; - struct filedesc *fdp; - u_int namelen; int count, off, minoff; - namelen = arg2; - if (namelen != 1) - return (EINVAL); - - if (*(int *)arg1 != 0) - return (EINVAL); - - fdp = curproc->p_fd; + if (fdp == NULL) + return (0); count = 0; FILEDESC_SLOCK(fdp); map = fdp->fd_map; @@ -4351,7 +4343,37 @@ sysctl_kern_proc_nfds(SYSCTL_HANDLER_ARGS) for (minoff = NDSLOT(0); off >= minoff; --off) count += bitcountl(map[off]); FILEDESC_SUNLOCK(fdp); + return (count); +} + +int +proc_nfiles(struct proc *p) +{ + struct filedesc *fdp; + int res; + + PROC_LOCK(p); + fdp = fdhold(p); + PROC_UNLOCK(p); + res = filedesc_nfiles(fdp); + fddrop(fdp); + return (res); +} + +static int +sysctl_kern_proc_nfds(SYSCTL_HANDLER_ARGS) +{ + u_int namelen; + int count; + + namelen = arg2; + if (namelen != 1) + return (EINVAL); + + if (*(int *)arg1 != 0) + return (EINVAL); + count = filedesc_nfiles(curproc->p_fd); return (SYSCTL_OUT(req, &count, sizeof(count))); } diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index 53034acb1b54..242f5b8831fd 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -335,6 +335,8 @@ fd_modified(struct filedesc *fdp, int fd, seqc_t seqc) } #endif +int proc_nfiles(struct proc *p); + /* cdir/rdir/jdir manipulation functions. */ struct pwddesc *pdcopy(struct pwddesc *pdp); void pdescfree(struct thread *td); From nobody Fri Sep 27 15:03:27 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 4XFYcv3v31z5Y5rD; Fri, 27 Sep 2024 15:03:27 +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 4XFYcv2PSVz58y2; Fri, 27 Sep 2024 15:03:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449407; 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=7TewG2kAFuzA6KZH+5oM2Q6EzSwr4NKlprxZDTQkfQQ=; b=XbzR6R5KaQ+gw68jjwZj/eAvNL/k0u8GnBvuhTYY6h7pLO8lfqaJuwEeCIQ4q07vzELouc r8a3fL50NlYlLQ4cU4VZkx8hscmkEwnNLzdnbp12LMJ7TTtagOH1lwjJsGX+GJuj6OinZy L3Ym+QHXoOpj8x5LuetqR9kvDVszdBCW02Y/McXy4poLg2aqcA8QWtzKapMbflDUmzaGGn ZB+Lx82qIkjg981H/Di/4UTU2J9Otrh991JYtZo9i6UdvY6Xbaz4cmW3NoXpP+elMmrZbf ft6kOvUed0PEq8VgxmZMtSTpVGCCrTtZ1kilALmel+NULnsFQbUyLtA7l9aCPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449407; 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=7TewG2kAFuzA6KZH+5oM2Q6EzSwr4NKlprxZDTQkfQQ=; b=v58AOv4x02gqRjg8MvT5qWhIfjU5SAuv1hKaYweqfIXt+FXb+vmko0WB7eKRzCQ2bc5oJj Ul5bDpPevVWsWe+w1Qx8wlyN9BEoPEPV1XcR47WRsFCbF26bDI21sZyqH4/JI50Mi20+mt P25ZO65LRXcq852lVh+ceSqG+IuIpafoioXnitdUfdVcR85bKNKo/Lx4430d0NlASwYLZj PfyiTqIIO6ZSxhPFSYj9VXRnHn9KKkTMveX5FhY8okQ+TiP5nvOzwXOYVhjaqGbg8GMgNx /E+iwyK1NxR6heKHLERwO7DVt3mOcScKoOy6SPGJvX/vzZqtSxXtTwuRQqYFtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727449407; a=rsa-sha256; cv=none; b=WYmeBgBYQx7RACVWerpS5sX8NI6EWkiV4tUo+xL6zU+91ST6pRhUrHcZQDVsUorM/yZXcB no1Cbp4kyWD/5bnKuzZaxtAQNKtyV4Xmc4/RhNTH3wBtQ2fKKkBRynRDBAjotdjjHNFZdA EDx26t2wdU5lU+oK57wKf/WnKSAVOblBfqnTmvETMB0TBEfS9jIKrJfdkae1eTm2V+WOKs gXpOFvRZMxtmwzr1mx78XKMxlbONPEx53lEQfKIJFfzkpmh6JL3SbTxZtf9FFq7aLqbeN4 b65qu5jCIxKMZg8qkKv4yYclmRZCoV8qmNAB8pme5CuC8VK25+rVkBxeW6+gJA== 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 4XFYcv1hXFzl68; Fri, 27 Sep 2024 15:03:27 +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 48RF3Rh1009134; Fri, 27 Sep 2024 15:03:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RF3R1l009131; Fri, 27 Sep 2024 15:03:27 GMT (envelope-from git) Date: Fri, 27 Sep 2024 15:03:27 GMT Message-Id: <202409271503.48RF3R1l009131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f028f44ef3cb - main - Add getrlimitusage(2) 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f028f44ef3cb10aafadf8b9f29954ed58bd88c70 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f028f44ef3cb10aafadf8b9f29954ed58bd88c70 commit f028f44ef3cb10aafadf8b9f29954ed58bd88c70 Author: Konstantin Belousov AuthorDate: 2024-09-20 15:18:38 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 15:02:04 +0000 Add getrlimitusage(2) Reviewed by: markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46747 --- sys/kern/kern_resource.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++ sys/kern/syscalls.master | 7 +++ sys/sys/resource.h | 3 ++ 3 files changed, 125 insertions(+) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 58723289af21..db5cce833012 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -60,6 +61,7 @@ #include #include #include +#include static MALLOC_DEFINE(M_PLIMIT, "plimit", "plimit structures"); static MALLOC_DEFINE(M_UIDINFO, "uidinfo", "uidinfo structures"); @@ -804,6 +806,119 @@ sys_getrlimit(struct thread *td, struct getrlimit_args *uap) return (error); } +static int +getrlimitusage_one(struct proc *p, u_int which, int flags, rlim_t *res) +{ + struct thread *td; + struct uidinfo *ui; + struct vmspace *vm; + uid_t uid; + int error; + + error = 0; + PROC_LOCK(p); + uid = (flags & GETRLIMITUSAGE_EUID) == 0 ? p->p_ucred->cr_ruid : + p->p_ucred->cr_uid; + PROC_UNLOCK(p); + + ui = uifind(uid); + vm = vmspace_acquire_ref(p); + + switch (which) { + case RLIMIT_CPU: + PROC_LOCK(p); + PROC_STATLOCK(p); + FOREACH_THREAD_IN_PROC(p, td) + ruxagg(p, td); + *res = p->p_rux.rux_runtime; + PROC_STATUNLOCK(p); + PROC_UNLOCK(p); + *res /= cpu_tickrate(); + break; + case RLIMIT_FSIZE: + error = ENXIO; + break; + case RLIMIT_DATA: + if (vm == NULL) + error = ENXIO; + else + *res = vm->vm_dsize * PAGE_SIZE; + break; + case RLIMIT_STACK: + if (vm == NULL) + error = ENXIO; + else + *res = vm->vm_ssize * PAGE_SIZE; + break; + case RLIMIT_CORE: + error = ENXIO; + break; + case RLIMIT_RSS: + if (vm == NULL) + error = ENXIO; + else + *res = vmspace_resident_count(vm) * PAGE_SIZE; + break; + case RLIMIT_MEMLOCK: + if (vm == NULL) + error = ENXIO; + else + *res = pmap_wired_count(vmspace_pmap(vm)) * PAGE_SIZE; + break; + case RLIMIT_NPROC: + *res = ui->ui_proccnt; + break; + case RLIMIT_NOFILE: + *res = proc_nfiles(p); + break; + case RLIMIT_SBSIZE: + *res = ui->ui_sbsize; + break; + case RLIMIT_VMEM: + if (vm == NULL) + error = ENXIO; + else + *res = vm->vm_map.size; + break; + case RLIMIT_NPTS: + *res = ui->ui_ptscnt; + break; + case RLIMIT_SWAP: + *res = ui->ui_vmsize; + break; + case RLIMIT_KQUEUES: + *res = ui->ui_kqcnt; + break; + case RLIMIT_UMTXP: + *res = ui->ui_umtxcnt; + break; + case RLIMIT_PIPEBUF: + *res = ui->ui_pipecnt; + break; + default: + error = EINVAL; + break; + } + + vmspace_free(vm); + uifree(ui); + return (error); +} + +int +sys_getrlimitusage(struct thread *td, struct getrlimitusage_args *uap) +{ + rlim_t res; + int error; + + if ((uap->flags & ~(GETRLIMITUSAGE_EUID)) != 0) + return (EINVAL); + error = getrlimitusage_one(curproc, uap->which, uap->flags, &res); + if (error == 0) + error = copyout(&res, uap->res, sizeof(res)); + return (error); +} + /* * Transform the running time and tick information for children of proc p * into user and system time usage. diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index fac1c2e1e96f..849e5ee2f13b 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -3333,5 +3333,12 @@ uintptr_t idx2 ); } +589 AUE_NULL STD|CAPENABLED { + int getrlimitusage( + u_int which, + int flags, + _Out_ rlim_t *res + ); + } ; vim: syntax=off diff --git a/sys/sys/resource.h b/sys/sys/resource.h index 81346028f1ed..d2803cccf380 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -171,6 +171,9 @@ struct loadavg { #define CP_IDLE 4 #define CPUSTATES 5 +/* getrlimitusage flags */ +#define GETRLIMITUSAGE_EUID 0x0001 + #endif /* __BSD_VISIBLE */ #ifdef _KERNEL From nobody Fri Sep 27 15:03:28 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 4XFYcw5k4pz5Y62d; Fri, 27 Sep 2024 15:03:28 +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 4XFYcw35L5z58yD; Fri, 27 Sep 2024 15:03:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449408; 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=55+ohgQj7GIRiUJfht5TVhRaEx9zcGmcm5F1xxtp0II=; b=bWF9qS0i4sCxS615uFjVdYrjm0sUEQnkCeZxIiVbEBzKVcxHaUjz9ZFp6yIwzRvLqhsstj 4EJeY+jFc71PcMV6XFkmKL8JPLHG6WnL+ifpGqOJuZUZW/QXfGmlo+4qOelm3lVcO/Occ2 nesZK3yNJgyPlHqru5osWgdXdl+7EBM+Sq/W0RLHoeK1Iavz0mPyT+74QG1PbViKGYz247 6ibAMX3uJYLkvSwcfL+5CL+CZKZm+iz9otbndITcgyzcizNQlpZo83+vHVN8xLGYPq4mjf IXJA1gTFGZjPnxLDmsJl75sXM4lFzAoGEAqc16C7l6JqHCiIEodG3t+2yy4LaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449408; 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=55+ohgQj7GIRiUJfht5TVhRaEx9zcGmcm5F1xxtp0II=; b=ruhqZpybMrqzWhzx46oxKwzsu0T7dXOUTCI+p4Wh7tT2FL6nXlUeccblX0NegjnvHbyprx SceYvX896EeCd3kM2a2UvUvl8zDLB70Le1LSHiovxDpR01sg53sLjchZRlJdnQ5DR/9iY/ 0FN/Kc+3bf0Z+P5ion3NNCqD5bNROkDa+DAr0jWVr8/H7yB3G/ydVP9+80IF4fzGwL6RAh KwXwuN39QmY3Lz2Bp78gjDP6NS8sK87xz+0Fvw8nkgneFmemWJMVHRj32Oijqrkq2ygPIY rsh9KkUHeVVuNvAlXEmuJdX/zeENwdQz7p5HFom3SgZPFIsmB30aqXK0dAZLMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727449408; a=rsa-sha256; cv=none; b=BLG9/wKKRFWCpmJm8+63dvR7G4gNVeXD4ofHe7FvzjaRgM+WiKW2kvurmRxzf4LqozmzKy 0KACHg2G/DioPqxxXwndAwAPuAyex3PTM+WtG+Cc2ksJlzJ92+rLqJmi9btbjqdxTDmvIg asLahVaU880dDkquJ1SRTZ8z2zD8eSma0xLa5KOEZXEsWuACFwNb/CgbbPWEfQ1ByGCdGq JlQ/A0HdaFOFql4L0gNTopR7i7ny9X6XHp19A8VmH+2hxyN5kOoK3Uxy9C5x16TFggBKk8 8Z8TN2LddqTamqkbDAuiWJVwNXBWtCguTson9YZoWMSqykx7YfqzjRhVbQrgnw== 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 4XFYcw2gBfzlrM; Fri, 27 Sep 2024 15:03:28 +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 48RF3SPe009176; Fri, 27 Sep 2024 15:03:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RF3Svj009173; Fri, 27 Sep 2024 15:03:28 GMT (envelope-from git) Date: Fri, 27 Sep 2024 15:03:28 GMT Message-Id: <202409271503.48RF3Svj009173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9b29fc89ae20 - main - Userspace enablement for getrlimitusage(2) 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b29fc89ae20a22516f54e146bfdfa0cfcd60b8b Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9b29fc89ae20a22516f54e146bfdfa0cfcd60b8b commit 9b29fc89ae20a22516f54e146bfdfa0cfcd60b8b Author: Konstantin Belousov AuthorDate: 2024-09-20 15:22:57 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 15:02:09 +0000 Userspace enablement for getrlimitusage(2) Reviewed by: markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46747 --- lib/libsys/Symbol.sys.map | 1 + sys/sys/resource.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map index 7f70e03a5c25..5a4e66baf3c4 100644 --- a/lib/libsys/Symbol.sys.map +++ b/lib/libsys/Symbol.sys.map @@ -379,6 +379,7 @@ FBSD_1.7 { }; FBSD_1.8 { + getrlimitusage; kcmp; }; diff --git a/sys/sys/resource.h b/sys/sys/resource.h index d2803cccf380..2725aa1ef646 100644 --- a/sys/sys/resource.h +++ b/sys/sys/resource.h @@ -190,6 +190,9 @@ int getrlimit(int, struct rlimit *); int getrusage(int, struct rusage *); int setpriority(int, int, int); int setrlimit(int, const struct rlimit *); +#if __BSD_VISIBLE +int getrlimitusage(unsigned which, int flags, rlim_t *res); +#endif __END_DECLS #endif /* _KERNEL */ From nobody Fri Sep 27 15:03:29 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 4XFYcx70V3z5Y60q; Fri, 27 Sep 2024 15:03:29 +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 4XFYcx3qPxz58bs; Fri, 27 Sep 2024 15:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449409; 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=B4V/l2B0uWaryGF1h/xL3rx7IFExZcIMDCToPjqu2Zo=; b=yPTIRDRaJ5stRLMwrSFNhaBZb6s8j4bo9j4Hv1e+98Oya26K/FztS1F3auESx39vBr+/sC klUfZ3Z0zHJE/BQHckTxwxh9c5I5Q2ElHXB+a7GjmgdakGUUYNipFqU/3lNQlLhnfuYlt6 PjPL1SzaggFkQKKA80FcLdgLb5yS8PH6uD0ga5Z789q96lmRaowqzcpsNxWJRHy6CRB0Md UA/xZXVCkt9xYuDRVwEhXMSQcSKbR15zalOg2PVA5VcDiVqf0AT8hvcosRAlwZgE00Tslm xo9jrqB2BBYW3tjdAyFErKTkvIbBvtP1zWsR+GsXZzQuem4U8PCuObWez8ApSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449409; 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=B4V/l2B0uWaryGF1h/xL3rx7IFExZcIMDCToPjqu2Zo=; b=jfacjcS2I42ozPatQJbwLM4RcWZuaXxmuFLQt/3XUl+x58/il8pPXkja32Ekg0G+TgKFbO 7mVZLqQsS8cle+2VNj2SJTeX8wkz3plXsJDianJpXOif4nE99PSshVNElLOsZ3//u/rrnS YRJs6VMW9bs5qsB7vc0Ym2AEvk0l58wNyAAoqwoG3JNVhDDOLAwmW3YwkMqNUiqp85Eje6 PXscr+H2sU/7ud/8A8s9+aUflZEOO0SsiCu5JqvVuAH2oXQ6dlrfX7dmun8TgPo02hW0ts 0efxSM2c+8D7n4UKUh9z9Fe5yf/NGHUv5S/h1L4DP7vFjpfnPSg2CPVbXdnIRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727449409; a=rsa-sha256; cv=none; b=ly8sJ7YYpRRjIA/5I+0en2JvAQwLm+jApL9kDqG/C47hRlHlS0F8mNGrxGyblfaODExZ1Z jYknzn+afKklZ9e+U41hXNZuOvx8JxlLwoDb4vdfkelYARRALz83dVS+YtFPiJEiD4yDYH PDZEiPTbVCses2L1MuVKBQ9Dk4zvHjhs6y3E6Syv2TOnIEDQnNdsgFt1fJEbkjWk7TXZbi aVAB6o3gk3vjYk7Al09meoj80D1KOlk74CEUKbxkSOXnQ9L81YkWr2gwFZ0a36W+Sa6iLp WIV4LUjv4Ouq50NLhz5sl2eVKDtSBDRSUmOVypinh3LQMwQoUItYi2n4X2GhUA== 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 4XFYcx3RZwzlWx; Fri, 27 Sep 2024 15:03:29 +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 48RF3T8I009206; Fri, 27 Sep 2024 15:03:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RF3T45009203; Fri, 27 Sep 2024 15:03:29 GMT (envelope-from git) Date: Fri, 27 Sep 2024 15:03:29 GMT Message-Id: <202409271503.48RF3T45009203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 927f379180cd - main - Regen 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 927f379180cd2f3d3460d2f3506d0059ea1c6cf8 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=927f379180cd2f3d3460d2f3506d0059ea1c6cf8 commit 927f379180cd2f3d3460d2f3506d0059ea1c6cf8 Author: Konstantin Belousov AuthorDate: 2024-09-20 15:21:06 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 15:02:23 +0000 Regen --- lib/libsys/_libsys.h | 2 ++ lib/libsys/syscalls.map | 2 ++ sys/compat/freebsd32/freebsd32_syscall.h | 3 ++- sys/compat/freebsd32/freebsd32_syscalls.c | 1 + sys/compat/freebsd32/freebsd32_sysent.c | 1 + sys/compat/freebsd32/freebsd32_systrace_args.c | 30 ++++++++++++++++++++++++++ sys/kern/init_sysent.c | 1 + sys/kern/syscalls.c | 1 + sys/kern/systrace_args.c | 30 ++++++++++++++++++++++++++ sys/sys/syscall.h | 3 ++- sys/sys/syscall.mk | 3 ++- sys/sys/sysproto.h | 7 ++++++ 12 files changed, 81 insertions(+), 3 deletions(-) diff --git a/lib/libsys/_libsys.h b/lib/libsys/_libsys.h index d4cd14ceb75f..4565740a25bc 100644 --- a/lib/libsys/_libsys.h +++ b/lib/libsys/_libsys.h @@ -461,6 +461,7 @@ typedef int (__sys_timerfd_create_t)(int, int); typedef int (__sys_timerfd_gettime_t)(int, struct itimerspec *); typedef int (__sys_timerfd_settime_t)(int, int, const struct itimerspec *, struct itimerspec *); typedef int (__sys_kcmp_t)(pid_t, pid_t, int, uintptr_t, uintptr_t); +typedef int (__sys_getrlimitusage_t)(u_int, int, rlim_t *); void __sys_exit(int rval); int __sys_fork(void); @@ -860,6 +861,7 @@ int __sys_timerfd_create(int clockid, int flags); int __sys_timerfd_gettime(int fd, struct itimerspec * curr_value); int __sys_timerfd_settime(int fd, int flags, const struct itimerspec * new_value, struct itimerspec * old_value); int __sys_kcmp(pid_t pid1, pid_t pid2, int type, uintptr_t idx1, uintptr_t idx2); +int __sys_getrlimitusage(u_int which, int flags, rlim_t * res); __END_DECLS #endif /* __LIBSYS_H_ */ diff --git a/lib/libsys/syscalls.map b/lib/libsys/syscalls.map index eeb75dc28a2c..3d952c691afd 100644 --- a/lib/libsys/syscalls.map +++ b/lib/libsys/syscalls.map @@ -801,4 +801,6 @@ FBSDprivate_1.0 { __sys_timerfd_settime; _kcmp; __sys_kcmp; + _getrlimitusage; + __sys_getrlimitusage; }; diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 662947c330d4..b3c5c46bd586 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -507,4 +507,5 @@ #define FREEBSD32_SYS_freebsd32_timerfd_gettime 586 #define FREEBSD32_SYS_freebsd32_timerfd_settime 587 #define FREEBSD32_SYS_kcmp 588 -#define FREEBSD32_SYS_MAXSYSCALL 589 +#define FREEBSD32_SYS_getrlimitusage 589 +#define FREEBSD32_SYS_MAXSYSCALL 590 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index b4c41fdbbc12..264a1f17db3b 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -594,4 +594,5 @@ const char *freebsd32_syscallnames[] = { "freebsd32_timerfd_gettime", /* 586 = freebsd32_timerfd_gettime */ "freebsd32_timerfd_settime", /* 587 = freebsd32_timerfd_settime */ "kcmp", /* 588 = kcmp */ + "getrlimitusage", /* 589 = getrlimitusage */ }; diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index b8df64206611..c8ddecc7f131 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -650,4 +650,5 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(freebsd32_timerfd_gettime_args), .sy_call = (sy_call_t *)freebsd32_timerfd_gettime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 586 = freebsd32_timerfd_gettime */ { .sy_narg = AS(freebsd32_timerfd_settime_args), .sy_call = (sy_call_t *)freebsd32_timerfd_settime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 587 = freebsd32_timerfd_settime */ { .sy_narg = AS(kcmp_args), .sy_call = (sy_call_t *)sys_kcmp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 588 = kcmp */ + { .sy_narg = AS(getrlimitusage_args), .sy_call = (sy_call_t *)sys_getrlimitusage, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 589 = getrlimitusage */ }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index ff62adce85b9..9992242dba25 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -3368,6 +3368,15 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 5; break; } + /* getrlimitusage */ + case 589: { + struct getrlimitusage_args *p = params; + uarg[a++] = p->which; /* u_int */ + iarg[a++] = p->flags; /* int */ + uarg[a++] = (intptr_t)p->res; /* rlim_t * */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -9100,6 +9109,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* getrlimitusage */ + case 589: + switch (ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "userland rlim_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -10983,6 +11008,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* getrlimitusage */ + case 589: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index e066b04b4f6e..147b26daa4e6 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -649,4 +649,5 @@ struct sysent sysent[] = { { .sy_narg = AS(timerfd_gettime_args), .sy_call = (sy_call_t *)sys_timerfd_gettime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 586 = timerfd_gettime */ { .sy_narg = AS(timerfd_settime_args), .sy_call = (sy_call_t *)sys_timerfd_settime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 587 = timerfd_settime */ { .sy_narg = AS(kcmp_args), .sy_call = (sy_call_t *)sys_kcmp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 588 = kcmp */ + { .sy_narg = AS(getrlimitusage_args), .sy_call = (sy_call_t *)sys_getrlimitusage, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 589 = getrlimitusage */ }; diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index 0e6e3a3dd1f1..a2af13617dee 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -594,4 +594,5 @@ const char *syscallnames[] = { "timerfd_gettime", /* 586 = timerfd_gettime */ "timerfd_settime", /* 587 = timerfd_settime */ "kcmp", /* 588 = kcmp */ + "getrlimitusage", /* 589 = getrlimitusage */ }; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index e7231bf8570e..2454a8b5137b 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -3455,6 +3455,15 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 5; break; } + /* getrlimitusage */ + case 589: { + struct getrlimitusage_args *p = params; + uarg[a++] = p->which; /* u_int */ + iarg[a++] = p->flags; /* int */ + uarg[a++] = (intptr_t)p->res; /* rlim_t * */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -9245,6 +9254,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* getrlimitusage */ + case 589: + switch (ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "userland rlim_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -11218,6 +11243,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* getrlimitusage */ + case 589: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 1fa5878c6ff6..2a200f12f3c1 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -525,4 +525,5 @@ #define SYS_timerfd_gettime 586 #define SYS_timerfd_settime 587 #define SYS_kcmp 588 -#define SYS_MAXSYSCALL 589 +#define SYS_getrlimitusage 589 +#define SYS_MAXSYSCALL 590 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 31e698ea2beb..6c8830042045 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -428,4 +428,5 @@ MIASM = \ timerfd_create.o \ timerfd_gettime.o \ timerfd_settime.o \ - kcmp.o + kcmp.o \ + getrlimitusage.o diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index c86c5d1eb212..26817db8d755 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -1877,6 +1877,11 @@ struct kcmp_args { char idx1_l_[PADL_(uintptr_t)]; uintptr_t idx1; char idx1_r_[PADR_(uintptr_t)]; char idx2_l_[PADL_(uintptr_t)]; uintptr_t idx2; char idx2_r_[PADR_(uintptr_t)]; }; +struct getrlimitusage_args { + char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; + char res_l_[PADL_(rlim_t *)]; rlim_t * res; char res_r_[PADR_(rlim_t *)]; +}; int sys_exit(struct thread *, struct exit_args *); int sys_fork(struct thread *, struct fork_args *); int sys_read(struct thread *, struct read_args *); @@ -2276,6 +2281,7 @@ int sys_timerfd_create(struct thread *, struct timerfd_create_args *); int sys_timerfd_gettime(struct thread *, struct timerfd_gettime_args *); int sys_timerfd_settime(struct thread *, struct timerfd_settime_args *); int sys_kcmp(struct thread *, struct kcmp_args *); +int sys_getrlimitusage(struct thread *, struct getrlimitusage_args *); #ifdef COMPAT_43 @@ -3255,6 +3261,7 @@ int freebsd13_swapoff(struct thread *, struct freebsd13_swapoff_args *); #define SYS_AUE_timerfd_gettime AUE_TIMERFD #define SYS_AUE_timerfd_settime AUE_TIMERFD #define SYS_AUE_kcmp AUE_NULL +#define SYS_AUE_getrlimitusage AUE_NULL #undef PAD_ #undef PADL_ From nobody Fri Sep 27 15:03:30 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 4XFYcz0c29z5Y6DS; Fri, 27 Sep 2024 15:03:31 +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 4XFYcy52f3z58fK; Fri, 27 Sep 2024 15:03:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449410; 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=eRLqVwoP4dHTYrz5e/nK8ud3whTnrkSAiPomW6ZTTcs=; b=NxjZYtajUI1dNI3qoy7Tw+Mb0FPvMSJ6jusRTM/O73HU65B6a6GCn+W6GHb+6LEgg45VX2 xj4koY5TbGjdtqTH2JHXaVAAS0ldb+ppObaJRv84LMJFY0NgNc9mkOMdJaSQuJodInaM/5 xXDYzuhCslNRo9ksf9dXCWlsCaEytnIERAMQ1gCsj5q9FxbHaP8vYj8yZ8LQ0T9TW4tQNw J4EaK5Ttwjrt7P/uWIpDB2xS889dYHnaJyqYNFzrM0vhaGqRJV1y4Y1PLkiTf/wFOho09A MpyyLh2ix7uVuYhiyb7XEaZ8FBt/C3BnoIy0E8zUVmmto5btqoTZZHPl38Ryhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449410; 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=eRLqVwoP4dHTYrz5e/nK8ud3whTnrkSAiPomW6ZTTcs=; b=oabj8WViRJBjIbAOlJ8FoLKaXIexxlvevGNNSzk0DiYApFk2iRQiIAS5KJl9XYK5AbZU/W Q6xU4YaUIeYDp0pgjZKIi7kBK6xK2KUVaFIf78Nw8Oitq0JtSRv7UiI1tsK6hMNUUus73G MsxUz4izn/OT22Zuki13D59lTUbxBBDfZ0aPU1ayKf7SSDe62jzCYgKmcjwp+VCsDpCREs YiaBKSiQU6ku3G7i9ZyAAY+BTI7c6tPUAZraICz9VBYZrtIXNfsb7+qjPMJx1Ws0ejynYl yaKgKdrewEJep9OIMROInY100lmuexiFjDy4OQNuretudGNOUSCvYI6wJdjibQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727449410; a=rsa-sha256; cv=none; b=ExcWJxjCI2HaXOSlk3XBkvlzn8HTz2dxzW2th2ify4YQdvcSBGMgqvTlufSXxJxLzAaIp/ ne02xtb8nU3WAloJp1DhHvPcx8WOngJrcUyv9dZ21Cu/uggkmacI9Hwdh8mM/nAPAXBquD ZrEgjFSHxyU18PrX1hgaKZzsmuAE0qIeahQoXGmnwVJ2GYm4Pl9r9RYCcBmFZBVRnnlbxx NLKfq0TtSK2pnDfrxQ464NwxHO8EKsofhscj9shfRkV2r8eCh1H1lcdoB5cM1XLrKczdqI /6KznM4bZKlr9Of+2UF6lJSInugnvbReWPqX/LdIjtAKHnHlkj34OSMjHXZ2ZQ== 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 4XFYcy4Tstzlqr; Fri, 27 Sep 2024 15:03:30 +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 48RF3UO6009246; Fri, 27 Sep 2024 15:03:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RF3UjC009243; Fri, 27 Sep 2024 15:03:30 GMT (envelope-from git) Date: Fri, 27 Sep 2024 15:03:30 GMT Message-Id: <202409271503.48RF3UjC009243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c85d3064c454 - main - sysctl: add KERN_PROC_RLIMIT_USAGE 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c85d3064c454bde9f1c0cfbb6f42c0ac9fa229e9 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c85d3064c454bde9f1c0cfbb6f42c0ac9fa229e9 commit c85d3064c454bde9f1c0cfbb6f42c0ac9fa229e9 Author: Konstantin Belousov AuthorDate: 2024-09-22 17:01:56 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 15:02:23 +0000 sysctl: add KERN_PROC_RLIMIT_USAGE Reviewed by: markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46747 --- sys/kern/kern_resource.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/sysctl.h | 1 + 2 files changed, 51 insertions(+) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index db5cce833012..c8b01afeab4f 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -1741,3 +1741,53 @@ chgpipecnt(struct uidinfo *uip, int diff, rlim_t max) return (chglimit(uip, &uip->ui_pipecnt, diff, max, "pipecnt")); } + +static int +sysctl_kern_proc_rlimit_usage(SYSCTL_HANDLER_ARGS) +{ + rlim_t resval[RLIM_NLIMITS]; + struct proc *p; + size_t len; + int error, *name, i; + + name = (int *)arg1; + if ((u_int)arg2 != 1 && (u_int)arg2 != 2) + return (EINVAL); + if (req->newptr != NULL) + return (EINVAL); + + error = pget((pid_t)name[0], PGET_WANTREAD, &p); + if (error != 0) + return (error); + + if ((u_int)arg2 == 1) { + len = sizeof(resval); + memset(resval, 0, sizeof(resval)); + for (i = 0; i < RLIM_NLIMITS; i++) { + error = getrlimitusage_one(p, (unsigned)i, 0, + &resval[i]); + if (error == ENXIO) { + resval[i] = -1; + error = 0; + } else if (error != 0) { + break; + } + } + } else { + len = sizeof(resval[0]); + error = getrlimitusage_one(p, (unsigned)name[1], 0, + &resval[0]); + if (error == ENXIO) { + resval[0] = -1; + error = 0; + } + } + if (error == 0) + error = SYSCTL_OUT(req, resval, len); + PRELE(p); + return (error); +} +static SYSCTL_NODE(_kern_proc, KERN_PROC_RLIMIT_USAGE, rlimit_usage, + CTLFLAG_RD | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE, + sysctl_kern_proc_rlimit_usage, + "Process limited resources usage info"); diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 66c6ff1640b7..f7abc27083aa 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -1040,6 +1040,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define KERN_PROC_NFDS 43 /* number of open file descriptors */ #define KERN_PROC_SIGFASTBLK 44 /* address of fastsigblk magic word */ #define KERN_PROC_VM_LAYOUT 45 /* virtual address space layout info */ +#define KERN_PROC_RLIMIT_USAGE 46 /* array of rlim_t */ /* * KERN_IPC identifiers From nobody Fri Sep 27 15:03: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 4XFYcz6yJJz5Y5rK; Fri, 27 Sep 2024 15:03:31 +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 4XFYcz5W4Pz5966; Fri, 27 Sep 2024 15:03:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449411; 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=Vbe4QCsYOcq8xMgWtiqtL45ny3ofo5b9Ta1i3Fdn6kc=; b=UtoQ26rMrR32xs7NWhcT+jOrAE8wxuLz9lwk23BXldOX+rA2lNWcEVdBh1Afr5+jwD99tH pXE27r7jQ332nzy+fp/93C5eOshcQwGkZBULHMpdQgw+YFMeCo0jrUYP1ZoQYEC5f4pD/a X//j682r/bBawOT/u6XOaaMGQSQe9acZogowCLFc7X6XznwztMDxZXio40L7eMnUyZTTca CSA1HrNdNnS+3wYVWruAWmhdArfKaxuVLS1o0a0RmScr5oPnhRJOcSuPvowqUkGsxIMHVJ r1xr+BIYOe0AS+ZPA0Jq3yChYyZdEWL+9D7Tw28qsYLuTDpaCXEln2+Ujy2d6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449411; 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=Vbe4QCsYOcq8xMgWtiqtL45ny3ofo5b9Ta1i3Fdn6kc=; b=e5BnWIFfo3xRnT4s1a2u1AevbC2ZJRe+kimPlf3H9SWnuUkTrkUmrkPv/zeXQKXNjy8tmv SyXeYBa8T/P4PR2EasnEbWP6AhskPN6HUxhvawqABwVkQoFtb1FZXYA5zU26P6zjzWrNu2 2PRhI9dfEG09NgWTlQwtYc1tOUah0uW52xNiVOr/VB9psORz3oeOwAnObjIwbnng/rD63g Xd7Z3re4SNPCZmPOtiXwV64IIuqsd9Py+wU3+JurMXmGZDirxYmei6PDBT0Mg006ti1IkP +Ev6VSnyDa7xFSMu6V5rdnFLOejNYEpiEsGMbqj8/wMN25x/DOLtO9q5kgxi3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727449411; a=rsa-sha256; cv=none; b=T1j1THHOk1zonI8ras1vSM+dOJqurlmXWNPKFWLvvGPozexc9rpYMjqN7NmtBD0Kc+b7pE zSS/y3fd7Emnk1Ez2/oaKs+Md2yZRVxf3n3sBNj1N9u586P4RNpEGWKifDZW4nJD2soygU Lc6kbmFzafgHXeIlKN7GgwdO5UMNjkScW55U1qqd7qM3xAMKlGoV2gSe8WY1NFSXH1bHDb M22LSuQ464SAcc80tZOdVBktdz0RWaopPffUvgtSwQ/Bt+Aesq2phRINe8nZZFaBGCWFwI 5e3f2hmTJsTtm6382J4MNFPIxk3vVcj0x1O1pLfxgqzhcXutuyQ/R+e+eih9xw== 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 4XFYcz579SzlWy; Fri, 27 Sep 2024 15:03:31 +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 48RF3VTV009287; Fri, 27 Sep 2024 15:03:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RF3VIY009284; Fri, 27 Sep 2024 15:03:31 GMT (envelope-from git) Date: Fri, 27 Sep 2024 15:03:31 GMT Message-Id: <202409271503.48RF3VIY009284@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6126f4ea646a - main - libprocstat: add procstat_getrlimitusage() 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6126f4ea646a3c19647c3efdcf672641cff6954b Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6126f4ea646a3c19647c3efdcf672641cff6954b commit 6126f4ea646a3c19647c3efdcf672641cff6954b Author: Konstantin Belousov AuthorDate: 2024-09-22 17:19:00 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 15:02:29 +0000 libprocstat: add procstat_getrlimitusage() Reviewed by: markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46747 --- lib/libprocstat/Symbol.map | 5 ++++ lib/libprocstat/libprocstat.c | 53 +++++++++++++++++++++++++++++++++++++++++++ lib/libprocstat/libprocstat.h | 3 +++ 3 files changed, 61 insertions(+) diff --git a/lib/libprocstat/Symbol.map b/lib/libprocstat/Symbol.map index 4c8a0c7edefb..c2ea7e95312c 100644 --- a/lib/libprocstat/Symbol.map +++ b/lib/libprocstat/Symbol.map @@ -47,4 +47,9 @@ FBSD_1.6 { FBSD_1.7 { procstat_getadvlock; procstat_freeadvlock; +}; + +FBSD_1.8 { + procstat_getrlimitusage; + procstat_freerlimitusage; }; \ No newline at end of file diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 0c7d28540e43..b808085f5eed 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2763,3 +2763,56 @@ procstat_freeadvlock(struct procstat *procstat __unused, free(lst); } +static rlim_t * +procstat_getrlimitusage_sysctl(pid_t pid, unsigned *cntp) +{ + int error, name[4]; + rlim_t *val; + size_t len; + + name[0] = CTL_KERN; + name[1] = KERN_PROC; + name[2] = KERN_PROC_RLIMIT_USAGE; + name[3] = pid; + + len = 0; + error = sysctl(name, nitems(name), NULL, &len, NULL, 0); + if (error == -1) + return (NULL); + val = malloc(len); + if (val == NULL) + return (NULL); + + error = sysctl(name, nitems(name), val, &len, NULL, 0); + if (error == -1) { + free(val); + return (NULL); + } + *cntp = len / sizeof(rlim_t); + return (val); +} + +rlim_t * +procstat_getrlimitusage(struct procstat *procstat, struct kinfo_proc *kp, + unsigned int *cntp) +{ + switch (procstat->type) { + case PROCSTAT_KVM: + warnx("kvm method is not supported"); + return (NULL); + case PROCSTAT_SYSCTL: + return (procstat_getrlimitusage_sysctl(kp->ki_pid, cntp)); + case PROCSTAT_CORE: + warnx("core method is not supported"); + return (NULL); + default: + warnx("unknown access method: %d", procstat->type); + return (NULL); + } +} + +void +procstat_freerlimitusage(struct procstat *procstat __unused, rlim_t *resusage) +{ + free(resusage); +} diff --git a/lib/libprocstat/libprocstat.h b/lib/libprocstat/libprocstat.h index 4aba1610a05f..81a3ac05393d 100644 --- a/lib/libprocstat/libprocstat.h +++ b/lib/libprocstat/libprocstat.h @@ -211,6 +211,7 @@ void procstat_freefiles(struct procstat *procstat, struct filestat_list *head); void procstat_freeptlwpinfo(struct procstat *procstat, struct ptrace_lwpinfo *pl); +void procstat_freerlimitusage(struct procstat *procstat, rlim_t *resusage); void procstat_freevmmap(struct procstat *procstat, struct kinfo_vmentry *vmmap); struct advlock_list *procstat_getadvlock(struct procstat *procstat); @@ -250,6 +251,8 @@ int procstat_getpathname(struct procstat *procstat, struct kinfo_proc *kp, char *pathname, size_t maxlen); int procstat_getrlimit(struct procstat *procstat, struct kinfo_proc *kp, int which, struct rlimit* rlimit); +rlim_t *procstat_getrlimitusage(struct procstat *procstat, + struct kinfo_proc *kp, unsigned int *cntp); int procstat_getumask(struct procstat *procstat, struct kinfo_proc *kp, unsigned short* umask); struct kinfo_vmentry *procstat_getvmmap(struct procstat *procstat, From nobody Fri Sep 27 15:03:32 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 4XFYd11pWFz5Y5wn; Fri, 27 Sep 2024 15:03:33 +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 4XFYd06cTVz594F; Fri, 27 Sep 2024 15:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449412; 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=vDuX/ZLYcEOoxiVvJUL5SwxJRlFU/i2EYFodMtbspUI=; b=xoEWDhVReQ+SYnQTcFBjxxtb9aMjTOWdGuZKD/aSr71ak+r4OADKSiOGm2LOY2fU3pB6Zr M24tatOMHqnMztOgM6VIZ+BPW1oIx9lZ96PXvs/B1sdrW4OUwnxdeZaGlU5MVaQDPk9x2c kQYTdSmWcUcjXMWaAAKBeKu8JtgyJs2f1q6vQfggteeuf8fw7pZjuBoEih+I7+9dZgaTaV +nyVr5C6HYE+/lj6QM6lkTGOYXXyKEazZ02j7yRWsoSK/vvPg7A50fdF0OMe1pC8CHs0Yw f3DMD8ynmruV3lE6qCmWatOOF4Dv6L6SR9Vn0yqKFjo7FVAClNgT1ckC5S8WIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727449412; 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=vDuX/ZLYcEOoxiVvJUL5SwxJRlFU/i2EYFodMtbspUI=; b=XrUGxixBJtLaxBIg433i6TzN0M5xlvEjB9TzZQX1SKeZ9muWkC0C84EPEGHo9LlGIT2hYH ivLbGW//U3mw5dQVApa5hSpdwgmQOcJrvAknxpOUHEbqJJ5wt11aPDMOWvvI/Z1Hs15ejn aQtcU3b1V+eMqSB1C2r/ASBzax+VfnzpuKkpDpTKaYF8pd29nVtJV4uHMf8DW/L8+4REkr 2iZGltHe4fSTQPZ9K6as0J9d2SGroGAQZ8gbLLunNfi8do3lN3dUien1kqzc+1sK/g58XX QkYFceo7c49pSa+96YmNCKEpklnzOU2RIiFnww+Qbe7Dcm32znV3XOFXHo79LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727449412; a=rsa-sha256; cv=none; b=m/d2WaSr4q03AfISrtO6fNpkvsVJpT00Zu9Pu3tkIKn0k9fxGNHJzG7aaVqsAei15umFpG GV9DsntZ0c1bgtFDe9hrRZ5o3AB2K9ZdzyUoLYwci+adyrcYl0MCJe/fzhxFRWa7N5W6Qe 2TnNhFPy2MIFfj15KI2dYNvTB3ty011OUv9JuV0yYT9Z0WvjUDm8nmKRBhimKAi/aR9HQB 6FR4IL9ggzyIL5yY0K+ZbE9tLdkVE2tpIKugktMtg5pa135kftgTZVCrt+KChvsNFeg0NJ Rnt49vzMpnJYMcUPSIyprC3uGzzqMGTCxnjiCShhbccNqOMGCPslmiDG0t8xSQ== 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 4XFYd05kwtzl69; Fri, 27 Sep 2024 15:03: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 48RF3W1o009332; Fri, 27 Sep 2024 15:03:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RF3Wk3009329; Fri, 27 Sep 2024 15:03:32 GMT (envelope-from git) Date: Fri, 27 Sep 2024 15:03:32 GMT Message-Id: <202409271503.48RF3Wk3009329@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5ac9320ddf50 - main - procstat(1): add rlimitusage subcommand 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ac9320ddf50702e4fe05c10adc46dcdbd8ed5ee Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5ac9320ddf50702e4fe05c10adc46dcdbd8ed5ee commit 5ac9320ddf50702e4fe05c10adc46dcdbd8ed5ee Author: Konstantin Belousov AuthorDate: 2024-09-22 17:55:14 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 15:02:34 +0000 procstat(1): add rlimitusage subcommand Reviewed by: markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46747 --- usr.bin/procstat/Makefile | 1 + usr.bin/procstat/procstat.c | 2 + usr.bin/procstat/procstat.h | 2 + usr.bin/procstat/procstat_rlimitusage.c | 76 +++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+) diff --git a/usr.bin/procstat/Makefile b/usr.bin/procstat/Makefile index 56847625521f..d0e5d89478e7 100644 --- a/usr.bin/procstat/Makefile +++ b/usr.bin/procstat/Makefile @@ -16,6 +16,7 @@ SRCS= procstat.c \ procstat_ptlwpinfo.c \ procstat_pwdx.c \ procstat_rlimit.c \ + procstat_rlimitusage.c \ procstat_rusage.c \ procstat_sigs.c \ procstat_threads.c \ diff --git a/usr.bin/procstat/procstat.c b/usr.bin/procstat/procstat.c index f5c9bb6e1967..49595537f273 100644 --- a/usr.bin/procstat/procstat.c +++ b/usr.bin/procstat/procstat.c @@ -115,6 +115,8 @@ static const struct procstat_cmd cmd_table[] = { PS_CMP_NORMAL }, { "rlimit", "rlimit", NULL, &procstat_rlimit, &cmdopt_none, PS_CMP_NORMAL }, + { "rlimitusage", "rlimitusage", NULL, &procstat_rlimitusage, + &cmdopt_none, PS_CMP_NORMAL }, { "rusage", "rusage", "[-Ht]", &procstat_rusage, &cmdopt_rusage, PS_CMP_NORMAL }, { "sigfastblock", "sigfastblock", NULL, &procstat_sigfastblock, diff --git a/usr.bin/procstat/procstat.h b/usr.bin/procstat/procstat.h index 0c138fa88d42..f106fac79127 100644 --- a/usr.bin/procstat/procstat.h +++ b/usr.bin/procstat/procstat.h @@ -65,6 +65,8 @@ void procstat_cs(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_env(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_files(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_kstack(struct procstat *prstat, struct kinfo_proc *kipp); +void procstat_rlimitusage(struct procstat *procstat, + struct kinfo_proc *kipp); void procstat_pargs(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_penv(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_ptlwpinfo(struct procstat *prstat, struct kinfo_proc *kipp); diff --git a/usr.bin/procstat/procstat_rlimitusage.c b/usr.bin/procstat/procstat_rlimitusage.c new file mode 100644 index 000000000000..f589edd23b02 --- /dev/null +++ b/usr.bin/procstat/procstat_rlimitusage.c @@ -0,0 +1,76 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2024 The FreeBSD Foundation + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#define _RLIMIT_IDENT +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "procstat.h" + +static const char ru[] = "resource_usage"; + +void +procstat_rlimitusage(struct procstat *procstat, struct kinfo_proc *kipp) +{ + rlim_t *resuse; + unsigned int cnt, i; + + if ((procstat_opts & PS_OPT_NOHEADER) == 0) + xo_emit("{T:/%7s %12s %4s %18s}\n", + "PID", "RESOURCE", "ID", "USAGE"); + + xo_emit("{ek:process_id/%d}", kipp->ki_pid); + + resuse = procstat_getrlimitusage(procstat, kipp, &cnt); + if (resuse == NULL) + return; + xo_open_list(ru); + for (i = 0; i < cnt; i++) { + xo_open_instance(ru); + xo_emit("{dk:process_id/%7d} ", kipp->ki_pid); + xo_emit("{:resource/%12s} ", i < nitems(rlimit_ident) ? + rlimit_ident[i] : "unknown"); + xo_emit("{:resid/%4d} ", i); + xo_emit("{:usage/%18jd}\n", (intmax_t)resuse[i]); + xo_close_instance(ru); + } + xo_close_list(ru); + procstat_freerlimitusage(procstat, resuse); +} From nobody Fri Sep 27 16:30:24 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 4XFbYD2XG2z5YBDL; Fri, 27 Sep 2024 16:30: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 4XFbYD1Krgz45Zh; Fri, 27 Sep 2024 16:30:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727454624; 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=MTuZIqxtolMmlZgHn3f/1RKZanUMGQRZf+8ZBRj59nk=; b=r+aqkN1VozX6mGljdkBOuavS5ShScLzWzm4dSy+lV2DAmUTZpEEAnjbjA1vLS40PneKBtW 7+4KhVmJtV3ehJC5wO0y6ZZq4lP5H+Lkxwu+gSWNdY8YieYpxwQQxtCQAjxIXSyYOBokTS X3JIu14l4H31SOcqHqcPPAF4EwxCWTBFVAaPiVovIiCCJpOLNAFMZCBosQ2QiULoLTnFEJ iad+fzEJz45sU8BCKAIxndAoglgd7AvfY9fK7n/LhVBYd1ZTm5HlF9UzDzhSuGXdMEKYkg H9rEYhe5RxoicIXvAxHk6ZrkloZTfKfZIA30quF5DFkdJaGoSxJz37NBNUMuLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727454624; 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=MTuZIqxtolMmlZgHn3f/1RKZanUMGQRZf+8ZBRj59nk=; b=CvJ+KhN6AX0JjRbQUygUMpD42on/4mYsM1fduVAjQjNYWLXbsybetvYZEBdqUjtiyz0bxI pG1+gyz6JD/8x6F6ENguumAvl0XmePReDbttKOHYVwPUHEAyyzhf6MH6s8yjn34Icj8/V4 oV3aNYYU2valMjxjwypdrLpX3MRco8bH+B4MckGXFsuZhRTeVW/4l1OfpAD6I9eAVwCVjA vlI15o48ATsfJs1uV7u5/qW+0nIYY50AYG94s92bTLkv/aze43kv+JE7JZkMDGAG53BjAk fXwrwK0syJNe3a8ifa0ZLYiZ13DfQvZbuiFCZwUCgQbkicwLh/4oO4EX1gm2HQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727454624; a=rsa-sha256; cv=none; b=uHfofBaa+mopNXN1KvKNGzie+rztfhLzkXZI6bxlUGLJjPC0Bhn8y9ZsVDSCNReuaNDLA2 a4e7NljR04ekWhdHmtIJR3kmIqRcH1lMrhDOacHiEQ0EixA7C15Ap89detnDnDvqx5DKEW 1nu6AtS611rzNlUsyJkF+nK8KsjT60JkUcVONYXE8fsX9xEnQHhvOjY1fajTpjPl08QhuM EFJl5MeI65K0V1hS43ApZAGljEHQBMiSKvZzbZ8HxFE8WZnUhTzwQVleBv+SFi7h4xZRSQ MDSuZecdcudMDoQlwT36Svkr7L6+XWJw2ZlJsqjkjmonRrLWMkGbDN1esTGENQ== 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 4XFbYD0xHqznTm; Fri, 27 Sep 2024 16:30: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 48RGUOva053423; Fri, 27 Sep 2024 16:30:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RGUOCt053420; Fri, 27 Sep 2024 16:30:24 GMT (envelope-from git) Date: Fri, 27 Sep 2024 16:30:24 GMT Message-Id: <202409271630.48RGUOCt053420@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: fc2efd283b4e - main - RELNOTES: RSA host keys for SSH are deprecated 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc2efd283b4e33bd6057aa0323a13ae1af4669fa Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=fc2efd283b4e33bd6057aa0323a13ae1af4669fa commit fc2efd283b4e33bd6057aa0323a13ae1af4669fa Author: Colin Percival AuthorDate: 2024-09-27 16:28:44 +0000 Commit: Colin Percival CommitDate: 2024-09-27 16:28:44 +0000 RELNOTES: RSA host keys for SSH are deprecated Ficticious hash since there's no actual code change; but the release notes for FreeBSD 15 should say that RSA host keys for SSH will no longer be generated by default in FreeBSD 16. Discussed on: freebsd-arch Sponsored by: Amazon --- RELNOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELNOTES b/RELNOTES index 0daff902d4fd..a1863a2521fd 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +000000000000: + RSA host keys for SSH are deprecated and will no longer be generated + by default in FreeBSD 16. + 0aabcd75dbc2: EC2 AMIs no longer generate RSA host keys by default for SSH. RSA host key generation can be re-enabled by setting sshd_rsa_enable="YES" From nobody Fri Sep 27 17:34:44 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 4XFczS2tfWz5YFPh; Fri, 27 Sep 2024 17:34:44 +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 4XFczS28qsz4ChG; Fri, 27 Sep 2024 17:34:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458484; 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=k30lu+2Y0xm96nniGREgH2u16LhzPRNegpuh89Oo5FU=; b=w6g3rQgOQ7JWjHf8ORmu73JPAt51EgePOfNYzovoRGdoLlODdnYsUDi5njyCLMT2yQSE+f QQZ0YOVqwfDp9jj0iMhqX13CzVdquaMtywN0Y7DSBsLXBQtJsGwXwRFuSfwZTII6efAZ4R v2W8zMws3kEMjo1dobPZVQUDE/KJ2j1VDgs0u/KLDGFC0rtslO33+rPCaSSwb0rNRK5frW GzBzOBAgkA0DZTuYGtlBDWnFQvJjaci8M3Y2WKmb6TEvxgYCJVIeezjpMrQRwcVxh2rFpj VoLspUWEQT1h9M04JnRMnr+HbwS30h59uHE9SlzpsJ9yil4W1UWpk/NUt4DU3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458484; 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=k30lu+2Y0xm96nniGREgH2u16LhzPRNegpuh89Oo5FU=; b=EOAWxvEwl0NLVm744H+rqjDQU4iwALjxI2PcYYbLqJyzUvOY2zN9wcp07GVs4It7fXkYEY QcJKCahCTNr0IXu/v0tAw0ryOa/C82GH7Yc3vFZsrBZjJHLQgHJN3QXlz0pvjAl2oWJuPh k6uzadlwuKxyxLdG+egMRRPuu7hz+MbNkFiEmjw5Dhp6v52Rux5F2vSy1FhCozfmh5JFgi 6luld+dfgyzeudH3v6Zu60GAGkti3xzPQ4+0RHySsJONns9kn+hUyg25fo6YGYciSxWgDh BWIUECHLwuyuyNwAm2COvMNX906tzM9jorT80ucw5EdZLoGuS/W3HKefMw9yXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727458484; a=rsa-sha256; cv=none; b=HKT8Mc3B4WuEwcAUzzVap4rTAW+kas70ccE4zL4uIhcxEfmY91NaJRQIsCDCyUewL6JmYy qCHI/SQJAWxqLG6c51wyiGyw6RDrSpv9xIjMPEPNQEFqyhQPDtzAkeHC+woJlW9rTtjE1m a0JNg0UC7acEgAxP/+nqdqoFpXTZOeZQHTIgrs5BG2rH5fjFkS3P+Q44Ri5g0ftrF6QYas cLgvdQXjRZhUib/g7flxZvL2wy0x4pR6AdUl34BsOuXrc31mLoywDvt3Q6ZnIDnVpikAeP CSokQazs3B2yAO069uiQbDHkgwKa47uS5HHowM1npXI/7jRW+VqBlFpKU+ECqg== 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 4XFczS1d0MzpRw; Fri, 27 Sep 2024 17:34:44 +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 48RHYiXY062615; Fri, 27 Sep 2024 17:34:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RHYimE062612; Fri, 27 Sep 2024 17:34:44 GMT (envelope-from git) Date: Fri, 27 Sep 2024 17:34:44 GMT Message-Id: <202409271734.48RHYimE062612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 10ebd230f4d9 - main - intel_idpgtbl.c: rename domain_* functions to dmar_* 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10ebd230f4d9ed5c6406037972776666a2241107 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=10ebd230f4d9ed5c6406037972776666a2241107 commit 10ebd230f4d9ed5c6406037972776666a2241107 Author: Konstantin Belousov AuthorDate: 2024-09-25 01:38:42 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 17:34:23 +0000 intel_idpgtbl.c: rename domain_* functions to dmar_* Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/x86/iommu/intel_ctx.c | 6 ++-- sys/x86/iommu/intel_dmar.h | 6 ++-- sys/x86/iommu/intel_idpgtbl.c | 66 +++++++++++++++++++++---------------------- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index 5047acd283e9..659d5c8a35e6 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -399,7 +399,7 @@ dmar_domain_alloc(struct dmar_unit *dmar, bool id_mapped) if (id_mapped) { if ((dmar->hw_ecap & DMAR_ECAP_PT) == 0) { - domain->pgtbl_obj = domain_get_idmap_pgtbl(domain, + domain->pgtbl_obj = dmar_get_idmap_pgtbl(domain, domain->iodom.end); } domain->iodom.flags |= IOMMU_DOMAIN_IDMAP; @@ -864,7 +864,7 @@ dmar_domain_unload_entry(struct iommu_map_entry *entry, bool free, iommu_domain_free_entry(entry, false); } } else { - domain_flush_iotlb_sync(domain, entry->start, entry->end - + dmar_flush_iotlb_sync(domain, entry->start, entry->end - entry->start); iommu_domain_free_entry(entry, free); } @@ -899,7 +899,7 @@ dmar_domain_unload(struct iommu_domain *iodom, entry->start, cansleep ? IOMMU_PGF_WAITOK : 0); KASSERT(error == 0, ("unmap %p error %d", domain, error)); if (!unit->qi_enabled) { - domain_flush_iotlb_sync(domain, entry->start, + dmar_flush_iotlb_sync(domain, entry->start, entry->end - entry->start); TAILQ_REMOVE(entries, entry, dmamap_link); iommu_domain_free_entry(entry, true); diff --git a/sys/x86/iommu/intel_dmar.h b/sys/x86/iommu/intel_dmar.h index 188e40dec36c..fcdc915abcfd 100644 --- a/sys/x86/iommu/intel_dmar.h +++ b/sys/x86/iommu/intel_dmar.h @@ -219,10 +219,10 @@ void dmar_qi_invalidate_iotlb_glob_locked(struct dmar_unit *unit); void dmar_qi_invalidate_iec_glob(struct dmar_unit *unit); void dmar_qi_invalidate_iec(struct dmar_unit *unit, u_int start, u_int cnt); -vm_object_t domain_get_idmap_pgtbl(struct dmar_domain *domain, +vm_object_t dmar_get_idmap_pgtbl(struct dmar_domain *domain, iommu_gaddr_t maxaddr); -void put_idmap_pgtbl(vm_object_t obj); -void domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, +void dmar_put_idmap_pgtbl(vm_object_t obj); +void dmar_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size); int dmar_domain_alloc_pgtbl(struct dmar_domain *domain); void dmar_domain_free_pgtbl(struct dmar_domain *domain); diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index fbc0e9e97b64..7def178146d1 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -67,7 +67,7 @@ #include #include -static int domain_unmap_buf_locked(struct dmar_domain *domain, +static int dmar_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size, int flags); /* @@ -106,7 +106,7 @@ static MALLOC_DEFINE(M_DMAR_IDPGTBL, "dmar_idpgtbl", * mapped by the page table page. */ static void -domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, +dmar_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, iommu_gaddr_t addr) { vm_page_t m1; @@ -125,7 +125,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, pg_sz = pglvl_page_size(tbl->pglvl, lvl); if (lvl != tbl->leaf) { for (i = 0, f = addr; i < IOMMU_NPTEPG; i++, f += pg_sz) - domain_idmap_nextlvl(tbl, lvl + 1, base + i, f); + dmar_idmap_nextlvl(tbl, lvl + 1, base + i, f); } VM_OBJECT_WUNLOCK(tbl->pgtbl_obj); pte = iommu_map_pgtbl(tbl->pgtbl_obj, idx, IOMMU_PGF_WAITOK, &sf); @@ -147,7 +147,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, VM_PAGE_TO_PHYS(m1)) | DMAR_PTE_R | DMAR_PTE_W; } } - /* domain_get_idmap_pgtbl flushes CPU cache if needed. */ + /* dmar_get_idmap_pgtbl flushes CPU cache if needed. */ iommu_unmap_pgtbl(sf); VM_OBJECT_WLOCK(tbl->pgtbl_obj); } @@ -161,7 +161,7 @@ domain_idmap_nextlvl(struct idpgtbl *tbl, int lvl, vm_pindex_t idx, * maxaddr is typically mapped. */ vm_object_t -domain_get_idmap_pgtbl(struct dmar_domain *domain, iommu_gaddr_t maxaddr) +dmar_get_idmap_pgtbl(struct dmar_domain *domain, iommu_gaddr_t maxaddr) { struct dmar_unit *unit; struct idpgtbl *tbl; @@ -231,7 +231,7 @@ domain_get_idmap_pgtbl(struct dmar_domain *domain, iommu_gaddr_t maxaddr) tbl->pgtbl_obj = vm_pager_allocate(OBJT_PHYS, NULL, IDX_TO_OFF(pglvl_max_pages(tbl->pglvl)), 0, 0, NULL); VM_OBJECT_WLOCK(tbl->pgtbl_obj); - domain_idmap_nextlvl(tbl, 0, 0, 0); + dmar_idmap_nextlvl(tbl, 0, 0, 0); VM_OBJECT_WUNLOCK(tbl->pgtbl_obj); LIST_INSERT_HEAD(&idpgtbls, tbl, link); res = tbl->pgtbl_obj; @@ -273,7 +273,7 @@ end: * Return a reference to the identity mapping page table to the cache. */ void -put_idmap_pgtbl(vm_object_t obj) +dmar_put_idmap_pgtbl(vm_object_t obj) { struct idpgtbl *tbl, *tbl1; vm_object_t rmobj; @@ -317,7 +317,7 @@ put_idmap_pgtbl(vm_object_t obj) */ static iommu_pte_t * -domain_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, +dmar_pgtbl_map_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags, vm_pindex_t *idxp, struct sf_buf **sf) { vm_page_t m; @@ -360,7 +360,7 @@ retry: vm_page_wire(m); sfp = NULL; - ptep = domain_pgtbl_map_pte(domain, base, lvl - 1, + ptep = dmar_pgtbl_map_pte(domain, base, lvl - 1, flags, &idx1, &sfp); if (ptep == NULL) { KASSERT(m->pindex != 0, @@ -385,7 +385,7 @@ retry: } static int -domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, +dmar_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags) { iommu_pte_t *pte; @@ -439,13 +439,13 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, ("mapping loop overflow %p %jx %jx %jx", domain, (uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz)); KASSERT(pg_sz > 0, ("pg_sz 0 lvl %d", lvl)); - pte = domain_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); + pte = dmar_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); if (pte == NULL) { KASSERT((flags & IOMMU_PGF_WAITOK) == 0, ("failed waitable pte alloc %p", domain)); if (sf != NULL) iommu_unmap_pgtbl(sf); - domain_unmap_buf_locked(domain, base1, base - base1, + dmar_unmap_buf_locked(domain, base1, base - base1, flags); TD_PINNED_ASSERT; return (ENOMEM); @@ -462,7 +462,7 @@ domain_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, } static int -domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, +dmar_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, iommu_gaddr_t size, vm_page_t *ma, uint64_t eflags, int flags) { struct dmar_domain *domain; @@ -513,13 +513,13 @@ domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, KASSERT((flags & ~IOMMU_PGF_WAITOK) == 0, ("invalid flags %x", flags)); DMAR_DOMAIN_PGLOCK(domain); - error = domain_map_buf_locked(domain, base, size, ma, pflags, flags); + error = dmar_map_buf_locked(domain, base, size, ma, pflags, flags); DMAR_DOMAIN_PGUNLOCK(domain); if (error != 0) return (error); if ((unit->hw_cap & DMAR_CAP_CM) != 0) - domain_flush_iotlb_sync(domain, base, size); + dmar_flush_iotlb_sync(domain, base, size); else if ((unit->hw_cap & DMAR_CAP_RWBF) != 0) { /* See 11.1 Write Buffer Flushing. */ DMAR_LOCK(unit); @@ -529,12 +529,12 @@ domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, return (0); } -static void domain_unmap_clear_pte(struct dmar_domain *domain, +static void dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags, iommu_pte_t *pte, struct sf_buf **sf, bool free_fs); static void -domain_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, +dmar_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags) { struct sf_buf *sf; @@ -542,12 +542,12 @@ domain_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, vm_pindex_t idx; sf = NULL; - pde = domain_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); - domain_unmap_clear_pte(domain, base, lvl, flags, pde, &sf, true); + pde = dmar_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); + dmar_unmap_clear_pte(domain, base, lvl, flags, pde, &sf, true); } static void -domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, +dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags, iommu_pte_t *pte, struct sf_buf **sf, bool free_sf) { vm_page_t m; @@ -568,14 +568,14 @@ domain_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, ("lost reference (idx) on root pg domain %p base %jx lvl %d", domain, (uintmax_t)base, lvl)); iommu_pgfree(domain->pgtbl_obj, m->pindex, flags); - domain_free_pgtbl_pde(domain, base, lvl - 1, flags); + dmar_free_pgtbl_pde(domain, base, lvl - 1, flags); } /* * Assumes that the unmap is never partial. */ static int -domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, +dmar_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size, int flags) { iommu_pte_t *pte; @@ -619,14 +619,14 @@ domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, pg_sz = domain_page_size(domain, lvl); if (pg_sz > size) continue; - pte = domain_pgtbl_map_pte(domain, base, lvl, flags, + pte = dmar_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); KASSERT(pte != NULL, ("sleeping or page missed %p %jx %d 0x%x", domain, (uintmax_t)base, lvl, flags)); if ((pte->pte & DMAR_PTE_SP) != 0 || lvl == domain->pglvl - 1) { - domain_unmap_clear_pte(domain, base, lvl, + dmar_unmap_clear_pte(domain, base, lvl, flags, pte, &sf, false); break; } @@ -647,7 +647,7 @@ domain_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, } static int -domain_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, +dmar_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, iommu_gaddr_t size, int flags) { struct dmar_domain *domain; @@ -656,7 +656,7 @@ domain_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, domain = IODOM2DOM(iodom); DMAR_DOMAIN_PGLOCK(domain); - error = domain_unmap_buf_locked(domain, base, size, flags); + error = dmar_unmap_buf_locked(domain, base, size, flags); DMAR_DOMAIN_PGUNLOCK(domain); return (error); } @@ -700,7 +700,7 @@ dmar_domain_free_pgtbl(struct dmar_domain *domain) domain->pgtbl_obj = NULL; if ((domain->iodom.flags & IOMMU_DOMAIN_IDMAP) != 0) { - put_idmap_pgtbl(obj); + dmar_put_idmap_pgtbl(obj); domain->iodom.flags &= ~IOMMU_DOMAIN_IDMAP; return; } @@ -716,7 +716,7 @@ dmar_domain_free_pgtbl(struct dmar_domain *domain) } static inline uint64_t -domain_wait_iotlb_flush(struct dmar_unit *unit, uint64_t wt, int iro) +dmar_wait_iotlb_flush(struct dmar_unit *unit, uint64_t wt, int iro) { uint64_t iotlbr; @@ -732,7 +732,7 @@ domain_wait_iotlb_flush(struct dmar_unit *unit, uint64_t wt, int iro) } void -domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, +dmar_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, iommu_gaddr_t size) { struct dmar_unit *unit; @@ -746,7 +746,7 @@ domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, iro = DMAR_ECAP_IRO(unit->hw_ecap) * 16; DMAR_LOCK(unit); if ((unit->hw_cap & DMAR_CAP_PSI) == 0 || size > 2 * 1024 * 1024) { - iotlbr = domain_wait_iotlb_flush(unit, DMAR_IOTLB_IIRG_DOM | + iotlbr = dmar_wait_iotlb_flush(unit, DMAR_IOTLB_IIRG_DOM | DMAR_IOTLB_DID(domain->domain), iro); KASSERT((iotlbr & DMAR_IOTLB_IAIG_MASK) != DMAR_IOTLB_IAIG_INVLD, @@ -756,7 +756,7 @@ domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, for (; size > 0; base += isize, size -= isize) { am = calc_am(unit, base, size, &isize); dmar_write8(unit, iro, base | am); - iotlbr = domain_wait_iotlb_flush(unit, + iotlbr = dmar_wait_iotlb_flush(unit, DMAR_IOTLB_IIRG_PAGE | DMAR_IOTLB_DID(domain->domain), iro); KASSERT((iotlbr & DMAR_IOTLB_IAIG_MASK) != @@ -778,6 +778,6 @@ domain_flush_iotlb_sync(struct dmar_domain *domain, iommu_gaddr_t base, } const struct iommu_domain_map_ops dmar_domain_map_ops = { - .map = domain_map_buf, - .unmap = domain_unmap_buf, + .map = dmar_map_buf, + .unmap = dmar_unmap_buf, }; From nobody Fri Sep 27 17:34:45 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 4XFczT3ZM9z5YFcv; Fri, 27 Sep 2024 17:34:45 +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 4XFczT2n7wz4Cdx; Fri, 27 Sep 2024 17:34:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458485; 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=9DZr/eN/bvDK5hIshzm8NBsl2UBf7lMKtVr4tnimpqM=; b=NCXdxeyrF2VOyrcefMmd2Hbtv3nq9qHjAP+Nh7qdH9XqrUG0nMSnT95+c7iWpNAArMTwXJ 8KxMVJg28oCapDhFqXGF1WGBVOqJg8mwQFj0J3byX6YuiwJHOg/ptvUagQ7BBzWU5ulR3R CtNM3CSZ8guoBX9Uzm7iwGneotmMkowKWO3iV3mo5j3+yWx9eS+YpUUYjdLh7xrP6E9z2o BPd7e9L1qG1p3h6MYyEBtk8xQV4kK6JW9RZsX4y9pDuwhApokZlqXikUu1gwmHvLp4QOnC rcWVNMkUeDyDHKbeOTcEqGW+bQeX7WCL0gfXi6fmfMEcqIzNKw3sshdskhvcXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458485; 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=9DZr/eN/bvDK5hIshzm8NBsl2UBf7lMKtVr4tnimpqM=; b=uHAQOCJavusp1U/IawjaqXwjFp8Lf54TY1eu3CWSKhxY/im8AMFde8Zgc+/Q4kERcIS6B7 xBn5TWYtBKhF9VyhaIpBA3yvs5WZkFRymR7M0gq4wPW0iewggocPqgJG5fCRi9plYiddAN ZO+YuIITzyJv6ymMu0IhRKVbAAkTq5loH51j0O5zcsXxUOUCxsQ9lk6+tF+sTOIj6XvVej JjiZLkestOocWRSOxfltzungsM/w2TE5txn3Mmib0efZgT+DOGtXLk6d0XNfC88RsUEEQL dVV0d0mUaAzw8k0u+1e/Qgdj8wU9KbF3Q67edIuh+THijyvXd18Tcz4k1QV0rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727458485; a=rsa-sha256; cv=none; b=TsQ+yKQ6qLzVQIhC5iMgg0jd5DlINKIR0Vc5FZIO1sC4CRocD2+JgMppj6HG3DatbbaUKV 9RLERp1Lcxc3XYxMl14a3NnjOu+jr+t50Fp4e1XMkhhyQbtAQ5dJ21cMaHkOzNCKAILt6S s3ELnJzNpujnPV5NxChGs4XcysW+FxRPYKR1LjFgHPpzwx5uYRtTiS8FOhYaNjdcXPV/Jd DZhyZbA++nvNmS2AkKqwXiXcMN4IKvD0g7N6gZ7L4I4QIVs38qAMV56U9V7iz/YFMUiUjr 1TOKw1iUsHffNR9pOcNi7ta+yDVTywh27paMbtxwh1+RpcobmBtMJX0YL4D+kw== 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 4XFczT2PK5zqb4; Fri, 27 Sep 2024 17:34:45 +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 48RHYjNt062678; Fri, 27 Sep 2024 17:34:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RHYjvi062675; Fri, 27 Sep 2024 17:34:45 GMT (envelope-from git) Date: Fri, 27 Sep 2024 17:34:45 GMT Message-Id: <202409271734.48RHYjvi062675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: d50403a6919a - main - iommu: add per-unit sysctls reporting the state of DMA and interrupt remapping 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d50403a6919a641abfb0da4d60eb58ce42302de5 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d50403a6919a641abfb0da4d60eb58ce42302de5 commit d50403a6919a641abfb0da4d60eb58ce42302de5 Author: Konstantin Belousov AuthorDate: 2024-09-27 01:17:57 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 17:34:23 +0000 iommu: add per-unit sysctls reporting the state of DMA and interrupt remapping Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/arm64/iommu/iommu.c | 2 ++ sys/dev/iommu/busdma_iommu.c | 4 ++++ sys/dev/iommu/iommu.h | 1 + sys/x86/iommu/intel_drv.c | 2 ++ sys/x86/iommu/intel_intrmap.c | 5 ++++- 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c index af0edfee70d8..e7b5b2298e26 100644 --- a/sys/arm64/iommu/iommu.c +++ b/sys/arm64/iommu/iommu.c @@ -454,6 +454,7 @@ iommu_register(struct iommu_unit *iommu) LIST_INSERT_HEAD(&iommu_list, entry, next); IOMMU_LIST_UNLOCK(); + sysctl_ctx_init(&iommu->sysctl_ctx); iommu_init_busdma(iommu); return (0); @@ -474,6 +475,7 @@ iommu_unregister(struct iommu_unit *iommu) IOMMU_LIST_UNLOCK(); iommu_fini_busdma(iommu); + sysctl_ctx_free(&iommu->sysctl_ctx); mtx_destroy(&iommu->lock); diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c index bddb466547d1..7a0ca39172f3 100644 --- a/sys/dev/iommu/busdma_iommu.c +++ b/sys/dev/iommu/busdma_iommu.c @@ -963,6 +963,10 @@ iommu_init_busdma(struct iommu_unit *unit) error = TUNABLE_INT_FETCH("hw.iommu.dma", &unit->dma_enabled); if (error == 0) /* compatibility */ TUNABLE_INT_FETCH("hw.dmar.dma", &unit->dma_enabled); + SYSCTL_ADD_INT(&unit->sysctl_ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(unit->dev)), + OID_AUTO, "dma", CTLFLAG_RD, &unit->dma_enabled, 0, + "DMA ops enabled"); TAILQ_INIT(&unit->delayed_maps); TASK_INIT(&unit->dmamap_load_task, 0, iommu_bus_task_dmamap, unit); unit->delayed_taskqueue = taskqueue_create("iommu", M_WAITOK, diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h index 9845b09e8732..957d4e14e8e2 100644 --- a/sys/dev/iommu/iommu.h +++ b/sys/dev/iommu/iommu.h @@ -67,6 +67,7 @@ struct iommu_unit { struct mtx lock; device_t dev; int unit; + struct sysctl_ctx_list sysctl_ctx; int dma_enabled; diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 05fb49538add..cc16759ebe34 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -256,6 +256,7 @@ dmar_release_resources(device_t dev, struct dmar_unit *unit) vm_object_deallocate(unit->ctx_obj); unit->ctx_obj = NULL; } + sysctl_ctx_free(&unit->iommu.sysctl_ctx); } #ifdef DEV_APIC @@ -337,6 +338,7 @@ dmar_attach(device_t dev) unit = device_get_softc(dev); unit->iommu.unit = device_get_unit(dev); unit->iommu.dev = dev; + sysctl_ctx_init(&unit->iommu.sysctl_ctx); dmaru = dmar_find_by_index(unit->iommu.unit); if (dmaru == NULL) return (EINVAL); diff --git a/sys/x86/iommu/intel_intrmap.c b/sys/x86/iommu/intel_intrmap.c index ec3cd35e4f4e..87bb7c791dd0 100644 --- a/sys/x86/iommu/intel_intrmap.c +++ b/sys/x86/iommu/intel_intrmap.c @@ -318,7 +318,10 @@ dmar_ir_free_irte(struct dmar_unit *unit, u_int cookie) int dmar_init_irt(struct dmar_unit *unit) { - + SYSCTL_ADD_INT(&unit->iommu.sysctl_ctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(unit->iommu.dev)), + OID_AUTO, "ir", CTLFLAG_RD, &unit->ir_enabled, 0, + "Interrupt remapping ops enabled"); if ((unit->hw_ecap & DMAR_ECAP_IR) == 0) return (0); unit->ir_enabled = 1; From nobody Fri Sep 27 17:34:46 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 4XFczV67Fyz5YFPm; Fri, 27 Sep 2024 17:34:46 +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 4XFczV3qQfz4Ck3; Fri, 27 Sep 2024 17:34:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458486; 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=Eg7O8rm7rp9wojm9QVeaLkJsiF73JGNnWnLtdlFEIOs=; b=QTwbUuerFzqisfdAV+k9zyzirN3/PHcvsiXn06N9Q0SjLOo6v3gSXBE0yk4d9c4iikngEb IPJwDUt9SHEPPbDFlTY/BQX+Gn4AUPJKnqYubDGXXTiH5IDC4kiOHnmkwSiWJAvMxry2QH Irt1yqfQo7vldwPDv2yGfhoG29hswpiiZFZ5CvomGS6nSbf/8BwhkebDe6HCWRsg7VoEGQ 5jkxqmk+bw8dTYCGY1Z7PzU81w9hMUgMQV/c/AuwXr2FWGkp8CrAyo/cww3Crhi1YG8N9I J40SX4fCb7qz+NqgZLs0EIemT6pzibcVPP+9u6CyG7eVd4qjctUW1XUDKCBVYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458486; 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=Eg7O8rm7rp9wojm9QVeaLkJsiF73JGNnWnLtdlFEIOs=; b=d6K8F3kv321RyzBjNdVWIpOiCjSszCruX2myhNPW2l/z6Gf7T6G9FTGq4xDfH2Oqo7nqJ9 R/BGSTWaEoKJsRck7ONsS9T6vIBR3kd6myBpcSYQttLPNsNC9hPfKkcH4t0o4lNqlfUZq5 qztCOQtpPDdK9b9nlc6Sxt928Lk8rNLkQG6Ft5fCXH1mS63OpdfspZkxv++0WiH5R/B31F Gji0w/Zoq/GGpqmic598QmgYByzG2b9TiwRqq5Jg30c+gzzhKP+gF3jWGSu3CQ8czF7gqX 3R+1eh+jYc6QPESoiLrwv7wCbfn9Hs5ZsBpq7c+3yuBc2I8zWSH5NpgcetDoAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727458486; a=rsa-sha256; cv=none; b=InUUzXyLNDAJaBDvO1xgZRf4fuRihx2IB+NZbwCLIiWgnkUt80mbNkcz1wSOt0EeqdGe9V YY0nHbereBEC89aKsi459Hr1/PKJTrIXQ9XfDn3zx2bKBkPBkeOwCQvbV5j76XuR3RCgN3 iUTyv+tU/fRgO7E3ztD3S58y8o56U32OtzEVtcOJt5huBrrMgAkeTLLE5obefCrZiLufVT KVB+EYAqxmKd8Kn9sF/sVUMmzkgrFXlzDvLbfPo+qOhnR6jpruEsQINLBjUWpFPtIWwO7C xyT3oqd44LAQ8x1gju1cvh4S2CiNpbT/ybwln7vvkK4l8Y+qwBN1Q7CJVSJECw== 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 4XFczV3PsfzqDG; Fri, 27 Sep 2024 17:34:46 +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 48RHYkeJ062723; Fri, 27 Sep 2024 17:34:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RHYk7h062720; Fri, 27 Sep 2024 17:34:46 GMT (envelope-from git) Date: Fri, 27 Sep 2024 17:34:46 GMT Message-Id: <202409271734.48RHYk7h062720@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: bdd5eb33cacd - main - iommu: change iommu_domain_map_ops to take iommu_map_entry 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bdd5eb33cacdbf174980b999c77847d0903fc12e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bdd5eb33cacdbf174980b999c77847d0903fc12e commit bdd5eb33cacdbf174980b999c77847d0903fc12e Author: Konstantin Belousov AuthorDate: 2024-09-25 01:47:54 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 17:34:23 +0000 iommu: change iommu_domain_map_ops to take iommu_map_entry instead of base/size. Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/arm64/iommu/iommu.c | 25 +++++++++++-------------- sys/dev/iommu/iommu.h | 8 ++++---- sys/dev/iommu/iommu_gas.c | 12 +++++------- sys/x86/iommu/intel_ctx.c | 4 ++-- sys/x86/iommu/intel_idpgtbl.c | 15 ++++++++++----- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c index e7b5b2298e26..0fe59c5d10b6 100644 --- a/sys/arm64/iommu/iommu.c +++ b/sys/arm64/iommu/iommu.c @@ -80,22 +80,21 @@ struct iommu_entry { static LIST_HEAD(, iommu_entry) iommu_list = LIST_HEAD_INITIALIZER(iommu_list); static int -iommu_domain_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, - iommu_gaddr_t size, int flags) +iommu_domain_unmap_buf(struct iommu_domain *iodom, + struct iommu_map_entry *entry, int flags) { struct iommu_unit *iommu; int error; iommu = iodom->iommu; - - error = IOMMU_UNMAP(iommu->dev, iodom, base, size); - + error = IOMMU_UNMAP(iommu->dev, iodom, entry->start, entry->end - + entry->start); return (error); } static int -iommu_domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, - iommu_gaddr_t size, vm_page_t *ma, uint64_t eflags, int flags) +iommu_domain_map_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, + vm_page_t *ma, uint64_t eflags, int flags) { struct iommu_unit *iommu; vm_prot_t prot; @@ -110,12 +109,10 @@ iommu_domain_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, if (eflags & IOMMU_MAP_ENTRY_WRITE) prot |= VM_PROT_WRITE; - va = base; - + va = entry->start; iommu = iodom->iommu; - - error = IOMMU_MAP(iommu->dev, iodom, va, ma, size, prot); - + error = IOMMU_MAP(iommu->dev, iodom, va, ma, entry->end - + entry->start, prot); return (error); } @@ -427,8 +424,8 @@ iommu_domain_unload(struct iommu_domain *iodom, TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) { KASSERT((entry->flags & IOMMU_MAP_ENTRY_MAP) != 0, ("not mapped entry %p %p", iodom, entry)); - error = iodom->ops->unmap(iodom, entry->start, entry->end - - entry->start, cansleep ? IOMMU_PGF_WAITOK : 0); + error = iodom->ops->unmap(iodom, entry, + cansleep ? IOMMU_PGF_WAITOK : 0); KASSERT(error == 0, ("unmap %p error %d", iodom, error)); TAILQ_REMOVE(entries, entry, dmamap_link); iommu_domain_free_entry(entry, true); diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h index 957d4e14e8e2..84d8c3680b71 100644 --- a/sys/dev/iommu/iommu.h +++ b/sys/dev/iommu/iommu.h @@ -86,10 +86,10 @@ struct iommu_unit { }; struct iommu_domain_map_ops { - int (*map)(struct iommu_domain *domain, iommu_gaddr_t base, - iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags); - int (*unmap)(struct iommu_domain *domain, iommu_gaddr_t base, - iommu_gaddr_t size, int flags); + int (*map)(struct iommu_domain *domain, struct iommu_map_entry *entry, + vm_page_t *ma, uint64_t pflags, int flags); + int (*unmap)(struct iommu_domain *domain, struct iommu_map_entry *entry, + int flags); }; /* diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 4b6141b981da..26ac38da3c4f 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -826,8 +826,7 @@ iommu_gas_map(struct iommu_domain *domain, entry->flags |= eflags; IOMMU_DOMAIN_UNLOCK(domain); - error = domain->ops->map(domain, entry->start, - entry->end - entry->start, ma, eflags, + error = domain->ops->map(domain, entry, ma, eflags, ((flags & IOMMU_MF_CANWAIT) != 0 ? IOMMU_PGF_WAITOK : 0)); if (error == ENOMEM) { iommu_domain_unload_entry(entry, true, @@ -868,9 +867,9 @@ iommu_gas_map_region(struct iommu_domain *domain, struct iommu_map_entry *entry, if (entry->end == entry->start) return (0); - error = domain->ops->map(domain, entry->start, - entry->end - entry->start, ma + OFF_TO_IDX(start - entry->start), - eflags, ((flags & IOMMU_MF_CANWAIT) != 0 ? IOMMU_PGF_WAITOK : 0)); + error = domain->ops->map(domain, entry, + ma + OFF_TO_IDX(start - entry->start), eflags, + ((flags & IOMMU_MF_CANWAIT) != 0 ? IOMMU_PGF_WAITOK : 0)); if (error == ENOMEM) { iommu_domain_unload_entry(entry, false, (flags & IOMMU_MF_CANWAIT) != 0); @@ -979,8 +978,7 @@ iommu_unmap_msi(struct iommu_ctx *ctx) if (entry == NULL) return; - domain->ops->unmap(domain, entry->start, entry->end - - entry->start, IOMMU_PGF_WAITOK); + domain->ops->unmap(domain, entry, IOMMU_PGF_WAITOK); iommu_gas_free_space(entry); diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c index 659d5c8a35e6..5af5ac7335b8 100644 --- a/sys/x86/iommu/intel_ctx.c +++ b/sys/x86/iommu/intel_ctx.c @@ -895,8 +895,8 @@ dmar_domain_unload(struct iommu_domain *iodom, TAILQ_FOREACH_SAFE(entry, entries, dmamap_link, entry1) { KASSERT((entry->flags & IOMMU_MAP_ENTRY_MAP) != 0, ("not mapped entry %p %p", domain, entry)); - error = iodom->ops->unmap(iodom, entry->start, entry->end - - entry->start, cansleep ? IOMMU_PGF_WAITOK : 0); + error = iodom->ops->unmap(iodom, entry, + cansleep ? IOMMU_PGF_WAITOK : 0); KASSERT(error == 0, ("unmap %p error %d", domain, error)); if (!unit->qi_enabled) { dmar_flush_iotlb_sync(domain, entry->start, diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index 7def178146d1..ffb4c73a6c5a 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -462,14 +462,18 @@ dmar_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, } static int -dmar_map_buf(struct iommu_domain *iodom, iommu_gaddr_t base, - iommu_gaddr_t size, vm_page_t *ma, uint64_t eflags, int flags) +dmar_map_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, + vm_page_t *ma, uint64_t eflags, int flags) { struct dmar_domain *domain; struct dmar_unit *unit; + iommu_gaddr_t base, size; uint64_t pflags; int error; + base = entry->start; + size = entry->end - entry->start; + pflags = ((eflags & IOMMU_MAP_ENTRY_READ) != 0 ? DMAR_PTE_R : 0) | ((eflags & IOMMU_MAP_ENTRY_WRITE) != 0 ? DMAR_PTE_W : 0) | ((eflags & IOMMU_MAP_ENTRY_SNOOP) != 0 ? DMAR_PTE_SNP : 0) | @@ -647,8 +651,8 @@ dmar_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, } static int -dmar_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, - iommu_gaddr_t size, int flags) +dmar_unmap_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, + int flags) { struct dmar_domain *domain; int error; @@ -656,7 +660,8 @@ dmar_unmap_buf(struct iommu_domain *iodom, iommu_gaddr_t base, domain = IODOM2DOM(iodom); DMAR_DOMAIN_PGLOCK(domain); - error = dmar_unmap_buf_locked(domain, base, size, flags); + error = dmar_unmap_buf_locked(domain, entry->start, entry->end - + entry->start, flags); DMAR_DOMAIN_PGUNLOCK(domain); return (error); } From nobody Fri Sep 27 17:34:47 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 4XFczW6PNCz5YFMY; Fri, 27 Sep 2024 17:34:47 +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 4XFczW4dfVz4CQ5; Fri, 27 Sep 2024 17:34:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458487; 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=WknBvgrPw7BjbR/AksYapUs5yZiEMbIR48XIHzF2VzA=; b=jGZAivPmo26HO+TnZitE5oTga4Alk6CvvpFr1atkZkf+Lt4BAEuorofEHM245X1jhW1knY 5bnFF48W9ECka+8LKb8ilRqCQ79dGK0L+LhcEk/9AxwGSxQjcM0StSQ6fw49BGE85ip+fK 1BqiYtwAnNWkALrN/Eqx4Fxz3OCriGHcEy6l8ycrcT0PrkheyUByaO01IUc/z3Lcy0QnNf CAght1KygRjN2J+8o13kOmgyV+q99Tl1VO/UzAMV6wVX1n814f4K+FdbG62u4V65AidLwD hEQDmNBTvb9cDjWw15moVkGDEgS3a2unF9HH/qDVIkhVDLnmu0azwku+LedsUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458487; 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=WknBvgrPw7BjbR/AksYapUs5yZiEMbIR48XIHzF2VzA=; b=ByUjbOBIfftcDs1b80Y+3hEAvNrLDa3285RyQaCHzgaRCmZVm/BbYIGesBsz1VKW9Igi7E 0/WFTap27owFNlmbF/kVcT7zryrgG5f3i37x192S/HdxVKkALTwifl1PMPcKP6Wo3BqTOM UARH6hHH8Vm080LJ6HUQ0T+8u4/7erbFzMi4x/oJfguMRcK/rp6kJBMuM6Tm2kyok+i6b7 oHHp3k00AJnvKPcl+l8EyVVVDlNGEQLWN7Pvq8uvjKd9JE9kvQgi7Rl0koSpErf1Bn7d/G b92SRO3m5wUGaxokdjTTL3G1TbKXsF59Fi5D1rtWA0WvBEfEQIrNuZ6/9C/+0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727458487; a=rsa-sha256; cv=none; b=w9cD2z4lsMd9HrcAEWh+TqGDL8MpgzjVJN8x28Cj6oQYpPgqCgdnpGrFvFJ2XA/eKb7Dtt tq84g0jVtpWUn8VL5m4IXjnfIzr0LdUfjCTwTePj0vlUfgLwNwyNaLGifg/imVvwwgJ0zP L51u5pdj/P0oQEDDVyyi+3iaQUQeddmsPar/cQuV7JezwhicfLJTyTonPPKR65ZCTj4FI+ ku/SImQw8ugd0qXTzhQyrTwTgHGzu5TqduJEj5mEqyHumi0k9AuBn8gR9SI3RYcW9Gw6HX Pw+v/thFXILzA7N5t7RKLq52VNYb287+cWf5nzE12vPGvUR8KchVR7rIf6whUg== 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 4XFczW4FyszqDH; Fri, 27 Sep 2024 17:34:47 +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 48RHYlRj062776; Fri, 27 Sep 2024 17:34:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RHYlsR062772; Fri, 27 Sep 2024 17:34:47 GMT (envelope-from git) Date: Fri, 27 Sep 2024 17:34:47 GMT Message-Id: <202409271734.48RHYlsR062772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 1784fb44498d - main - vm_page_free_pages_toq(): return the count of freed pages 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1784fb44498da8007fb8cd8ee5060894eb5fe1e6 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1784fb44498da8007fb8cd8ee5060894eb5fe1e6 commit 1784fb44498da8007fb8cd8ee5060894eb5fe1e6 Author: Konstantin Belousov AuthorDate: 2024-09-27 16:20:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 17:34:23 +0000 vm_page_free_pages_toq(): return the count of freed pages Reviewed by: bnovkov Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46820 --- sys/vm/vm_page.c | 5 +++-- sys/vm/vm_page.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 40108e8a9b0a..6256472e0336 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -4177,14 +4177,14 @@ vm_page_free_toq(vm_page_t m) * from any VM object. In other words, this is equivalent to * calling vm_page_free_toq() for each page of a list of VM objects. */ -void +int vm_page_free_pages_toq(struct spglist *free, bool update_wire_count) { vm_page_t m; int count; if (SLIST_EMPTY(free)) - return; + return (0); count = 0; while ((m = SLIST_FIRST(free)) != NULL) { @@ -4195,6 +4195,7 @@ vm_page_free_pages_toq(struct spglist *free, bool update_wire_count) if (update_wire_count) vm_wire_sub(count); + return (count); } /* diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index a69155e50723..c7c1ec3872a8 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -710,7 +710,7 @@ int vm_page_is_valid(vm_page_t, int, int); void vm_page_test_dirty(vm_page_t); vm_page_bits_t vm_page_bits(int base, int size); void vm_page_zero_invalid(vm_page_t m, boolean_t setvalid); -void vm_page_free_pages_toq(struct spglist *free, bool update_wire_count); +int vm_page_free_pages_toq(struct spglist *free, bool update_wire_count); void vm_page_dirty_KBI(vm_page_t m); void vm_page_lock_KBI(vm_page_t m, const char *file, int line); From nobody Fri Sep 27 17:34:48 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 4XFczX6dgjz5YFHZ; Fri, 27 Sep 2024 17:34:48 +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 4XFczX5Jf2z4Cq5; Fri, 27 Sep 2024 17:34:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458488; 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=CWwyXxH9I9UVndw8UebqVDmEvyKhyDs4JXGg1jaA8XA=; b=kPWO/LXsq1Wfx+J7CoXpCyzcvQvSmeN6FyNDVhMIqjwU0Ym53x0emiLjjDLHCnNGtVSGUI MClvgBwUSVq23xO1IX5BsCd1c3aiUfL1qbVcVDl7W5clCyzTqkt4iJJaCe65SQ/mDl09db eM23tm3Lfwz38JXAiy35y2JZJJpDVNB9zIYhY8TG46wEEWo3OWZrmC5mFVMyVwRMdlSxYL /UrDijEjSYAevnLcWFQQOy0GFmk2mTZztM830HZyySBy5daTGVE0MwSYgdGCYNR8qrYp2e FNnA5lK004JxPE+LLODKnmeK5giIzaR0wVzRUzq45s2xaFkgjls+8oc8Z37xug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458488; 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=CWwyXxH9I9UVndw8UebqVDmEvyKhyDs4JXGg1jaA8XA=; b=XUQ6KhLfw0cwDZxAaneFInxXl1Vp0XKBIZ3D9ZcHPfpBqFjPiE7cr9s/hSxseiPWc8kSps mihubu5mz2W9tLLy7iSeYG3F/WQWpuYWZgHWGBlBs+z2NDAcrd6RY0wRUBXPGzRQHKDLrH AnvadWmxAu9LYqEYUavdlEJqVEpP5L9KxHb6WaTVqbmTLLfPcAuHOaYQ4LPlJwdNIqhSfC V0BSDPCFmXbh+N2DZo7KKqpMP65gOxRz0nke5bS2kgnZQpvOadHsRuLuSySpLeK2C362DR f4DTUzuC0XlQQZBufiSe+1lBeiqXLcI/Tq7QULbqrPBUEyT7aKKkpOLcRoSBpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727458488; a=rsa-sha256; cv=none; b=lO7YJBm6weUrm1dj1aEUZcaux06hyu03ZP0bYrsWPYxxOU2Tu8CMQaacpE/z9Muqf8Y3qK nHbc7UwQbpbEUAiQdAgNeAL/pdCQ7DuYBSfOL8kwNoHxyS+PdZAwuHO2pXIBlwb1wdKpBK J4q314E2usQUOCFoeOgvCaWGC+7Fw8SD9Ih5ix+XWKsw/f9M9pPnSL7hHIj9IB7ZTUhfR8 8hBNv8hNVN/9ztN9GKdQwE8eLasAsoEBcSfM6XdUneHNEyEO24xXWa1b0XFZz2HNHCInEh vyBXAhICS5UQ5/Y3pX9+L8IwIivaaU8VS2PuA4HNKEbH/DKu2ZMIOV7jOaUrhA== 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 4XFczX4th4zqgh; Fri, 27 Sep 2024 17:34:48 +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 48RHYmXr062844; Fri, 27 Sep 2024 17:34:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RHYmhl062841; Fri, 27 Sep 2024 17:34:48 GMT (envelope-from git) Date: Fri, 27 Sep 2024 17:34:48 GMT Message-Id: <202409271734.48RHYmhl062841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f713ed6694d9 - main - iommu: extend iommu_map_entry to store the list of associated freed page table pages 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f713ed6694d949ec37365533afbb47c04f919572 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f713ed6694d949ec37365533afbb47c04f919572 commit f713ed6694d949ec37365533afbb47c04f919572 Author: Konstantin Belousov AuthorDate: 2024-09-25 01:50:34 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 17:34:23 +0000 iommu: extend iommu_map_entry to store the list of associated freed page table pages The pages are inserted into the added slist if the entry parameter is passed to iommu_pgfree(). For now it is nop. Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/dev/iommu/iommu.h | 3 +++ sys/dev/iommu/iommu_gas.c | 14 +++++++++++--- sys/x86/iommu/intel_idpgtbl.c | 4 ++-- sys/x86/iommu/iommu_utils.c | 15 +++++++++++---- sys/x86/iommu/x86_iommu.h | 3 ++- 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/sys/dev/iommu/iommu.h b/sys/dev/iommu/iommu.h index 84d8c3680b71..73d0a6f1279b 100644 --- a/sys/dev/iommu/iommu.h +++ b/sys/dev/iommu/iommu.h @@ -31,6 +31,8 @@ #ifndef _DEV_IOMMU_IOMMU_H_ #define _DEV_IOMMU_IOMMU_H_ +#include +#include #include struct bus_dma_tag_common; @@ -61,6 +63,7 @@ struct iommu_map_entry { RB_ENTRY(iommu_map_entry) rb_entry; /* Links for domain entries */ struct iommu_domain *domain; struct iommu_qi_genseq gseq; + struct spglist pgtbl_free; }; struct iommu_unit { diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 26ac38da3c4f..d97bdee47b28 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -96,9 +96,12 @@ iommu_gas_alloc_entry(struct iommu_domain *domain, u_int flags) res = uma_zalloc(iommu_map_entry_zone, ((flags & IOMMU_PGF_WAITOK) != 0 ? M_WAITOK : M_NOWAIT) | M_ZERO); - if (res != NULL && domain != NULL) { - res->domain = domain; - atomic_add_int(&domain->entries_cnt, 1); + if (res != NULL) { + SLIST_INIT(&res->pgtbl_free); + if (domain != NULL) { + res->domain = domain; + atomic_add_int(&domain->entries_cnt, 1); + } } return (res); } @@ -107,7 +110,12 @@ void iommu_gas_free_entry(struct iommu_map_entry *entry) { struct iommu_domain *domain; + int n __unused; + n = vm_page_free_pages_toq(&entry->pgtbl_free, false); +#if defined(__i386__) || defined(__amd64__) + atomic_subtract_int(&iommu_tbl_pagecnt, n); +#endif domain = entry->domain; if (domain != NULL) atomic_subtract_int(&domain->entries_cnt, 1); diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index ffb4c73a6c5a..da2750df5567 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -367,7 +367,7 @@ retry: ("loosing root page %p", domain)); vm_page_unwire_noq(m); iommu_pgfree(domain->pgtbl_obj, m->pindex, - flags); + flags, NULL); return (NULL); } dmar_pte_store(&ptep->pte, DMAR_PTE_R | DMAR_PTE_W | @@ -571,7 +571,7 @@ dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, KASSERT(m->pindex != 0, ("lost reference (idx) on root pg domain %p base %jx lvl %d", domain, (uintmax_t)base, lvl)); - iommu_pgfree(domain->pgtbl_obj, m->pindex, flags); + iommu_pgfree(domain->pgtbl_obj, m->pindex, flags, NULL); dmar_free_pgtbl_pde(domain, base, lvl - 1, flags); } diff --git a/sys/x86/iommu/iommu_utils.c b/sys/x86/iommu/iommu_utils.c index 2011c632f770..8ff15cc86cb8 100644 --- a/sys/x86/iommu/iommu_utils.c +++ b/sys/x86/iommu/iommu_utils.c @@ -109,7 +109,8 @@ iommu_pgalloc(vm_object_t obj, vm_pindex_t idx, int flags) } void -iommu_pgfree(vm_object_t obj, vm_pindex_t idx, int flags) +iommu_pgfree(vm_object_t obj, vm_pindex_t idx, int flags, + struct iommu_map_entry *entry) { vm_page_t m; @@ -117,8 +118,13 @@ iommu_pgfree(vm_object_t obj, vm_pindex_t idx, int flags) VM_OBJECT_WLOCK(obj); m = vm_page_grab(obj, idx, VM_ALLOC_NOCREAT); if (m != NULL) { - vm_page_free(m); - atomic_subtract_int(&iommu_tbl_pagecnt, 1); + if (entry == NULL) { + vm_page_free(m); + atomic_subtract_int(&iommu_tbl_pagecnt, 1); + } else { + vm_page_remove_xbusy(m); /* keep page busy */ + SLIST_INSERT_HEAD(&entry->pgtbl_free, m, plinks.s.ss); + } } if ((flags & IOMMU_PGF_OBJL) == 0) VM_OBJECT_WUNLOCK(obj); @@ -154,7 +160,8 @@ iommu_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, sched_unpin(); if (allocated) { VM_OBJECT_ASSERT_WLOCKED(obj); - iommu_pgfree(obj, m->pindex, flags | IOMMU_PGF_OBJL); + iommu_pgfree(obj, m->pindex, flags | IOMMU_PGF_OBJL, + NULL); } if ((flags & IOMMU_PGF_OBJL) == 0) VM_OBJECT_WUNLOCK(obj); diff --git a/sys/x86/iommu/x86_iommu.h b/sys/x86/iommu/x86_iommu.h index a1ed5c71c513..4d0ac8351e2e 100644 --- a/sys/x86/iommu/x86_iommu.h +++ b/sys/x86/iommu/x86_iommu.h @@ -48,7 +48,8 @@ struct vm_object; struct vm_page *iommu_pgalloc(struct vm_object *obj, vm_pindex_t idx, int flags); -void iommu_pgfree(struct vm_object *obj, vm_pindex_t idx, int flags); +void iommu_pgfree(struct vm_object *obj, vm_pindex_t idx, int flags, + struct iommu_map_entry *entry); void *iommu_map_pgtbl(struct vm_object *obj, vm_pindex_t idx, int flags, struct sf_buf **sf); void iommu_unmap_pgtbl(struct sf_buf *sf); From nobody Fri Sep 27 17:34:49 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 4XFczZ2MSxz5YFHg; Fri, 27 Sep 2024 17:34:50 +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 4XFczY6YDyz4Cc0; Fri, 27 Sep 2024 17:34:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458489; 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=dySJndQuvKVDaTGC3vCChlFFggDzgvO8Ed+HxIfzKaQ=; b=rjMJnxJ+/YpbgSbbgWzYEK47xlZ1Qcia5V22uQc2wSagkLLNzrhbwleuGNTJWJTZBjpcw3 AsgQdpxBO6ZwstZX2kjRvEGYpt0MLnLbr30R0ihmlUOZQtEYGd60vnwwK7OFygoTfwmO9Z 7eRfJb6iv8D10Vp/nLHwuEPG6ga1CuT/F47Tta17fvDSmJzwY1HIJkpPe0NQHk62HL3FDB 1iA4faSaD19U2GLKN9axPT/niEjbC+1IrfehLyWIJIer35CItr9vGbPu823og4mXKaOpM6 iL6fLpOhev9/xbzl+Vx9OTRjzEokjbj3ImMeFRxFHzNADCgIGRyFtHV6VsLYag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727458489; 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=dySJndQuvKVDaTGC3vCChlFFggDzgvO8Ed+HxIfzKaQ=; b=uC/k4biTHDFxhj1zLC2Ta0+kJTXdN4hL9I7+8ODDgQWun/KLFBuC12/4BhSb9Q5RpPINca HY7saMnzdybw4PmgK4Vk8wYj/EKCfyYB1qdtpS2f/oFdjrF8owgflF9ziNORRn3JaG/9oj 36qkzOODGqSh4qIQwayy4BuiHkDwCLGEt7nogq/hdGsj04z9+jBBGSeCuwuXg+4b0KOfiv tMgia9CFpZZd4vNt0XfYXKlrUgm2VzSN4dhXo/7SbXPsHvXDXpucacM7vP7tIkvUQUAUVt HeDqgyVY+hA2gKfbg9S1sheW7pUhlg5bsdL6fUUtmZ6e9InciYesUbybWFCpDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727458489; a=rsa-sha256; cv=none; b=je4fW3xBLRqg4VTccHMG0ARDnucgKpWMy14zkBMtFG6awHhzkYxZi7h0BK+VraA11rBNmQ ewnzTjXZtJJofXq5J1HHAV6oGysTK3F1VeFLIvLalYopmYxrjUKhnp2SpvF7/MdvSRTLJe ab8DhygVSIyBMtcVKJYJypg5rFIv0I88oK5Yji0DSwvb/9PBtdczA6YL9CUy8x9DHpSXNb tk7VS/HHoAXH/mC3W0ex6XTpLTYkxY5JDaisyVSk7HPxHurQytR9oPZg5ynzsbCJbvN956 yT2nL/+lbqs5AfydgAfARiOm97t8X09ZdQQ0PWVk1rcR8kMsmPJCsedIhDJCtg== 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 4XFczY5yDJzqdH; Fri, 27 Sep 2024 17:34:49 +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 48RHYnth062913; Fri, 27 Sep 2024 17:34:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RHYnCg062910; Fri, 27 Sep 2024 17:34:49 GMT (envelope-from git) Date: Fri, 27 Sep 2024 17:34:49 GMT Message-Id: <202409271734.48RHYnCg062910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3848dc4fe6f3 - main - dmar: on unmap, postpone freeing page table pages after the invalidation is done 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3848dc4fe6f37cbcfaea29eb94fa560a503f60ab Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3848dc4fe6f37cbcfaea29eb94fa560a503f60ab commit 3848dc4fe6f37cbcfaea29eb94fa560a503f60ab Author: Konstantin Belousov AuthorDate: 2024-09-25 03:54:44 +0000 Commit: Konstantin Belousov CommitDate: 2024-09-27 17:34:23 +0000 dmar: on unmap, postpone freeing page table pages after the invalidation is done IOMMU is free to access page tables until we invalidate them Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/x86/iommu/intel_idpgtbl.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/sys/x86/iommu/intel_idpgtbl.c b/sys/x86/iommu/intel_idpgtbl.c index da2750df5567..6f66106822fe 100644 --- a/sys/x86/iommu/intel_idpgtbl.c +++ b/sys/x86/iommu/intel_idpgtbl.c @@ -68,7 +68,8 @@ #include static int dmar_unmap_buf_locked(struct dmar_domain *domain, - iommu_gaddr_t base, iommu_gaddr_t size, int flags); + iommu_gaddr_t base, iommu_gaddr_t size, int flags, + struct iommu_map_entry *entry); /* * The cache of the identity mapping page tables for the DMARs. Using @@ -386,7 +387,8 @@ retry: static int dmar_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, - iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags) + iommu_gaddr_t size, vm_page_t *ma, uint64_t pflags, int flags, + struct iommu_map_entry *entry) { iommu_pte_t *pte; struct sf_buf *sf; @@ -446,7 +448,7 @@ dmar_map_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, if (sf != NULL) iommu_unmap_pgtbl(sf); dmar_unmap_buf_locked(domain, base1, base - base1, - flags); + flags, entry); TD_PINNED_ASSERT; return (ENOMEM); } @@ -517,7 +519,8 @@ dmar_map_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, KASSERT((flags & ~IOMMU_PGF_WAITOK) == 0, ("invalid flags %x", flags)); DMAR_DOMAIN_PGLOCK(domain); - error = dmar_map_buf_locked(domain, base, size, ma, pflags, flags); + error = dmar_map_buf_locked(domain, base, size, ma, pflags, flags, + entry); DMAR_DOMAIN_PGUNLOCK(domain); if (error != 0) return (error); @@ -535,11 +538,11 @@ dmar_map_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, static void dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, int flags, iommu_pte_t *pte, - struct sf_buf **sf, bool free_fs); + struct sf_buf **sf, struct iommu_map_entry *entry, bool free_fs); static void dmar_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, - int lvl, int flags) + int lvl, int flags, struct iommu_map_entry *entry) { struct sf_buf *sf; iommu_pte_t *pde; @@ -547,12 +550,14 @@ dmar_free_pgtbl_pde(struct dmar_domain *domain, iommu_gaddr_t base, sf = NULL; pde = dmar_pgtbl_map_pte(domain, base, lvl, flags, &idx, &sf); - dmar_unmap_clear_pte(domain, base, lvl, flags, pde, &sf, true); + dmar_unmap_clear_pte(domain, base, lvl, flags, pde, &sf, + entry, true); } static void dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, - int flags, iommu_pte_t *pte, struct sf_buf **sf, bool free_sf) + int flags, iommu_pte_t *pte, struct sf_buf **sf, + struct iommu_map_entry *entry, bool free_sf) { vm_page_t m; @@ -571,8 +576,8 @@ dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, KASSERT(m->pindex != 0, ("lost reference (idx) on root pg domain %p base %jx lvl %d", domain, (uintmax_t)base, lvl)); - iommu_pgfree(domain->pgtbl_obj, m->pindex, flags, NULL); - dmar_free_pgtbl_pde(domain, base, lvl - 1, flags); + iommu_pgfree(domain->pgtbl_obj, m->pindex, flags, entry); + dmar_free_pgtbl_pde(domain, base, lvl - 1, flags, entry); } /* @@ -580,7 +585,7 @@ dmar_unmap_clear_pte(struct dmar_domain *domain, iommu_gaddr_t base, int lvl, */ static int dmar_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, - iommu_gaddr_t size, int flags) + iommu_gaddr_t size, int flags, struct iommu_map_entry *entry) { iommu_pte_t *pte; struct sf_buf *sf; @@ -631,7 +636,7 @@ dmar_unmap_buf_locked(struct dmar_domain *domain, iommu_gaddr_t base, if ((pte->pte & DMAR_PTE_SP) != 0 || lvl == domain->pglvl - 1) { dmar_unmap_clear_pte(domain, base, lvl, - flags, pte, &sf, false); + flags, pte, &sf, entry, false); break; } } @@ -661,7 +666,7 @@ dmar_unmap_buf(struct iommu_domain *iodom, struct iommu_map_entry *entry, DMAR_DOMAIN_PGLOCK(domain); error = dmar_unmap_buf_locked(domain, entry->start, entry->end - - entry->start, flags); + entry->start, flags, entry); DMAR_DOMAIN_PGUNLOCK(domain); return (error); } From nobody Fri Sep 27 17:54:33 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 4XFdQK386Rz5YFqN; Fri, 27 Sep 2024 17:54:33 +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 4XFdQK2lWXz4Gpv; Fri, 27 Sep 2024 17:54:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727459673; 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=E3px+aIZPq5jAMRxv5JvdRCMlEGaaOldqTZeHAbARDA=; b=qjAUDGksvr/FD+Fby8lfOBe5c3HVOK/Tr9qxb44IyUxgfTE+t+RDF/6dIdrOi3BbIhEFra KypxjFYtuh/j+jkvGlvf6TsMjJFz4ya6OAkZLnajZNhJhdtF3sLeKFlUyx1eskIajRkMVv 69PwECPgnSTiAbvQ3KGmc090yXeTHKpyQY7W93n5Ipl/qRf9qTZ2p+oOmE98TDyp0OFWpJ aVafbLHIC16KHHjsjA98xit8TyxYxXWz4mUnJWxOoYeIL/gpWwaKAWJMH1klvEnuTpkgoW 6JjJKlGS/FQBnz9Mwp1qiIINdRuwjzE1MdqKrmZYybG1+Ab8agicPwvDiw7odw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727459673; 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=E3px+aIZPq5jAMRxv5JvdRCMlEGaaOldqTZeHAbARDA=; b=AVGHipW+9BQbneGKixA/xXfHrrWHIGorsCSRUN7Qlk1fJpm60BeSBDv4tAHQIyLoaiPaar FR/oD7ZlntuN9r13qnZV7PwlvAXK8WA/Mx30zSPeCMU57iFALF/DV1mvlwM7iY2WNAQ4KK w7zLeu0tWZ+6BAxWKqad4RLQDvjvw2Gcw9T6R7hnjIbHSu6+/JoASZ85id9Uayx3efjQ+e Up4Si40hvV6HtKDuCeMEu7kGs59nMsn5Cq7CeLAeMXGkqB1VWA/5MoxCVb5yZmZYhygQqN qSer0hKmpdO7ciH1bSr+aYW4stWiuF/jOUNS70DvAi9yYrlpGOWraUhSoiPD8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727459673; a=rsa-sha256; cv=none; b=w0qaCrWQBZts1XziiG7aD6nTugJRH+F13yJJXXtkxsH1UZZIRqU7k9HIvm27ZxsZ0ZQeil bBnk1mPImCax24qRCf5KPXZVHoMOKtmxrGenyl4XvlqYda3GCLBozkNsABsE96NLoL4lmu MR8JjtjyMU8KLsuGMPyVSoMVKCPNGZQ60ouQW+87j1td17xnqNDIEsxoqZsU34BHpK6sDO P11itsYiOSDi2fIzsyyUNpSyW9dQpNM+Tzm+bEirA/1FNGMpvlf3UKoinBHSzyhDuNisT8 GAXYiP+col1IWU30jAcMiUurMMQ3aaV2eSzBoNkdYaDj0Ue1+V5yYv1rJ6M0Qg== 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 4XFdQK2LyVzqlY; Fri, 27 Sep 2024 17:54:33 +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 48RHsX0f096261; Fri, 27 Sep 2024 17:54:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RHsXsE096258; Fri, 27 Sep 2024 17:54:33 GMT (envelope-from git) Date: Fri, 27 Sep 2024 17:54:33 GMT Message-Id: <202409271754.48RHsXsE096258@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0b325167f60d - main - LinuxKPI: 802.11: move functions between header files 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b325167f60def621536632460caf68e2fab4fb8 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0b325167f60def621536632460caf68e2fab4fb8 commit 0b325167f60def621536632460caf68e2fab4fb8 Author: Bjoern A. Zeeb AuthorDate: 2024-09-27 17:47:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-27 17:54:16 +0000 LinuxKPI: 802.11: move functions between header files Move some ieee8022_{is,has,get}_... functions working on header fields from mac80211.h to ieee80211.h to avoid problems with #includes. No functional changes. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- .../linuxkpi/common/include/linux/ieee80211.h | 351 +++++++++++++++++++++ sys/compat/linuxkpi/common/include/net/mac80211.h | 341 -------------------- 2 files changed, 351 insertions(+), 341 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 9a43a571d390..ce6a18f798d1 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -37,6 +37,14 @@ #include #include +/* linux_80211.c */ +extern int linuxkpi_debug_80211; +#ifndef D80211_TODO +#define D80211_TODO 0x1 +#endif +#define TODO(...) if (linuxkpi_debug_80211 & D80211_TODO) \ + printf("%s:%d: XXX LKPI80211 TODO\n", __func__, __LINE__) + /* 9.4.2.55 Management MIC element (CMAC-256, GMAC-128, and GMAC-256). */ struct ieee80211_mmie_16 { @@ -853,4 +861,347 @@ ieee80211_is_trigger(__le16 fc) return (fc == v); } +static __inline bool +ieee80211_is_action(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_ACTION | IEEE80211_FC0_TYPE_MGT); + + return (fc == v); +} + +static __inline bool +ieee80211_is_probe_resp(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_PROBE_RESP | IEEE80211_FC0_TYPE_MGT); + + return (fc == v); +} + +static __inline bool +ieee80211_is_auth(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_AUTH | IEEE80211_FC0_TYPE_MGT); + + return (fc == v); +} + +static __inline bool +ieee80211_is_assoc_req(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_ASSOC_REQ | IEEE80211_FC0_TYPE_MGT); + + return (fc == v); +} + +static __inline bool +ieee80211_is_assoc_resp(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_ASSOC_RESP | IEEE80211_FC0_TYPE_MGT); + + return (fc == v); +} + +static __inline bool +ieee80211_is_reassoc_req(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_REASSOC_REQ | IEEE80211_FC0_TYPE_MGT); + + return (fc == v); +} + +static __inline bool +ieee80211_is_reassoc_resp(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_REASSOC_RESP | IEEE80211_FC0_TYPE_MGT); + + return (fc == v); +} + +static __inline bool +ieee80211_is_disassoc(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_DISASSOC | IEEE80211_FC0_TYPE_MGT); + + return (fc == v); +} + +static __inline bool +ieee80211_is_data_present(__le16 fc) +{ + __le16 v; + + /* If it is a data frame and NODATA is not present. */ + fc &= htole16(IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_NODATA); + v = htole16(IEEE80211_FC0_TYPE_DATA); + + return (fc == v); +} + +static __inline bool +ieee80211_is_deauth(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_DEAUTH | IEEE80211_FC0_TYPE_MGT); + + return (fc == v); +} + +static __inline bool +ieee80211_is_beacon(__le16 fc) +{ + __le16 v; + + /* + * For as much as I get it this comes in LE and unlike FreeBSD + * where we get the entire frame header and u8[], here we get the + * 9.2.4.1 Frame Control field only. Mask and compare. + */ + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_BEACON | IEEE80211_FC0_TYPE_MGT); + + return (fc == v); +} + + +static __inline bool +ieee80211_is_probe_req(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_PROBE_REQ | IEEE80211_FC0_TYPE_MGT); + + return (fc == v); +} + +static __inline bool +ieee80211_has_protected(__le16 fc) +{ + + return (fc & htole16(IEEE80211_FC1_PROTECTED << 8)); +} + +static __inline bool +ieee80211_is_back_req(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_BAR | IEEE80211_FC0_TYPE_CTL); + + return (fc == v); +} + +static __inline bool +ieee80211_is_bufferable_mmpdu(struct sk_buff *skb) +{ + struct ieee80211_mgmt *mgmt; + __le16 fc; + + mgmt = (struct ieee80211_mgmt *)skb->data; + fc = mgmt->frame_control; + + /* 11.2.2 Bufferable MMPDUs, 80211-2020. */ + /* XXX we do not care about IBSS yet. */ + + if (!ieee80211_is_mgmt(fc)) + return (false); + if (ieee80211_is_action(fc)) /* XXX FTM? */ + return (true); /* XXX false? */ + if (ieee80211_is_disassoc(fc)) + return (true); + if (ieee80211_is_deauth(fc)) + return (true); + + TODO(); + + return (false); +} + +static __inline bool +ieee80211_is_nullfunc(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_NODATA | IEEE80211_FC0_TYPE_DATA); + + return (fc == v); +} + +static __inline bool +ieee80211_is_qos_nullfunc(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_QOS_NULL | IEEE80211_FC0_TYPE_DATA); + + return (fc == v); +} + +static __inline bool +ieee80211_is_any_nullfunc(__le16 fc) +{ + + return (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)); +} + +static inline bool +ieee80211_is_pspoll(__le16 fc) +{ + __le16 v; + + fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); + v = htole16(IEEE80211_FC0_SUBTYPE_PS_POLL | IEEE80211_FC0_TYPE_CTL); + + return (fc == v); +} + +static __inline bool +ieee80211_has_a4(__le16 fc) +{ + __le16 v; + + fc &= htole16((IEEE80211_FC1_DIR_TODS | IEEE80211_FC1_DIR_FROMDS) << 8); + v = htole16((IEEE80211_FC1_DIR_TODS | IEEE80211_FC1_DIR_FROMDS) << 8); + + return (fc == v); +} + +static __inline bool +ieee80211_has_order(__le16 fc) +{ + + return (fc & htole16(IEEE80211_FC1_ORDER << 8)); +} + +static __inline bool +ieee80211_has_retry(__le16 fc) +{ + + return (fc & htole16(IEEE80211_FC1_RETRY << 8)); +} + + +static __inline bool +ieee80211_has_fromds(__le16 fc) +{ + + return (fc & htole16(IEEE80211_FC1_DIR_FROMDS << 8)); +} + +static __inline bool +ieee80211_has_tods(__le16 fc) +{ + + return (fc & htole16(IEEE80211_FC1_DIR_TODS << 8)); +} + +static __inline uint8_t * +ieee80211_get_SA(struct ieee80211_hdr *hdr) +{ + + if (ieee80211_has_a4(hdr->frame_control)) + return (hdr->addr4); + if (ieee80211_has_fromds(hdr->frame_control)) + return (hdr->addr3); + return (hdr->addr2); +} + +static __inline uint8_t * +ieee80211_get_DA(struct ieee80211_hdr *hdr) +{ + + if (ieee80211_has_tods(hdr->frame_control)) + return (hdr->addr3); + return (hdr->addr1); +} + +static __inline bool +ieee80211_is_frag(struct ieee80211_hdr *hdr) +{ + TODO(); + return (false); +} + +static __inline bool +ieee80211_is_first_frag(__le16 fc) +{ + TODO(); + return (false); +} + +static __inline bool +ieee80211_is_robust_mgmt_frame(struct sk_buff *skb) +{ + TODO(); + return (false); +} + +static __inline bool +ieee80211_is_ftm(struct sk_buff *skb) +{ + TODO(); + return (false); +} + +static __inline bool +ieee80211_is_timing_measurement(struct sk_buff *skb) +{ + TODO(); + return (false); +} + +static __inline bool +ieee80211_has_pm(__le16 fc) +{ + TODO(); + return (false); +} + +static __inline bool +ieee80211_has_morefrags(__le16 fc) +{ + + fc &= htole16(IEEE80211_FC1_MORE_FRAG << 8); + return (fc != 0); +} + +static __inline u8 * +ieee80211_get_qos_ctl(struct ieee80211_hdr *hdr) +{ + if (ieee80211_has_a4(hdr->frame_control)) + return (u8 *)hdr + 30; + else + return (u8 *)hdr + 24; +} + + #endif /* _LINUXKPI_LINUX_IEEE80211_H */ diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 29fb335a8db9..c3b07b68090a 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1260,229 +1260,6 @@ ieee80211_hw_restart_disconnect(struct ieee80211_vif *vif) /* -------------------------------------------------------------------------- */ -static __inline bool -ieee80211_is_action(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_ACTION | IEEE80211_FC0_TYPE_MGT); - - return (fc == v); -} - -static __inline bool -ieee80211_is_probe_resp(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_PROBE_RESP | IEEE80211_FC0_TYPE_MGT); - - return (fc == v); -} - -static __inline bool -ieee80211_is_auth(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_AUTH | IEEE80211_FC0_TYPE_MGT); - - return (fc == v); -} - -static __inline bool -ieee80211_is_assoc_req(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_ASSOC_REQ | IEEE80211_FC0_TYPE_MGT); - - return (fc == v); -} - -static __inline bool -ieee80211_is_assoc_resp(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_ASSOC_RESP | IEEE80211_FC0_TYPE_MGT); - - return (fc == v); -} - -static __inline bool -ieee80211_is_reassoc_req(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_REASSOC_REQ | IEEE80211_FC0_TYPE_MGT); - - return (fc == v); -} - -static __inline bool -ieee80211_is_reassoc_resp(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_REASSOC_RESP | IEEE80211_FC0_TYPE_MGT); - - return (fc == v); -} - -static __inline bool -ieee80211_is_disassoc(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_DISASSOC | IEEE80211_FC0_TYPE_MGT); - - return (fc == v); -} - -static __inline bool -ieee80211_is_data_present(__le16 fc) -{ - __le16 v; - - /* If it is a data frame and NODATA is not present. */ - fc &= htole16(IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_NODATA); - v = htole16(IEEE80211_FC0_TYPE_DATA); - - return (fc == v); -} - -static __inline bool -ieee80211_is_deauth(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_DEAUTH | IEEE80211_FC0_TYPE_MGT); - - return (fc == v); -} - -static __inline bool -ieee80211_is_beacon(__le16 fc) -{ - __le16 v; - - /* - * For as much as I get it this comes in LE and unlike FreeBSD - * where we get the entire frame header and u8[], here we get the - * 9.2.4.1 Frame Control field only. Mask and compare. - */ - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_BEACON | IEEE80211_FC0_TYPE_MGT); - - return (fc == v); -} - - -static __inline bool -ieee80211_is_probe_req(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_PROBE_REQ | IEEE80211_FC0_TYPE_MGT); - - return (fc == v); -} - -static __inline bool -ieee80211_has_protected(__le16 fc) -{ - - return (fc & htole16(IEEE80211_FC1_PROTECTED << 8)); -} - -static __inline bool -ieee80211_is_back_req(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_BAR | IEEE80211_FC0_TYPE_CTL); - - return (fc == v); -} - -static __inline bool -ieee80211_is_bufferable_mmpdu(struct sk_buff *skb) -{ - struct ieee80211_mgmt *mgmt; - __le16 fc; - - mgmt = (struct ieee80211_mgmt *)skb->data; - fc = mgmt->frame_control; - - /* 11.2.2 Bufferable MMPDUs, 80211-2020. */ - /* XXX we do not care about IBSS yet. */ - - if (!ieee80211_is_mgmt(fc)) - return (false); - if (ieee80211_is_action(fc)) /* XXX FTM? */ - return (true); /* XXX false? */ - if (ieee80211_is_disassoc(fc)) - return (true); - if (ieee80211_is_deauth(fc)) - return (true); - - TODO(); - - return (false); -} - -static __inline bool -ieee80211_is_nullfunc(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_NODATA | IEEE80211_FC0_TYPE_DATA); - - return (fc == v); -} - -static __inline bool -ieee80211_is_qos_nullfunc(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_QOS_NULL | IEEE80211_FC0_TYPE_DATA); - - return (fc == v); -} - -static __inline bool -ieee80211_is_any_nullfunc(__le16 fc) -{ - - return (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc)); -} - -static inline bool -ieee80211_is_pspoll(__le16 fc) -{ - __le16 v; - - fc &= htole16(IEEE80211_FC0_SUBTYPE_MASK | IEEE80211_FC0_TYPE_MASK); - v = htole16(IEEE80211_FC0_SUBTYPE_PS_POLL | IEEE80211_FC0_TYPE_CTL); - - return (fc == v); -} - static __inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif) { @@ -1490,124 +1267,6 @@ ieee80211_vif_is_mesh(struct ieee80211_vif *vif) return (false); } -static __inline bool -ieee80211_is_frag(struct ieee80211_hdr *hdr) -{ - TODO(); - return (false); -} - -static __inline bool -ieee80211_is_first_frag(__le16 fc) -{ - TODO(); - return (false); -} - -static __inline bool -ieee80211_is_robust_mgmt_frame(struct sk_buff *skb) -{ - TODO(); - return (false); -} - -static __inline bool -ieee80211_is_ftm(struct sk_buff *skb) -{ - TODO(); - return (false); -} - -static __inline bool -ieee80211_is_timing_measurement(struct sk_buff *skb) -{ - TODO(); - return (false); -} - -static __inline bool -ieee80211_has_pm(__le16 fc) -{ - TODO(); - return (false); -} - -static __inline bool -ieee80211_has_a4(__le16 fc) -{ - __le16 v; - - fc &= htole16((IEEE80211_FC1_DIR_TODS | IEEE80211_FC1_DIR_FROMDS) << 8); - v = htole16((IEEE80211_FC1_DIR_TODS | IEEE80211_FC1_DIR_FROMDS) << 8); - - return (fc == v); -} - -static __inline bool -ieee80211_has_order(__le16 fc) -{ - - return (fc & htole16(IEEE80211_FC1_ORDER << 8)); -} - -static __inline bool -ieee80211_has_retry(__le16 fc) -{ - - return (fc & htole16(IEEE80211_FC1_RETRY << 8)); -} - - -static __inline bool -ieee80211_has_fromds(__le16 fc) -{ - - return (fc & htole16(IEEE80211_FC1_DIR_FROMDS << 8)); -} - -static __inline bool -ieee80211_has_tods(__le16 fc) -{ - - return (fc & htole16(IEEE80211_FC1_DIR_TODS << 8)); -} - -static __inline uint8_t * -ieee80211_get_SA(struct ieee80211_hdr *hdr) -{ - - if (ieee80211_has_a4(hdr->frame_control)) - return (hdr->addr4); - if (ieee80211_has_fromds(hdr->frame_control)) - return (hdr->addr3); - return (hdr->addr2); -} - -static __inline uint8_t * -ieee80211_get_DA(struct ieee80211_hdr *hdr) -{ - - if (ieee80211_has_tods(hdr->frame_control)) - return (hdr->addr3); - return (hdr->addr1); -} - -static __inline bool -ieee80211_has_morefrags(__le16 fc) -{ - - fc &= htole16(IEEE80211_FC1_MORE_FRAG << 8); - return (fc != 0); -} - -static __inline u8 * -ieee80211_get_qos_ctl(struct ieee80211_hdr *hdr) -{ - if (ieee80211_has_a4(hdr->frame_control)) - return (u8 *)hdr + 30; - else - return (u8 *)hdr + 24; -} /* -------------------------------------------------------------------------- */ /* Receive functions (air/driver to mac80211/net80211). */ From nobody Fri Sep 27 19:33:00 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 4XFgbx1j4kz5X7Xb; Fri, 27 Sep 2024 19:33:01 +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 4XFgbx0vx6z4T3W; Fri, 27 Sep 2024 19:33:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727465581; 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=USMn2k7+KZLJiJmBYSM9e2afK0Rfvr8nslxm6u2XwW8=; b=dhi01/gYnXhmgm9N/9WEc83t9/SQ7z7uYxRyMR5cSGPQJy1/Q05OGjN67qiWqIcVfOnt3W gAQwe8EZJSLBz/A3bbkopMgrP6ppeSApZRkmrK7igStQ/HqIXGS7BDtKX/BJLGVlBgy4Di 7lh2P5ivCLHzKp+gjvhVPJl6z3LHM2op8/ZYGyPkZIQStpJa5ARItvYajJiLjLFyIS9Vzk kg6Q+O+fTiC888KSyLNYaE2kebPOD+sp0V1fCg3wu0zoWahJuV+7/j8B3E95OzHXSLqq82 hIeT4O+uEAon8MTdF+0BIOVejUJq9b1MWccUzE1r/DpfzuUvLChS6Ylr7EWEMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727465581; 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=USMn2k7+KZLJiJmBYSM9e2afK0Rfvr8nslxm6u2XwW8=; b=VBzspu4Y6VBsc+pqkPmAsuy9HdKWzF9qWPlihR6ozzvJlRfpmcjVmcVSAtEGXcuN5/tiSw RYW1AVxM8IWKJ2mkNB0c/qwIpCm516dAwNboVcanzM24uw4FiLrNfc7r4n2ta2ylDrCQ46 AWSX/XWYMMozuBL08Y9qixgc0qaNYcJCL1vvy2Wn5RY4CHOqPtf84lBPMddie/DB5ZBzxe +UvePhZuzkML4xGNCVFTwGYPPJ1GUEpclb8cfoPhWeIIDn7ltcTDP8c987lMv/aucntHnz Nxtc31ZOBWMKebfCJ9WnNLUwJQmwoOLA1SNu0KnFrM4Dr0u3fKEKENLxldDldg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727465581; a=rsa-sha256; cv=none; b=L4kPBWmuXsEXE1o1GDuywxGUoOUZs9fNo0sFLgBy0brUXLb47GzEEK4PEXlVVCR+hPVSVF k7hruxKIQYcjOshnnZ/ud9uHbqF+B3ochl0qtIIstiDAMAFTZqZ62AvZMliCObJ0i5Xcu4 390broy11BdDIBaNHIRBatbjRbhl7RBsdGcy31wt8vZpGUW5BmYT4gvftVJ+YCmFwmJNvq 7oKpNByP7TfFY3PSNJtMh2b+YbBiaxaJI7hau2JOOquwjpCc9Ssp5FKoSzojnUkZ56FeX0 5cqZhsD4qsM3f6ytvEkDuOopSA7arBD3loxwnCu113fDINZn/HL/8ks83vzU8g== 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 4XFgbx0CPyztTS; Fri, 27 Sep 2024 19:33:01 +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 48RJX09W066671; Fri, 27 Sep 2024 19:33:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RJX0dH066668; Fri, 27 Sep 2024 19:33:00 GMT (envelope-from git) Date: Fri, 27 Sep 2024 19:33:00 GMT Message-Id: <202409271933.48RJX0dH066668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 1235d276b78a - main - lib{c,sys}: stop exposing errno symbol 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1235d276b78a769bded01d51c9bf3cdc480db9fb Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=1235d276b78a769bded01d51c9bf3cdc480db9fb commit 1235d276b78a769bded01d51c9bf3cdc480db9fb Author: Brooks Davis AuthorDate: 2024-09-27 19:27:46 +0000 Commit: Brooks Davis CommitDate: 2024-09-27 19:27:46 +0000 lib{c,sys}: stop exposing errno symbol Officially since C11 (and in reality FreeBSD since 3.0 with commit 1b46cb523df3) errno has been defined to be a macro. Rename the symbol to __libsys_errno and move it to FBSDprivate_1.0 and confine it entierly to libsys for use by libthr. Add a FBSD_1.0 compat symbol for existing binaries that were incorrectly linked to the errno symbol during libc.so.7's lifetime. This deliberately breaks linking software that directly links to errno. Such software is broken and will fail in surprising ways if it becomes threaded (e.g., if it triggers loading of a pam or nss module that uses threads.) Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46780 --- lib/libsys/Makefile | 2 ++ lib/libsys/Symbol.map | 1 + lib/libsys/Symbol.sys.map | 1 - lib/libsys/__error.c | 10 +++++----- lib/libthr/sys/thr_error.c | 5 ++--- lib/libthr/thread/thr_rtld.c | 7 +++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/libsys/Makefile b/lib/libsys/Makefile index b4c0e91e860c..b4b4662ae47f 100644 --- a/lib/libsys/Makefile +++ b/lib/libsys/Makefile @@ -25,6 +25,8 @@ MK_SSP= no INCS= libsys.h _libsys.h +CFLAGS+=-DLIBSYS + CFLAGS+=-I${LIBSYS_SRCTOP}/include -I${LIBC_SRCTOP}/include CFLAGS+=-I${LIBSYS_SRCTOP}/${LIBC_ARCH} CFLAGS+=-I${LIBC_SRCTOP}/${LIBC_ARCH} diff --git a/lib/libsys/Symbol.map b/lib/libsys/Symbol.map index b2bc69108bbb..51ea1b5da231 100644 --- a/lib/libsys/Symbol.map +++ b/lib/libsys/Symbol.map @@ -1,5 +1,6 @@ FBSDprivate_1.0 { __elf_aux_vector; + __libsys_errno; __getosreldate; __libsys_interposing_slot; __realpathat; diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map index 5a4e66baf3c4..85373b1f9cda 100644 --- a/lib/libsys/Symbol.sys.map +++ b/lib/libsys/Symbol.sys.map @@ -72,7 +72,6 @@ FBSD_1.0 { extattr_set_file; extattr_set_link; extattrctl; - errno; fchdir; fchflags; fchmod; diff --git a/lib/libsys/__error.c b/lib/libsys/__error.c index 1132bdba9c65..41016e9a1ed2 100644 --- a/lib/libsys/__error.c +++ b/lib/libsys/__error.c @@ -31,13 +31,15 @@ #include "libc_private.h" -int errno; +int __libsys_errno; +#ifdef LIBSYS +__sym_compat(errno, __libsys_errno, FBSD_1.0); +#endif static int * __error_unthreaded(void) { - - return (&errno); + return (&__libsys_errno); } static int *(*__error_selector)(void) = __error_unthreaded; @@ -45,13 +47,11 @@ static int *(*__error_selector)(void) = __error_unthreaded; void __set_error_selector(int *(*arg)(void)) { - __error_selector = arg; } int * __error(void) { - return (__error_selector()); } diff --git a/lib/libthr/sys/thr_error.c b/lib/libthr/sys/thr_error.c index 7ce3a84fab6b..ec7a57bf6610 100644 --- a/lib/libthr/sys/thr_error.c +++ b/lib/libthr/sys/thr_error.c @@ -39,8 +39,7 @@ #include "libc_private.h" #include "thr_private.h" -#undef errno -extern int errno; +extern int __libsys_errno; __weak_reference(__error_threaded, __error); int * @@ -53,5 +52,5 @@ __error_threaded(void) if (curthread != NULL && curthread != _thr_initial) return (&curthread->error); } - return (&errno); + return (&__libsys_errno); } diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c index 68a02e9aca1b..e5a7f86de288 100644 --- a/lib/libthr/thread/thr_rtld.c +++ b/lib/libthr/thread/thr_rtld.c @@ -39,8 +39,7 @@ #include "rtld_lock.h" #include "thr_private.h" -#undef errno -extern int errno; +extern int __libsys_errno; static int _thr_rtld_clr_flag(int); static void *_thr_rtld_lock_create(void); @@ -96,14 +95,14 @@ _thr_rtld_lock_destroy(void *lock) if (curthread != _thr_initial) \ errsave = curthread->error; \ else \ - errsave = errno; \ + errsave = __libsys_errno; \ } #define RESTORE_ERRNO() { \ if (curthread != _thr_initial) \ curthread->error = errsave; \ else \ - errno = errsave; \ + __libsys_errno = errsave; \ } static void From nobody Fri Sep 27 22:15:19 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 4XFlCC3CZ5z5XKCK; Fri, 27 Sep 2024 22:15:19 +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 4XFlCC27Vbz4kPx; Fri, 27 Sep 2024 22:15:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475319; 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=lIjx3FQBj3/YLwX7RWO0/3yvljvCZXOyAiFYkqScNxY=; b=ZUnXMdgnDisXDY0ZQQe0+qpEvQd7xtuBMxu9psAGGnKeQ7NPCVTBFKFPeIhIevUfQFmBip H5ao040r6moBiErc0wc0FCrjNV8MjLk2sdvgFAGi6ChTVA2PwHHcUtWDS7lMLhWvz521ra 3xrSqUuFLUj5z0hjcl1Loz0i6eOLm96u3VbmutbeAQKVwPf0KpD0eSQcKbjjTbNNcmem3p nV4vhY0Jx63h/HhjjMWYehS5O556iZx0LRngdjPQGJ6pdvzDVDyocqYvhI4Ys2ZSihM3Wr rTXRG4W3HpmvwmRTDN5hZZO4Q3OnMSKFmyQ95774MWA7o4tHCfq8YpmHxejGNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475319; 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=lIjx3FQBj3/YLwX7RWO0/3yvljvCZXOyAiFYkqScNxY=; b=ERehpbb0Tpkfneo3XtZk7SlHSn7eaDt2BD/c5dGib96DgFJQGDMVpJjNBB5RHXjH/qqRDJ eOsPAV707+WElQ6creau5kjtfBRbzFKYtfttMLEh5IXsLnrPt0Vhp6A7rwLiTB/JwMPDo/ 48FLSXVKw02F1pGNaRPHNO6EvZLcl0XAnmtJbkjuINnq7e7dgHbIqT5FYKKqkFT94nTa3R dfkwdRrAH5zLSIzVPIMy2UJvw09SBDQkbhbrPrn6A7hdGA0vPwDjsyFm39qN6K08vuD1xS 1rkeQpZ8knSLkp6retzYvaR0wCnFe95UiqUvzP39vdj54JQYxhXYJMoQxS+43Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727475319; a=rsa-sha256; cv=none; b=ZVjzAoNfou+KiFpcUiKwc5VCIYFAKwI9R9sUISuNWhuE5BcwThisNCt8ehR36Yl5sj5tlm Uoh3N2xh4T1sOrGKHyjbOveGbHJSBQSTScYauNVlM2aaC2SYk+wztBOh0LRUuqysiHOiIc jRxRfj1TNZ3702QXg+QvR7da9ICtwqmBeHrZadjLJxpe8Lp1pxEHkxChJVt57MXnvXqoQS ccDwYeUU45XwxJBsiTQI7RQNkEhzU7J2qmuRQifD/WbgKrrpa5Zs0w8zk6jQqCXp7NXf1T 3DbqXMzknJ6vTpe+SIdcAWAtKOi1fsnlj5+xsuHTs+gSV+N/pDzPOYuhIpCpwA== 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 4XFlCC1fGKzyMb; Fri, 27 Sep 2024 22:15:19 +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 48RMFJks038842; Fri, 27 Sep 2024 22:15:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RMFJqY038839; Fri, 27 Sep 2024 22:15:19 GMT (envelope-from git) Date: Fri, 27 Sep 2024 22:15:19 GMT Message-Id: <202409272215.48RMFJqY038839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: c09ca8f43de1 - stable/14 - mountd: Add check for "=" after exports(5) options 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c09ca8f43de12fecf701920675b793cbafba58c5 Auto-Submitted: auto-generated The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=c09ca8f43de12fecf701920675b793cbafba58c5 commit c09ca8f43de12fecf701920675b793cbafba58c5 Author: Rick Macklem AuthorDate: 2024-09-06 23:41:12 +0000 Commit: Rick Macklem CommitDate: 2024-09-27 22:13:49 +0000 mountd: Add check for "=" after exports(5) options Some exports(5) options take a "=arg" component that provides an argument value for the option. Others do not. Without this patch, if "=arg" was provided for an option that did not take an argument value, the "=arg" was simply ignored. This could result in confusion w.r.t. what was being exported, as noted by the Problem Report. This patch adds a check for "=arg" for the options that do not take an argument value and fails the exports line if one is found. PR: 281003 (cherry picked from commit 3df987c99d1194a0e43a84853e934aa0c0ab09db) --- usr.sbin/mountd/mountd.c | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 6583bfbc0ffb..fa270f3a42d4 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -2827,7 +2827,7 @@ do_opt(char **cpp, char **endcpp, struct exportlist *ep, struct grouplist *grp, { char *cpoptarg, *cpoptend; char *cp, *endcp, *cpopt, savedc, savedc2; - int allflag, usedarg; + int allflag, usedarg, fnd_equal; savedc2 = '\0'; cpopt = *cpp; @@ -2838,14 +2838,18 @@ do_opt(char **cpp, char **endcpp, struct exportlist *ep, struct grouplist *grp, while (cpopt && *cpopt) { allflag = 1; usedarg = -2; + fnd_equal = 0; if ((cpoptend = strchr(cpopt, ','))) { *cpoptend++ = '\0'; - if ((cpoptarg = strchr(cpopt, '='))) + if ((cpoptarg = strchr(cpopt, '='))) { *cpoptarg++ = '\0'; + fnd_equal = 1; + } } else { - if ((cpoptarg = strchr(cpopt, '='))) + if ((cpoptarg = strchr(cpopt, '='))) { *cpoptarg++ = '\0'; - else { + fnd_equal = 1; + } else { *cp = savedc; nextfield(&cp, &endcp); **endcpp = '\0'; @@ -2858,6 +2862,10 @@ do_opt(char **cpp, char **endcpp, struct exportlist *ep, struct grouplist *grp, } } if (!strcmp(cpopt, "ro") || !strcmp(cpopt, "o")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= MNT_EXRDONLY; } else if (cpoptarg && (!strcmp(cpopt, "maproot") || !(allflag = strcmp(cpopt, "mapall")) || @@ -2896,15 +2904,31 @@ do_opt(char **cpp, char **endcpp, struct exportlist *ep, struct grouplist *grp, usedarg++; opt_flags |= OP_NET; } else if (!strcmp(cpopt, "alldirs")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } opt_flags |= OP_ALLDIRS; } else if (!strcmp(cpopt, "public")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= MNT_EXPUBLIC; } else if (!strcmp(cpopt, "webnfs")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= (MNT_EXPUBLIC|MNT_EXRDONLY|MNT_EXPORTANON); opt_flags |= OP_MAPALL; } else if (cpoptarg && !strcmp(cpopt, "index")) { ep->ex_indexfile = strdup(cpoptarg); } else if (!strcmp(cpopt, "quiet")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } opt_flags |= OP_QUIET; } else if (cpoptarg && !strcmp(cpopt, "sec")) { if (parsesec(cpoptarg, ep)) @@ -2912,10 +2936,22 @@ do_opt(char **cpp, char **endcpp, struct exportlist *ep, struct grouplist *grp, opt_flags |= OP_SEC; usedarg++; } else if (!strcmp(cpopt, "tls")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= MNT_EXTLS; } else if (!strcmp(cpopt, "tlscert")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= (MNT_EXTLS | MNT_EXTLSCERT); } else if (!strcmp(cpopt, "tlscertuser")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= (MNT_EXTLS | MNT_EXTLSCERT | MNT_EXTLSCERTUSER); } else { From nobody Fri Sep 27 22:17:13 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 4XFlFP33rRz5XK7n; Fri, 27 Sep 2024 22:17:13 +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 4XFlFP2V0hz4kVC; Fri, 27 Sep 2024 22:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475433; 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=5L1bd92SSFyYkUroazni3AxCWT8BipTB078uJLNjHFg=; b=F2vLEbmZ/HzqpeeWJJTBGWHltZKwNSeeQC7K8XJ1+6ctsoPuGrnhtPk49+j+1P42a3nJb0 LmLsZD/zPepNmqCYNp8eX2WYnc6CsnWHVh/BjpG2LsV26bcVjG6ph7xZWNGsdl7dBDAro0 zzbwgk1fz3u63L7vJxHyOpwcyoDR6AE9OABaCwAF51e2RiAmnALZMc9G8wIjtENdW+9ZyI UiZh/36A1+nL5ELF8bTqT3k43rL9Jym/9J0/OvsThiHc2LgkGzZxIABQQIzUmbGa3rJuE/ 6TNR2htLlT73aoFFSojwmTWgOp8mZC1oROacxCEX1o4TVsikKoswN+kXYZx3mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475433; 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=5L1bd92SSFyYkUroazni3AxCWT8BipTB078uJLNjHFg=; b=o6iZpE1Ubbh2sKhtrnB6LSOYloLYtOJO6NfhtyNnEwZ6MH54hNJKDuHySigiZgucV6dwx3 m/lCKz89c9irvSD+DV9F2K4dRexH0pPypHFUYzZPZy8ziI+IpbiQS4EuBqyEolwt1HdtUr qjtaeTglt0AOrBkzKXb/MZys7QVZg462WDsRcGq3ISBZC2gx61WZThoM+48zoYnP699Mf+ mge8W4V2wE/rsCyUW8JKDkDL1PxI7IP2dZ8rOIWGJnZv3nbv2fR091tzyghv+DM7kUbddT DQ8ngxzZiql/n/F94xey+WjLXXxEdSgdA7F4WFV7syO2gEoqjDldOLbw3wgmyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727475433; a=rsa-sha256; cv=none; b=RONBWv/lo1IrkWerS5x9Dte5cyHCvLAlpbs7zyJXoMabrl5dZ7kY+qMd7ISgb1s9QRJQ4t ohRV6BDHMH6HNDrwe3g8mX0M+GAyXoI+IjHs7nDcU8+Nth3zhN/4Vl1pAQjvk4uvf/CNfn /dpAzXhxKU5hmdZuVgoswtp+Ud/r6vp6Ydc5lSbLSfZ5HVEWCYIwjJFgTD0WvhUte2BPI+ l0EMK1AxSfYXKx1xhZfbAkkpvWrQknMweSm2EQmaeTPk5ldQEyXaDLeU6MGq4ZwUtwxn/F /2eHG0etcAtV7UvPqADgQz8YfM3wlSQDHA0N8U+P6lcJPb2ODjmQ2ZCh1PxUHw== 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 4XFlFP2070zy6D; Fri, 27 Sep 2024 22:17:13 +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 48RMHD5T039224; Fri, 27 Sep 2024 22:17:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RMHDOh039221; Fri, 27 Sep 2024 22:17:13 GMT (envelope-from git) Date: Fri, 27 Sep 2024 22:17:13 GMT Message-Id: <202409272217.48RMHDOh039221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 27f54be50bba - main - pf: merge pf_test() and pf_test6() 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27f54be50bbadae936f2ad0f1457fbdbd9634ae5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=27f54be50bbadae936f2ad0f1457fbdbd9634ae5 commit 27f54be50bbadae936f2ad0f1457fbdbd9634ae5 Author: Kristof Provost AuthorDate: 2024-09-11 11:24:47 +0000 Commit: Kristof Provost CommitDate: 2024-09-27 20:13:22 +0000 pf: merge pf_test() and pf_test6() Bye bye pf_test6(). Only one pf_test function for both IPv4 and v6. The functions were 95% identical anyway. OK bluhm@ mcbride@ and most probably henning@ as well Obtained from: OpenBSD, claudio , c8bc4f6e29 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46649 --- sys/net/pfvar.h | 8 +- sys/netpfil/pf/pf.c | 614 +++++++++++++--------------------------------- sys/netpfil/pf/pf_ioctl.c | 8 +- 3 files changed, 173 insertions(+), 457 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 9ad079f9f95b..c4553e6f380f 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2361,16 +2361,16 @@ int pf_setup_pdesc(sa_family_t, int, int pf_test_eth(int, int, struct ifnet *, struct mbuf **, struct inpcb *); int pf_scan_sctp(struct mbuf *, int, struct pf_pdesc *, struct pfi_kkif *); -#ifdef INET -int pf_test(int, int, struct ifnet *, struct mbuf **, struct inpcb *, +#if defined(INET) || defined(INET6) +int pf_test(sa_family_t, int, int, struct ifnet *, struct mbuf **, struct inpcb *, struct pf_rule_actions *); +#endif +#ifdef INET int pf_normalize_ip(struct mbuf **, struct pfi_kkif *, u_short *, struct pf_pdesc *); #endif /* INET */ #ifdef INET6 -int pf_test6(int, int, struct ifnet *, struct mbuf **, struct inpcb *, - struct pf_rule_actions *); int pf_normalize_ip6(struct mbuf **, struct pfi_kkif *, u_short *, struct pf_pdesc *); void pf_poolmask(struct pf_addr *, struct pf_addr*, diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 215f2655d9d4..8072207ef5dd 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -121,8 +121,6 @@ SDT_PROVIDER_DEFINE(pf); SDT_PROBE_DEFINE4(pf, ip, test, done, "int", "int", "struct pf_krule *", "struct pf_kstate *"); -SDT_PROBE_DEFINE4(pf, ip, test6, done, "int", "int", "struct pf_krule *", - "struct pf_kstate *"); SDT_PROBE_DEFINE5(pf, ip, state, lookup, "struct pfi_kkif *", "struct pf_state_key_cmp *", "int", "struct pf_pdesc *", "struct pf_kstate *"); @@ -585,6 +583,19 @@ pf_addr_cmp(struct pf_addr *a, struct pf_addr *b, sa_family_t af) return (0); } +static bool +pf_is_loopback(sa_family_t af, struct pf_addr *addr) +{ + switch (af) { + case AF_INET: + return IN_LOOPBACK(ntohl(addr->v4.s_addr)); + case AF_INET6: + return IN6_IS_ADDR_LOOPBACK(&addr->v6); + default: + panic("Unknown af %d", af); + } +} + static void pf_packet_rework_nat(struct mbuf *m, struct pf_pdesc *pd, int off, struct pf_state_key *nk) @@ -7906,7 +7917,8 @@ pf_route(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, goto bad; if (pd->dir == PF_IN) { - if (pf_test(PF_OUT, PFIL_FWD, ifp, &m0, inp, &pd->act) != PF_PASS) + if (pf_test(AF_INET, PF_OUT, PFIL_FWD, ifp, &m0, inp, + &pd->act) != PF_PASS) goto bad; else if (m0 == NULL) goto done; @@ -8156,7 +8168,8 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp, goto bad; if (pd->dir == PF_IN) { - if (pf_test6(PF_OUT, PFIL_FWD, ifp, &m0, inp, &pd->act) != PF_PASS) + if (pf_test(AF_INET6, PF_OUT, PFIL_FWD, ifp, &m0, inp, + &pd->act) != PF_PASS) goto bad; else if (m0 == NULL) goto done; @@ -8586,6 +8599,9 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf *m, pd->tot_len = ntohs(h->ip_len); pd->act.rtableid = -1; + if (h->ip_hl > 5) /* has options */ + pd->rh_cnt++; + /* fragments not reassembled handled later */ if (h->ip_off & htons(IP_MF | IP_OFFMASK)) return (0); @@ -8756,6 +8772,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf *m, *hdrlen = ICMP_MINLEN; break; } +#ifdef INET6 case IPPROTO_ICMPV6: { size_t icmp_hlen = sizeof(struct icmp6_hdr); @@ -8786,6 +8803,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf *m, *hdrlen = icmp_hlen; break; } +#endif } return (0); } @@ -8869,15 +8887,16 @@ pf_counters_inc(int action, struct pf_pdesc *pd, pf_counter_u64_critical_exit(); } -#ifdef INET +#if defined(INET) || defined(INET6) int -pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, +pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp, struct pf_rule_actions *default_actions) { struct pfi_kkif *kif; u_short action, reason = 0; struct mbuf *m = *m0; struct ip *h = NULL; + struct ip6_hdr *h6 = NULL; struct m_tag *mtag; struct pf_krule *a = NULL, *r = &V_pf_default_rule; struct pf_kstate *s = NULL; @@ -8886,6 +8905,7 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, int off, hdrlen, use_2nd_queue = 0; uint16_t tag; uint8_t rt; + uint8_t ttl; PF_RULES_RLOCK_TRACKER; KASSERT(dir == PF_IN || dir == PF_OUT, ("%s: bad direction %d\n", __func__, dir)); @@ -8920,26 +8940,68 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, return (PF_DROP); } - if (__predict_false(m->m_len < sizeof(struct ip)) && - (m = *m0 = m_pullup(*m0, sizeof(struct ip))) == NULL) { - DPFPRINTF(PF_DEBUG_URGENT, - ("pf_test: m_len < sizeof(struct ip), pullup failed\n")); - PF_RULES_RUNLOCK(); - return (PF_DROP); - } - memset(&pd, 0, sizeof(pd)); pd.dir = dir; - if (pf_normalize_ip(m0, kif, &reason, &pd) != PF_PASS) { + switch (af) { +#ifdef INET + case AF_INET: + if (__predict_false(m->m_len < sizeof(struct ip)) && + (m = *m0 = m_pullup(*m0, sizeof(struct ip))) == NULL) { + DPFPRINTF(PF_DEBUG_URGENT, + ("pf_test: m_len < sizeof(struct ip), pullup failed\n")); + PF_RULES_RUNLOCK(); + return (PF_DROP); + } + + if (pf_normalize_ip(m0, kif, &reason, &pd) != PF_PASS) { + /* We do IP header normalization and packet reassembly here */ + action = PF_DROP; + goto done; + } + m = *m0; /* pf_normalize messes with m0 */ + h = mtod(m, struct ip *); + ttl = h->ip_ttl; + break; +#endif +#ifdef INET6 + case AF_INET6: + /* + * If we end up changing IP addresses (e.g. binat) the stack may get + * confused and fail to send the icmp6 packet too big error. Just send + * it here, before we do any NAT. + */ + if (dir == PF_OUT && pflags & PFIL_FWD && IN6_LINKMTU(ifp) < pf_max_frag_size(m)) { + PF_RULES_RUNLOCK(); + *m0 = NULL; + icmp6_error(m, ICMP6_PACKET_TOO_BIG, 0, IN6_LINKMTU(ifp)); + return (PF_DROP); + } + + if (__predict_false(m->m_len < sizeof(struct ip6_hdr)) && + (m = *m0 = m_pullup(*m0, sizeof(struct ip6_hdr))) == NULL) { + DPFPRINTF(PF_DEBUG_URGENT, + ("pf_test6: m_len < sizeof(struct ip6_hdr)" + ", pullup failed\n")); + PF_RULES_RUNLOCK(); + return (PF_DROP); + } + /* We do IP header normalization and packet reassembly here */ - action = PF_DROP; - goto done; + if (pf_normalize_ip6(m0, kif, &reason, &pd) != PF_PASS) { + action = PF_DROP; + goto done; + } + m = *m0; /* pf_normalize messes with m0 */ + h6 = mtod(m, struct ip6_hdr *); + ttl = h6->ip6_hlim; + break; +#endif + default: + panic("Unknown af %d", af); } - m = *m0; /* pf_normalize messes with m0 */ - h = mtod(m, struct ip *); - if (pf_setup_pdesc(AF_INET, dir, &pd, m, &action, &reason, kif, &a, &r, + if (pf_setup_pdesc(af, dir, &pd, m, &action, &reason, kif, &a, &r, &ruleset, &off, &hdrlen, default_actions) == -1) { if (action != PF_PASS) pd.act.log |= PF_LOG_FORCE; @@ -9000,15 +9062,35 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, m_tag_delete(m, mtag); } - /* handle fragments that didn't get reassembled by normalization */ - if (h->ip_off & htons(IP_MF | IP_OFFMASK)) { - action = pf_test_fragment(&r, kif, m, &pd, &a, &ruleset); - goto done; + switch (af) { +#ifdef INET + case AF_INET: + /* handle fragments that didn't get reassembled by normalization */ + if (h->ip_off & htons(IP_MF | IP_OFFMASK)) { + action = pf_test_fragment(&r, kif, m, &pd, &a, &ruleset); + goto done; + } + break; +#endif +#ifdef INET6 + case AF_INET6: + /* + * we do not support jumbogram. if we keep going, zero ip6_plen + * will do something bad, so drop the packet for now. + */ + if (htons(h6->ip6_plen) == 0) { + action = PF_DROP; + REASON_SET(&reason, PFRES_NORM); /*XXX*/ + goto done; + } + break; +#endif + default: + panic("Unknown af %d", af); } - switch (h->ip_p) { + switch (pd.proto) { case IPPROTO_TCP: { - /* Respond to SYN with a syncookie. */ if ((pd.hdr.tcp.th_flags & (TH_SYN|TH_ACK|TH_RST)) == TH_SYN && pd.dir == PF_IN && pf_synflood_check(&pd)) { @@ -9036,14 +9118,14 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, pd.dir == PF_IN) { struct mbuf *msyn; - msyn = pf_syncookie_recreate_syn(h->ip_ttl, off, + msyn = pf_syncookie_recreate_syn(ttl, off, &pd); if (msyn == NULL) { action = PF_DROP; break; } - action = pf_test(dir, pflags, ifp, &msyn, inp, + action = pf_test(af, dir, pflags, ifp, &msyn, inp, &pd.act); m_freem(msyn); if (action != PF_PASS) @@ -9101,6 +9183,12 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, } case IPPROTO_ICMP: { + if (af != AF_INET) { + action = PF_DROP; + DPFPRINTF(PF_DEBUG_MISC, + ("dropping IPv6 packet with ICMPv4 payload")); + goto done; + } action = pf_test_state_icmp(&s, kif, m, off, &pd, &reason); if (action == PF_PASS) { if (V_pfsync_update_state_ptr != NULL) @@ -9114,10 +9202,22 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, } case IPPROTO_ICMPV6: { - action = PF_DROP; - DPFPRINTF(PF_DEBUG_MISC, - ("pf: dropping IPv4 packet with ICMPv6 payload\n")); - goto done; + if (af != AF_INET6) { + action = PF_DROP; + DPFPRINTF(PF_DEBUG_MISC, + ("pf: dropping IPv4 packet with ICMPv6 payload\n")); + goto done; + } + action = pf_test_state_icmp(&s, kif, m, off, &pd, &reason); + if (action == PF_PASS) { + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); + r = s->rule.ptr; + a = s->anchor.ptr; + } else if (s == NULL) + action = pf_test_rule(&r, &s, kif, m, off, &pd, + &a, &ruleset, inp, hdrlen); + break; } default: @@ -9135,13 +9235,14 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, done: PF_RULES_RUNLOCK(); - if (action == PF_PASS && h->ip_hl > 5 && + + if (action == PF_PASS && pd.rh_cnt && !((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) { action = PF_DROP; REASON_SET(&reason, PFRES_IPOPTIONS); pd.act.log = PF_LOG_FORCE; DPFPRINTF(PF_DEBUG_MISC, - ("pf: dropping packet with ip options\n")); + ("pf: dropping packet with dangerous headers\n")); } if (s) { @@ -9193,7 +9294,10 @@ done: else pd.pf_mtag->qid = pd.act.qid; /* Add hints for ecn. */ - pd.pf_mtag->hdr = h; + if (af == AF_INET) + pd.pf_mtag->hdr = h; + else + pd.pf_mtag->hdr = h6; } } #endif /* ALTQ */ @@ -9207,11 +9311,11 @@ done: pd.proto == IPPROTO_UDP) && s != NULL && s->nat_rule.ptr != NULL && (s->nat_rule.ptr->action == PF_RDR || s->nat_rule.ptr->action == PF_BINAT) && - IN_LOOPBACK(ntohl(pd.dst->v4.s_addr))) + pf_is_loopback(af, pd.dst)) m->m_flags |= M_SKIP_FIREWALL; - if (__predict_false(ip_divert_ptr != NULL) && action == PF_PASS && - r->divert.port && !PACKET_LOOPED(&pd)) { + if (af == AF_INET && __predict_false(ip_divert_ptr != NULL) && + action == PF_PASS && r->divert.port && !PACKET_LOOPED(&pd)) { mtag = m_tag_alloc(MTAG_PF_DIVERT, 0, sizeof(struct pf_divert_mtag), M_NOWAIT | M_ZERO); if (mtag != NULL) { @@ -9252,6 +9356,10 @@ done: ("pf: failed to allocate divert tag\n")); } } + /* XXX: Anybody working on it?! */ + if (af == AF_INET6 && r->divert.port) + printf("pf: divert(9) is not supported for IPv6\n"); + /* this flag will need revising if the pkt is forwarded */ if (pd.pf_mtag) pd.pf_mtag->flags &= ~PF_MTAG_FLAG_PACKET_LOOPED; @@ -9291,417 +9399,23 @@ done: *m0 = NULL; break; default: - /* pf_route() returns unlocked. */ if (rt) { - pf_route(m0, r, kif->pfik_ifp, s, &pd, inp); - goto out; - } - if (pf_dummynet(&pd, s, r, m0) != 0) { - action = PF_DROP; - REASON_SET(&reason, PFRES_MEMORY); - } - break; - } - - SDT_PROBE4(pf, ip, test, done, action, reason, r, s); - - if (s && action != PF_DROP) { - if (!s->if_index_in && dir == PF_IN) - s->if_index_in = ifp->if_index; - else if (!s->if_index_out && dir == PF_OUT) - s->if_index_out = ifp->if_index; - } - - if (s) - PF_STATE_UNLOCK(s); - -out: - pf_sctp_multihome_delayed(&pd, off, kif, s, action); - - return (action); -} -#endif /* INET */ - + switch (af) { +#ifdef INET + case AF_INET: + /* pf_route() returns unlocked. */ + pf_route(m0, r, kif->pfik_ifp, s, &pd, inp); + break; +#endif #ifdef INET6 -int -pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp, - struct pf_rule_actions *default_actions) -{ - struct pfi_kkif *kif; - u_short action, reason = 0; - struct mbuf *m = *m0, *n = NULL; - struct m_tag *mtag; - struct ip6_hdr *h = NULL; - struct pf_krule *a = NULL, *r = &V_pf_default_rule; - struct pf_kstate *s = NULL; - struct pf_kruleset *ruleset = NULL; - struct pf_pdesc pd; - int off, hdrlen, use_2nd_queue = 0; - uint16_t tag; - uint8_t rt; - - PF_RULES_RLOCK_TRACKER; - KASSERT(dir == PF_IN || dir == PF_OUT, ("%s: bad direction %d\n", __func__, dir)); - M_ASSERTPKTHDR(m); - - if (!V_pf_status.running) - return (PF_PASS); - - PF_RULES_RLOCK(); - - kif = (struct pfi_kkif *)ifp->if_pf_kif; - if (__predict_false(kif == NULL)) { - DPFPRINTF(PF_DEBUG_URGENT, - ("pf_test6: kif == NULL, if_xname %s\n", ifp->if_xname)); - PF_RULES_RUNLOCK(); - return (PF_DROP); - } - if (kif->pfik_flags & PFI_IFLAG_SKIP) { - PF_RULES_RUNLOCK(); - return (PF_PASS); - } - - if (m->m_flags & M_SKIP_FIREWALL) { - PF_RULES_RUNLOCK(); - return (PF_PASS); - } - - /* - * If we end up changing IP addresses (e.g. binat) the stack may get - * confused and fail to send the icmp6 packet too big error. Just send - * it here, before we do any NAT. - */ - if (dir == PF_OUT && pflags & PFIL_FWD && IN6_LINKMTU(ifp) < pf_max_frag_size(m)) { - PF_RULES_RUNLOCK(); - *m0 = NULL; - icmp6_error(m, ICMP6_PACKET_TOO_BIG, 0, IN6_LINKMTU(ifp)); - return (PF_DROP); - } - - if (__predict_false(! M_WRITABLE(*m0))) { - m = *m0 = m_unshare(*m0, M_NOWAIT); - if (*m0 == NULL) - return (PF_DROP); - } - - if (__predict_false(m->m_len < sizeof(struct ip6_hdr)) && - (m = *m0 = m_pullup(*m0, sizeof(struct ip6_hdr))) == NULL) { - DPFPRINTF(PF_DEBUG_URGENT, - ("pf_test6: m_len < sizeof(struct ip6_hdr)" - ", pullup failed\n")); - PF_RULES_RUNLOCK(); - return (PF_DROP); - } - - memset(&pd, 0, sizeof(pd)); - pd.dir = dir; - - /* We do IP header normalization and packet reassembly here */ - if (pf_normalize_ip6(m0, kif, &reason, &pd) != PF_PASS) { - action = PF_DROP; - goto done; - } - m = *m0; /* pf_normalize messes with m0 */ - h = mtod(m, struct ip6_hdr *); - off = ((caddr_t)h - m->m_data) + sizeof(struct ip6_hdr); - - if (pf_setup_pdesc(AF_INET6, dir, &pd, m, &action, &reason, kif, &a, &r, - &ruleset, &off, &hdrlen, default_actions) == -1) { - if (action != PF_PASS) - pd.act.log |= PF_LOG_FORCE; - goto done; - } - - if (pd.pf_mtag != NULL && (pd.pf_mtag->flags & PF_MTAG_FLAG_ROUTE_TO)) { - pd.pf_mtag->flags &= ~PF_MTAG_FLAG_ROUTE_TO; - - ifp = ifnet_byindexgen(pd.pf_mtag->if_index, - pd.pf_mtag->if_idxgen); - if (ifp == NULL || ifp->if_flags & IFF_DYING) { - PF_RULES_RUNLOCK(); - m_freem(*m0); - *m0 = NULL; - return (PF_PASS); - } - PF_RULES_RUNLOCK(); - nd6_output_ifp(ifp, ifp, m, - (struct sockaddr_in6 *)&pd.pf_mtag->dst, NULL); - *m0 = NULL; - return (PF_PASS); - } - - if (ip_dn_io_ptr != NULL && pd.pf_mtag != NULL && - pd.pf_mtag->flags & PF_MTAG_FLAG_DUMMYNET) { - pf_dummynet_flag_remove(m, pd.pf_mtag); - /* Dummynet re-injects packets after they've - * completed their delay. We've already - * processed them, so pass unconditionally. */ - PF_RULES_RUNLOCK(); - return (PF_PASS); - } - - /* - * we do not support jumbogram. if we keep going, zero ip6_plen - * will do something bad, so drop the packet for now. - */ - if (htons(h->ip6_plen) == 0) { - action = PF_DROP; - REASON_SET(&reason, PFRES_NORM); /*XXX*/ - goto done; - } - - /* if there's no routing header, use unmodified mbuf for checksumming */ - if (!n) - n = m; - - switch (pd.proto) { - case IPPROTO_TCP: { - /* Respond to SYN with a syncookie. */ - if ((pd.hdr.tcp.th_flags & (TH_SYN|TH_ACK|TH_RST)) == TH_SYN && - pd.dir == PF_IN && pf_synflood_check(&pd)) { - pf_syncookie_send(m, off, &pd); - action = PF_DROP; - break; - } - - if ((pd.hdr.tcp.th_flags & TH_ACK) && pd.p_len == 0) - use_2nd_queue = 1; - - action = pf_normalize_tcp(kif, m, 0, off, &pd); - if (action == PF_DROP) - goto done; - action = pf_test_state_tcp(&s, kif, m, off, &pd, &reason); - if (action == PF_PASS) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule.ptr; - a = s->anchor.ptr; - } else if (s == NULL) { - /* Validate remote SYN|ACK, re-create original SYN if - * valid. */ - if ((pd.hdr.tcp.th_flags & (TH_SYN|TH_ACK|TH_RST)) == - TH_ACK && pf_syncookie_validate(&pd) && - pd.dir == PF_IN) { - struct mbuf *msyn; - - msyn = pf_syncookie_recreate_syn(h->ip6_hlim, - off, &pd); - if (msyn == NULL) { - action = PF_DROP; - break; - } - - action = pf_test6(dir, pflags, ifp, &msyn, inp, - &pd.act); - m_freem(msyn); - if (action != PF_PASS) - break; - - action = pf_test_state_tcp(&s, kif, m, off, - &pd, &reason); - if (action != PF_PASS || s == NULL) { - action = PF_DROP; - break; - } - - s->src.seqhi = ntohl(pd.hdr.tcp.th_ack) - 1; - s->src.seqlo = ntohl(pd.hdr.tcp.th_seq) - 1; - pf_set_protostate(s, PF_PEER_SRC, PF_TCPS_PROXY_DST); - - action = pf_synproxy(&pd, &s, &reason); + case AF_INET6: + /* pf_route6() returns unlocked. */ + pf_route6(m0, r, kif->pfik_ifp, s, &pd, inp); break; - } else { - action = pf_test_rule(&r, &s, kif, m, off, &pd, - &a, &ruleset, inp, hdrlen); +#endif + default: + panic("Unknown af %d", af); } - } - break; - } - - case IPPROTO_UDP: { - action = pf_test_state_udp(&s, kif, m, off, &pd); - if (action == PF_PASS) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule.ptr; - a = s->anchor.ptr; - } else if (s == NULL) - action = pf_test_rule(&r, &s, kif, m, off, &pd, - &a, &ruleset, inp, hdrlen); - break; - } - - case IPPROTO_SCTP: { - action = pf_normalize_sctp(dir, kif, m, 0, off, &pd); - if (action == PF_DROP) - goto done; - action = pf_test_state_sctp(&s, kif, m, off, &pd, - &reason); - if (action == PF_PASS) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule.ptr; - a = s->anchor.ptr; - } else if (s == NULL) { - action = pf_test_rule(&r, &s, kif, m, off, - &pd, &a, &ruleset, inp, hdrlen); - } - break; - } - - case IPPROTO_ICMP: { - action = PF_DROP; - DPFPRINTF(PF_DEBUG_MISC, - ("pf: dropping IPv6 packet with ICMPv4 payload\n")); - goto done; - } - - case IPPROTO_ICMPV6: { - action = pf_test_state_icmp(&s, kif, m, off, &pd, &reason); - if (action == PF_PASS) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule.ptr; - a = s->anchor.ptr; - } else if (s == NULL) - action = pf_test_rule(&r, &s, kif, m, off, &pd, - &a, &ruleset, inp, hdrlen); - break; - } - - default: - action = pf_test_state_other(&s, kif, m, &pd); - if (action == PF_PASS) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule.ptr; - a = s->anchor.ptr; - } else if (s == NULL) - action = pf_test_rule(&r, &s, kif, m, off, &pd, - &a, &ruleset, inp, hdrlen); - break; - } - -done: - PF_RULES_RUNLOCK(); - if (n != m) { - m_freem(n); - n = NULL; - } - - /* handle dangerous IPv6 extension headers. */ - if (action == PF_PASS && pd.rh_cnt && - !((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) { - action = PF_DROP; - REASON_SET(&reason, PFRES_IPOPTIONS); - pd.act.log = r->log; - DPFPRINTF(PF_DEBUG_MISC, - ("pf: dropping packet with dangerous v6 headers\n")); - } - - if (s) { - uint8_t log = pd.act.log; - memcpy(&pd.act, &s->act, sizeof(struct pf_rule_actions)); - pd.act.log |= log; - tag = s->tag; - rt = s->rt; - } else { - tag = r->tag; - rt = r->rt; - } - - if (tag > 0 && pf_tag_packet(m, &pd, tag)) { - action = PF_DROP; - REASON_SET(&reason, PFRES_MEMORY); - } - - pf_scrub(m, &pd); - if (pd.proto == IPPROTO_TCP && pd.act.max_mss) - pf_normalize_mss(m, off, &pd); - - if (pd.act.rtableid >= 0) - M_SETFIB(m, pd.act.rtableid); - - if (pd.act.flags & PFSTATE_SETPRIO) { - if (pd.tos & IPTOS_LOWDELAY) - use_2nd_queue = 1; - if (vlan_set_pcp(m, pd.act.set_prio[use_2nd_queue])) { - action = PF_DROP; - REASON_SET(&reason, PFRES_MEMORY); - pd.act.log = PF_LOG_FORCE; - DPFPRINTF(PF_DEBUG_MISC, - ("pf: failed to allocate 802.1q mtag\n")); - } - } - -#ifdef ALTQ - if (action == PF_PASS && pd.act.qid) { - if (pd.pf_mtag == NULL && - ((pd.pf_mtag = pf_get_mtag(m)) == NULL)) { - action = PF_DROP; - REASON_SET(&reason, PFRES_MEMORY); - } else { - if (s != NULL) - pd.pf_mtag->qid_hash = pf_state_hash(s); - if (use_2nd_queue || (pd.tos & IPTOS_LOWDELAY)) - pd.pf_mtag->qid = pd.act.pqid; - else - pd.pf_mtag->qid = pd.act.qid; - /* Add hints for ecn. */ - pd.pf_mtag->hdr = h; - } - } -#endif /* ALTQ */ - - if (dir == PF_IN && action == PF_PASS && (pd.proto == IPPROTO_TCP || - pd.proto == IPPROTO_UDP) && s != NULL && s->nat_rule.ptr != NULL && - (s->nat_rule.ptr->action == PF_RDR || - s->nat_rule.ptr->action == PF_BINAT) && - IN6_IS_ADDR_LOOPBACK(&pd.dst->v6)) - m->m_flags |= M_SKIP_FIREWALL; - - /* XXX: Anybody working on it?! */ - if (r->divert.port) - printf("pf: divert(9) is not supported for IPv6\n"); - - if (pd.act.log) { - struct pf_krule *lr; - struct pf_krule_item *ri; - - if (s != NULL && s->nat_rule.ptr != NULL && - s->nat_rule.ptr->log & PF_LOG_ALL) - lr = s->nat_rule.ptr; - else - lr = r; - - if (pd.act.log & PF_LOG_FORCE || lr->log & PF_LOG_ALL) - PFLOG_PACKET(kif, m, action, reason, lr, a, ruleset, - &pd, (s == NULL)); - if (s) { - SLIST_FOREACH(ri, &s->match_rules, entry) - if (ri->r->log & PF_LOG_ALL) - PFLOG_PACKET(kif, m, action, reason, - ri->r, a, ruleset, &pd, 0); - } - } - - pf_counters_inc(action, &pd, kif, s, r, a); - - switch (action) { - case PF_SYNPROXY_DROP: - m_freem(*m0); - case PF_DEFER: - *m0 = NULL; - action = PF_PASS; - break; - case PF_DROP: - m_freem(*m0); - *m0 = NULL; - break; - default: - /* pf_route6() returns unlocked. */ - if (rt) { - pf_route6(m0, r, kif->pfik_ifp, s, &pd, inp); goto out; } if (pf_dummynet(&pd, s, r, m0) != 0) { @@ -9711,6 +9425,8 @@ done: break; } + SDT_PROBE4(pf, ip, test, done, action, reason, r, s); + if (s && action != PF_DROP) { if (!s->if_index_in && dir == PF_IN) s->if_index_in = ifp->if_index; @@ -9721,16 +9437,16 @@ done: if (s) PF_STATE_UNLOCK(s); +#ifdef INET6 /* If reassembled packet passed, create new fragments. */ - if (action == PF_PASS && *m0 && dir == PF_OUT && + if (af == AF_INET6 && action == PF_PASS && *m0 && dir == PF_OUT && (mtag = m_tag_find(m, PACKET_TAG_PF_REASSEMBLED, NULL)) != NULL) action = pf_refragment6(ifp, m0, mtag, pflags & PFIL_FWD); +#endif out: - SDT_PROBE4(pf, ip, test6, done, action, reason, r, s); - pf_sctp_multihome_delayed(&pd, off, kif, s, action); return (action); } -#endif /* INET6 */ +#endif /* INET || INET6 */ diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index dcdab6029558..0a573a017ef3 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -6471,7 +6471,7 @@ pf_check_in(struct mbuf **m, struct ifnet *ifp, int flags, CURVNET_ASSERT_SET(); - chk = pf_test(PF_IN, flags, ifp, m, inp, NULL); + chk = pf_test(AF_INET, PF_IN, flags, ifp, m, inp, NULL); return (pf_check_return(chk, m)); } @@ -6484,7 +6484,7 @@ pf_check_out(struct mbuf **m, struct ifnet *ifp, int flags, CURVNET_ASSERT_SET(); - chk = pf_test(PF_OUT, flags, ifp, m, inp, NULL); + chk = pf_test(AF_INET, PF_OUT, flags, ifp, m, inp, NULL); return (pf_check_return(chk, m)); } @@ -6504,7 +6504,7 @@ pf_check6_in(struct mbuf **m, struct ifnet *ifp, int flags, * order to support scoped addresses. In order to support stateful * filtering we have change this to lo0 as it is the case in IPv4. */ - chk = pf_test6(PF_IN, flags, (*m)->m_flags & M_LOOP ? V_loif : ifp, + chk = pf_test(AF_INET6, PF_IN, flags, (*m)->m_flags & M_LOOP ? V_loif : ifp, m, inp, NULL); return (pf_check_return(chk, m)); @@ -6518,7 +6518,7 @@ pf_check6_out(struct mbuf **m, struct ifnet *ifp, int flags, CURVNET_ASSERT_SET(); - chk = pf_test6(PF_OUT, flags, ifp, m, inp, NULL); + chk = pf_test(AF_INET6, PF_OUT, flags, ifp, m, inp, NULL); return (pf_check_return(chk, m)); } From nobody Fri Sep 27 22:17:14 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 4XFlFQ5Gklz5XK7p; Fri, 27 Sep 2024 22:17:14 +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 4XFlFQ3zQwz4kVD; Fri, 27 Sep 2024 22:17:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475434; 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=Fyn+0E5Fq4wk7bzYuTooBrAzsFDR1zEloYqq4OlUMow=; b=tlwhuf6NRck4dNCFZ2keX4hlH0jUDzBwKs+jnbUsWatyGe5/hnjYQeN1TizRG3f3+XbdUe cZO6GKacNIKcxSOfTQIllzNrYRIgj+lEWqQjfz0j/6o56Jn2RJlSDEdZP6jXn096OjlqxS Ch5MEjQM9+gkefH6pY9JBkeSwYHZ7Y2ul7ngSzCSWulhwUhJBL7B2riyCl3XN9ZEgMra5z ZmzKOLfHtJL8o7C8ANdIbSN3Y+g9H49roI/syWg+iomBjbwOBkYTcFWG05jsvvyDAYHsJH HaGMJl5mOKjnDI5qLonmrQHVf2SjdlbTfByg3qX7aswd+VqJSpRBjGTEpDzGdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475434; 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=Fyn+0E5Fq4wk7bzYuTooBrAzsFDR1zEloYqq4OlUMow=; b=rmw0nRGB/5Tn2IAqeTspYc/mZG+G/0/sKRz1lqO7USg7RSbse7165+MBzRgr+6y/Ob5SMp OQz8Vdewbda2A9tPMQMMEOj5c/0XT1rlqLiU3Adcimu7NurgWg3GM62xhMB3Bsrr6dq+Ud Zwpmq4c2YuEceczOiYa2NH1t0CRoUycF91Qn5wfsBLRDnTH1bTAcheMhJBQtdhdKXoipbz 1c49ulhyMmtLHLgWMBII0IK3fTWciBAmDnHJhhrQEao1yfYyRwdfHpwuGRmYxaOQveGaTJ uYaVrrSqXyk5vQ4vOokmn3GQ9xc0f6frjzgQlgaSi0qqYNdZSXHPPMHBAwzrXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727475434; a=rsa-sha256; cv=none; b=NDCqgn1FInUFRcnmPnHOxIraAeDvlKfgsPLj8E68oNQx94XG+QzzUnEs9NiUY1qaf7bJIv UoTUIdCdWyPnO6V0rugbJTavHnvGx4OnC6FbXC1e4JHCoFxfuCD1dIDgb3grX4zaInuD1u kmv4gmj1zE/HM2Kw2EQrh7DQFQryeXKD6kG2hgk/Y0NrqgEurfZkTKLIaCHliEgHxrR5r7 Z89SnRy8hqWM5mwbpltRy5Iiwl1AJQQj7Vju2cZM2K+raT5RvRWlv253yThQpn3e7Rj36p Z/BAA9GAs+iCKLqgFiUTGnnnmLlUOycT0zrXXkDhpUFjEfSSR341FVxZn6Zq+w== 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 4XFlFQ3Mp4zyMd; Fri, 27 Sep 2024 22:17:14 +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 48RMHENn039275; Fri, 27 Sep 2024 22:17:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RMHEcj039272; Fri, 27 Sep 2024 22:17:14 GMT (envelope-from git) Date: Fri, 27 Sep 2024 22:17:14 GMT Message-Id: <202409272217.48RMHEcj039272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 39f615e90ca3 - main - pf: rename the pf_pdesc field rh_cnt to badopts 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 39f615e90ca3fc6207dd0419a69a859e563e1de0 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=39f615e90ca3fc6207dd0419a69a859e563e1de0 commit 39f615e90ca3fc6207dd0419a69a859e563e1de0 Author: Kristof Provost AuthorDate: 2024-09-11 12:46:51 +0000 Commit: Kristof Provost CommitDate: 2024-09-27 20:13:23 +0000 pf: rename the pf_pdesc field rh_cnt to badopts It is also used for IPv4 options now. ok mcbride@ henning@ Reviewed by: zlei Obtained from: OpenBSD, bluhm , 4fe6abd45f Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46650 --- sys/net/pfvar.h | 2 +- sys/netpfil/pf/pf.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index c4553e6f380f..f5551447f7aa 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1611,7 +1611,7 @@ struct pf_pdesc { struct pf_rule_actions act; u_int32_t p_len; /* total length of payload */ - u_int32_t rh_cnt; /* Route header count */ + u_int32_t badopts; /* v4 options or v6 routing headers */ u_int16_t *ip_sum; u_int16_t *proto_sum; diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 8072207ef5dd..823e90384747 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8600,7 +8600,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf *m, pd->act.rtableid = -1; if (h->ip_hl > 5) /* has options */ - pd->rh_cnt++; + pd->badopts++; /* fragments not reassembled handled later */ if (h->ip_off & htons(IP_MF | IP_OFFMASK)) @@ -8643,7 +8643,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf *m, case IPPROTO_ROUTING: { struct ip6_rthdr rthdr; - if (pd->rh_cnt++) { + if (pd->badopts++) { DPFPRINTF(PF_DEBUG_MISC, ("pf: IPv6 more than one rthdr")); *action = PF_DROP; @@ -9236,7 +9236,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 done: PF_RULES_RUNLOCK(); - if (action == PF_PASS && pd.rh_cnt && + if (action == PF_PASS && pd.badopts && !((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) { action = PF_DROP; REASON_SET(&reason, PFRES_IPOPTIONS); From nobody Fri Sep 27 22:17:15 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 4XFlFS1hQgz5XKLq; Fri, 27 Sep 2024 22:17:16 +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 4XFlFR5bz2z4kqw; Fri, 27 Sep 2024 22:17:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475435; 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=3v14jfXR3yo7vxEq7PLJ1WjDKLE0S9w/FfPnTxnzd7Y=; b=WmG6iSlf1g+/VZQBG9sFwtumUaaVbJmo3gG0z64jT++bQpwvsKNaS1JKW5bYhD7gOlivme syHfjM0HHHbLRng6OPOVM55vpZno9gN/AQ9+kzfxyStVTjpgHpt2o55oj8iV6w32bMPDwD 5IvIoAqYqIrf7NcWHFL0s2hXa9kfp3qf4/gjzI+SrP12T7ZVS5w1vVOgF2PTtZ9/C3kCFh KjaT+X1ygRFmAkwviIVOa2Hv4b2e2pjb7TiiAyvxd7HDIpQ8EiwxGci8O4jVZCAtpfV1cs PdS/+fvgpIA+88ATEAGKhcE/Vrqi+jSaDojvx75cKOoBXuet6phzJvhdNhyDaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475435; 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=3v14jfXR3yo7vxEq7PLJ1WjDKLE0S9w/FfPnTxnzd7Y=; b=L45fh1d7RAB4aHk3hTKig6al0nyqQpPLFv2mP1cm2C6jjoybd79aXYX6ZcuP34v6z4lSbG 47IEa5DJ4yGoRwR46NB0hcqNWmGiosRB4DppMUSyPwOc0jGBCfC25MhNxBxZTl5XBGgYQ7 DQuq0O/k8QScQqfZt07kWIsBLs7gmg9pmSKAYO0zO65upqo1AjeZmk8whYTms7jPbkR/m7 C7OWVhBFehGPaPevvgoNzwo5njpY0eq3hpTA/WEsFH0567aPoMSUpTcEpvtcgRu1Ez9pIm APPkfYZj52W+P+Tga6nbEU1bmFO/IIT2VqJdvgvdpjbVsjjAO50AoZOWS4nzhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727475435; a=rsa-sha256; cv=none; b=LwYXWe0V0xrDSkQMIpCuh4lBPHo02m0nho4pn/vufSZ8m2lrsctR0uOXrgTNa23pl+RBbh tC0T9KZADox+NV9ifNAkHQdD/YvaqQiKHR9/gZRajZLFMmK6ILr8VtJvfm3KYVULeSqyJ8 Ob4XHckw8NHFv71GsIzKKpBG9Cp4H38/fT1UJ5qSces6zHRD67npcfYp0gv3SGvnVts2We g4Emg8B5SGmLsXxTmiTOcyyYdvmqIo5zYfCUaJQL+kWSGifHfuWY48VYhwuwc7b+ZcPfFv AmyqvjY4OUMgyyG1CEC5T/fy1LxVz4lYWLno+PhWpSfZ3XnEh28xZNpYK56p2Q== 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 4XFlFR4J6dzy48; Fri, 27 Sep 2024 22:17:15 +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 48RMHFxv039323; Fri, 27 Sep 2024 22:17:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RMHFag039320; Fri, 27 Sep 2024 22:17:15 GMT (envelope-from git) Date: Fri, 27 Sep 2024 22:17:15 GMT Message-Id: <202409272217.48RMHFag039320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f8e994296328 - main - pf: remove ip(6) header argument from pf_reassemble(6)() 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f8e99429632822cf22a7a0999c00a4a9db1f3702 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f8e99429632822cf22a7a0999c00a4a9db1f3702 commit f8e99429632822cf22a7a0999c00a4a9db1f3702 Author: Kristof Provost AuthorDate: 2024-09-11 15:21:09 +0000 Commit: Kristof Provost CommitDate: 2024-09-27 20:13:23 +0000 pf: remove ip(6) header argument from pf_reassemble(6)() Instead of passing the ip header and mbuf to pf_reassemble(), lookup the header address in the mbuf. ok henning@ Reviewed by: zlei Obtained from: OpenBSD, bluhm , 074ee1f915 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46652 --- sys/netpfil/pf/pf_norm.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index c4cc482c62f0..d1a1e84db9dc 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -151,10 +151,10 @@ static struct pf_fragment *pf_fillup_fragment(struct pf_fragment_cmp *, struct pf_frent *, u_short *); static struct mbuf *pf_join_fragment(struct pf_fragment *); #ifdef INET -static int pf_reassemble(struct mbuf **, struct ip *, int, u_short *); +static int pf_reassemble(struct mbuf **, int, u_short *); #endif /* INET */ #ifdef INET6 -static int pf_reassemble6(struct mbuf **, struct ip6_hdr *, +static int pf_reassemble6(struct mbuf **, struct ip6_frag *, uint16_t, uint16_t, u_short *); #endif /* INET6 */ @@ -741,9 +741,10 @@ pf_join_fragment(struct pf_fragment *frag) #ifdef INET static int -pf_reassemble(struct mbuf **m0, struct ip *ip, int dir, u_short *reason) +pf_reassemble(struct mbuf **m0, int dir, u_short *reason) { struct mbuf *m = *m0; + struct ip *ip = mtod(m, struct ip *); struct pf_frent *frent; struct pf_fragment *frag; struct pf_fragment_cmp key; @@ -814,10 +815,11 @@ pf_reassemble(struct mbuf **m0, struct ip *ip, int dir, u_short *reason) #ifdef INET6 static int -pf_reassemble6(struct mbuf **m0, struct ip6_hdr *ip6, struct ip6_frag *fraghdr, +pf_reassemble6(struct mbuf **m0, struct ip6_frag *fraghdr, uint16_t hdrlen, uint16_t extoff, u_short *reason) { struct mbuf *m = *m0; + struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *); struct pf_frent *frent; struct pf_fragment *frag; struct pf_fragment_cmp key; @@ -1170,7 +1172,7 @@ pf_normalize_ip(struct mbuf **m0, struct pfi_kkif *kif, u_short *reason, * Might return a completely reassembled mbuf, or NULL */ PF_FRAG_LOCK(); DPFPRINTF(("reass frag %d @ %d-%d\n", h->ip_id, fragoff, max)); - verdict = pf_reassemble(m0, h, pd->dir, reason); + verdict = pf_reassemble(m0, pd->dir, reason); PF_FRAG_UNLOCK(); if (verdict != PF_PASS) @@ -1360,7 +1362,7 @@ again: off += sizeof(frag); /* Returns PF_DROP or *m0 is NULL or completely reassembled mbuf. */ - if (pf_reassemble6(m0, h, &frag, off, extoff, reason) != PF_PASS) + if (pf_reassemble6(m0, &frag, off, extoff, reason) != PF_PASS) return (PF_DROP); m = *m0; if (m == NULL) From nobody Fri Sep 27 22:17:16 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 4XFlFT1ftCz5XK3b; Fri, 27 Sep 2024 22:17:17 +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 4XFlFS66dkz4kr3; Fri, 27 Sep 2024 22:17:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475436; 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=9n7JgUGvHyPOalHGG2LkHDBEHjnXsOrUqsXzJGQ7WN8=; b=imAedC2U/Pr7ya/vtzkqytko2+tfySBOs0PucjCWvXZZTeu4NClr4SnzrtNP4nT7+Ta3pY lkOYurg8X30S0cEIVOFCqira+sL9MhTjMBqKulGGQC4b2qfBAPZ1Qq7uRq5cG/4gwlY0JZ zIPqHiq8oeZC+idlxRkLW0JRo9yv4SgrcQaIDrt8pHLBvsYd46dasbHgmQv1hWMDOTUhwC z+y4lTO586d/iKV97C6xjHqpN/N6JCoH0k+V1N0Vb8MKjr26R6Jw5qM32shZqwYGMEc5h6 nwBepwjQFWjYt3s5z92rbBV8Tj+crelFQj1tbKbwpjiEARgRoJZyDE5YYGxcQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475436; 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=9n7JgUGvHyPOalHGG2LkHDBEHjnXsOrUqsXzJGQ7WN8=; b=EGiU87UVPT/Hu8QCfs7BhGZZ11Sb+4mgZbAAaWqOBztY+KGOR0jkIOGkYgh1bW9v5q5dPM a10QuL40EC8HsEy4GOXOd00DRnIS5DgZNm8R2ABWtE4gdwLghvJgk6h9Y+ZbYDbze25jKb LwC2Mb9zBONW0YdsQ8QhZ0KfB6jdRo0070XmKeF21DHAkxvdQ0eiRCPGCPwHsqW3HyIfiL Wx2nsJ34EfZ1JJcS/QQvlYb2vOEsUaG2hr3MG70rEnchSSRX5qlphwntr8xUJUI39xJIyG R0ST7YsoQkeOvxLP2JfvSKJarqcOlYDEoB9tV9j+rXEcL6+a/hpEIKeamYSCgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727475436; a=rsa-sha256; cv=none; b=h56qZiIakYGnhTdSjhu2GcNFSyEgSfR84Kt4pL5SLBlsydb7j3G2mrHYaA5KKtg3GMCp+w Lx9EK5B5QdUFXhdpjnF11DG7X9CoDzp+ZbsBgpWnHBDzCa2hWHLZqYqRHU0fhxovJgVoWQ zWkuqMgo+MBiFjP/aJUSbeuAd3sAqCVum7vjz+cnjgID8+pAfzVQsk24S+SRoU7uMJLZ8h qgtwR2gCdagb95Ebzko/QT35iGPIyDaXslrwoGgnrXqDapjakyb+zQUoj5QCughinJ+j/W na/VAdVI6/dZWojdsXCGtMYgZrgF7xWRxTlGQThF2D83hFO2j46Jm9Qsr4C78w== 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 4XFlFS4cZvzy8J; Fri, 27 Sep 2024 22:17:16 +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 48RMHGix039368; Fri, 27 Sep 2024 22:17:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RMHGmm039365; Fri, 27 Sep 2024 22:17:16 GMT (envelope-from git) Date: Fri, 27 Sep 2024 22:17:16 GMT Message-Id: <202409272217.48RMHGmm039365@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 86fc6f838ed2 - main - pf: make pf_setup_pdesc() a static function 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86fc6f838ed2a01f8bffa2cd6437052f450f3370 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=86fc6f838ed2a01f8bffa2cd6437052f450f3370 commit 86fc6f838ed2a01f8bffa2cd6437052f450f3370 Author: Kristof Provost AuthorDate: 2024-09-16 13:24:15 +0000 Commit: Kristof Provost CommitDate: 2024-09-27 20:13:23 +0000 pf: make pf_setup_pdesc() a static function We only ever call it from pf_test(), and implement it in the same source file. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46706 --- sys/net/pfvar.h | 6 ------ sys/netpfil/pf/pf.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index f5551447f7aa..3afbabf30d4d 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2352,12 +2352,6 @@ VNET_DECLARE(struct pf_krule, pf_default_rule); extern void pf_addrcpy(struct pf_addr *, struct pf_addr *, sa_family_t); void pf_free_rule(struct pf_krule *); -int pf_setup_pdesc(sa_family_t, int, - struct pf_pdesc *, struct mbuf *, - u_short *, u_short *, struct pfi_kkif *, - struct pf_krule **, struct pf_krule **, - struct pf_kruleset **, int *, int *, - struct pf_rule_actions *); int pf_test_eth(int, int, struct ifnet *, struct mbuf **, struct inpcb *); int pf_scan_sctp(struct mbuf *, int, struct pf_pdesc *, struct pfi_kkif *); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 823e90384747..1634c856f51f 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8555,7 +8555,7 @@ pf_dummynet_route(struct pf_pdesc *pd, struct pf_kstate *s, return (0); } -int +static int pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf *m, u_short *action, u_short *reason, struct pfi_kkif *kif, struct pf_krule **a, struct pf_krule **r, struct pf_kruleset **ruleset, int *off, int *hdrlen, From nobody Fri Sep 27 22:19:48 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 4XFlJP016kz5XKM4; Fri, 27 Sep 2024 22:19:49 +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 4XFlJN69cZz4lpy; Fri, 27 Sep 2024 22:19:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475588; 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=iTWKZgn8VkfO2ENLdRWG8rYB1pbzCNyPXn5Q16gNlI0=; b=H80QXd8oiyriFHs6KfgD4kqLVOv4xPFBgy014GM/xtdXNt9k8IWwENwY5TJSpAZBm0SpDj IqyFfl7wsSrx3w9GmlI9hIZadOurvvevhouvBS5LENCilLpXFaa0ndUYPzGDXRZiXExZIr 4WqaUDbbF2vRSKbdL9tRZRXBuVPvGdUkmebu4Iq7EUcqtsuzo2zKXnKB8x5o0toGITLAfY s1IPvN1NSoubYYQCTjUqzRPbPgKImh6e2PbyrEfIAqF9ZTu5aExNYdLGW+VCGEm+19EbrL 1SBh1wzJBDIdi8mlIcURVmg9mr1EjY+oDPrxkVgGS4s1GWGI/DmWj09/Ri1nzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727475588; 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=iTWKZgn8VkfO2ENLdRWG8rYB1pbzCNyPXn5Q16gNlI0=; b=i9HgQTIgem02tNU/dRnomYO/H8Ib5fV9hc1wM/DKPCu/c5lreaDJNMLuL6s1NiiPfLZlb4 Axr9kEbdtQpFmYagOvS4jkAGCAOiBgf4FJrWL8FqeknHbNif353djzMk7NP5drt0i4x0l2 LuUWeJGjFhGprMM67fShuL2pieE7d44Qe/nGox+6K8EZcbcjNARdFMhcGjtsiB5iDyptDp k9VGE4voo4XWXyUgy8oUBHTLN1E2zBifV0yMd8nRzPb13R7402i9qXOMUesVnZ2GFAAe3e fhsCH77/mRhYSsxhXKYTzZf92YIYaPpZwvCy6m3QzPstGEJDMYmdgqs3/4T8kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727475588; a=rsa-sha256; cv=none; b=B7SZnF5WKvqm/oLP5a+2UUPUwHR4h+OxJcnhOLl4gelHdkZBwd5Mbev21PhauA8tvsIgv0 ZJD2SYyJGYkrv15//db+10/qYW0oWC4i5HXxL1iWodU4sdJaNjB9/jVAFQ07RURhjOtumw hC9i/MBs8P0gukLgWvVQ0LtTVWt0ExCmUDHqCDbJsc09dEXhr41FAhoyl9fsET91R/iypZ cvk21/QP91OT4xR/aKvXf/qtAbPAC709bq7BlNF09sUlA53v+0GSdKBJrLsKICJ2BNrtYL +SS3WDFk7bYKcO3Fv+Kh7ct37uEAeFsDlED01ngN57Ev7FYtwdPyygJmkBRINA== 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 4XFlJN59KzzyN8; Fri, 27 Sep 2024 22:19:48 +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 48RMJm9D039842; Fri, 27 Sep 2024 22:19:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RMJmmC039839; Fri, 27 Sep 2024 22:19:48 GMT (envelope-from git) Date: Fri, 27 Sep 2024 22:19:48 GMT Message-Id: <202409272219.48RMJmmC039839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 132f5d03d358 - stable/13 - mountd: Add check for "=" after exports(5) options 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 132f5d03d358d89d4030de9173cd6ca5b4b48d68 Auto-Submitted: auto-generated The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=132f5d03d358d89d4030de9173cd6ca5b4b48d68 commit 132f5d03d358d89d4030de9173cd6ca5b4b48d68 Author: Rick Macklem AuthorDate: 2024-09-06 23:41:12 +0000 Commit: Rick Macklem CommitDate: 2024-09-27 22:18:46 +0000 mountd: Add check for "=" after exports(5) options Some exports(5) options take a "=arg" component that provides an argument value for the option. Others do not. Without this patch, if "=arg" was provided for an option that did not take an argument value, the "=arg" was simply ignored. This could result in confusion w.r.t. what was being exported, as noted by the Problem Report. This patch adds a check for "=arg" for the options that do not take an argument value and fails the exports line if one is found. PR: 281003 (cherry picked from commit 3df987c99d1194a0e43a84853e934aa0c0ab09db) --- usr.sbin/mountd/mountd.c | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index eba59ebf00a4..492d7a5e3647 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -2784,7 +2784,7 @@ do_opt(char **cpp, char **endcpp, struct exportlist *ep, struct grouplist *grp, { char *cpoptarg, *cpoptend; char *cp, *endcp, *cpopt, savedc, savedc2; - int allflag, usedarg; + int allflag, usedarg, fnd_equal; savedc2 = '\0'; cpopt = *cpp; @@ -2795,14 +2795,18 @@ do_opt(char **cpp, char **endcpp, struct exportlist *ep, struct grouplist *grp, while (cpopt && *cpopt) { allflag = 1; usedarg = -2; + fnd_equal = 0; if ((cpoptend = strchr(cpopt, ','))) { *cpoptend++ = '\0'; - if ((cpoptarg = strchr(cpopt, '='))) + if ((cpoptarg = strchr(cpopt, '='))) { *cpoptarg++ = '\0'; + fnd_equal = 1; + } } else { - if ((cpoptarg = strchr(cpopt, '='))) + if ((cpoptarg = strchr(cpopt, '='))) { *cpoptarg++ = '\0'; - else { + fnd_equal = 1; + } else { *cp = savedc; nextfield(&cp, &endcp); **endcpp = '\0'; @@ -2815,6 +2819,10 @@ do_opt(char **cpp, char **endcpp, struct exportlist *ep, struct grouplist *grp, } } if (!strcmp(cpopt, "ro") || !strcmp(cpopt, "o")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= MNT_EXRDONLY; } else if (cpoptarg && (!strcmp(cpopt, "maproot") || !(allflag = strcmp(cpopt, "mapall")) || @@ -2853,15 +2861,31 @@ do_opt(char **cpp, char **endcpp, struct exportlist *ep, struct grouplist *grp, usedarg++; opt_flags |= OP_NET; } else if (!strcmp(cpopt, "alldirs")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } opt_flags |= OP_ALLDIRS; } else if (!strcmp(cpopt, "public")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= MNT_EXPUBLIC; } else if (!strcmp(cpopt, "webnfs")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= (MNT_EXPUBLIC|MNT_EXRDONLY|MNT_EXPORTANON); opt_flags |= OP_MAPALL; } else if (cpoptarg && !strcmp(cpopt, "index")) { ep->ex_indexfile = strdup(cpoptarg); } else if (!strcmp(cpopt, "quiet")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } opt_flags |= OP_QUIET; } else if (cpoptarg && !strcmp(cpopt, "sec")) { if (parsesec(cpoptarg, ep)) @@ -2869,10 +2893,22 @@ do_opt(char **cpp, char **endcpp, struct exportlist *ep, struct grouplist *grp, opt_flags |= OP_SEC; usedarg++; } else if (!strcmp(cpopt, "tls")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= MNT_EXTLS; } else if (!strcmp(cpopt, "tlscert")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= (MNT_EXTLS | MNT_EXTLSCERT); } else if (!strcmp(cpopt, "tlscertuser")) { + if (fnd_equal == 1) { + syslog(LOG_ERR, "= after op: %s", cpopt); + return (1); + } *exflagsp |= (MNT_EXTLS | MNT_EXTLSCERT | MNT_EXTLSCERTUSER); } else { From nobody Fri Sep 27 23:45:39 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 4XFnCR5tQFz5XPwP; Fri, 27 Sep 2024 23:45:39 +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 4XFnCR5LVbz4rKw; Fri, 27 Sep 2024 23:45:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727480739; 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=dkrrJUJMabSqqSMyRHHcHHSjignACw8ExdNF3PcAiVA=; b=SX9ETz9doOGsGkAbOKke3eX5UDWKXzJ7QtfR086ESvLVoDgAPpwDTvbxVJqG3niJeBlEc3 m8fyZlzZHPpSy5imgGs8Mg6bGOWkXQGFOfVlsGse7Nut+1v0ZEo5qUVxfRHD7hImoQxaUj IpZY+AkiDJwmUqPxDYin/LaCC9tN3WWciGewCZGItgwIqvExDxD+4WObSZheEfygPNhWgr ZEuP51quf9YZJkQ/KUgLHIRnuaWJZpycrbpddQPIhpzJU9ZtcR9laFR4qdUuGWAC0LXEbv mXeWej8ykyatnXryTydEl3oADOgUse7fK5lU+nUZMlb6R6T0jFhshs7AD55HKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727480739; 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=dkrrJUJMabSqqSMyRHHcHHSjignACw8ExdNF3PcAiVA=; b=tIsTtystwJaMMHBC8Tx6IU17pYc/yBv2JDk1U8r5BWx1i9Cq5+YLh9sbOxs/T8Y5EH2DWZ p1QNHkpJsOWrkkKPpq48n/GPZdSb9I6b5fJ9cIkHIKMs0XtNqPHICXl+3e0H8EitBa1rQM wGLMZx38+FDFkcI3H56geOBqUWRWdAq+azMlHJ1GZZtsY6vJ2yjlq0Kfl9cb52tsxK/E0G fJUH1BDbY1XK01gM0/BEihe6EebZdAKHqSBbc/H+ppDE9aLcPSPX+xY/EFoucvV8d83V38 7M2uzVRRCKttlve8yEgKP2JVQj2LBRLAHENj+WSlXWYE7KNQUZVVrg7lLDizCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727480739; a=rsa-sha256; cv=none; b=W2dZ1i8g6tHq7HfHwBiHzFt61a2NoyIOvshVhtV7qWoA08LPYJd8v9jRhTVjyEA28WO2Q3 uOMT0JENYttWLPIDvokNs5pCq+YG9AHo27sCwNIwpNCIAASJMfkv1PwTuqcQZEkGXr1e4D BxPBKNwGwX/XBPgcfHyiJYuc3EEjqUJ3cI4dDgaKNZ1vS+ODLY3FCpdP3z2LivaxrODo+B urkKlR8c/ovWw56MgTOCvpqhbZmnrAmu7+R+iLnMTiUwd1oSyrbBXOA+VJ2zaKBlkkzs46 7YDhluPsd5eirUUDjA/RYS5TCFLCnCWV80XI3SAFwjMILHYhZijv/n/7AHedew== 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 4XFnCR4qYRz117Y; Fri, 27 Sep 2024 23:45:39 +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 48RNjdSf090764; Fri, 27 Sep 2024 23:45:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48RNjdmF090761; Fri, 27 Sep 2024 23:45:39 GMT (envelope-from git) Date: Fri, 27 Sep 2024 23:45:39 GMT Message-Id: <202409272345.48RNjdmF090761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: b7cbf741d554 - main - libkern: avoid local var in order_base_2() 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7cbf741d55468ba34305a14ac3acc1c286af034 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=b7cbf741d55468ba34305a14ac3acc1c286af034 commit b7cbf741d55468ba34305a14ac3acc1c286af034 Author: Doug Moore AuthorDate: 2024-09-27 23:43:07 +0000 Commit: Doug Moore CommitDate: 2024-09-27 23:43:07 +0000 libkern: avoid local var in order_base_2() order_base_2(n) is implemented with a variable, which keeps it from being used at file scope. Implement it instead as ilog2(2*n-1), which produces a different result when 2*n overflows, which appears unlikely in practice. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D46826 --- sys/sys/libkern.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/sys/libkern.h b/sys/sys/libkern.h index 64744f57b5c3..ad64d0fb0a57 100644 --- a/sys/sys/libkern.h +++ b/sys/sys/libkern.h @@ -227,10 +227,7 @@ ilog2_long_long(long long n) #define ilog2(n) (__builtin_constant_p(n) ? ilog2_const(n) : ilog2_var(n)) #define rounddown_pow_of_two(n) ((__typeof(n))1 << ilog2(n)) -#define order_base_2(n) ({ \ - __typeof(n) _n = (n); \ - _n == 1 ? 0 : 1 + ilog2(_n - 1); \ -}) +#define order_base_2(n) ilog2(2*(n)-1) #define roundup_pow_of_two(n) ((__typeof(n))1 << order_base_2(n)) #define bitcount64(x) __bitcount64((uint64_t)(x)) From nobody Sat Sep 28 03:30:01 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 4XFtBK72Qsz5Xg73 for ; Sat, 28 Sep 2024 03:30:01 +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 4XFtBK6Wxqz4PZm; Sat, 28 Sep 2024 03:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727494201; 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=lbfvxzZRkBM8nx7gILXx+I9YUDER6HKl3jgRkKQQmCQ=; b=Z3T4Pl6/9TEJyc+4NbVeZ8jvzkOmvCpBQewlYXPhyjFSn1OHp+KTDk7bSE5ghwUArLVbrU arkNSzwZhmvutSodTAVuKM7DOsT3e7wLCRDR91R6YUGt2rg0/Nr2+SOY7xliu5UF5eV7SM 7fYLvwhaipKwAKkxFbT1yyYTl7NtM0HU/DpnkTCDlsGF9bvSpgD6PbwB4lratwCROdXLlE kA1LW76SqWUXk6IC06KeueggVqnZ1ZuKg0on4BJ4GC8TsloPFYrVUqgQ0X54YyCFWAoeHy M59RVtTAPT7HckZLL4I69TW+D0TXtyyDLatTt1JOkN7d+z7Tk6GtJ6XSgcMwQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727494201; 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=lbfvxzZRkBM8nx7gILXx+I9YUDER6HKl3jgRkKQQmCQ=; b=rY8a5Kpcs/ebd5t+oniEOPQ5MM3+DGthlU1+Iqnf/z1X+mBCNIKMbE+7coRFB+fJYT7LkW 5gfCZs0KmYhNVmywxTJ5Je+8LedQf5IC4x0/ddnexZI81VUMWC7Hele6AA/akumGSJm+AG ZjR4LFm1rv3xJG3P/mcUlzY7CNBQ29RPeHJZIRu5Ek0tsLqZPpKQP+t0O8+Ko5B3LJZH5z VmUDGCv3PeoJI7F34RfjHDSpMSTaesO+4h4+SR+N0IfcuPfMJdnkjM23heDPdVeyWbIj8k e+iOU6qB2PazZgTgMZ7fgHwNZv/GbUm7a7vQIrdn74mvh9LzoApxLGiH33Ydew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727494201; a=rsa-sha256; cv=none; b=VO5Yv7fUTILBv1xRTSqBxIkhNs2lU+gd7bQCfMqxEGhhF6EwBq55DFH2ZBjuXyw2XYf9PK uX+GAs1zXd2PlfYJDcsDPa8G9e0VrKJHtYYZezgLjuH8HYLRzSGk7o1PuvauOVLPD7potV JxCWHCVhZQ9wElHSt+vEbcoc+D9aAZcQS6swA3YdaUEkCthQezAMUoXXeIsNhebIJ4j9mo 4vS/4JmOdLui0YMEQiUp38o6leDrL8SDkCzm3BnghDqgbtYpZJifoZuRN/FUDUNuPvMgI3 bVG0sxRGprofZGRv5N9PsHuP/FjvPG5aUKoKs7SeZgkKoEG8aNM1FIrE+oI3hw== 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 4XFtBK5jrvz16wb; Sat, 28 Sep 2024 03:30:01 +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 48S3U13a067153; Sat, 28 Sep 2024 03:30:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S3U1eH067150; Sat, 28 Sep 2024 03:30:01 GMT (envelope-from git) Date: Sat, 28 Sep 2024 03:30:01 GMT Message-Id: <202409280330.48S3U1eH067150@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Enji Cooper Subject: git: 345cf360f8b8..8e1eae2319cd - vendor/expat - vendor branch updated 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/vendor/expat X-Git-Reftype: branch X-Git-Commit: 8e1eae2319cd3a651941c88b46d95e8ee8507c6c X-Git-Oldrev: 345cf360f8b824329558275653518e5f514627ac X-Git-Newrev: 8e1eae2319cd3a651941c88b46d95e8ee8507c6c Auto-Submitted: auto-generated The branch vendor/expat has been updated by ngie: URL: https://cgit.FreeBSD.org/src/log/?id=345cf360f8b8..8e1eae2319cd 8e1eae2319cd vendor/expat: import 2.6.3 From nobody Sat Sep 28 03:30:01 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 4XFtBL1jt1z5Xg5n for ; Sat, 28 Sep 2024 03:30:02 +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 4XFtBK6wbpz4PX2; Sat, 28 Sep 2024 03:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727494202; 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=OUL7V9xAIbIGXNjWHrVSqgkxcijasE1un0wVTOZuWYY=; b=G/B8UH4Rc9/6vE9DtZVgtTQKNEnNVHVvwTGFcwLF58pDXrgaxIfR5UYmLUjst3CRsv3LIt dDvharSmlSJ2lDvPsOwErQxYm+yNcXdq8QTr+bMQQCBjU+sRqMBC+94U3Xqb7ebcBTEx7d NmORY/IFMeLvbib5GumBn7Hb5K0gyHy5TDzsddTLSAxi5oivgHuWQlQLOsVhpraZ4UZfJ/ ZJs/HVQ7uJuwn44fiGqkIJsobe9lh3QIsvz1CTpVVCnnc2YfafOSWq9AqjNLeggdRoqakB n2jJdZ/KjWSH6Kp3dusy3p40L0qn370/ht0xXX7So0L00shAPNT06lkb6esbQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727494202; 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=OUL7V9xAIbIGXNjWHrVSqgkxcijasE1un0wVTOZuWYY=; b=txSSYaS7h+mu07gvxJnn19y8W/cwqfgR4AQ25p/IcsZSfJhUBulhZfHmMnK4g7g76AVHz9 N2S+aOPES5c7aRdTrNKTwWTD1oI2ZQHaFyZTZjYRlQ0ltKMD1dJJOxarY07V+uVmIs1qjW PwRXdPvxJykyJkuf6gjLhUZ3lsdrMg6XUU2hnjJOpriLN/wZ44sANGwZ1TInb/a80Vt/A/ 6a+g8N7uKLWkbFdoB4a07D9y2MslxsFDG8bssL0P9ysm80j9B4X+TwgoLXhUL0Vsd+vR4F vgeT/Zo63lBcAoUMUOaofhSMw75BcYPcOcZjHWJOHpFq9QfSmpr3Kkag30rbCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727494202; a=rsa-sha256; cv=none; b=Lz1v8P128DDzyK84Tag8zp9KUE9Hx//KEkW9uTSQR3GzzuqoDVRdWbdyGF9F/4cxzo+v0K sVLA6AXZkWaZfotOqlwuKOuwhCMjPPgkSb/L3dnIWlYXJjmT3X4UbUBaZmaCT6N8GoLZFm kqr+8LL0BMs41IPUNg9IRwz5dAjtAfDPC8XZASOe2H4dJgjCsvVIr4o6rdtH/vhZkK9uof /FXXkkrjUQngOrhNND5IbJPQoGTv56rQAnrt7UFzC2mOZUJAJQPDkrsicFlY2Pb3pwSkmD M7iaOHYfpB6492f13JJcR1kHcf+UjyWor9OirRkZGcOwdI4mUocYq0Av3rQscw== 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 4XFtBK6PLrz179X; Sat, 28 Sep 2024 03:30:01 +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 48S3U10j067186; Sat, 28 Sep 2024 03:30:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S3U1Q3067183; Sat, 28 Sep 2024 03:30:01 GMT (envelope-from git) Date: Sat, 28 Sep 2024 03:30:01 GMT Message-Id: <202409280330.48S3U1Q3067183@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Enji Cooper Subject: git: 7709c7d33267 - Create tag vendor/expat/2.6.3 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: ngie X-Git-Repository: src X-Git-Refname: refs/tags/vendor/expat/2.6.3 X-Git-Reftype: annotated tag X-Git-Commit: 7709c7d3326795b3acfbd92362ec27720688e343 Auto-Submitted: auto-generated The annotated tag vendor/expat/2.6.3 has been created by ngie: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/expat/2.6.3 tag vendor/expat/2.6.3 Tagger: Enji Cooper TaggerDate: 2024-09-28 03:29:11 +0000 vendor/expat: tag version 2.6.3 commit 8e1eae2319cd3a651941c88b46d95e8ee8507c6c Author: Enji Cooper AuthorDate: 2024-09-28 03:21:31 +0000 Commit: Enji Cooper CommitDate: 2024-09-28 03:21:31 +0000 vendor/expat: import 2.6.3 The 2.6.1 - 2.6.3 releases address security issues. The release notes for the 2.6.3 release can be found at https://github.com/libexpat/libexpat/blob/R_2_6_3/expat/Changes . From nobody Sat Sep 28 03:36:11 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 4XFtKR3fXnz5Xg3y; Sat, 28 Sep 2024 03:36:11 +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 4XFtKR2vQzz4Pv5; Sat, 28 Sep 2024 03:36:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727494571; 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=OgHjJFVjbtK0SKakzFQXk4g+3ZRP9FoN5/X0wmGaZ0U=; b=UOkA+RbY+SghqCXoTvApWIK1LEyGqPVwOMVuDH5Kt49jQJyuVxG/qRBs1ucAPct1ZsdrJu QK00Id2PiZNMrxD0zvYNhXT45qy0N2VtMDAAPJAbvWe1Yb8tZsA8abv1yA5+Ey9NzKH0A+ tdB2aNyJo/lzgQ/XTVAC1wjIXhP6jbySzWHMm9jwQkVTlT5DTXkdrQsl+T/BEgEVm7uf2Q dddcfGMyTNsLMT2pEDIDcl9fVD/46Ac62lfylX74EUalh+oGQK0AJuWBbc7hJiofRxbCf8 9G0sg2Knff+vW5sz8W0BG4QHdmTjs5ecQ/V2FHDH+N514MkCbD1GJfjle4lvTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727494571; 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=OgHjJFVjbtK0SKakzFQXk4g+3ZRP9FoN5/X0wmGaZ0U=; b=aOv857czi8g5kIwcdLcK5OCKjpLvQ5rH1XR9VKPDVmrban6ZpRXwb1DfxuDPS3QUzeYPSB U/qLVFoA/jiKH/tAawdoAzRvyN9G2vVy2Zvc1e8gonI95vmIYBdTC4JVf6HT3HnZjCGiPI A4mUXOUp4xnQB1i9eoGWD1jiFLDU2WSqpidm8oQziskk02nqZZV6omVmT45B4uZocO/jsq fEvIh7GpQPNnOGrdqwxZClRCBsUAI8THOui2cGJz9NEQZkyTC1FOmwg8RnJi9BeaMweByY vnjaBBKygDf/GkXCytTxG9XLmTcfeUuXWj4kT+DxLarIfAgicMQk4XYafdbC+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727494571; a=rsa-sha256; cv=none; b=GxGdQKj3aIpJzxuqnhWUrro70hXBTqA3aQ2lJURwi8i9VPJjBee9J6uL3reEhcq9jcMp77 bzljFFp1SR68A6/X6gUBXolYIgeEITtfVBJaK1O092gPNLT6aMVITA9ygJO9z0dZNmOOZo r1ESiCcPIU6rJGvI5q/JPnZb4FVi5rugg5n8WOzLalBqO7ENR7csSGwYp2keRoLf2qSWrd iM10he7zbAiqgA2frS+tVHqM0n85Ty8d4rXYuxxbeIVpoycUG8MN6WaMwQV3Zz1UZvfI1Q 8RamE04BCAqvioTHv28PR7gwGxe5+jb2hZPSX7ar4hf+Um2IEoZMZztZhVECWQ== 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 4XFtKR2WWFz17F6; Sat, 28 Sep 2024 03:36:11 +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 48S3aBq3082238; Sat, 28 Sep 2024 03:36:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S3aBJM082235; Sat, 28 Sep 2024 03:36:11 GMT (envelope-from git) Date: Sat, 28 Sep 2024 03:36:11 GMT Message-Id: <202409280336.48S3aBJM082235@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: 26439b57877c - main - e1000: Remove redundant EITR shift from igb 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: 26439b57877ccae7a2404f7d179afaa5ddb2f64d Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=26439b57877ccae7a2404f7d179afaa5ddb2f64d commit 26439b57877ccae7a2404f7d179afaa5ddb2f64d Author: Kevin Bowling AuthorDate: 2024-09-28 03:34:18 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 03:36:00 +0000 e1000: Remove redundant EITR shift from igb The E1000_EITR() macro is already multiplying by 0x4 which is the same as this shift, so we were shifting more than expected. MFC after: 6 days Sponsored by: BBOX.io --- sys/dev/e1000/if_em.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index 7219dc57c333..83a0d4e96fc6 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -251,8 +251,7 @@ #define IGB_ITR_DIVIDEND 1000000 #define IGB_ITR_SHIFT 2 #define IGB_QVECTOR_MASK 0x7FFC -#define IGB_INTS_TO_EITR(i) (((IGB_ITR_DIVIDEND/i) & IGB_QVECTOR_MASK) << \ - IGB_ITR_SHIFT) +#define IGB_INTS_TO_EITR(i) ((IGB_ITR_DIVIDEND/i) & IGB_QVECTOR_MASK) #define IGB_LINK_ITR 2000 #define I210_LINK_DELAY 1000 From nobody Sat Sep 28 03:52:30 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 4XFthH0Tkxz5Xh6d; Sat, 28 Sep 2024 03:52:31 +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 4XFthG74ztz4RMp; Sat, 28 Sep 2024 03:52:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727495551; 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=nCNCtmq46naWwsO6+LGsaiOnRa8psv7bQ8kfLK4uap4=; b=TeNntmLSMin4c/Q5Imqlt8G9OPhAM/T5LPiZdFPxGJimPVVmBxIInuIYXhXOVB/IRgbybA gm9u3BuomDFOJz3pbyYLzfpGA9l9TIEXuYJeNaRX5ALyvwOdUUspoDjkbtmAhGJGu9BmrE +XgTREml98v8CVLUoDky4nc/eqmEQ49UrAeFwukejWCFaFX2/3mKiKnni3qiOgWP8HHWT1 Jw4mQcRo5p+GHoP7sdWsfW0eSlRGM/MRflPH2vlR7URKkzBn5JKk19InI6g4eLDdp8LR41 LBbQn9/tuI6tN27/ZAKSJS2SnJWZbRm94Uied+NvXFkq/b+qTRU3CCH/QS2b0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727495551; 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=nCNCtmq46naWwsO6+LGsaiOnRa8psv7bQ8kfLK4uap4=; b=N6HWnnrrymgJi7A/rem1Kljf1M2nbGVNZlWlAWwJWfYrbRrjApZKfBMn/02KlJ9EVaNfEZ 8RvuTnCrASDKDUP2SqOZSmkCoWPDP3BQFFsCBKfRjRq1lvWgBsqfo3TXdFj5h82kD65FLt Ka6XWNeVMOvu486cZ+7kjNdJB+o0MfZa7k2w539V/5Ar6Iabi2K3vHyf2Zm4Z3f6JmSm0e vx0vjwmhv5TBZ7/8NuuM17JdTZMDx8EHKhjd4Py1s0ewLvct0cbMae0VRGvbXALbJ2sNrR HYSOIK4fj6VVr1phRiDDmdo+T+9DTQk+BKcN35iGIpU4kSplYMLrLjf5tikyjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727495551; a=rsa-sha256; cv=none; b=cgJ6Hg187+HNBnbvEmuQMt6VA57LexdBYnAnPZWr3M8deVrhSIIWt03jCuFX9UekySPs7W RgXqllUiPnub74nwWugpHJIwSzeIwUf2Z5PTV24K/Ijp6UzD3vpEt4EDXqYursHBn817+k 3gIJOeM3x6b1ZlYmzNFbPzskejxe4S9q3/oFz3XkoqhKREJY9bhLEO7jwoKmFqEMlNMVFC 7Y7vz4m8/GWdBICd5o8ptBeBnjf+v43pYIjnp25sC4p3OJ4xXbfarVmqZi/dMtoopsLLhG lLGvvcI2i+YPie8r4iKnzbHCoXe0sRW4o5pcd1AuZ9BE9rcHCU0KBNbtoPiLkQ== 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 4XFthG6h8cz17xT; Sat, 28 Sep 2024 03:52:30 +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 48S3qUKj014439; Sat, 28 Sep 2024 03:52:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S3qUAk014436; Sat, 28 Sep 2024 03:52:30 GMT (envelope-from git) Date: Sat, 28 Sep 2024 03:52:30 GMT Message-Id: <202409280352.48S3qUAk014436@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: cc43f991ab3e - stable/14 - openssl: Import OpenSSL 3.0.15. 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cc43f991ab3e46ec16f3f1395160805f01bf932e Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=cc43f991ab3e46ec16f3f1395160805f01bf932e commit cc43f991ab3e46ec16f3f1395160805f01bf932e Author: Enji Cooper AuthorDate: 2024-09-08 04:30:17 +0000 Commit: Enji Cooper CommitDate: 2024-09-28 03:50:47 +0000 openssl: Import OpenSSL 3.0.15. This release incorporates the following bug fixes and mitigations: - Fixed possible denial of service in X.509 name checks ([CVE-2024-6119]) - Fixed possible buffer overread in SSL_select_next_proto() ([CVE-2024-5535]) Release notes can be found at: https://openssl-library.org/news/openssl-3.0-notes/index.html Co-authored-by: gordon MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46602 Merge commit '108164cf95d9594884c2dcccba2691335e6f221b' (cherry picked from commit a7148ab39c03abd4d1a84997c70bf96f15dd2a09) Update config/build info for OpenSSL 3.0.15 This is a companion commit to the OpenSSL 3.0.15 update. `opensslv.h` was regenerated via the following process: ``` cd crypto/openssl ./config git reset --hard gmake include/openssl/opensslv.h ``` `Makefile.inc` has been updated to match. MFC after: 1 week MFC with: a7148ab39c03abd4d1a84997c70bf96f15dd2a09 Differential Revision: https://reviews.freebsd.org/D46603 (cherry picked from commit cc717b574d7faa2e0b2de1a985076286cef74187) sys/crypto/openssl: update powerpc* ASM This change updates the crypto powerpc* ASM via the prescribed process documented in `crypto/openssl/FREEBSD-upgrade`. This change syncs the ASM with 3.0.15's generated ASM. MFC after: 1 week MFC with: a7148ab39c03abd4d1a84997c70bf96f15dd2a09 MFC with: cc717b574d7faa2e0b2de1a985076286cef74187 Differential Revision: https://reviews.freebsd.org/D46604 (cherry picked from commit 77864b545b0aaa91bc78b1156c477825007a6233) --- crypto/openssl/CHANGES.md | 34 ++ crypto/openssl/CONTRIBUTING.md | 6 +- crypto/openssl/Configurations/10-main.conf | 36 ++ crypto/openssl/Configurations/15-ios.conf | 2 +- crypto/openssl/Configure | 10 +- crypto/openssl/FAQ.md | 6 - crypto/openssl/INSTALL.md | 4 +- crypto/openssl/NEWS.md | 15 + crypto/openssl/VERSION.dat | 4 +- crypto/openssl/apps/cms.c | 4 +- crypto/openssl/apps/dgst.c | 9 +- crypto/openssl/apps/lib/opt.c | 4 +- crypto/openssl/apps/lib/s_cb.c | 3 +- crypto/openssl/apps/smime.c | 4 +- crypto/openssl/crypto/aes/asm/aesp8-ppc.pl | 147 ++++-- crypto/openssl/crypto/aes/build.info | 4 + crypto/openssl/crypto/asn1/a_d2i_fp.c | 5 +- crypto/openssl/crypto/asn1/a_mbstr.c | 14 +- crypto/openssl/crypto/asn1/a_strex.c | 11 +- crypto/openssl/crypto/asn1/a_verify.c | 4 +- crypto/openssl/crypto/asn1/tasn_fre.c | 8 +- crypto/openssl/crypto/bio/bf_readbuff.c | 7 +- crypto/openssl/crypto/bio/bio_addr.c | 12 +- crypto/openssl/crypto/cmp/cmp_vfy.c | 4 +- crypto/openssl/crypto/conf/conf_def.c | 4 +- crypto/openssl/crypto/conf/conf_lib.c | 5 +- crypto/openssl/crypto/conf/conf_sap.c | 4 +- crypto/openssl/crypto/context.c | 4 +- crypto/openssl/crypto/ec/ecdsa_ossl.c | 12 +- crypto/openssl/crypto/engine/eng_table.c | 8 +- crypto/openssl/crypto/evp/ctrl_params_translate.c | 5 +- crypto/openssl/crypto/evp/digest.c | 4 +- crypto/openssl/crypto/evp/names.c | 36 +- crypto/openssl/crypto/evp/pmeth_lib.c | 11 +- crypto/openssl/crypto/o_str.c | 6 +- crypto/openssl/crypto/pkcs12/p12_crt.c | 17 +- crypto/openssl/crypto/pkcs7/pk7_doit.c | 45 +- crypto/openssl/crypto/property/property.c | 55 +- crypto/openssl/crypto/rand/randfile.c | 13 +- crypto/openssl/crypto/rsa/rsa_oaep.c | 4 +- crypto/openssl/crypto/x509/v3_utl.c | 2 +- crypto/openssl/crypto/x509/x_name.c | 6 +- crypto/openssl/doc/HOWTO/certificates.txt | 2 +- crypto/openssl/doc/fingerprints.txt | 3 - crypto/openssl/doc/man1/openssl-enc.pod.in | 13 +- .../doc/man1/openssl-passphrase-options.pod | 24 +- crypto/openssl/doc/man1/openssl-s_client.pod.in | 8 +- crypto/openssl/doc/man1/openssl-s_server.pod.in | 7 +- .../doc/man1/openssl-verification-options.pod | 4 +- crypto/openssl/doc/man3/ASN1_INTEGER_new.pod | 3 +- crypto/openssl/doc/man3/ASYNC_WAIT_CTX_new.pod | 5 +- crypto/openssl/doc/man3/BIO_ADDR.pod | 3 +- crypto/openssl/doc/man3/BIO_ADDRINFO.pod | 4 +- crypto/openssl/doc/man3/BIO_f_base64.pod | 26 +- crypto/openssl/doc/man3/BIO_meth_new.pod | 4 +- crypto/openssl/doc/man3/BN_add.pod | 22 +- crypto/openssl/doc/man3/BN_generate_prime.pod | 5 +- crypto/openssl/doc/man3/BN_set_bit.pod | 9 +- crypto/openssl/doc/man3/BUF_MEM_new.pod | 3 +- crypto/openssl/doc/man3/CRYPTO_THREAD_run_once.pod | 12 +- crypto/openssl/doc/man3/CTLOG_STORE_new.pod | 4 +- crypto/openssl/doc/man3/CTLOG_new.pod | 4 +- crypto/openssl/doc/man3/CT_POLICY_EVAL_CTX_new.pod | 5 +- crypto/openssl/doc/man3/DH_meth_new.pod | 4 +- crypto/openssl/doc/man3/DSA_SIG_new.pod | 3 +- crypto/openssl/doc/man3/DSA_meth_new.pod | 4 +- crypto/openssl/doc/man3/ECDSA_SIG_new.pod | 3 +- crypto/openssl/doc/man3/ENGINE_add.pod | 5 +- crypto/openssl/doc/man3/EVP_ASYM_CIPHER_free.pod | 4 +- crypto/openssl/doc/man3/EVP_CIPHER_meth_new.pod | 3 +- crypto/openssl/doc/man3/EVP_DigestInit.pod | 10 +- crypto/openssl/doc/man3/EVP_EncodeInit.pod | 4 +- crypto/openssl/doc/man3/EVP_EncryptInit.pod | 19 +- crypto/openssl/doc/man3/EVP_KEM_free.pod | 3 +- crypto/openssl/doc/man3/EVP_KEYEXCH_free.pod | 4 +- crypto/openssl/doc/man3/EVP_KEYMGMT.pod | 3 +- crypto/openssl/doc/man3/EVP_MD_meth_new.pod | 3 +- crypto/openssl/doc/man3/EVP_PKEY_ASN1_METHOD.pod | 4 +- crypto/openssl/doc/man3/EVP_PKEY_meth_new.pod | 4 +- crypto/openssl/doc/man3/EVP_RAND.pod | 4 +- crypto/openssl/doc/man3/EVP_SIGNATURE.pod | 4 +- crypto/openssl/doc/man3/HMAC.pod | 4 +- crypto/openssl/doc/man3/MD5.pod | 15 +- crypto/openssl/doc/man3/NCONF_new_ex.pod | 4 +- crypto/openssl/doc/man3/OCSP_REQUEST_new.pod | 3 +- crypto/openssl/doc/man3/OCSP_cert_to_id.pod | 3 +- crypto/openssl/doc/man3/OCSP_response_status.pod | 3 +- crypto/openssl/doc/man3/OPENSSL_LH_COMPFUNC.pod | 4 +- crypto/openssl/doc/man3/OPENSSL_init_crypto.pod | 3 +- crypto/openssl/doc/man3/OPENSSL_malloc.pod | 5 +- crypto/openssl/doc/man3/OPENSSL_secure_malloc.pod | 8 +- crypto/openssl/doc/man3/OSSL_CMP_CTX_new.pod | 8 +- crypto/openssl/doc/man3/OSSL_CMP_SRV_CTX_new.pod | 3 +- crypto/openssl/doc/man3/OSSL_CMP_validate_msg.pod | 9 +- crypto/openssl/doc/man3/OSSL_DECODER.pod | 3 +- crypto/openssl/doc/man3/OSSL_DECODER_CTX.pod | 3 +- .../doc/man3/OSSL_DECODER_CTX_new_for_pkey.pod | 4 +- crypto/openssl/doc/man3/OSSL_ENCODER.pod | 3 +- crypto/openssl/doc/man3/OSSL_ENCODER_CTX.pod | 3 +- crypto/openssl/doc/man3/OSSL_HTTP_REQ_CTX.pod | 3 +- crypto/openssl/doc/man3/OSSL_LIB_CTX.pod | 4 +- crypto/openssl/doc/man3/OSSL_PARAM_BLD.pod | 3 +- crypto/openssl/doc/man3/OSSL_PARAM_dup.pod | 3 +- crypto/openssl/doc/man3/OSSL_SELF_TEST_new.pod | 3 +- crypto/openssl/doc/man3/OSSL_STORE_INFO.pod | 3 +- crypto/openssl/doc/man3/OSSL_STORE_LOADER.pod | 23 +- crypto/openssl/doc/man3/OSSL_STORE_SEARCH.pod | 3 +- .../openssl/doc/man3/PEM_read_bio_PrivateKey.pod | 6 +- crypto/openssl/doc/man3/RAND_set_DRBG_type.pod | 4 +- crypto/openssl/doc/man3/RSA_meth_new.pod | 4 +- crypto/openssl/doc/man3/SCT_new.pod | 8 +- .../doc/man3/SSL_CTX_set_alpn_select_cb.pod | 28 +- .../openssl/doc/man3/SSL_CTX_set_cipher_list.pod | 4 +- .../doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod | 8 +- crypto/openssl/doc/man3/TS_RESP_CTX_new.pod | 3 +- crypto/openssl/doc/man3/X509V3_get_d2i.pod | 3 +- crypto/openssl/doc/man3/X509_LOOKUP.pod | 3 +- crypto/openssl/doc/man3/X509_LOOKUP_meth_new.pod | 3 +- crypto/openssl/doc/man3/X509_STORE_new.pod | 3 +- crypto/openssl/doc/man3/X509_dup.pod | 2 +- crypto/openssl/doc/man3/X509_new.pod | 7 +- crypto/openssl/doc/man3/d2i_X509.pod | 6 +- crypto/openssl/doc/man7/EVP_KEYEXCH-DH.pod | 11 +- crypto/openssl/doc/man7/EVP_PKEY-DH.pod | 62 +-- crypto/openssl/doc/man7/ossl_store.pod | 9 +- crypto/openssl/fuzz/bignum.c | 9 +- crypto/openssl/include/crypto/aes_platform.h | 4 +- crypto/openssl/include/crypto/bn.h | 2 +- crypto/openssl/include/openssl/opensslv.h | 10 +- crypto/openssl/include/openssl/tls1.h | 4 +- crypto/openssl/providers/fips-sources.checksums | 18 +- crypto/openssl/providers/fips.checksum | 2 +- .../implementations/encode_decode/decode_der2key.c | 35 +- .../openssl/providers/implementations/rands/drbg.c | 5 + crypto/openssl/ssl/bio_ssl.c | 4 +- crypto/openssl/ssl/ssl_lib.c | 63 ++- crypto/openssl/ssl/ssl_sess.c | 34 +- crypto/openssl/ssl/statem/extensions.c | 14 +- crypto/openssl/ssl/statem/extensions_clnt.c | 29 +- crypto/openssl/ssl/statem/extensions_srvr.c | 34 +- crypto/openssl/ssl/statem/statem_lib.c | 6 +- crypto/openssl/ssl/t1_lib.c | 2 + crypto/openssl/test/build.info | 6 +- crypto/openssl/test/crltest.c | 65 ++- crypto/openssl/test/endecode_test.c | 22 +- crypto/openssl/test/evp_byname_test.c | 40 ++ crypto/openssl/test/evp_extra_test.c | 21 + crypto/openssl/test/helpers/handshake.c | 8 +- crypto/openssl/test/hexstr_test.c | 11 +- crypto/openssl/test/prov_config_test.c | 9 +- crypto/openssl/test/provider_fallback_test.c | 14 +- crypto/openssl/test/provider_internal_test.c | 4 +- crypto/openssl/test/provider_test.c | 3 +- crypto/openssl/test/recipes/03-test_fipsinstall.t | 44 +- crypto/openssl/test/recipes/04-test_conf.t | 3 +- .../recipes/04-test_conf_data/oversized_line.cnf | 3 + .../recipes/04-test_conf_data/oversized_line.txt | 4 + crypto/openssl/test/recipes/25-test_eai_data.t | 2 +- crypto/openssl/test/recipes/30-test_evp_byname.t | 16 + .../test/recipes/30-test_evp_data/evppkey_dsa.txt | 6 +- .../recipes/30-test_evp_data/evppkey_ecdsa.txt | 3 +- .../30-test_evp_data/evppkey_rsa_common.txt | 3 +- crypto/openssl/test/recipes/70-test_npn.t | 73 +++ crypto/openssl/test/ssl-tests/08-npn.cnf | 553 ++++++++++++--------- crypto/openssl/test/ssl-tests/08-npn.cnf.in | 37 +- crypto/openssl/test/ssl-tests/09-alpn.cnf | 66 ++- crypto/openssl/test/ssl-tests/09-alpn.cnf.in | 35 +- crypto/openssl/test/sslapitest.c | 370 +++++++++++++- crypto/openssl/util/check-format-commit.sh | 171 +++++++ crypto/openssl/util/check-format-test-negatives.c | 5 +- crypto/openssl/util/check-format.pl | 13 +- crypto/openssl/util/perl/OpenSSL/Test/Utils.pm | 18 +- crypto/openssl/util/perl/TLSProxy/Message.pm | 11 +- crypto/openssl/util/perl/TLSProxy/NextProto.pm | 54 ++ crypto/openssl/util/perl/TLSProxy/Proxy.pm | 3 +- secure/lib/libcrypto/Makefile.inc | 4 +- sys/crypto/openssl/powerpc/aesp8-ppc.S | 143 ++++-- sys/crypto/openssl/powerpc/poly1305-ppc.S | 64 +-- sys/crypto/openssl/powerpc64/aesp8-ppc.S | 143 ++++-- sys/crypto/openssl/powerpc64/poly1305-ppc.S | 64 +-- sys/crypto/openssl/powerpc64le/aesp8-ppc.S | 143 ++++-- sys/crypto/openssl/powerpc64le/poly1305-ppc.S | 64 +-- 182 files changed, 2697 insertions(+), 1062 deletions(-) diff --git a/crypto/openssl/CHANGES.md b/crypto/openssl/CHANGES.md index 19e0fd6e25a5..e41181b5bbb0 100644 --- a/crypto/openssl/CHANGES.md +++ b/crypto/openssl/CHANGES.md @@ -28,6 +28,30 @@ breaking changes, and mappings for the large list of deprecated functions. [Migration guide]: https://github.com/openssl/openssl/tree/master/doc/man7/migration_guide.pod +### Changes between 3.0.14 and 3.0.15 [3 Sep 2024] + + * Fixed possible denial of service in X.509 name checks. + + Applications performing certificate name checks (e.g., TLS clients checking + server certificates) may attempt to read an invalid memory address when + comparing the expected name with an `otherName` subject alternative name of + an X.509 certificate. This may result in an exception that terminates the + application program. + + ([CVE-2024-6119]) + + *Viktor Dukhovni* + + * Fixed possible buffer overread in SSL_select_next_proto(). + + Calling the OpenSSL API function SSL_select_next_proto with an empty + supported client protocols buffer may cause a crash or memory contents + to be sent to the peer. + + ([CVE-2024-5535]) + + *Matt Caswell* + ### Changes between 3.0.13 and 3.0.14 [4 Jun 2024] * Fixed potential use after free after SSL_free_buffers() is called. @@ -70,6 +94,14 @@ breaking changes, and mappings for the large list of deprecated functions. *Tomáš Mráz* + * Improved EC/DSA nonce generation routines to avoid bias and timing + side channel leaks. + + Thanks to Florian Sieck from Universität zu Lübeck and George Pantelakis + and Hubert Kario from Red Hat for reporting the issues. + + *Tomáš Mráz and Paul Dale* + * Fixed an issue where some non-default TLS server configurations can cause unbounded memory growth when processing TLSv1.3 sessions. An attacker may exploit certain server configurations to trigger unbounded memory growth that @@ -19890,6 +19922,8 @@ ndif +[CVE-2024-6119]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-6119 +[CVE-2024-5535]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-5535 [CVE-2024-4741]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-4741 [CVE-2024-4603]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-4603 [CVE-2024-2511]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-2511 diff --git a/crypto/openssl/CONTRIBUTING.md b/crypto/openssl/CONTRIBUTING.md index fec6616e21fe..cced15347d05 100644 --- a/crypto/openssl/CONTRIBUTING.md +++ b/crypto/openssl/CONTRIBUTING.md @@ -3,7 +3,7 @@ HOW TO CONTRIBUTE TO OpenSSL Please visit our [Getting Started] page for other ideas about how to contribute. - [Getting Started]: + [Getting Started]: Development is done on GitHub in the [openssl/openssl] repository. @@ -77,8 +77,8 @@ guidelines: Clean builds via GitHub Actions are required. They are started automatically whenever a PR is created or updated by committers. - [coding style]: https://www.openssl.org/policies/technical/coding-style.html - [documentation policy]: https://openssl.org/policies/technical/documentation-policy.html + [coding style]: https://openssl-library.org/policies/technical/coding-style/ + [documentation policy]: https://openssl-library.org/policies/technical/documentation-policy/ 5. When at all possible, code contributions should include tests. These can either be added to an existing test, or completely new. Please see diff --git a/crypto/openssl/Configurations/10-main.conf b/crypto/openssl/Configurations/10-main.conf index 1155d9859c56..e74adb50cc3c 100644 --- a/crypto/openssl/Configurations/10-main.conf +++ b/crypto/openssl/Configurations/10-main.conf @@ -1264,6 +1264,25 @@ my %targets = ( AR => add("-X32"), RANLIB => add("-X32"), }, + # To enable openxl compiler for aix + # If 17.1 openxl runtime is available, -latomic can be used + # instead of -DBROKEN_CLANG_ATOMICS + "aix-clang" => { + inherit_from => [ "aix-common" ], + CC => "ibm-clang", + CFLAGS => picker(debug => "-O0 -g", + release => "-O"), + cflags => combine("-Wno-implicit-function-declaration -mcmodel=large -DBROKEN_CLANG_ATOMICS", + threads("-pthread")), + ex_libs => add(threads("-pthread")), + bn_ops => "BN_LLONG RC4_CHAR", + asm_arch => 'ppc32', + perlasm_scheme => "aix32", + shared_cflag => "-fpic", + shared_ldflag => add("-shared"), + AR => add("-X32"), + RANLIB => add("-X32"), + }, "aix64-cc" => { inherit_from => [ "aix-common" ], CC => "cc", @@ -1282,6 +1301,23 @@ my %targets = ( AR => add("-X64"), RANLIB => add("-X64"), }, + "aix64-clang" => { + inherit_from => [ "aix-common" ], + CC => "ibm-clang", + CFLAGS => picker(debug => "-O0 -g", + release => "-O"), + cflags => combine("-maix64 -Wno-implicit-function-declaration -mcmodel=large", + threads("-pthread")), + ex_libs => add(threads("-pthread")), + bn_ops => "SIXTY_FOUR_BIT_LONG RC4_CHAR", + asm_arch => 'ppc64', + perlasm_scheme => "aix64", + shared_cflag => "-fpic", + shared_ldflag => add("-shared"), + shared_extension => "64.so.\$(SHLIB_VERSION_NUMBER)", + AR => add("-X64"), + RANLIB => add("-X64"), + }, # SIEMENS BS2000/OSD: an EBCDIC-based mainframe "BS2000-OSD" => { diff --git a/crypto/openssl/Configurations/15-ios.conf b/crypto/openssl/Configurations/15-ios.conf index 81e3d68bc7f0..84c9cfeb3a14 100644 --- a/crypto/openssl/Configurations/15-ios.conf +++ b/crypto/openssl/Configurations/15-ios.conf @@ -10,7 +10,7 @@ my %targets = ( template => 1, inherit_from => [ "darwin-common" ], sys_id => "iOS", - disable => [ "shared", "async" ], + disable => [ "async" ], }, "ios-xcrun" => { inherit_from => [ "ios-common" ], diff --git a/crypto/openssl/Configure b/crypto/openssl/Configure index 40c03ad0af32..0c60d1da1659 100755 --- a/crypto/openssl/Configure +++ b/crypto/openssl/Configure @@ -178,7 +178,6 @@ my @gcc_devteam_warn = qw( # -Wextended-offsetof -- no, needed in CMS ASN1 code my @clang_devteam_warn = qw( -Wno-unknown-warning-option - -Wswitch-default -Wno-parentheses-equality -Wno-language-extension-token -Wno-extended-offsetof @@ -1583,7 +1582,7 @@ if (!$disabled{makedepend}) { disable('unavailable', 'makedepend') unless $config{makedep_scheme}; } -if (!$disabled{asm} && !$predefined_C{__MACH__} && $^O ne 'VMS') { +if (!$disabled{asm} && !$predefined_C{__MACH__} && $^O ne 'VMS' && !$predefined_C{_AIX}) { # probe for -Wa,--noexecstack option... if ($predefined_C{__clang__}) { # clang has builtin assembler, which doesn't recognize --help, @@ -3407,6 +3406,13 @@ sub absolutedir { return rel2abs($dir); } + # realpath() on Windows seems to check if the directory actually exists, + # which isn't what is wanted here. All we want to know is if a directory + # spec is absolute, not if it exists. + if ($^O eq "MSWin32") { + return rel2abs($dir); + } + # We use realpath() on Unix, since no other will properly clean out # a directory spec. use Cwd qw/realpath/; diff --git a/crypto/openssl/FAQ.md b/crypto/openssl/FAQ.md deleted file mode 100644 index 30f5010ce3a4..000000000000 --- a/crypto/openssl/FAQ.md +++ /dev/null @@ -1,6 +0,0 @@ -Frequently Asked Questions (FAQ) -================================ - -The [Frequently Asked Questions][FAQ] are now maintained on the OpenSSL homepage. - - [FAQ]: https://www.openssl.org/docs/faq.html diff --git a/crypto/openssl/INSTALL.md b/crypto/openssl/INSTALL.md index c0dae491c94d..47d64b1a39d8 100644 --- a/crypto/openssl/INSTALL.md +++ b/crypto/openssl/INSTALL.md @@ -1164,7 +1164,7 @@ Configure OpenSSL ### Automatic Configuration In previous version, the `config` script determined the platform type and -compiler and then called `Configure`. Starting with this release, they are +compiler and then called `Configure`. Starting with version 3.0, they are the same. #### Unix / Linux / macOS @@ -1618,7 +1618,7 @@ More about our support resources can be found in the [SUPPORT] file. ### Configuration Errors -If the `./Configure` or `./Configure` command fails with an error message, +If the `./config` or `./Configure` command fails with an error message, read the error message carefully and try to figure out whether you made a mistake (e.g., by providing a wrong option), or whether the script is working incorrectly. If you think you encountered a bug, please diff --git a/crypto/openssl/NEWS.md b/crypto/openssl/NEWS.md index fb231bcd8459..e0a81703ee8d 100644 --- a/crypto/openssl/NEWS.md +++ b/crypto/openssl/NEWS.md @@ -18,6 +18,19 @@ OpenSSL Releases OpenSSL 3.0 ----------- +### Major changes between OpenSSL 3.0.14 and OpenSSL 3.0.15 [3 Sep 2024] + +OpenSSL 3.0.15 is a security patch release. The most severe CVE fixed in this +release is Moderate. + +This release incorporates the following bug fixes and mitigations: + + * Fixed possible denial of service in X.509 name checks + ([CVE-2024-6119]) + + * Fixed possible buffer overread in SSL_select_next_proto() + ([CVE-2024-5535]) + ### Major changes between OpenSSL 3.0.13 and OpenSSL 3.0.14 [4 Jun 2024] * Fixed potential use after free after SSL_free_buffers() is called @@ -1482,6 +1495,8 @@ OpenSSL 0.9.x +[CVE-2024-6119]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-6119 +[CVE-2024-5535]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-5535 [CVE-2024-4741]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-4741 [CVE-2024-4603]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-4603 [CVE-2024-2511]: https://www.openssl.org/news/vulnerabilities.html#CVE-2024-2511 diff --git a/crypto/openssl/VERSION.dat b/crypto/openssl/VERSION.dat index 5de9bf3d01ba..0942ddc200ca 100644 --- a/crypto/openssl/VERSION.dat +++ b/crypto/openssl/VERSION.dat @@ -1,7 +1,7 @@ MAJOR=3 MINOR=0 -PATCH=14 +PATCH=15 PRE_RELEASE_TAG= BUILD_METADATA= -RELEASE_DATE="4 Jun 2024" +RELEASE_DATE="3 Sep 2024" SHLIB_VERSION=3 diff --git a/crypto/openssl/apps/cms.c b/crypto/openssl/apps/cms.c index 3994cb0fcd58..abb9f196a760 100644 --- a/crypto/openssl/apps/cms.c +++ b/crypto/openssl/apps/cms.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -132,7 +132,7 @@ const OPTIONS cms_options[] = { {"binary", OPT_BINARY, '-', "Treat input as binary: do not translate to canonical form"}, {"crlfeol", OPT_CRLFEOL, '-', - "Use CRLF as EOL termination instead of CR only" }, + "Use CRLF as EOL termination instead of LF only" }, {"asciicrlf", OPT_ASCIICRLF, '-', "Perform CRLF canonicalisation when signing"}, diff --git a/crypto/openssl/apps/dgst.c b/crypto/openssl/apps/dgst.c index 3f02af0d5738..51383bec26ca 100644 --- a/crypto/openssl/apps/dgst.c +++ b/crypto/openssl/apps/dgst.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -478,7 +478,7 @@ int dgst_main(int argc, char **argv) static void show_digests(const OBJ_NAME *name, void *arg) { struct doall_dgst_digests *dec = (struct doall_dgst_digests *)arg; - const EVP_MD *md = NULL; + EVP_MD *md = NULL; /* Filter out signed digests (a.k.a signature algorithms) */ if (strstr(name->name, "rsa") != NULL || strstr(name->name, "RSA") != NULL) @@ -490,8 +490,7 @@ static void show_digests(const OBJ_NAME *name, void *arg) /* Filter out message digests that we cannot use */ md = EVP_MD_fetch(app_get0_libctx(), name->name, app_get0_propq()); if (md == NULL) { - md = EVP_get_digestbyname(name->name); - if (md == NULL) + if (EVP_get_digestbyname(name->name) == NULL) return; } @@ -502,6 +501,8 @@ static void show_digests(const OBJ_NAME *name, void *arg) } else { BIO_printf(dec->bio, " "); } + + EVP_MD_free(md); } /* diff --git a/crypto/openssl/apps/lib/opt.c b/crypto/openssl/apps/lib/opt.c index d56964dbe7ba..88db9ad6947b 100644 --- a/crypto/openssl/apps/lib/opt.c +++ b/crypto/openssl/apps/lib/opt.c @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2015-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -616,7 +616,7 @@ int opt_uintmax(const char *value, ossl_uintmax_t *result) opt_number_error(value); return 0; } - *result = (ossl_intmax_t)m; + *result = (ossl_uintmax_t)m; errno = oerrno; return 1; } diff --git a/crypto/openssl/apps/lib/s_cb.c b/crypto/openssl/apps/lib/s_cb.c index 7881c1667626..6440b496099e 100644 --- a/crypto/openssl/apps/lib/s_cb.c +++ b/crypto/openssl/apps/lib/s_cb.c @@ -649,7 +649,7 @@ void msg_cb(int write_p, int version, int content_type, const void *buf, (void)BIO_flush(bio); } -static STRINT_PAIR tlsext_types[] = { +static const STRINT_PAIR tlsext_types[] = { {"server name", TLSEXT_TYPE_server_name}, {"max fragment length", TLSEXT_TYPE_max_fragment_length}, {"client certificate URL", TLSEXT_TYPE_client_certificate_url}, @@ -688,6 +688,7 @@ static STRINT_PAIR tlsext_types[] = { {"psk kex modes", TLSEXT_TYPE_psk_kex_modes}, {"certificate authorities", TLSEXT_TYPE_certificate_authorities}, {"post handshake auth", TLSEXT_TYPE_post_handshake_auth}, + {"early_data", TLSEXT_TYPE_early_data}, {NULL} }; diff --git a/crypto/openssl/apps/smime.c b/crypto/openssl/apps/smime.c index 52b4a01c232f..651294e46daa 100644 --- a/crypto/openssl/apps/smime.c +++ b/crypto/openssl/apps/smime.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2024 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -118,7 +118,7 @@ const OPTIONS smime_options[] = { "Do not load certificates from the default certificates store"}, {"nochain", OPT_NOCHAIN, '-', "set PKCS7_NOCHAIN so certificates contained in the message are not used as untrusted CAs" }, - {"crlfeol", OPT_CRLFEOL, '-', "Use CRLF as EOL termination instead of CR only"}, + {"crlfeol", OPT_CRLFEOL, '-', "Use CRLF as EOL termination instead of LF only"}, OPT_R_OPTIONS, OPT_V_OPTIONS, diff --git a/crypto/openssl/crypto/aes/asm/aesp8-ppc.pl b/crypto/openssl/crypto/aes/asm/aesp8-ppc.pl index 60cf86f52aed..f7f78d04b0e1 100755 --- a/crypto/openssl/crypto/aes/asm/aesp8-ppc.pl +++ b/crypto/openssl/crypto/aes/asm/aesp8-ppc.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2014-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2014-2024 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the Apache License 2.0 (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -99,11 +99,12 @@ rcon: .long 0x1b000000, 0x1b000000, 0x1b000000, 0x1b000000 ?rev .long 0x0d0e0f0c, 0x0d0e0f0c, 0x0d0e0f0c, 0x0d0e0f0c ?rev .long 0,0,0,0 ?asis +.long 0x0f102132, 0x43546576, 0x8798a9ba, 0xcbdcedfe Lconsts: mflr r0 bcl 20,31,\$+4 mflr $ptr #vvvvv "distance between . and rcon - addi $ptr,$ptr,-0x48 + addi $ptr,$ptr,-0x58 mtlr r0 blr .long 0 @@ -2405,7 +2406,7 @@ ___ my $key_=$key2; my ($x00,$x10,$x20,$x30,$x40,$x50,$x60,$x70)=map("r$_",(0,3,26..31)); $x00=0 if ($flavour =~ /osx/); -my ($in0, $in1, $in2, $in3, $in4, $in5 )=map("v$_",(0..5)); +my ($in0, $in1, $in2, $in3, $in4, $in5)=map("v$_",(0..5)); my ($out0, $out1, $out2, $out3, $out4, $out5)=map("v$_",(7,12..16)); my ($twk0, $twk1, $twk2, $twk3, $twk4, $twk5)=map("v$_",(17..22)); my $rndkey0="v23"; # v24-v25 rotating buffer for first found keys @@ -2460,6 +2461,18 @@ _aesp8_xts_encrypt6x: li $x70,0x70 mtspr 256,r0 + # Reverse eighty7 to 0x010101..87 + xxlor 2, 32+$eighty7, 32+$eighty7 + vsldoi $eighty7,$tmp,$eighty7,1 # 0x010101..87 + xxlor 1, 32+$eighty7, 32+$eighty7 + + # Load XOR contents. 0xf102132435465768798a9bacbdcedfe + mr $x70, r6 + bl Lconsts + lxvw4x 0, $x40, r6 # load XOR contents + mr r6, $x70 + li $x70,0x70 + subi $rounds,$rounds,3 # -4 in total lvx $rndkey0,$x00,$key1 # load key schedule @@ -2502,69 +2515,77 @@ Load_xts_enc_key: ?vperm v31,v31,$twk5,$keyperm lvx v25,$x10,$key_ # pre-load round[2] + # Switch to use the following codes with 0x010101..87 to generate tweak. + # eighty7 = 0x010101..87 + # vsrab tmp, tweak, seven # next tweak value, right shift 7 bits + # vand tmp, tmp, eighty7 # last byte with carry + # vaddubm tweak, tweak, tweak # left shift 1 bit (x2) + # xxlor vsx, 0, 0 + # vpermxor tweak, tweak, tmp, vsx + vperm $in0,$inout,$inptail,$inpperm subi $inp,$inp,31 # undo "caller" vxor $twk0,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 vand $tmp,$tmp,$eighty7 vxor $out0,$in0,$twk0 - vxor $tweak,$tweak,$tmp + xxlor 32+$in1, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in1 lvx_u $in1,$x10,$inp vxor $twk1,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 le?vperm $in1,$in1,$in1,$leperm vand $tmp,$tmp,$eighty7 vxor $out1,$in1,$twk1 - vxor $tweak,$tweak,$tmp + xxlor 32+$in2, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in2 lvx_u $in2,$x20,$inp andi. $taillen,$len,15 vxor $twk2,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 le?vperm $in2,$in2,$in2,$leperm vand $tmp,$tmp,$eighty7 vxor $out2,$in2,$twk2 - vxor $tweak,$tweak,$tmp + xxlor 32+$in3, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in3 lvx_u $in3,$x30,$inp sub $len,$len,$taillen vxor $twk3,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 le?vperm $in3,$in3,$in3,$leperm vand $tmp,$tmp,$eighty7 vxor $out3,$in3,$twk3 - vxor $tweak,$tweak,$tmp + xxlor 32+$in4, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in4 lvx_u $in4,$x40,$inp subi $len,$len,0x60 vxor $twk4,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 le?vperm $in4,$in4,$in4,$leperm vand $tmp,$tmp,$eighty7 vxor $out4,$in4,$twk4 - vxor $tweak,$tweak,$tmp + xxlor 32+$in5, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in5 lvx_u $in5,$x50,$inp addi $inp,$inp,0x60 vxor $twk5,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 le?vperm $in5,$in5,$in5,$leperm vand $tmp,$tmp,$eighty7 vxor $out5,$in5,$twk5 - vxor $tweak,$tweak,$tmp + xxlor 32+$in0, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in0 vxor v31,v31,$rndkey0 mtctr $rounds @@ -2590,6 +2611,8 @@ Loop_xts_enc6x: lvx v25,$x10,$key_ # round[4] bdnz Loop_xts_enc6x + xxlor 32+$eighty7, 1, 1 # 0x010101..87 + subic $len,$len,96 # $len-=96 vxor $in0,$twk0,v31 # xor with last round key vcipher $out0,$out0,v24 @@ -2599,7 +2622,6 @@ Loop_xts_enc6x: vaddubm $tweak,$tweak,$tweak vcipher $out2,$out2,v24 vcipher $out3,$out3,v24 - vsldoi $tmp,$tmp,$tmp,15 vcipher $out4,$out4,v24 vcipher $out5,$out5,v24 @@ -2607,7 +2629,8 @@ Loop_xts_enc6x: vand $tmp,$tmp,$eighty7 vcipher $out0,$out0,v25 vcipher $out1,$out1,v25 - vxor $tweak,$tweak,$tmp + xxlor 32+$in1, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in1 vcipher $out2,$out2,v25 vcipher $out3,$out3,v25 vxor $in1,$twk1,v31 @@ -2618,13 +2641,13 @@ Loop_xts_enc6x: and r0,r0,$len vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 vcipher $out0,$out0,v26 vcipher $out1,$out1,v26 vand $tmp,$tmp,$eighty7 vcipher $out2,$out2,v26 vcipher $out3,$out3,v26 - vxor $tweak,$tweak,$tmp + xxlor 32+$in2, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in2 vcipher $out4,$out4,v26 vcipher $out5,$out5,v26 @@ -2638,7 +2661,6 @@ Loop_xts_enc6x: vaddubm $tweak,$tweak,$tweak vcipher $out0,$out0,v27 vcipher $out1,$out1,v27 - vsldoi $tmp,$tmp,$tmp,15 vcipher $out2,$out2,v27 vcipher $out3,$out3,v27 vand $tmp,$tmp,$eighty7 @@ -2646,7 +2668,8 @@ Loop_xts_enc6x: vcipher $out5,$out5,v27 addi $key_,$sp,$FRAME+15 # rewind $key_ - vxor $tweak,$tweak,$tmp + xxlor 32+$in3, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in3 vcipher $out0,$out0,v28 vcipher $out1,$out1,v28 vxor $in3,$twk3,v31 @@ -2655,7 +2678,6 @@ Loop_xts_enc6x: vcipher $out2,$out2,v28 vcipher $out3,$out3,v28 vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 vcipher $out4,$out4,v28 vcipher $out5,$out5,v28 lvx v24,$x00,$key_ # re-pre-load round[1] @@ -2663,7 +2685,8 @@ Loop_xts_enc6x: vcipher $out0,$out0,v29 vcipher $out1,$out1,v29 - vxor $tweak,$tweak,$tmp + xxlor 32+$in4, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in4 vcipher $out2,$out2,v29 vcipher $out3,$out3,v29 vxor $in4,$twk4,v31 @@ -2673,14 +2696,14 @@ Loop_xts_enc6x: vcipher $out5,$out5,v29 lvx v25,$x10,$key_ # re-pre-load round[2] vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 vcipher $out0,$out0,v30 vcipher $out1,$out1,v30 vand $tmp,$tmp,$eighty7 vcipher $out2,$out2,v30 vcipher $out3,$out3,v30 - vxor $tweak,$tweak,$tmp + xxlor 32+$in5, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in5 vcipher $out4,$out4,v30 vcipher $out5,$out5,v30 vxor $in5,$twk5,v31 @@ -2690,7 +2713,6 @@ Loop_xts_enc6x: vcipherlast $out0,$out0,$in0 lvx_u $in0,$x00,$inp # load next input block vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 vcipherlast $out1,$out1,$in1 lvx_u $in1,$x10,$inp vcipherlast $out2,$out2,$in2 @@ -2703,7 +2725,10 @@ Loop_xts_enc6x: vcipherlast $out4,$out4,$in4 le?vperm $in2,$in2,$in2,$leperm lvx_u $in4,$x40,$inp - vxor $tweak,$tweak,$tmp + xxlor 10, 32+$in0, 32+$in0 + xxlor 32+$in0, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in0 + xxlor 32+$in0, 10, 10 vcipherlast $tmp,$out5,$in5 # last block might be needed # in stealing mode le?vperm $in3,$in3,$in3,$leperm @@ -2736,6 +2761,8 @@ Loop_xts_enc6x: mtctr $rounds beq Loop_xts_enc6x # did $len-=96 borrow? + xxlor 32+$eighty7, 2, 2 # 0x870101..01 + addic. $len,$len,0x60 beq Lxts_enc6x_zero cmpwi $len,0x20 @@ -3112,6 +3139,18 @@ _aesp8_xts_decrypt6x: li $x70,0x70 mtspr 256,r0 + # Reverse eighty7 to 0x010101..87 + xxlor 2, 32+$eighty7, 32+$eighty7 + vsldoi $eighty7,$tmp,$eighty7,1 # 0x010101..87 + xxlor 1, 32+$eighty7, 32+$eighty7 + + # Load XOR contents. 0xf102132435465768798a9bacbdcedfe + mr $x70, r6 + bl Lconsts + lxvw4x 0, $x40, r6 # load XOR contents + mr r6, $x70 + li $x70,0x70 + subi $rounds,$rounds,3 # -4 in total lvx $rndkey0,$x00,$key1 # load key schedule @@ -3159,64 +3198,64 @@ Load_xts_dec_key: vxor $twk0,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 vand $tmp,$tmp,$eighty7 vxor $out0,$in0,$twk0 - vxor $tweak,$tweak,$tmp + xxlor 32+$in1, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in1 lvx_u $in1,$x10,$inp vxor $twk1,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 le?vperm $in1,$in1,$in1,$leperm vand $tmp,$tmp,$eighty7 vxor $out1,$in1,$twk1 - vxor $tweak,$tweak,$tmp + xxlor 32+$in2, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in2 lvx_u $in2,$x20,$inp andi. $taillen,$len,15 vxor $twk2,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 le?vperm $in2,$in2,$in2,$leperm vand $tmp,$tmp,$eighty7 vxor $out2,$in2,$twk2 - vxor $tweak,$tweak,$tmp + xxlor 32+$in3, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in3 lvx_u $in3,$x30,$inp sub $len,$len,$taillen vxor $twk3,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 le?vperm $in3,$in3,$in3,$leperm vand $tmp,$tmp,$eighty7 vxor $out3,$in3,$twk3 - vxor $tweak,$tweak,$tmp + xxlor 32+$in4, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in4 lvx_u $in4,$x40,$inp subi $len,$len,0x60 vxor $twk4,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak - vsldoi $tmp,$tmp,$tmp,15 le?vperm $in4,$in4,$in4,$leperm vand $tmp,$tmp,$eighty7 vxor $out4,$in4,$twk4 - vxor $tweak,$tweak,$tmp + xxlor 32+$in5, 0, 0 + vpermxor $tweak, $tweak, $tmp, $in5 lvx_u $in5,$x50,$inp addi $inp,$inp,0x60 vxor $twk5,$tweak,$rndkey0 vsrab $tmp,$tweak,$seven # next tweak value vaddubm $tweak,$tweak,$tweak *** 8393 LINES SKIPPED *** From nobody Sat Sep 28 03:55:02 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 4XFtlB2P2yz5XhDY; Sat, 28 Sep 2024 03:55:02 +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 4XFtlB1q2Zz4Rp1; Sat, 28 Sep 2024 03:55:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727495702; 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=SJV6EyIWFDO4IrqOf3Pem/Oy1O/QWYRsvkpKyhWbOJI=; b=qB89BGdmf1yjHgScydGLAJewY7rU8zPNpphSNWD43fH8eIrDxMmLuWphTNjELS5HKW1LuP mp8iC5BH/qVQ2xMhfH7Le0uQEQXuw7VPrfktdx3U9JBYeAMjSBTaoSOFHOFSMkByFRk8tC YdcMgSZX1+GzMq558xW+vdFrlne60KuUWVrtrSrewWVLdSL2qEI9kv2voI/CMGwwIp4n+j dHoy7UsTmsX7ebawnWx22iv/GPwk9iQBiF7vms3PehZIICqzIIkSx4UtOdT1Gnz6s+e9ve K2E1FjhWAmwzFgb807eL+GGhmXkDGrSlEku1rpeGZIp+DmQA+Erp3UBUiE+amg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727495702; 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=SJV6EyIWFDO4IrqOf3Pem/Oy1O/QWYRsvkpKyhWbOJI=; b=o1Sv4WeDqgRO6UUYSNLRoV3BNA9wFAGCDyRetx1CamHBHofYn0etp1bWG/zh58nGG4R+N2 NbojY4/kZ99eMfEh7AWd64gVzFXYik/WnVVg4IOPOqRhah5OyzDVdySNmgJyuOVml1jigH J243BnXHvdLOfYMKVzEsTZkt1fP5bki1ACY+uQjiU3rTem7YhtnXJRalDuNxRfz6FEO3RL r802vCAXlEAQe7Zw6zHr1vdMz1VZrc87bjH5wGMvxzFbKIX5uNs6jl7h/7eyhpmuRC3OEc gUn420gOckNBn5GvnzWFl8d+fFqJ+185RuYPTkXXGhRXKprtZbQIA0QEK18vfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727495702; a=rsa-sha256; cv=none; b=xrMKaAxKRrTJnjgDfVtVInlvzZ9nN32MdZacMK3O26Zo3Fn6nQltwMBypW7GH7YV7SaGA8 jrhDqeWMCNFW+Q5yBjzoN95Bhw6ngMck2+DwB7PgClvk96Cdst9Lj78KGixaF7yopMTQho FXdUXsa/37mLRv4U4PmuCUL7oPJvLDwa0R91LBjb2fmUwnkRKhMScbAPZXgqufHrd0u/vF wmhC488pj5IINfAiZLSZZ27UwxNZmytlqy6cgOdHOJpMx36R/AzWBxJILWFiX76Ubj1hqh YzmmAl4QJMTFmEVW3nnazicN8+MPV0BniuD85NV8rxoRYDBDkm1O7gL7+uRl0Q== 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 4XFtlB1G2Hz17RM; Sat, 28 Sep 2024 03:55:02 +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 48S3t2Ao015021; Sat, 28 Sep 2024 03:55:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S3t285015018; Sat, 28 Sep 2024 03:55:02 GMT (envelope-from git) Date: Sat, 28 Sep 2024 03:55:02 GMT Message-Id: <202409280355.48S3t285015018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: c2dca1b5607f - stable/14 - radlib: fix a memory leak in `is_valid_request` 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c2dca1b5607fa4c69d5357c717c3b2dd359e2f26 Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c2dca1b5607fa4c69d5357c717c3b2dd359e2f26 commit c2dca1b5607fa4c69d5357c717c3b2dd359e2f26 Author: Enji Cooper AuthorDate: 2024-06-04 20:01:55 +0000 Commit: Enji Cooper CommitDate: 2024-09-28 03:54:48 +0000 radlib: fix a memory leak in `is_valid_request` Call `HMAC_CTX_free` if returning early from `is_valid_request` when processing `Message-Authenticator` tags. Reported by: Coverity MFC after: 1 week Fixes: 8d5c7813061d ("libradius: Fix input validation bugs") Differential Revision: https://reviews.freebsd.org/D45488 (cherry picked from commit 77c04f3eb12a560eb61252c817e4147bc0178e43) --- lib/libradius/radlib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libradius/radlib.c b/lib/libradius/radlib.c index 2049468f455f..cd1f1df1b234 100644 --- a/lib/libradius/radlib.c +++ b/lib/libradius/radlib.c @@ -321,8 +321,10 @@ is_valid_request(struct rad_handle *h) hctx = HMAC_CTX_new(); while (pos < len - 2) { alen = h->in[pos + 1]; - if (alen < 2) + if (alen < 2) { + HMAC_CTX_free(hctx); return (0); + } if (h->in[pos] == RAD_MESSAGE_AUTHENTIC) { if (len - pos < MD5_DIGEST_LENGTH + 2) { HMAC_CTX_free(hctx); From nobody Sat Sep 28 03:57:57 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 4XFtpY5bfwz5XhTK; Sat, 28 Sep 2024 03:57:57 +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 4XFtpY3fQdz4S2B; Sat, 28 Sep 2024 03:57:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727495877; 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=T1dFEVazFRCF6B+uX+VKfndhQyvX5p5hbsVsBG3KLSI=; b=VRkXBfQq4Ho0OSiW54QCnc/UgOfVDVDe6WX7G/KQLaARmIFxxDTNdLr6yGvXo7N14Sejyu dzyHpAMYZYIAZMLn5/60sduaxRns84KY6iwKwPPpgGZm/MsYx6paob66klz8Zo3/WrFwKV WbMf601E07IGx4Lcs1jWXi7mm8pz0aMwyHCj8ooCtFcaaYVaUt+vrk8jv6WVCCXXnvJfmg yePcCSERQv/nslTcOPR3voh9olvct2d4SkfPorQ66VbhGZbCi/tT0QmHtRF0VdOpj4d/fA xXaO0aHzceUiz48A7zyq7FfbkLB2rOGIo4CPfrl/ebbAXRLj0x+uTukt1KjLAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727495877; 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=T1dFEVazFRCF6B+uX+VKfndhQyvX5p5hbsVsBG3KLSI=; b=bhSd2ULYK0ZMpCbCBM8mv+lvA+GBy9JV3iDZt0KGx0AlQPeTiRQq/WJqWCWbhWL7fbbVQ3 0HrdUH4m/s6HBNlRmionpxFzzWiFKrJKBwqmQPsJsy3mgoG4yflUbKkAvhQ0StQOCH2CQX bvPuL/1I/oIzA46JjqPjzQRhbLbNSs5jZPL3CUf6oS5KRQkbRIehfG7S3Y+Co1BHFyxGXv 6i3y2ylAm39Aanjb4ankZgcQcm/9e4xX6mVAssMRdpHZnsGYkUhocz2eiu8Wsf3jwlrxvM UG/IgIh7Zj5bcZbrQdr1oYeOswie50inkfduIPvdCzVjaaNypbO2olrJC/3Tow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727495877; a=rsa-sha256; cv=none; b=BNoVRZE4z5OJIejIPCYDNQuMAajBsjv16iUaKACDBh76P+rfavk9nUfPjwG2exC7rH9kCo uX+PtoyEIlPihE3LFDvpF2N8Pl1G9h9PpX6y34AMYWHPhgiOwz+xMnT6UGE9c9mF8sfwLr M7SlCyfV055WbNMy8BWNZ8m36YzuZQiVdfG75vg6w1OOnmQ/c0fIXZjn5GJADKxLGXBbhJ /vw9lWB9nolGBCnFJyrTAdiSffY1vw0EaO0VMbHyfnSDtfYsvqyDG1mcR2eyFjO4frxVlv vTFEErICYJDtPc6xi4i9VW5tRI+mF4vwZHF9WlrtsA2B0AAnR6Y16rbEQDwnRg== 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 4XFtpY2m4rz17gG; Sat, 28 Sep 2024 03:57:57 +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 48S3vvrP015504; Sat, 28 Sep 2024 03:57:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S3vvVW015501; Sat, 28 Sep 2024 03:57:57 GMT (envelope-from git) Date: Sat, 28 Sep 2024 03:57:57 GMT Message-Id: <202409280357.48S3vvVW015501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: c6961c90fd2a - stable/14 - lib/libcrypt: remove trailing whitespace 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c6961c90fd2a320a0e4da1771dc47a1fe8f56b0b Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c6961c90fd2a320a0e4da1771dc47a1fe8f56b0b commit c6961c90fd2a320a0e4da1771dc47a1fe8f56b0b Author: Enji Cooper AuthorDate: 2023-10-28 01:10:39 +0000 Commit: Enji Cooper CommitDate: 2024-09-28 03:57:45 +0000 lib/libcrypt: remove trailing whitespace No functional change intended. MFC after: 2 weeks (cherry picked from commit 8ef8da882ff475e3da3bde57d97593a68f7d97b2) --- lib/libcrypt/crypt-nthash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libcrypt/crypt-nthash.c b/lib/libcrypt/crypt-nthash.c index 28c832dd6f9f..8bd880e625cc 100644 --- a/lib/libcrypt/crypt-nthash.c +++ b/lib/libcrypt/crypt-nthash.c @@ -57,17 +57,17 @@ crypt_nthash(const char *pw, const char *salt __unused, char *buffer) u_char hash[MD4_SIZE]; const char *s; MD4_CTX ctx; - - bzero(unipw, sizeof(unipw)); + + bzero(unipw, sizeof(unipw)); /* convert to unicode (thanx Archie) */ unipwLen = 0; for (s = pw; unipwLen < sizeof(unipw) / 2 && *s; s++) unipw[unipwLen++] = htons(*s << 8); - + /* Compute MD4 of Unicode password */ MD4Init(&ctx); MD4Update(&ctx, (u_char *)unipw, unipwLen*sizeof(u_int16_t)); - MD4Final(hash, &ctx); + MD4Final(hash, &ctx); buffer = stpcpy(buffer, magic); *buffer++ = '$'; From nobody Sat Sep 28 03:58:26 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 4XFtq71ZdTz5Xh7V; Sat, 28 Sep 2024 03:58:27 +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 4XFtq70vhSz4SPG; Sat, 28 Sep 2024 03:58:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727495907; 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=GRLu89pVLzfebJBOx2k/WOwThsKQHFTnV+BuQMPXeJs=; b=fIyAuKqQyIZqbxt/8k2q1MRUku/0/TLiG1fc1SQpsUtR+aYK/bHy9WewDzCF/N9qy+HPvi zSFnc+KSLcvj8qYG2P45QXtUH/7cTzi4fFV5Vq2p1o9gcUIsePgKwerpzDabR+rXBqZJHv mk5hBaAe3YxhkNUlRYOLcTIJVDcsJgBP/dG4aKTB3KaUUHAeGUx0t1nOU1ES0GchKex7YO mPcBVdzD2mQYRRS0CJK/eXkrrurDQnmGIyv7EZ5TzG6N7IKNWQIGdbLljD3SLe7PIY/4L+ bAeTKdtIE8VXauXlrDJRuVVCzijlr3M1N032LTidlkiHw9A51KSoJG4WuZzvPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727495907; 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=GRLu89pVLzfebJBOx2k/WOwThsKQHFTnV+BuQMPXeJs=; b=fbTnCF8SCQRsLk7YnibCTh+N/klhkn333Tiou3UUQx7XIKk7o/hXFyas7t6nQCDSR+d+S5 Ehyn/sGopxBFkimaSkaTA9fKgJNm0MbQ79pvqmdhaES9Fybs7wdRdHQWbrI28XVV0rfSBE n13OZ98gtZjKcZAA8RX/hJ450ccOsh8/PoVtW/sQabY9jxz6tlgkzBr8+Q0pTsJXCGc27U z7ZzlxgqZFhNvn+9upAczjUJ2eWPTgL3oUxBMUK4kP3ew6a3/vLPEg4+bI+LmyonFrS+2O a5FBdnYtQvWKrGqwiB5H7VBKKBR8ybtPURwhohMc/SIUs3Fuip0twLKyTV1+pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727495907; a=rsa-sha256; cv=none; b=qjFylgu1eeGtPvtZK0g5NjQmDMAt4tKjmDY05Mw3LMA0W2yG70Eu1fsRINlMxGBtOaZxmh XswvxOVnb198yhd5k/W+f4uYMKa86EL5T/56g+sTPVVBrHgy7DDJiGkZcKviqhAmEA2nDA IBraK56TqxCQAbnHd2vL+GezFc8e/iwcHSYtS1ESGeYAcL0YLIeLQb1pmDwCKpkSVGLu8E TLoRXmOYnQMTeWYQlagtDBRFyMUYjsP1uchyknqpkdCDvHGhsW/c3zLMdYsW4QRUUCaND7 kZ/Udee0sWv42z4dP36/Ht7NBREiXi5rXpZb9PeTCDXVWj8NVo09X5MINB0hzw== 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 4XFtq70WdPz187x; Sat, 28 Sep 2024 03:58:27 +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 48S3wQEJ015698; Sat, 28 Sep 2024 03:58:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S3wQt1015695; Sat, 28 Sep 2024 03:58:26 GMT (envelope-from git) Date: Sat, 28 Sep 2024 03:58:26 GMT Message-Id: <202409280358.48S3wQt1015695@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: c931eed5bc43 - stable/14 - lib/libcrypt: another trivial style change 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c931eed5bc4346fac88a4a7224f26f280ecd11be Auto-Submitted: auto-generated The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c931eed5bc4346fac88a4a7224f26f280ecd11be commit c931eed5bc4346fac88a4a7224f26f280ecd11be Author: Enji Cooper AuthorDate: 2023-10-28 01:56:41 +0000 Commit: Enji Cooper CommitDate: 2024-09-28 03:58:19 +0000 lib/libcrypt: another trivial style change Normalize on hard tabs. I didn't catch this before pushing the previous commit. No functional changes intended. MFC after: 2 weeks MFC with: 8ef8da882ff475e3da3bde57d97593a68f7d97b2 (cherry picked from commit 61b15e6dfc963a0c67dbaeae7f4590674976111f) --- lib/libcrypt/crypt-nthash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libcrypt/crypt-nthash.c b/lib/libcrypt/crypt-nthash.c index 8bd880e625cc..cc9dbf7533cd 100644 --- a/lib/libcrypt/crypt-nthash.c +++ b/lib/libcrypt/crypt-nthash.c @@ -65,7 +65,7 @@ crypt_nthash(const char *pw, const char *salt __unused, char *buffer) unipw[unipwLen++] = htons(*s << 8); /* Compute MD4 of Unicode password */ - MD4Init(&ctx); + MD4Init(&ctx); MD4Update(&ctx, (u_char *)unipw, unipwLen*sizeof(u_int16_t)); MD4Final(hash, &ctx); From nobody Sat Sep 28 08:49:17 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 4XG1Gj4gZPz5Y13r; Sat, 28 Sep 2024 08:49:17 +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 4XG1Gj3JNjz4m7t; Sat, 28 Sep 2024 08:49:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727513357; 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=umV9laZPhDpD2h8Aauu/lwqWLds7hpH2T+vVXx595Bc=; b=PD3nyO/7QukxH1/Kd5fCE43A/fidTyqWRNpGkF/ctkH+BbWm+04P7OelToW3ljozQq3biL DoDKlt+7+2w0M/CqRDoegFu+w5sq6AxQWut0yzsxbSfrfDTmgZfMYYg3GXZWVB2YbXPZtH m972vB/dMF0J9n9vZcmuCqoq4Tu6AjYMQxeXp3Rv7ML2ybR7/oh44hXN8R43U3deKLO3Dc zrcIL9/AdEFShwwpTqVOiF92opBbXIp//GCUrv+gTYdzvr92fvpOAEQauSb6exo+rf4jBi lWR0Mq0VrJS/8aN1qXuvK4gC0lKzm2lr8eJUEl8vSz0yuD86NK642dldbV4TbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727513357; 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=umV9laZPhDpD2h8Aauu/lwqWLds7hpH2T+vVXx595Bc=; b=oIwnPRJNQBws4ain3Rr1Ga/PDLJF5e5fuZwO4a5fNfCjktyAHGvrDjEXFIPWL3z9ocRSng ZDooshi0T7A6o8huJGMX8SR+IpnDXnjipTLLBU+hAx3pGi77MBo84odSbT8Hh/5eURUkMm GVPX8WRJEhbZcZg/hiIEc68amNF7Ib7RO5Vtou3ZZd8pc3h9udJUJHr06n+1A8C+8z25BX WLqwAewwyPuto0WO9rkNuUUktZfD8o2wKnKMm+dKuLLAY9x91cMk8NAlErRMoAFsva+CwA N5+DyBV+bbpTv5Zzsrl3Ce0FrwY9YhWM1CPr3aJ9ZSzlrZKfzQdk4CWAjSST/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727513357; a=rsa-sha256; cv=none; b=M07Liln2YH/mHWeuQs9tAaiaQdMEX4DNgHHGh3LLtrt48BibO4XpCUt7QkWz0G6Q+byQGt AwneE65go8udLkVqzhUYGR6MjYXtANwYVEI7ppscvPMC3DF/rtcSQPcrM8C9C8Q2soK/7x e9xU/S/kLh6wfUyuF4SY1rvCX74MtGrvteJGTJFo7nRfqrpzi27jNp+KeKOD5MXTqgWl+a kAbFWIygzYJAOxt7/WxbW8LXWFsOo8p5XsVulAnNhbtVlsIyMyUSfB1TMAHBD+m7pIZzPO NfhHbLbdyYmYHlht4F9xRk1XYNCw+Sm1lE1u8pjRgIJm+psXGBglRE76UQfFBA== 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 4XG1Gj2Z0FzJ0l; Sat, 28 Sep 2024 08:49:17 +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 48S8nHWs009015; Sat, 28 Sep 2024 08:49:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S8nHTo009012; Sat, 28 Sep 2024 08:49:17 GMT (envelope-from git) Date: Sat, 28 Sep 2024 08:49:17 GMT Message-Id: <202409280849.48S8nHTo009012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: 38c63b52830c - main - dhclient: Ignore vendor-identifying DHCP options defined in RFC 3925 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: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38c63b52830c85013f30bc62b2b32f3936d84e65 Auto-Submitted: auto-generated The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=38c63b52830c85013f30bc62b2b32f3936d84e65 commit 38c63b52830c85013f30bc62b2b32f3936d84e65 Author: Michael Osipov AuthorDate: 2024-09-23 12:37:34 +0000 Commit: Michael Osipov CommitDate: 2024-09-28 08:49:02 +0000 dhclient: Ignore vendor-identifying DHCP options defined in RFC 3925 Ignore DHCP options 124 and 125 to shut up the warning messages. These options are defined in the RFC 3925. PR: 281361 Reviewed by: jrm (mentor), otis (mentor), thj Tested by: jlduran@gmail.com MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46760 --- sbin/dhclient/dhclient.c | 2 ++ sbin/dhclient/dhcp.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 4a674cec5888..93988d5ce7a4 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2641,6 +2641,8 @@ check_option(struct client_lease *l, int option) case DHO_DHCP_USER_CLASS_ID: case DHO_URL: case DHO_SIP_SERVERS: + case DHO_V_I_VENDOR_CLASS: + case DHO_V_I_VENDOR_OPTS: case DHO_END: return (1); case DHO_CLASSLESS_ROUTES: diff --git a/sbin/dhclient/dhcp.h b/sbin/dhclient/dhcp.h index 99b69613934f..02ea42a66079 100644 --- a/sbin/dhclient/dhcp.h +++ b/sbin/dhclient/dhcp.h @@ -174,6 +174,8 @@ struct dhcp_packet { #define DHO_DOMAIN_SEARCH 119 #define DHO_SIP_SERVERS 120 #define DHO_CLASSLESS_ROUTES 121 +#define DHO_V_I_VENDOR_CLASS 124 +#define DHO_V_I_VENDOR_OPTS 125 #define DHO_END 255 /* DHCP message types. */ From nobody Sat Sep 28 09:12:08 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 4XG1n44Yb6z5Y2RK; Sat, 28 Sep 2024 09:12:08 +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 4XG1n444Jhz4pH1; Sat, 28 Sep 2024 09:12:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727514728; 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=uBOaRnHOqR1MBLzy9n4x+x2icRUIXsHvgR49Ic2V91I=; b=y4qB4LaIRWh89gfW6N0UW3SDPRGHxVCiICOEUexUk+5IEN0URWrPx1fLVKWSq0az4SrFSB eE0BiJMb8HiIJG6ACiWJ8mCb9Y8Hi29AnocwMDS/5jHu1rOn8pJlE+b58ME7rrD6xMkywJ sAD55/c5j1RAInx52e4E+pONLPXFIH1TJujSpuu1R1yR16fwW4CNJDwc9M7QnI4lnf6bDH raU3Yb5gfYszSTAA9oR1l4/MvDvjMfbMXaVpXqJtO10u2tDK7wCUFV8sCUW4GGdAHo/CnN r/8ZTU57+tXUM0ghh/ZjRcg399Dgks5FfkxWJyvDLIf57Hi4OUqF1cS4pE4dbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727514728; 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=uBOaRnHOqR1MBLzy9n4x+x2icRUIXsHvgR49Ic2V91I=; b=sjxLin2pzxMYyWkGBPVqattIgbOJ17Hwjr5459oAnyo1N0GSK1ZU4A+q4isJyHP5U5/LmO Od2iUSqS46dFEJvMic3CdXYBBl9xlx0StGfhmWtAoOA6qaZjKWZw84LMiO4rx5z/Eq9crO nqRY9Nl4xtsQ6nWlRwsVOT5H8VeHaai4bX62PCL5gQvJq6HwQ4JL12Ze010IHGCIi5hhca yyyNeubKRICNiPqLJqVbhR5Vs2nZm0UDxhf4oTwz3QctrOmFdsIxY+APYCrb9QRQdK/oiL VJlp6UFvmoa/PxlwmlP3L7fsfdgD1JXN21ap77CzCuGyewUCx0w1FAqlKvZDYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727514728; a=rsa-sha256; cv=none; b=J8+chTtE0gMGOBPmeQb5d4GwF2l+4INgtizP91BdeDiBos18JYnnjH6wc5WjKChWmOkpnp I4ETz7wVArFdjyk6JIB4TP3gQYSKHHkpD/2WmL5vMCBz/tGQBmwYuSWCTMErx7tX67kh5T NW9dp5vFOyIoH9lLWxHNpmETRG96bGmNu8p07PVdFMTmnqA7q2JYnJj5FF2LbMNV5HGeYi jTF4LA4NW7y9yG0OKkdUEItp37aadV/vZyFKq26UMkcm9q0p6xHwT/KQcbdeI4CC2Na1Lu kDuTq6QjGD78351AqeMT3YYeT6VsYA2qMRRbSH9/YSvlA/rc2wQpHSm3jjkJLg== 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 4XG1n43Zy3zJGH; Sat, 28 Sep 2024 09:12:08 +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 48S9C8SM057605; Sat, 28 Sep 2024 09:12:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9C8Tx057602; Sat, 28 Sep 2024 09:12:08 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:12:08 GMT Message-Id: <202409280912.48S9C8Tx057602@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: 911b3c3aa648 - main - Revert "e1000: Remove redundant EITR shift from igb" 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: 911b3c3aa6484709f7a6020f1f25ab24737296ce Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=911b3c3aa6484709f7a6020f1f25ab24737296ce commit 911b3c3aa6484709f7a6020f1f25ab24737296ce Author: Kevin Bowling AuthorDate: 2024-09-28 08:47:00 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:11:55 +0000 Revert "e1000: Remove redundant EITR shift from igb" Turns out this is necessary This reverts commit 26439b57877ccae7a2404f7d179afaa5ddb2f64d. --- sys/dev/e1000/if_em.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index 83a0d4e96fc6..7219dc57c333 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -251,7 +251,8 @@ #define IGB_ITR_DIVIDEND 1000000 #define IGB_ITR_SHIFT 2 #define IGB_QVECTOR_MASK 0x7FFC -#define IGB_INTS_TO_EITR(i) ((IGB_ITR_DIVIDEND/i) & IGB_QVECTOR_MASK) +#define IGB_INTS_TO_EITR(i) (((IGB_ITR_DIVIDEND/i) & IGB_QVECTOR_MASK) << \ + IGB_ITR_SHIFT) #define IGB_LINK_ITR 2000 #define I210_LINK_DELAY 1000 From nobody Sat Sep 28 09:23:06 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 4XG21k4pL9z5Y2sL; Sat, 28 Sep 2024 09:23:06 +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 4XG21k3sNpz4qHr; Sat, 28 Sep 2024 09:23:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515386; 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=9JWwhcfwoQ2tV3m1iWGpEPCS/K0GlJ4tA1inJDPtxUw=; b=Qe9j8rfSRyjgQIMD8nkFi6tMDHnB5EpT0Y3HhpAkxRvcNccEsgYVES3jzTwFIkq/GwUe/l aWsMQtDDPSu+IBHjyONfMlbRToHW6134WUl/qCAN0h0RdpZtHYKPGKGalMF5Mmj7bNrDS0 pGLUQkp2vfrP2shkEBhZgHQH6EZIv9aOi/2zwKBvL7j+MR1scX7C84xMkPbbmrafDEHBu7 Hmj65eQqsn4P3PB2faM3o73mUMzmx8uqY1rj1GEj1eieDblPH36fNPG9iwOxJkRNJeSgC8 iuUpz05QMNeMvkH/6thzFCU9d8LlmepUe5ssVbu8mNPAhmW0luOp10u4rgEs3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515386; 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=9JWwhcfwoQ2tV3m1iWGpEPCS/K0GlJ4tA1inJDPtxUw=; b=PVQnSPvFmECIO9xRaMaW4Gigz7Q07NCi7sKeNuwJI6KOKksp3TyLXIgjJMv2oDmcjA+MWV k4hmgGDsMr4Ss/xnNBiPDpc9+AXdHLYhdPiZ46HMtK9dhgF/qQOdKVHWMZsbCoc7AdUjdA 1OX3IQBmauvwkidzO1CNJ60WwPBrRKoUYwQ9EXFQW25xlvH68EBQQlh7FLvpEBMIG4xRKY noDuSf6ymAfgLXAuoG+9NRBVBfd23llwku/RL47gcR8xeMdhJ0V4mc5wop+xStITZKmykE fAVlEoz6fHHuC1/O9VLjm5b/fnHEhyEzSdll99O6fnrJHZbOwT1n6s+nvyensQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515386; a=rsa-sha256; cv=none; b=npG1Ef2X1VtACqS2kyUAViZv1I1zAlkRkY1rP6yPZzNV7U/am67wSgmbPtSNpn5RxW8ArB N+4nWulJQvRuOAHgLWYXRZkpCnCYAoMijoBPxFjaxekXw/rJA5UKabkEE4aRp66M4y4cWq hnPYs6NaVrGiFUXhToA5NA1OZTGLFi1gTfQjvkeB7Mq130g+A8H2V+DJIXbtcQSCXV6Zsp TSCApchf6V/Z4F/WiJmsvYtv872SPRdRhqUj41KynY8hZR0c+R4V7zsaR4XJavBeP0AwEB 02rzC5xxdb1Kl9serE+dm3YILfrTessBilvOXlgkG7+cHAuZhHtAuVNPSgVkfQ== 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 4XG21k3QR1zK6s; Sat, 28 Sep 2024 09:23:06 +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 48S9N6Q1076046; Sat, 28 Sep 2024 09:23:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9N6BA076043; Sat, 28 Sep 2024 09:23:06 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:23:06 GMT Message-Id: <202409280923.48S9N6BA076043@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: a0d55936c9da - stable/14 - e1000: Update igb driver version to 2.5.28-fbsd 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: a0d55936c9da931147655e9ff48d1b3b1a1f8e73 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a0d55936c9da931147655e9ff48d1b3b1a1f8e73 commit a0d55936c9da931147655e9ff48d1b3b1a1f8e73 Author: Kevin Bowling AuthorDate: 2024-09-21 06:27:54 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:21:39 +0000 e1000: Update igb driver version to 2.5.28-fbsd Bump to the current out of tree driver version since we only have some gratuitous changes. (cherry picked from commit ddfec1fb6814088abc5805f45c4a18c5731d51b9) --- sys/dev/e1000/e1000_base.c | 3 ++- sys/dev/e1000/e1000_i210.c | 14 +++++++------- sys/dev/e1000/e1000_phy.c | 2 +- sys/dev/e1000/if_em.c | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/sys/dev/e1000/e1000_base.c b/sys/dev/e1000/e1000_base.c index d83dc48c4d4d..ae44a0b91aac 100644 --- a/sys/dev/e1000/e1000_base.c +++ b/sys/dev/e1000/e1000_base.c @@ -162,7 +162,8 @@ void e1000_rx_fifo_flush_base(struct e1000_hw *hw) rfctl |= E1000_RFCTL_IPV6_EX_DIS; E1000_WRITE_REG(hw, E1000_RFCTL, rfctl); - if (!(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN)) + if (hw->mac.type != e1000_82575 || + !(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN)) return; /* Disable all Rx queues */ diff --git a/sys/dev/e1000/e1000_i210.c b/sys/dev/e1000/e1000_i210.c index c7ca56914dba..4005034d7d31 100644 --- a/sys/dev/e1000/e1000_i210.c +++ b/sys/dev/e1000/e1000_i210.c @@ -362,7 +362,7 @@ s32 e1000_read_invm_version(struct e1000_hw *hw, E1000_INVM_RECORD_SIZE_IN_BYTES); u32 buffer[E1000_INVM_SIZE]; s32 status = -E1000_ERR_INVM_VALUE_NOT_FOUND; - u16 version = 0; + u16 nvm_version = 0; DEBUGFUNC("e1000_read_invm_version"); @@ -379,14 +379,14 @@ s32 e1000_read_invm_version(struct e1000_hw *hw, /* Check if we have first version location used */ if ((i == 1) && ((*record & E1000_INVM_VER_FIELD_ONE) == 0)) { - version = 0; + nvm_version = 0; status = E1000_SUCCESS; break; } /* Check if we have second version location used */ else if ((i == 1) && ((*record & E1000_INVM_VER_FIELD_TWO) == 0)) { - version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; + nvm_version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; status = E1000_SUCCESS; break; } @@ -397,7 +397,7 @@ s32 e1000_read_invm_version(struct e1000_hw *hw, else if ((((*record & E1000_INVM_VER_FIELD_ONE) == 0) && ((*record & 0x3) == 0)) || (((*record & 0x3) != 0) && (i != 1))) { - version = (*next_record & E1000_INVM_VER_FIELD_TWO) + nvm_version = (*next_record & E1000_INVM_VER_FIELD_TWO) >> 13; status = E1000_SUCCESS; break; @@ -408,16 +408,16 @@ s32 e1000_read_invm_version(struct e1000_hw *hw, */ else if (((*record & E1000_INVM_VER_FIELD_TWO) == 0) && ((*record & 0x3) == 0)) { - version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; + nvm_version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; status = E1000_SUCCESS; break; } } if (status == E1000_SUCCESS) { - invm_ver->invm_major = (version & E1000_INVM_MAJOR_MASK) + invm_ver->invm_major = (nvm_version & E1000_INVM_MAJOR_MASK) >> E1000_INVM_MAJOR_SHIFT; - invm_ver->invm_minor = version & E1000_INVM_MINOR_MASK; + invm_ver->invm_minor = nvm_version & E1000_INVM_MINOR_MASK; } /* Read Image Type */ for (i = 1; i < invm_blocks; i++) { diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c index 0aaf32125bbe..634f48171c3e 100644 --- a/sys/dev/e1000/e1000_phy.c +++ b/sys/dev/e1000/e1000_phy.c @@ -1037,7 +1037,7 @@ static s32 e1000_set_master_slave_mode(struct e1000_hw *hw) break; case e1000_ms_auto: phy_data &= ~CR_1000T_MS_ENABLE; - /* FALLTHROUGH */ + break; default: break; } diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 690d6dfa3218..3d815348f5ec 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -37,7 +37,7 @@ * Driver version: *********************************************************************/ static const char em_driver_version[] = "7.7.8-fbsd"; -static const char igb_driver_version[] = "2.5.19-fbsd"; +static const char igb_driver_version[] = "2.5.28-fbsd"; /********************************************************************* * PCI Device ID Table From nobody Sat Sep 28 09:23:07 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 4XG21l5qf7z5Y2sM; Sat, 28 Sep 2024 09:23:07 +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 4XG21l4nRkz4qMt; Sat, 28 Sep 2024 09:23:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515387; 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=J+87+ks+trFKhE5z49gzqCVfd7Q6Sk5Pr1gh8iAxA9U=; b=u9T5IWJxMbrHFA8rtWfviLEtB7wN1KBCW+dVqAkUSVeoBbaz2OlpClx/cE4U837oMJpVEL OfKq2qE8I8x2dJ2MS4gTjhYIOBr/LJyjy6z8pXkQNugLVvkXh41zVf6PIFizEbTCiF6ZiD roR43/fSFIZ1AePrXQ6IDge01cwu4nE509O491Os47diJ++ZsfSLOtC6BkirNt+2j5vSG7 hgfmblSOVGmPa85zfL/6qUObuPlCGHGrzUj37txpHE3DsupHCoJfLlRddlYX4NspHjTTZs f8DyoYv7rVJzPoubYk5TS5Excsa8n6PO4kmNeh/cx2YAJ1GMXmWWFCl+Kwlgsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515387; 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=J+87+ks+trFKhE5z49gzqCVfd7Q6Sk5Pr1gh8iAxA9U=; b=DENHcK0qC2NFCnv8VQTIhEOKwk0TMWvJW70VGdOKpPjaSngRRz8C3duF4x60kAV5B7APPO 5sSBb5RUWvV1aDhQLxfW3bUcYNEiBRYxSbKaoGV53uDpqxGtNjaYUMbq/MOnPUx4j7efhp MU0M0vMUHNPyzsXNi1/qjnqJfkbIHf45fW0NIwNPPSICr8rVc4ea9g9cQ9QA8z/A8nl3qY Ka0u8FQDpkK8x8580TqdVr5z3s2IBdB3kTSs+n1BKrf51RfG+jGqYCEqL+rR1JEoTTu58s YGoWDj17mZ+m0IbgMFxzsBK8G51eXl2kwtbN4pjQwLull/Xiz3iXjZDvdOsTqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515387; a=rsa-sha256; cv=none; b=jnBlnPsQq5xhygIKLR8DLDWlsOKi4PagU71QurmEFHBx25Bdksujo/Nepnpi7/HSsPMbOk KdPCb/dWVCRpQ1YQtdJy5aoigcy5qdYF2e+zaKv3J5t/CnzcQ6NJJ3LfgoB27arHseC9r3 hCDzltfq7ghrpVC3uo3uMbwFfd8s0IguKBop5Or5egpGZ+e3gkulVK0rtqhx2/e/5xKb06 mfHNVOS+NDA2Tl4Ra3RsyiR3T26zot1Yr53hUGsjVhShgx60QJKC/n8YVtj3bX1+hncXwC 8bhyqcKnllIEyv8x/MKW98QKW1Q08P6vRnrKYERkrHXtgloOUdQINiMKfEx0ng== 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 4XG21l4PR9zK6t; Sat, 28 Sep 2024 09:23:07 +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 48S9N7ci076088; Sat, 28 Sep 2024 09:23:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9N7qc076085; Sat, 28 Sep 2024 09:23:07 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:23:07 GMT Message-Id: <202409280923.48S9N7qc076085@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: 1091dcca0e82 - stable/14 - ixgbe: update if_bypass to ix-3.3.38 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: 1091dcca0e8280d0932b3d31389ffe28fd2934d3 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1091dcca0e8280d0932b3d31389ffe28fd2934d3 commit 1091dcca0e8280d0932b3d31389ffe28fd2934d3 Author: Kevin Bowling AuthorDate: 2024-09-21 09:39:54 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:21:39 +0000 ixgbe: update if_bypass to ix-3.3.38 Bring if_bypass up to date with changes in the out of tree driver Drop NEEDGIANT as the sysctl handlers have internal mutex for state changes. (cherry picked from commit c41a0eeea0d69264317401dd3fac46be160081b5) --- sys/dev/ixgbe/if_bypass.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/sys/dev/ixgbe/if_bypass.c b/sys/dev/ixgbe/if_bypass.c index e9ea77dfb49c..166150d75cc6 100644 --- a/sys/dev/ixgbe/if_bypass.c +++ b/sys/dev/ixgbe/if_bypass.c @@ -530,8 +530,7 @@ ixgbe_bp_wd_reset(SYSCTL_HANDLER_ARGS) error = IXGBE_BYPASS_FW_WRITE_FAILURE; break; } - error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL1, &reset_wd); - if (error != 0) { + if (hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL1, &reset_wd)) { error = IXGBE_ERR_INVALID_ARGUMENT; break; } @@ -745,8 +744,7 @@ ixgbe_bypass_init(struct ixgbe_softc *sc) */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "bypass_log", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "bypass_log", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, ixgbe_bp_log, "I", "Bypass Log"); /* All other setting are hung from the 'bypass' node */ @@ -757,39 +755,39 @@ ixgbe_bypass_init(struct ixgbe_softc *sc) bp_list = SYSCTL_CHILDREN(bp_node); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "version", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + OID_AUTO, "version", CTLTYPE_INT | CTLFLAG_RD, sc, 0, ixgbe_bp_version, "I", "Bypass Version"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_set_state, "I", "Bypass State"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "timeout", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "timeout", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_timeout, "I", "Bypass Timeout"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "main_on", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "main_on", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_main_on, "I", "Bypass Main On"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "main_off", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "main_off", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_main_off, "I", "Bypass Main Off"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "aux_on", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "aux_on", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_aux_on, "I", "Bypass Aux On"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "aux_off", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "aux_off", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_aux_off, "I", "Bypass Aux Off"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "wd_set", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "wd_set", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_wd_set, "I", "Set BP Watchdog"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "wd_reset", CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, + OID_AUTO, "wd_reset", CTLTYPE_INT | CTLFLAG_WR, sc, 0, ixgbe_bp_wd_reset, "S", "Bypass WD Reset"); sc->feat_en |= IXGBE_FEATURE_BYPASS; From nobody Sat Sep 28 09:23:08 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 4XG21n4j3Sz5Y2sN; Sat, 28 Sep 2024 09:23:09 +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 4XG21n0Zt7z4qT1; Sat, 28 Sep 2024 09:23:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515389; 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=88uPV2HDgumSgDcT1i5BlQ+TAxTRpnbOEs3mpapnpH4=; b=owAWj0hSaIOiT2dK8cyfGEAMNj4dF5ksbcWPYHB8s71jewEk2lFDKKLjPWo/zlczj/Svr5 ZUa4A09kGwD6WrOnnIdLVJJu6GVJWB6+unT7rUR3iCLC8VLAbYvcSYYPId4tr0vMI+HHfl MX4HjY1YziNXZGh4u2oRyR2P4FsvZmq6RNODY7KtxY8QgdVaou6ktfI5uUPCKr1i/ICDRR WtDcNA9Wd0l/af08dkuUauuBokwXi7npyxof1bIJ/gfLnXMc09N+IZpEJEdHp76EgGIcge l+dM/4lUOLMz3Rp1oZi8UFJhAqv/LKMWoqzg4lDWDVpattoRAt+C/tkdSOLRLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515389; 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=88uPV2HDgumSgDcT1i5BlQ+TAxTRpnbOEs3mpapnpH4=; b=Kxe0Ld56P022ZOBgWeile/IXx33H535bWg8wTI8D6bEBn78g5Dv2PtRPCuVxrG0525Exi5 FHKT1rsOgCncof8Nb5gsoy8O4qhfPz1erhKLXI/+RrhYPqeG9ncTwnMXNEiaUInL/aFA06 dE27C80tBBg7NvF9q23w2zzR6rvmQFvFuU7yPbR/Qipin5ArSCWhlbmRQARIhbUDkenDmr RZUjOnSNouTNaOG1H093Ybfr9sJR5hxPnuPTrD0Bkv+EMC2L2+8M2V9ESrJMIsnuZYqxvv VWzlTsTDTuikJUXT8Qjl0q5qLo/bOqgzPp+BNDBu2580LW2DeqPV5kTbrD8RVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515389; a=rsa-sha256; cv=none; b=RG/+cjiyoZqMu1/uOGo6FDGqWIxJYq8e6tR8Oh4K68z45whohsOSZmcAmGLhRVmmeQ+3dH WYGOSKnL0T49namujjBfvv18gaR27vH9NbfotaQmKetFgARJcDoEHYNM/C8409bzv04dUM 65UrXD7C+bZP05YjxGvkqV9WLy1KzEVj9Xt+RwlQZM/ZctaF5Jkm85qyp294//YMS2a3ra fn4i7SOPSEtu224v+TgTp6dn8VN+3+CTfgxDSxijgGnduMuGLPGCMcqISdOdPbvzItO9Ph 7i5Ryxs83plCrCPTIaAVzskSL7A6A39qdPDe94AKbM9ihEM2P78jMLN9ZEoX4g== 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 4XG21m5X4FzK6v; Sat, 28 Sep 2024 09:23:08 +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 48S9N8uC076138; Sat, 28 Sep 2024 09:23:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9N8J8076135; Sat, 28 Sep 2024 09:23:08 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:23:08 GMT Message-Id: <202409280923.48S9N8J8076135@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: af9d02f4da5f - stable/14 - ixgbe: update ixgbe_phy with ix-3.3.38 changes 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: af9d02f4da5f5c8139f5ae67a7afc5fcb0d01e02 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=af9d02f4da5f5c8139f5ae67a7afc5fcb0d01e02 commit af9d02f4da5f5c8139f5ae67a7afc5fcb0d01e02 Author: Kevin Bowling AuthorDate: 2024-09-21 09:45:12 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:21:46 +0000 ixgbe: update ixgbe_phy with ix-3.3.38 changes (cherry picked from commit e06918b94ac44448272a9d6747dcdba142e18b58) --- sys/dev/ixgbe/ixgbe_phy.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index c2f23179476b..e3f311473c38 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1487,6 +1487,11 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) hw->phy.type = ixgbe_phy_sfp_intel; break; default: + if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) + hw->phy.type = ixgbe_phy_sfp_passive_unknown; + else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) + hw->phy.type = ixgbe_phy_sfp_active_unknown; + else hw->phy.type = ixgbe_phy_sfp_unknown; break; } @@ -1495,10 +1500,6 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) /* Allow any DA cable vendor */ if (cable_tech & (IXGBE_SFF_DA_PASSIVE_CABLE | IXGBE_SFF_DA_ACTIVE_CABLE)) { - if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) - hw->phy.type = ixgbe_phy_sfp_passive_unknown; - else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) - hw->phy.type = ixgbe_phy_sfp_active_unknown; status = IXGBE_SUCCESS; goto out; } From nobody Sat Sep 28 09:23:09 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 4XG21p326jz5Y2ky; Sat, 28 Sep 2024 09:23:10 +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 4XG21p0Hdfz4qTD; Sat, 28 Sep 2024 09:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515390; 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=7567SeHyhI50F+EKHdqKU2RRGtvZfYGz7WS3rI0B3EM=; b=WtVdzUH9UFImy6R9G8ceC6soc5eQBOZYiUjObyNQV0JWzw7pJvF3vcWbmzMnAgB7qSuAOX ZK5Dfm6ekWFx+1ZMansAu8OhfL0W9HZQMCaJGVu7oKZP5yT3IiBexXG0k+zG3Szy3d6xy3 T0gRk9n49JG4dN/b46IMSyoXepyp5ltEnT7WBzxkPWSAi/oj9Ug87sxE77pQKVA48Uqn8j 8Bvf4rUtSaWhQmk0lv8q/Z7fXLC2painaSOOivsYcxQiX+yEsrQijJOfxD1MHXl3Xfxrpo 6lWkJCm3G2w+P4tiBZ8cThvvAnd+IKR8EkNLAIYRSUH5e7eqnoU7emt/4KEqvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515390; 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=7567SeHyhI50F+EKHdqKU2RRGtvZfYGz7WS3rI0B3EM=; b=gZ3Mn2fCEiLptLWY2D945RFktEhQVNekSaGFBICAH/YsHrBURF9bSu52oSwMtMgPPszfG6 XfYSTNuhXTS0hHzXwpfAoFvWbqpGd2uawCzsBEguk2/dXwnLdVs6TP3qS8avCDr1fqNdqm IRFALd7c0UxkOtRC3QBVN/vslPD1OOF3hNDT090fAf4M7w2P9hXp91csiEpIZNGnWE6Q1x MG/lWYDf6jh/Q61dr8Hbr8a+r7Je60bSACr7mb56IAykS8Q5SLy/ovAukBUHsZUZ2kVejg 47IMgCQbKVNq/gEyl39iZcmahVfFmqPw2EeewwZjb2zp2WxCckdl3Wg2/0IFSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515390; a=rsa-sha256; cv=none; b=YNQduhF9WQthvBEpqz49cipWmXknlahnFUfbhIhUoC1uVYZG35cY67EpgTt1IJ9JSAmx0u CAbJGd/39QzWzDxC8SW+lK3vgdG25stg6rr4FzQHBmKTMlDERk/o+u0jX2kNCnalglKz4h OkonO/vBZDWMd7P30LRxI66ztJ9dGc8j/1MC3r8eJ1s1Tfmjx9lgCKk5Q/BkSdxzwqrlIQ QqFJwOXfdr0yVCDUZKFLckYr5IcdvQ3Yru4j+8CGZERNPj3Se12iY3Hcwysnuy3m51ZiL2 QxnXbgy4dG4bJQLh/zrgj6l+iNoRLvHv+/lsNHp3zbEW9l8nykkK2LW6qOqODg== 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 4XG21n6P0zzJVL; Sat, 28 Sep 2024 09:23:09 +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 48S9N9GM076185; Sat, 28 Sep 2024 09:23:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9N9ad076182; Sat, 28 Sep 2024 09:23:09 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:23:09 GMT Message-Id: <202409280923.48S9N9ad076182@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: 09c658172a03 - stable/14 - ixgbe: update ixgbe_mbx with ix-3.3.38 changes 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: 09c658172a03ffae272092527ee43b39adbb6e17 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=09c658172a03ffae272092527ee43b39adbb6e17 commit 09c658172a03ffae272092527ee43b39adbb6e17 Author: Kevin Bowling AuthorDate: 2024-09-21 09:47:11 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:22:01 +0000 ixgbe: update ixgbe_mbx with ix-3.3.38 changes (cherry picked from commit 0acea458f82d95b75193bf6ce6321906032abf40) --- sys/dev/ixgbe/ixgbe_mbx.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe_mbx.h | 1 + 2 files changed, 45 insertions(+) diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c index 0a0c5abde157..5f1f64e02b82 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.c +++ b/sys/dev/ixgbe/ixgbe_mbx.c @@ -199,6 +199,26 @@ s32 ixgbe_check_for_rst(struct ixgbe_hw *hw, u16 mbx_id) return ret_val; } +/** + * ixgbe_clear_mbx - Clear Mailbox Memory + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to write + * + * Set VFMBMEM of given VF to 0x0. + **/ +s32 ixgbe_clear_mbx(struct ixgbe_hw *hw, u16 mbx_id) +{ + struct ixgbe_mbx_info *mbx = &hw->mbx; + s32 ret_val = IXGBE_ERR_CONFIG; + + DEBUGFUNC("ixgbe_clear_mbx"); + + if (mbx->ops[mbx_id].clear) + ret_val = mbx->ops[mbx_id].clear(hw, mbx_id); + + return ret_val; +} + /** * ixgbe_poll_for_msg - Wait for message notification * @hw: pointer to the HW structure @@ -658,6 +678,7 @@ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) mbx->ops[0].check_for_msg = ixgbe_check_for_msg_vf; mbx->ops[0].check_for_ack = ixgbe_check_for_ack_vf; mbx->ops[0].check_for_rst = ixgbe_check_for_rst_vf; + mbx->ops[0].clear = NULL; mbx->stats.msgs_tx = 0; mbx->stats.msgs_rx = 0; @@ -1054,6 +1075,27 @@ static s32 ixgbe_read_mbx_pf(struct ixgbe_hw *hw, u32 *msg, u16 size, return IXGBE_SUCCESS; } +/** + * ixgbe_clear_mbx_pf - Clear Mailbox Memory + * @hw: pointer to the HW structure + * @vf_id: the VF index + * + * Set VFMBMEM of given VF to 0x0. + **/ +static s32 ixgbe_clear_mbx_pf(struct ixgbe_hw *hw, u16 vf_id) +{ + u16 mbx_size = hw->mbx.size; + u16 i; + + if (vf_id > 63) + return IXGBE_ERR_PARAM; + + for (i = 0; i < mbx_size; ++i) + IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_id), i, 0x0); + + return IXGBE_SUCCESS; +} + /** * ixgbe_init_mbx_params_pf_id - set initial values for pf mailbox * @hw: pointer to the HW structure @@ -1072,6 +1114,7 @@ void ixgbe_init_mbx_params_pf_id(struct ixgbe_hw *hw, u16 vf_id) mbx->ops[vf_id].check_for_msg = ixgbe_check_for_msg_pf; mbx->ops[vf_id].check_for_ack = ixgbe_check_for_ack_pf; mbx->ops[vf_id].check_for_rst = ixgbe_check_for_rst_pf; + mbx->ops[vf_id].clear = ixgbe_clear_mbx_pf; } /** @@ -1147,6 +1190,7 @@ void ixgbe_upgrade_mbx_params_pf(struct ixgbe_hw *hw, u16 vf_id) mbx->ops[vf_id].check_for_msg = ixgbe_check_for_msg_pf; mbx->ops[vf_id].check_for_ack = ixgbe_check_for_ack_pf; mbx->ops[vf_id].check_for_rst = ixgbe_check_for_rst_pf; + mbx->ops[vf_id].clear = ixgbe_clear_mbx_pf; mbx->stats.msgs_tx = 0; mbx->stats.msgs_rx = 0; diff --git a/sys/dev/ixgbe/ixgbe_mbx.h b/sys/dev/ixgbe/ixgbe_mbx.h index 3a9bd34a137f..e6519963242e 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.h +++ b/sys/dev/ixgbe/ixgbe_mbx.h @@ -195,6 +195,7 @@ s32 ixgbe_write_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id); s32 ixgbe_check_for_msg(struct ixgbe_hw *hw, u16 mbx_id); s32 ixgbe_check_for_ack(struct ixgbe_hw *hw, u16 mbx_id); s32 ixgbe_check_for_rst(struct ixgbe_hw *hw, u16 mbx_id); +s32 ixgbe_clear_mbx(struct ixgbe_hw *hw, u16 vf_number); void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw); void ixgbe_upgrade_mbx_params_vf(struct ixgbe_hw *hw); void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw); From nobody Sat Sep 28 09:23:10 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 4XG21q3rF8z5Y2Yw; Sat, 28 Sep 2024 09:23:11 +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 4XG21q0bF6z4qJQ; Sat, 28 Sep 2024 09:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515391; 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=PG9cUgpo51XNCg/36Ajcd22m4wyBUHRGPxwP+PG6LsM=; b=QziRX05GipylpT6xYv7lN2JYnP8huCDr1ADWrOTQvUfGyriVPNbPbBGOzaiw/QLdHiTQKq RzIFYKFtJ8g00hkenI894AYz8s+T6TlWP2AQssY2RXhwkNWD5nPYSjxTcR48Fn5N7WffAa sx5EMCVuwe88wM7HPUK8OR34IiL7IsXCGtxwvKrutANUySDmXa1b0tVsILPqBgHI1OSZ/7 Vi8qJB0OCfh7TDtNvYqVoTZH/ezs6oCP/TpJX5RMNOoRV33kRfdMlGI5XwKVyL9WCyo39W Rp0ZMWp4IeVqmu/t0AFSPDtlUrKeWpVIV00GpJGCKzrrWYw2RTFRDZlbCGt0ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515391; 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=PG9cUgpo51XNCg/36Ajcd22m4wyBUHRGPxwP+PG6LsM=; b=arMZfAbF8wHl8TKqRTueXMzQC6YXmtk0+H/M/MxyBkq4OwOa17YMO7TgspOUDWuPTBZFOT tl3xH74B/N0OgMtize5kx9mHd+2W1AFgzgIwDPwzkw4JAAYHPZrZRiCG7zFgvIdtUn9rel rTAjIKX2DQZbRyFUqYw/jcZRmlQOwvFJo1wT7185ceh9qRQo7fItBtx3fx0ES6svHCFqJV OHEB+keaReWW2uheRDO9fzS4ePhQxcDWNI27XWo+Zs3+iF1nNEpoNnhujWHVyUkSJwU/xI 5RHf//Ffr9L35TSwS9HmRO2AcKI9r5ikHSUlmtLOxKi10Hc7doX61Pc3QkWImg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515391; a=rsa-sha256; cv=none; b=qyVlXC18ZBKRJ8luFFpKb7MD7hVMHdIDyjcgvFgJOheyjN4XcQUcX1okX/auvOC0BRvyL1 mMqaqkcWcW43s57ufB9tSAL9ofyLNlx8QV0ReBQ5r7hBWi/STpp1RxCC6+KmingMtgspGT sJuu515TIGpeNeGJV0Xu0JPks+ynuAqgcOjzFW2VatzjW6DFzlTM9nWdqS+IhGdNXDmWu/ tJhVvSwLFSlfXmNaEu/sG4f86aI4B6MUbI1ml8FxfLEgWypr84eKXq09bSkOtzEmzGEnwQ HM7hDA86v4tCSASjAiv/oteSjvqaUMmglLNxfcdqGgliSoAwAqgABd2Nd1FcOQ== 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 4XG21q09pbzJgS; Sat, 28 Sep 2024 09:23:11 +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 48S9NAjp076239; Sat, 28 Sep 2024 09:23:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9NAVo076236; Sat, 28 Sep 2024 09:23:10 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:23:10 GMT Message-Id: <202409280923.48S9NAVo076236@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: b8c2ff930b39 - stable/14 - ixgbe: update if_ix and ixgbe api with ix-3.3.38 changes 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: b8c2ff930b397951a158ce150a5c6f8b2c533cf6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=b8c2ff930b397951a158ce150a5c6f8b2c533cf6 commit b8c2ff930b397951a158ce150a5c6f8b2c533cf6 Author: Kevin Bowling AuthorDate: 2024-09-21 09:51:24 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:22:15 +0000 ixgbe: update if_ix and ixgbe api with ix-3.3.38 changes (cherry picked from commit f72de14ea13259db78b06c50da6c864dea698668) --- sys/dev/ixgbe/if_ix.c | 172 ++++++++++++++++++++++++++++++++++------- sys/dev/ixgbe/ixgbe.h | 4 + sys/dev/ixgbe/ixgbe_api.c | 19 ++++- sys/dev/ixgbe/ixgbe_api.h | 1 + sys/dev/ixgbe/ixgbe_common.c | 161 +++++++++++++++++++++++++++++++++++++- sys/dev/ixgbe/ixgbe_common.h | 3 + sys/dev/ixgbe/ixgbe_features.h | 1 + sys/dev/ixgbe/ixgbe_rss.h | 1 + sys/dev/ixgbe/ixgbe_type.h | 52 +++++++++++++ 9 files changed, 378 insertions(+), 36 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index f2b41e19a15e..74bde3497279 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -172,6 +172,7 @@ static void ixgbe_add_media_types(if_ctx_t); static void ixgbe_update_stats_counters(struct ixgbe_softc *); static void ixgbe_config_link(if_ctx_t); static void ixgbe_get_slot_info(struct ixgbe_softc *); +static void ixgbe_fw_mode_timer(void *); static void ixgbe_check_wol_support(struct ixgbe_softc *); static void ixgbe_enable_rx_drop(struct ixgbe_softc *); static void ixgbe_disable_rx_drop(struct ixgbe_softc *); @@ -1141,6 +1142,17 @@ ixgbe_if_attach_post(if_ctx_t ctx) /* Add sysctls */ ixgbe_add_device_sysctls(ctx); + /* Init recovery mode timer and state variable */ + if (sc->feat_en & IXGBE_FEATURE_RECOVERY_MODE) { + sc->recovery_mode = 0; + + /* Set up the timer callout */ + callout_init(&sc->fw_mode_timer, true); + + /* Start the task */ + callout_reset(&sc->fw_mode_timer, hz, ixgbe_fw_mode_timer, 0); + } + return (0); err: return (error); @@ -1639,10 +1651,10 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, txr, 0, + CTLTYPE_UINT | CTLFLAG_RD, txr, 0, ixgbe_sysctl_tdh_handler, "IU", "Transmit Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, txr, 0, + CTLTYPE_UINT | CTLFLAG_RD, txr, 0, ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor Tail"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tso_tx", CTLFLAG_RD, &txr->tso_tx, "TSO"); @@ -1659,7 +1671,7 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", - CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_UINT | CTLFLAG_RW, &sc->rx_queues[i], 0, ixgbe_sysctl_interrupt_rate_handler, "IU", "Interrupt Rate"); @@ -1667,10 +1679,10 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) CTLFLAG_RD, &(sc->rx_queues[i].irqs), "irqs on this queue"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, rxr, 0, + CTLTYPE_UINT | CTLFLAG_RD, rxr, 0, ixgbe_sysctl_rdh_handler, "IU", "Receive Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, rxr, 0, + CTLTYPE_UINT | CTLFLAG_RD, rxr, 0, ixgbe_sysctl_rdt_handler, "IU", "Receive Descriptor Tail"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "rx_packets", CTLFLAG_RD, &rxr->rx_packets, "Queue Packets Received"); @@ -1799,6 +1811,10 @@ ixgbe_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS) if (!txr) return (0); + + if (atomic_load_acq_int(&txr->sc->recovery_mode)) + return (EPERM); + val = IXGBE_READ_REG(&txr->sc->hw, IXGBE_TDH(txr->me)); error = sysctl_handle_int(oidp, &val, 0, req); if (error || !req->newptr) @@ -1822,6 +1838,9 @@ ixgbe_sysctl_tdt_handler(SYSCTL_HANDLER_ARGS) if (!txr) return (0); + if (atomic_load_acq_int(&txr->sc->recovery_mode)) + return (EPERM); + val = IXGBE_READ_REG(&txr->sc->hw, IXGBE_TDT(txr->me)); error = sysctl_handle_int(oidp, &val, 0, req); if (error || !req->newptr) @@ -1845,6 +1864,9 @@ ixgbe_sysctl_rdh_handler(SYSCTL_HANDLER_ARGS) if (!rxr) return (0); + if (atomic_load_acq_int(&rxr->sc->recovery_mode)) + return (EPERM); + val = IXGBE_READ_REG(&rxr->sc->hw, IXGBE_RDH(rxr->me)); error = sysctl_handle_int(oidp, &val, 0, req); if (error || !req->newptr) @@ -1868,6 +1890,9 @@ ixgbe_sysctl_rdt_handler(SYSCTL_HANDLER_ARGS) if (!rxr) return (0); + if (atomic_load_acq_int(&rxr->sc->recovery_mode)) + return (EPERM); + val = IXGBE_READ_REG(&rxr->sc->hw, IXGBE_RDT(rxr->me)); error = sysctl_handle_int(oidp, &val, 0, req); if (error || !req->newptr) @@ -2158,6 +2183,7 @@ ixgbe_perform_aim(struct ixgbe_softc *sc, struct ix_rx_queue *que) { uint32_t newitr = 0; struct rx_ring *rxr = &que->rxr; + /* FIXME struct tx_ring *txr = ... ->txr; */ /* * Do Adaptive Interrupt Moderation: @@ -2173,12 +2199,18 @@ ixgbe_perform_aim(struct ixgbe_softc *sc, struct ix_rx_queue *que) que->eitr_setting = 0; /* Idle, do nothing */ if (rxr->bytes == 0) { + /* FIXME && txr->bytes == 0 */ return; } - if ((rxr->bytes) && (rxr->packets)) { - newitr = (rxr->bytes / rxr->packets); - } + if ((rxr->bytes) && (rxr->packets)) + newitr = rxr->bytes / rxr->packets; + /* FIXME for transmit accounting + * if ((txr->bytes) && (txr->packets)) + * newitr = txr->bytes/txr->packets; + * if ((rxr->bytes) && (rxr->packets)) + * newitr = max(newitr, (rxr->bytes / rxr->packets)); + */ newitr += 24; /* account for hardware frame, crc */ /* set an upper boundary */ @@ -2201,6 +2233,8 @@ ixgbe_perform_aim(struct ixgbe_softc *sc, struct ix_rx_queue *que) que->eitr_setting = newitr; /* Reset state */ + /* FIXME txr->bytes = 0; */ + /* FIXME txr->packets = 0; */ rxr->bytes = 0; rxr->packets = 0; @@ -2658,6 +2692,9 @@ ixgbe_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) int error; unsigned int reg, usec, rate; + if (atomic_load_acq_int(&que->sc->recovery_mode)) + return (EPERM); + reg = IXGBE_READ_REG(&que->sc->hw, IXGBE_EITR(que->msix)); usec = ((reg & 0x0FF8) >> 3); if (usec > 0) @@ -2697,12 +2734,12 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) /* Sysctls for all devices */ SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fc", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_flowcntl, "I", IXGBE_SYSCTL_DESC_SET_FC); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "advertise_speed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_advertise, "I", IXGBE_SYSCTL_DESC_ADV_SPEED); @@ -2711,35 +2748,35 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) &sc->enable_aim, 0, "Interrupt Moderation"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fw_version", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_STRING | CTLFLAG_RD, sc, 0, ixgbe_sysctl_print_fw_version, "A", "Prints FW/NVM Versions"); #ifdef IXGBE_DEBUG /* testing sysctls (for all devices) */ SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "power_state", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_power_state, "I", "PCI Power State"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "print_rss_config", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_STRING | CTLFLAG_RD, sc, 0, ixgbe_sysctl_print_rss_config, "A", "Prints RSS Configuration"); #endif /* for X550 series devices */ if (hw->mac.type >= ixgbe_mac_X550) SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "dmac", - CTLTYPE_U16 | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_U16 | CTLFLAG_RW, sc, 0, ixgbe_sysctl_dmac, "I", "DMA Coalesce"); /* for WoL-capable devices */ if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) { SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "wol_enable", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_wol_enable, "I", "Enable/Disable Wake on LAN"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "wufc", - CTLTYPE_U32 | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_U32 | CTLFLAG_RW, sc, 0, ixgbe_sysctl_wufc, "I", "Enable/Disable Wake Up Filters"); } @@ -2754,20 +2791,20 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) phy_list = SYSCTL_CHILDREN(phy_node); SYSCTL_ADD_PROC(ctx_list, phy_list, OID_AUTO, "temp", - CTLTYPE_U16 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_U16 | CTLFLAG_RD, sc, 0, ixgbe_sysctl_phy_temp, "I", "Current External PHY Temperature (Celsius)"); SYSCTL_ADD_PROC(ctx_list, phy_list, OID_AUTO, "overtemp_occurred", - CTLTYPE_U16 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_U16 | CTLFLAG_RD, sc, 0, ixgbe_sysctl_phy_overtemp_occurred, "I", "External PHY High Temperature Event Occurred"); } if (sc->feat_cap & IXGBE_FEATURE_EEE) { SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "eee_state", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_eee_state, "I", "EEE Power Save State"); } } /* ixgbe_add_device_sysctls */ @@ -2831,6 +2868,8 @@ ixgbe_if_detach(if_ctx_t ctx) ctrl_ext &= ~IXGBE_CTRL_EXT_DRV_LOAD; IXGBE_WRITE_REG(&sc->hw, IXGBE_CTRL_EXT, ctrl_ext); + callout_drain(&sc->fw_mode_timer); + ixgbe_free_pci_resources(ctx); free(sc->mta, M_IXGBE); @@ -3497,6 +3536,34 @@ ixgbe_if_timer(if_ctx_t ctx, uint16_t qid) } /* ixgbe_if_timer */ +/************************************************************************ + * ixgbe_fw_mode_timer - FW mode timer routine + ************************************************************************/ +static void +ixgbe_fw_mode_timer(void *arg) +{ + struct ixgbe_softc *sc = arg; + struct ixgbe_hw *hw = &sc->hw; + + if (ixgbe_fw_recovery_mode(hw)) { + if (atomic_cmpset_acq_int(&sc->recovery_mode, 0, 1)) { + /* Firmware error detected, entering recovery mode */ + device_printf(sc->dev, "Firmware recovery mode detected. Limiting" + " functionality. Refer to the Intel(R) Ethernet Adapters" + " and Devices User Guide for details on firmware recovery" + " mode.\n"); + + if (hw->adapter_stopped == FALSE) + ixgbe_if_stop(sc->ctx); + } + } else + atomic_cmpset_acq_int(&sc->recovery_mode, 1, 0); + + + callout_reset(&sc->fw_mode_timer, hz, + ixgbe_fw_mode_timer, sc); +} /* ixgbe_fw_mode_timer */ + /************************************************************************ * ixgbe_sfp_probe * @@ -3948,7 +4015,7 @@ ixgbe_intr(void *arg) } /* Check for fan failure */ - if ((hw->device_id == IXGBE_DEV_ID_82598AT) && + if ((sc->feat_en & IXGBE_FEATURE_FAN_FAIL) && (eicr & IXGBE_EICR_GPI_SDP1)) { device_printf(sc->dev, "\nCRITICAL: FAN FAILURE!! REPLACE IMMEDIATELY!!\n"); @@ -4142,6 +4209,9 @@ ixgbe_sysctl_advertise(SYSCTL_HANDLER_ARGS) int error, advertise; sc = (struct ixgbe_softc *)arg1; + if (atomic_load_acq_int(&sc->recovery_mode)) + return (EPERM); + advertise = sc->advertise; error = sysctl_handle_int(oidp, &advertise, 0, req); @@ -4493,6 +4563,9 @@ ixgbe_sysctl_print_rss_config(SYSCTL_HANDLER_ARGS) int error = 0, reta_size; u32 reg; + if (atomic_load_acq_int(&sc->recovery_mode)) + return (EPERM); + buf = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (!buf) { device_printf(dev, "Could not allocate sbuf for output.\n"); @@ -4548,6 +4621,9 @@ ixgbe_sysctl_phy_temp(SYSCTL_HANDLER_ARGS) struct ixgbe_hw *hw = &sc->hw; u16 reg; + if (atomic_load_acq_int(&sc->recovery_mode)) + return (EPERM); + if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) { device_printf(iflib_get_dev(sc->ctx), "Device has no supported external thermal sensor.\n"); @@ -4580,6 +4656,9 @@ ixgbe_sysctl_phy_overtemp_occurred(SYSCTL_HANDLER_ARGS) struct ixgbe_hw *hw = &sc->hw; u16 reg; + if (atomic_load_acq_int(&sc->recovery_mode)) + return (EPERM); + if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) { device_printf(iflib_get_dev(sc->ctx), "Device has no supported external thermal sensor.\n"); @@ -4617,6 +4696,9 @@ ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS) int curr_eee, new_eee, error = 0; s32 retval; + if (atomic_load_acq_int(&sc->recovery_mode)) + return (EPERM); + curr_eee = new_eee = !!(sc->feat_en & IXGBE_FEATURE_EEE); error = sysctl_handle_int(oidp, &new_eee, 0, req); @@ -4681,15 +4763,20 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) sc->feat_cap |= IXGBE_FEATURE_BYPASS; break; case ixgbe_mac_X550: + sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; sc->feat_cap |= IXGBE_FEATURE_TEMP_SENSOR; sc->feat_cap |= IXGBE_FEATURE_SRIOV; sc->feat_cap |= IXGBE_FEATURE_FDIR; break; case ixgbe_mac_X550EM_x: + sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; sc->feat_cap |= IXGBE_FEATURE_SRIOV; sc->feat_cap |= IXGBE_FEATURE_FDIR; + if (sc->hw.device_id == IXGBE_DEV_ID_X550EM_X_KR) + sc->feat_cap |= IXGBE_FEATURE_EEE; break; case ixgbe_mac_X550EM_a: + sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; sc->feat_cap |= IXGBE_FEATURE_SRIOV; sc->feat_cap |= IXGBE_FEATURE_FDIR; sc->feat_cap &= ~IXGBE_FEATURE_LEGACY_IRQ; @@ -4725,6 +4812,9 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) /* Thermal Sensor */ if (sc->feat_cap & IXGBE_FEATURE_TEMP_SENSOR) sc->feat_en |= IXGBE_FEATURE_TEMP_SENSOR; + /* Recovery mode */ + if (sc->feat_cap & IXGBE_FEATURE_RECOVERY_MODE) + sc->feat_en |= IXGBE_FEATURE_RECOVERY_MODE; /* Enabled via global sysctl... */ /* Flow Director */ @@ -4776,14 +4866,42 @@ static void ixgbe_sbuf_fw_version(struct ixgbe_hw *hw, struct sbuf *buf) { struct ixgbe_nvm_version nvm_ver = {0}; - uint16_t phyfw = 0; - int status; const char *space = ""; + ixgbe_get_nvm_version(hw, &nvm_ver); /* NVM version */ ixgbe_get_oem_prod_version(hw, &nvm_ver); /* OEM's NVM version */ - ixgbe_get_orom_version(hw, &nvm_ver); /* Option ROM */ ixgbe_get_etk_id(hw, &nvm_ver); /* eTrack identifies a build in Intel's SCM */ - status = ixgbe_get_phy_firmware_version(hw, &phyfw); + ixgbe_get_orom_version(hw, &nvm_ver); /* Option ROM */ + + /* FW version */ + if ((nvm_ver.phy_fw_maj == 0x0 && + nvm_ver.phy_fw_min == 0x0 && + nvm_ver.phy_fw_id == 0x0) || + (nvm_ver.phy_fw_maj == 0xF && + nvm_ver.phy_fw_min == 0xFF && + nvm_ver.phy_fw_id == 0xF)) { + /* If major, minor and id numbers are set to 0, + * reading FW version is unsupported. If major number + * is set to 0xF, minor is set to 0xFF and id is set + * to 0xF, this means that number read is invalid. */ + } else + sbuf_printf(buf, "fw %d.%d.%d ", + nvm_ver.phy_fw_maj, nvm_ver.phy_fw_min, nvm_ver.phy_fw_id); + + /* NVM version */ + if ((nvm_ver.nvm_major == 0x0 && + nvm_ver.nvm_minor == 0x0 && + nvm_ver.nvm_id == 0x0) || + (nvm_ver.nvm_major == 0xF && + nvm_ver.nvm_minor == 0xFF && + nvm_ver.nvm_id == 0xF)) { + /* If major, minor and id numbers are set to 0, + * reading NVM version is unsupported. If major number + * is set to 0xF, minor is set to 0xFF and id is set + * to 0xF, this means that number read is invalid. */ + } else + sbuf_printf(buf, "nvm %x.%02x.%x ", + nvm_ver.nvm_major, nvm_ver.nvm_minor, nvm_ver.nvm_id); if (nvm_ver.oem_valid) { sbuf_printf(buf, "NVM OEM V%d.%d R%d", nvm_ver.oem_major, @@ -4798,13 +4916,9 @@ ixgbe_sbuf_fw_version(struct ixgbe_hw *hw, struct sbuf *buf) } if (nvm_ver.etk_id != ((NVM_VER_INVALID << NVM_ETK_SHIFT) | - NVM_VER_INVALID)) { + NVM_VER_INVALID | 0xFFFFFFFF)) { sbuf_printf(buf, "%seTrack 0x%08x", space, nvm_ver.etk_id); - space = " "; } - - if (phyfw != 0 && status == IXGBE_SUCCESS) - sbuf_printf(buf, "%sPHY FW V%d", space, phyfw); } /* ixgbe_sbuf_fw_version */ /************************************************************************ diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 3dae3aeebaa1..ae202b72390b 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -434,6 +434,10 @@ struct ixgbe_softc { /* Bypass */ struct ixgbe_bp_data bypass; + /* Firmware error check */ + int recovery_mode; + struct callout fw_mode_timer; + /* Misc stats maintained by the driver */ unsigned long dropped_pkts; unsigned long mbuf_header_failed; diff --git a/sys/dev/ixgbe/ixgbe_api.c b/sys/dev/ixgbe/ixgbe_api.c index 7767e9a5571c..4c50f10ed92e 100644 --- a/sys/dev/ixgbe/ixgbe_api.c +++ b/sys/dev/ixgbe/ixgbe_api.c @@ -1133,6 +1133,19 @@ s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, IXGBE_NOT_IMPLEMENTED); } +/** + * ixgbe_toggle_txdctl - Toggle VF's queues + * @hw: pointer to hardware structure + * @vind: VMDq pool index + * + * Enable and disable each queue in VF. + */ +s32 ixgbe_toggle_txdctl(struct ixgbe_hw *hw, u32 vind) +{ + return ixgbe_call_func(hw, hw->mac.ops.toggle_txdctl, (hw, + vind), IXGBE_NOT_IMPLEMENTED); +} + /** * ixgbe_fc_enable - Enable flow control * @hw: pointer to hardware structure @@ -1417,15 +1430,15 @@ s32 ixgbe_bypass_rw(struct ixgbe_hw *hw, u32 cmd, u32 *status) /** * ixgbe_bypass_valid_rd - Verify valid return from bit-bang. + * @hw: pointer to hardware structure + * @in_reg: The register cmd for the bit-bang read. + * @out_reg: The register returned from a bit-bang read. * * If we send a write we can't be sure it took until we can read back * that same register. It can be a problem as some of the fields may * for valid reasons change inbetween the time wrote the register and * we read it again to verify. So this function check everything we * can check and then assumes it worked. - * - * @u32 in_reg - The register cmd for the bit-bang read. - * @u32 out_reg - The register returned from a bit-bang read. **/ bool ixgbe_bypass_valid_rd(struct ixgbe_hw *hw, u32 in_reg, u32 out_reg) { diff --git a/sys/dev/ixgbe/ixgbe_api.h b/sys/dev/ixgbe/ixgbe_api.h index 33c1cd1baeaf..b81510dacb95 100644 --- a/sys/dev/ixgbe/ixgbe_api.h +++ b/sys/dev/ixgbe/ixgbe_api.h @@ -131,6 +131,7 @@ s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, u32 *vfta_delta, u32 vfta, bool vlvf_bypass); +s32 ixgbe_toggle_txdctl(struct ixgbe_hw *hw, u32 vind); s32 ixgbe_fc_enable(struct ixgbe_hw *hw); s32 ixgbe_setup_fc(struct ixgbe_hw *hw); s32 ixgbe_set_fw_drv_ver(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build, diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 7643d4028529..df7ab90e72ab 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -133,6 +133,7 @@ s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw) mac->ops.init_uta_tables = NULL; mac->ops.enable_rx = ixgbe_enable_rx_generic; mac->ops.disable_rx = ixgbe_disable_rx_generic; + mac->ops.toggle_txdctl = ixgbe_toggle_txdctl_generic; /* Flow Control */ mac->ops.fc_enable = ixgbe_fc_enable_generic; @@ -4138,6 +4139,62 @@ s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw) return IXGBE_SUCCESS; } + +/** + * ixgbe_toggle_txdctl_generic - Toggle VF's queues + * @hw: pointer to hardware structure + * @vf_number: VF index + * + * Enable and disable each queue in VF. + */ +s32 ixgbe_toggle_txdctl_generic(struct ixgbe_hw *hw, u32 vf_number) +{ + u8 queue_count, i; + u32 offset, reg; + + if (vf_number > 63) + return IXGBE_ERR_PARAM; + + /* + * Determine number of queues by checking + * number of virtual functions + */ + reg = IXGBE_READ_REG(hw, IXGBE_GCR_EXT); + switch (reg & IXGBE_GCR_EXT_VT_MODE_MASK) { + case IXGBE_GCR_EXT_VT_MODE_64: + queue_count = 2; + break; + case IXGBE_GCR_EXT_VT_MODE_32: + queue_count = 4; + break; + case IXGBE_GCR_EXT_VT_MODE_16: + queue_count = 8; + break; + default: + return IXGBE_ERR_CONFIG; + } + + /* Toggle queues */ + for (i = 0; i < queue_count; ++i) { + /* Calculate offset of current queue */ + offset = queue_count * vf_number + i; + + /* Enable queue */ + reg = IXGBE_READ_REG(hw, IXGBE_PVFTXDCTL(offset)); + reg |= IXGBE_TXDCTL_ENABLE; + IXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(offset), reg); + IXGBE_WRITE_FLUSH(hw); + + /* Disable queue */ + reg = IXGBE_READ_REG(hw, IXGBE_PVFTXDCTL(offset)); + reg &= ~IXGBE_TXDCTL_ENABLE; + IXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(offset), reg); + IXGBE_WRITE_FLUSH(hw); + } + + return IXGBE_SUCCESS; +} + /** * ixgbe_need_crosstalk_fix - Determine if we need to do cross talk fix * @hw: pointer to hardware structure @@ -5151,15 +5208,14 @@ s32 ixgbe_bypass_rw_generic(struct ixgbe_hw *hw, u32 cmd, u32 *status) /** * ixgbe_bypass_valid_rd_generic - Verify valid return from bit-bang. + * @in_reg: The register cmd for the bit-bang read. + * @out_reg: The register returned from a bit-bang read. * * If we send a write we can't be sure it took until we can read back * that same register. It can be a problem as some of the fields may * for valid reasons change inbetween the time wrote the register and * we read it again to verify. So this function check everything we * can check and then assumes it worked. - * - * @u32 in_reg - The register cmd for the bit-bang read. - * @u32 out_reg - The register returned from a bit-bang read. **/ bool ixgbe_bypass_valid_rd_generic(u32 in_reg, u32 out_reg) { @@ -5210,7 +5266,7 @@ bool ixgbe_bypass_valid_rd_generic(u32 in_reg, u32 out_reg) * ixgbe_bypass_set_generic - Set a bypass field in the FW CTRL Regiter. * * @hw: pointer to hardware structure - * @cmd: The control word we are setting. + * @ctrl: The control word we are setting. * @event: The event we are setting in the FW. This also happens to * be the mask for the event we are setting (handy) * @action: The action we set the event to in the FW. This is in a @@ -5395,6 +5451,103 @@ void ixgbe_get_etk_id(struct ixgbe_hw *hw, struct ixgbe_nvm_version *nvm_ver) } } +/** + * ixgbe_get_nvm_version - Return version of NVM and its components + * + * @hw: pointer to hardware structure + * @nvm_ver: pointer to output structure + * + * irrelevant component fields will return 0, read errors will return 0xff + **/ +void ixgbe_get_nvm_version(struct ixgbe_hw *hw, + struct ixgbe_nvm_version *nvm_ver) +{ + u16 word, phy_ver; + + DEBUGFUNC("ixgbe_get_nvm_version"); + + memset(nvm_ver, 0, sizeof(struct ixgbe_nvm_version)); + + /* eeprom version is mac-type specific */ + switch (hw->mac.type) { + case ixgbe_mac_82598EB: + /* version of eeprom section */ + if (ixgbe_read_eeprom(hw, NVM_EEP_OFFSET_82598, &word)) + word = NVM_VER_INVALID; + nvm_ver->nvm_major = ((word & NVM_EEP_MAJOR_MASK) + >> NVM_EEP_MAJ_SHIFT); + nvm_ver->nvm_minor = ((word & NVM_EEP_MINOR_MASK) + >> NVM_EEP_MIN_SHIFT); + nvm_ver->nvm_id = (word & NVM_EEP_ID_MASK); + break; + case ixgbe_mac_X540: + /* version of eeprom section */ + if (ixgbe_read_eeprom(hw, NVM_EEP_OFFSET_X540, &word)) + word = NVM_VER_INVALID; + nvm_ver->nvm_major = ((word & NVM_EEP_MAJOR_MASK) + >> NVM_EEP_MAJ_SHIFT); + nvm_ver->nvm_minor = ((word & NVM_EEP_MINOR_MASK) + >> NVM_EEP_MIN_SHIFT); + nvm_ver->nvm_id = (word & NVM_EEP_ID_MASK); + break; + + case ixgbe_mac_X550: + case ixgbe_mac_X550EM_x: + case ixgbe_mac_X550EM_a: + /* version of eeprom section */ + if (ixgbe_read_eeprom(hw, NVM_EEP_OFFSET_X540, &word)) + word = NVM_VER_INVALID; + nvm_ver->nvm_major = ((word & NVM_EEP_MAJOR_MASK) + >> NVM_EEP_MAJ_SHIFT); + nvm_ver->nvm_minor = (word & NVM_EEP_X550_MINOR_MASK); + + break; + default: + break; + } + + /* phy version is mac-type specific */ + switch (hw->mac.type) { + case ixgbe_mac_X540: + case ixgbe_mac_X550: + case ixgbe_mac_X550EM_x: + case ixgbe_mac_X550EM_a: + /* intel phy firmware version */ + if (ixgbe_read_eeprom(hw, NVM_EEP_PHY_OFF_X540, &word)) + word = NVM_VER_INVALID; + nvm_ver->phy_fw_maj = ((word & NVM_PHY_MAJOR_MASK) + >> NVM_PHY_MAJ_SHIFT); + nvm_ver->phy_fw_min = ((word & NVM_PHY_MINOR_MASK) + >> NVM_PHY_MIN_SHIFT); + nvm_ver->phy_fw_id = (word & NVM_PHY_ID_MASK); + break; + default: + break; + } + + ixgbe_get_etk_id(hw, nvm_ver); + + /* devstarter image */ + if (ixgbe_read_eeprom(hw, NVM_DS_OFFSET, &word)) + word = NVM_VER_INVALID; + nvm_ver->devstart_major = ((word & NVM_DS_MAJOR_MASK) >> NVM_DS_SHIFT); + nvm_ver->devstart_minor = (word & NVM_DS_MINOR_MASK); + + /* OEM customization word */ + if (ixgbe_read_eeprom(hw, NVM_OEM_OFFSET, &nvm_ver->oem_specific)) + nvm_ver->oem_specific = NVM_VER_INVALID; + + /* vendor (not intel) phy firmware version */ + if (ixgbe_get_phy_firmware_version(hw, &phy_ver)) + phy_ver = NVM_VER_INVALID; + nvm_ver->phy_vend_maj = ((phy_ver & NVM_PHYVEND_MAJOR_MASK) + >> NVM_PHYVEND_SHIFT); + nvm_ver->phy_vend_min = (phy_ver & NVM_PHYVEND_MINOR_MASK); + + /* Option Rom may or may not be present. Start with pointer */ + ixgbe_get_orom_version(hw, nvm_ver); + return; +} /** * ixgbe_dcb_get_rtrup2tc_generic - read rtrup2tc reg diff --git a/sys/dev/ixgbe/ixgbe_common.h b/sys/dev/ixgbe/ixgbe_common.h index 0ff5c60d40af..a2da9c834f8f 100644 --- a/sys/dev/ixgbe/ixgbe_common.h +++ b/sys/dev/ixgbe/ixgbe_common.h @@ -141,6 +141,7 @@ s32 ixgbe_set_vlvf_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlvf_bypass); s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw); s32 ixgbe_find_vlvf_slot(struct ixgbe_hw *hw, u32 vlan, bool vlvf_bypass); +s32 ixgbe_toggle_txdctl_generic(struct ixgbe_hw *hw, u32 vind); s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed, @@ -195,6 +196,8 @@ void ixgbe_get_oem_prod_version(struct ixgbe_hw *hw, struct ixgbe_nvm_version *nvm_ver); void ixgbe_get_orom_version(struct ixgbe_hw *hw, struct ixgbe_nvm_version *nvm_ver); +void ixgbe_get_nvm_version(struct ixgbe_hw *hw, + struct ixgbe_nvm_version *nvm_ver); void ixgbe_disable_rx_generic(struct ixgbe_hw *hw); void ixgbe_enable_rx_generic(struct ixgbe_hw *hw); s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, diff --git a/sys/dev/ixgbe/ixgbe_features.h b/sys/dev/ixgbe/ixgbe_features.h index ed35a6ed458c..0cef334a185f 100644 --- a/sys/dev/ixgbe/ixgbe_features.h +++ b/sys/dev/ixgbe/ixgbe_features.h @@ -56,6 +56,7 @@ #define IXGBE_FEATURE_EEE (u32)(1 << 11) #define IXGBE_FEATURE_LEGACY_IRQ (u32)(1 << 12) #define IXGBE_FEATURE_NEEDS_CTXD (u32)(1 << 13) +#define IXGBE_FEATURE_RECOVERY_MODE (u32)(1 << 15) /* Check for OS support. Undefine features if not included in the OS */ #ifndef PCI_IOV diff --git a/sys/dev/ixgbe/ixgbe_rss.h b/sys/dev/ixgbe/ixgbe_rss.h index c00273587aaa..84c802671195 100644 --- a/sys/dev/ixgbe/ixgbe_rss.h +++ b/sys/dev/ixgbe/ixgbe_rss.h @@ -48,6 +48,7 @@ #define RSS_HASHTYPE_RSS_IPV6_EX (1 << 5) #define RSS_HASHTYPE_RSS_TCP_IPV6_EX (1 << 6) #define RSS_HASHTYPE_RSS_UDP_IPV4 (1 << 7) +#define RSS_HASHTYPE_RSS_UDP_IPV4_EX (1 << 8) #define RSS_HASHTYPE_RSS_UDP_IPV6 (1 << 9) #define RSS_HASHTYPE_RSS_UDP_IPV6_EX (1 << 10) diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index dbcc6544133e..a414e27142ec 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -202,6 +202,10 @@ #define IXGBE_FLA_X550EM_x IXGBE_FLA #define IXGBE_FLA_X550EM_a 0x15F68 #define IXGBE_FLA_BY_MAC(_hw) IXGBE_BY_MAC((_hw), FLA) +#define IXGBE_FLA_FL_SIZE_SHIFT_X540 17 +#define IXGBE_FLA_FL_SIZE_SHIFT_X550 12 +#define IXGBE_FLA_FL_SIZE_MASK_X540 (0x7 << IXGBE_FLA_FL_SIZE_SHIFT_X540) +#define IXGBE_FLA_FL_SIZE_MASK_X550 (0x7 << IXGBE_FLA_FL_SIZE_SHIFT_X550) #define IXGBE_EEMNGCTL 0x10110 #define IXGBE_EEMNGDATA 0x10114 @@ -284,6 +288,41 @@ #define IXGBE_I2C_CLK_OE_N_EN_BY_MAC(_hw) IXGBE_BY_MAC((_hw), I2C_CLK_OE_N_EN) #define IXGBE_I2C_CLOCK_STRETCHING_TIMEOUT 500 +/* NVM component version fields */ +#define NVM_VERSZ_LONG 64 +#define NVM_VERSZ_SHORT 32 +#define NVM_VER_LONG \ + "DS_%x.%x NVM_%x.%02x.%x PHY_%x.%02x.%x OEM_%04x EtkId_%x OR_%x.%x.%x\n" +#define NVM_VER_SHORT1 "%02x.%02x %x %x.%x.%x\n" +#define NVM_VER_SHORT2 "%02x.%02x.%x %x.%02x.%x %x %x.%x.%x\n" + +#define NVM_EEP_MAJOR_MASK 0xF000 +#define NVM_EEP_MINOR_MASK 0xFF0 +#define NVM_EEP_ID_MASK 0xF +#define NVM_EEP_MAJ_SHIFT 12 +#define NVM_EEP_MIN_SHIFT 4 + +#define NVM_EEP_OFFSET_82598 0x2A +#define NVM_EEP_OFFSET_X540 0x18 +#define NVM_EEP_X550_MINOR_MASK 0xFF +#define NVM_EEP_PHY_OFF_X540 0x19 +#define NVM_PHY_MAJOR_MASK 0xF000 +#define NVM_PHY_MINOR_MASK 0xFF0 +#define NVM_PHY_ID_MASK 0xF +#define NVM_PHY_MAJ_SHIFT 12 +#define NVM_PHY_MIN_SHIFT 4 + +#define NVM_DS_OFFSET 0x29 +#define NVM_DS_MAJOR_MASK 0xF000 +#define NVM_DS_MINOR_MASK 0xF +#define NVM_DS_SHIFT 12 + +#define NVM_OEM_OFFSET 0x2A + +#define NVM_PHYVEND_MAJOR_MASK 0xFF00 +#define NVM_PHYVEND_MINOR_MASK 0xFF +#define NVM_PHYVEND_SHIFT 8 + #define IXGBE_I2C_THERMAL_SENSOR_ADDR 0xF8 #define IXGBE_EMC_INTERNAL_DATA 0x00 #define IXGBE_EMC_INTERNAL_THERM_LIMIT 0x20 @@ -344,6 +383,16 @@ struct ixgbe_nvm_version { u16 or_build; u8 or_patch; + u8 phy_fw_maj; + u16 phy_fw_min; + u8 phy_fw_id; + + u8 devstart_major; + u8 devstart_minor; + u16 oem_specific; + + u8 phy_vend_maj; + u8 phy_vend_min; }; /* Interrupt Registers */ @@ -1443,6 +1492,7 @@ struct ixgbe_dmac_config { #define IXGBE_BARCTRL_FLSIZE 0x0700 #define IXGBE_BARCTRL_FLSIZE_SHIFT 8 #define IXGBE_BARCTRL_CSRSIZE 0x2000 +#define IXGBE_BARCTRL_CSRSIZE_SHIFT 13 /* RSCCTL Bit Masks */ #define IXGBE_RSCCTL_RSCEN 0x01 @@ -3414,6 +3464,7 @@ struct ixgbe_adv_tx_context_desc { #define IXGBE_ADVTXD_POPTS_RSV 0x00002000 /* POPTS Reserved */ #define IXGBE_ADVTXD_PAYLEN_SHIFT 14 /* Adv desc PAYLEN shift */ #define IXGBE_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */ +#define IXGBE_ADVTXD_MACLEN_MASK (0x7F << IXGBE_ADVTXD_MACLEN_SHIFT) /* Adv ctxt desc mac len mask */ #define IXGBE_ADVTXD_VLAN_SHIFT 16 /* Adv ctxt vlan tag shift */ #define IXGBE_ADVTXD_TUCMD_IPV4 0x00000400 /* IP Packet Type: 1=IPv4 */ #define IXGBE_ADVTXD_TUCMD_IPV6 0x00000000 /* IP Packet Type: 0=IPv6 */ @@ -4030,6 +4081,7 @@ struct ixgbe_mac_operations { s32 (*init_uta_tables)(struct ixgbe_hw *); void (*set_mac_anti_spoofing)(struct ixgbe_hw *, bool, int); void (*set_vlan_anti_spoofing)(struct ixgbe_hw *, bool, int); + s32 (*toggle_txdctl)(struct ixgbe_hw *hw, u32 vf_index); s32 (*update_xcast_mode)(struct ixgbe_hw *, int); s32 (*set_rlpml)(struct ixgbe_hw *, u16); From nobody Sat Sep 28 09:23:12 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 4XG21r34z8z5Y34P; Sat, 28 Sep 2024 09:23:12 +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 4XG21r22Nwz4qTs; Sat, 28 Sep 2024 09:23:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515392; 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=OZAwCZNRDMIi7xLfAbIyog1fwq7oVa1xIeqrj0JTxY4=; b=jzoPDMWPP97P9TQZ/9Lr4F8CfA49XtLlby0yIoTjnVxyZ2S5WEFGWJavBktYn8mArfeF9V 1s5r8rV0K+Z6UBMVZv8XCF//pK9I73bhStBtnFSS5dEjhrZRG0fB1xUQafOQYOw2dprFWw lgDBDKJUYlognj/mTdo3SxeerYU+cD/VQ+47Q/TzHRrwTqSAWBwJ3FNKsIlHSTPThA/SDL TL+uIsTBJuxEhaetj7S0VlqaZ7Pf+915uCP7TQBrcLuFmrcI3mu2wfXjSLQyXSdlUnGKKw cqyz6+I/EJtm+5g9TDl1CrJYgJFbDk5Tw3LqIJGig+Wyo4/gQLaGPuLngon3Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515392; 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=OZAwCZNRDMIi7xLfAbIyog1fwq7oVa1xIeqrj0JTxY4=; b=EVGpvzm3GXpkNqGdiGzc7WulLisEcpg/2dwDdXYxOYPzfUCmxU2KFvn50KUNLfCvig5Pdv sToDi3/Rz0elcl+pp/v7AG7nlNBy0bZ985fVG5vgMgyBzd3jtCHcuU1Xos2FJ6daONktfs AFD6xC44Nv+14HxjH56hnSdGtdxh6tft3fd7xfxLxfcmbhR/dYGCGhY1a6kPNvHrqjwotn 7ek1WkxiQb4HLlSAdhF45so8uEeIRm7VIT3jhudxTdFPixpvkjNT8dD9Dap0p+/uZ8fVLw tFFPRZSGwP11pBPLdvzBe1Cp1KaSa3l/bv01HRhfUkdExZ6Zf0Kf0C+n4aYo2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515392; a=rsa-sha256; cv=none; b=tm+lvrdNg5KKwZre5n+oIAGGpMKDaO1ROZ89Zb61gOcwWEv7fZkknNteVa3RbXqlZrby2k DGtS9l8h7+MkjAlon7L+fqk4/m8OzNwnG7LQnQo6OdRPiBNDvvNeiKjRA3/ryoAkTKxtU8 FXHQejKYqo0TmQyTxDkkbaOeY9m5HOjcghwmxJUpeNTT7oCKP2nFIyMKCDfj1LGY1bFG+f zqplvBXe/oMz94wXKOVoZpWoG5OzuK4UpbHbsy2LdZ8zeiQzN3oyUDHoZR/Thhm3sqV+0O xVTsL6s6QoeD9LrfhERVsFZ4OLTGm0EHaKHGeBq4J1+61LTSyJCaGnaitOQnWA== 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 4XG21r0nYgzJgT; Sat, 28 Sep 2024 09:23:12 +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 48S9NCHc076284; Sat, 28 Sep 2024 09:23:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9NCY6076281; Sat, 28 Sep 2024 09:23:12 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:23:12 GMT Message-Id: <202409280923.48S9NCY6076281@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: e9e57ee70bfa - stable/14 - ixgbe: update if_sriov with ix-3.3.38 changes 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: e9e57ee70bfac510c0efa9af7900540e489dacec Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=e9e57ee70bfac510c0efa9af7900540e489dacec commit e9e57ee70bfac510c0efa9af7900540e489dacec Author: Kevin Bowling AuthorDate: 2024-09-21 09:56:19 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:22:27 +0000 ixgbe: update if_sriov with ix-3.3.38 changes There are some critical fixes here. The PF must communicate with each VF slot (vf->pool), only VFs shall use 0 for everything. IXGBE_FEATURE_SRIOV needs to be set before calling ixgbe_if_init(). With these changes, ixv(4) now attaches to VFs, but after bringing up VFs, the PF and VF still are not correctly passing traffic. (cherry picked from commit b6cd053e6da9bb8f77d2c6069260e52bbd53fa4a) --- sys/dev/ixgbe/if_sriov.c | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index eab5ff8f5da0..6a2dad4bca42 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -95,26 +95,26 @@ ixgbe_align_all_queue_indices(struct ixgbe_softc *sc) /* Support functions for SR-IOV/VF management */ static inline void -ixgbe_send_vf_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) +ixgbe_send_vf_msg(struct ixgbe_hw *hw, struct ixgbe_vf *vf, u32 msg) { if (vf->flags & IXGBE_VF_CTS) msg |= IXGBE_VT_MSGTYPE_CTS; - ixgbe_write_mbx(&sc->hw, &msg, 1, vf->pool); + hw->mbx.ops[vf->pool].write(hw, &msg, 1, vf->pool); } static inline void ixgbe_send_vf_success(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) { msg &= IXGBE_VT_MSG_MASK; - ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_SUCCESS); + ixgbe_send_vf_msg(&sc->hw, vf, msg | IXGBE_VT_MSGTYPE_SUCCESS); } static inline void ixgbe_send_vf_failure(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) { msg &= IXGBE_VT_MSG_MASK; - ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_FAILURE); + ixgbe_send_vf_msg(&sc->hw, vf, msg | IXGBE_VT_MSGTYPE_FAILURE); } static inline void @@ -210,7 +210,7 @@ ixgbe_ping_all_vfs(struct ixgbe_softc *sc) for (int i = 0; i < sc->num_vfs; i++) { vf = &sc->vfs[i]; if (vf->flags & IXGBE_VF_ACTIVE) - ixgbe_send_vf_msg(sc, vf, IXGBE_PF_CONTROL_MSG); + ixgbe_send_vf_msg(&sc->hw, vf, IXGBE_PF_CONTROL_MSG); } } /* ixgbe_ping_all_vfs */ @@ -254,6 +254,17 @@ ixgbe_vf_set_default_vlan(struct ixgbe_softc *sc, struct ixgbe_vf *vf, IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf->pool), vmvir); } /* ixgbe_vf_set_default_vlan */ +static void +ixgbe_clear_vfmbmem(struct ixgbe_softc *sc, struct ixgbe_vf *vf) +{ + struct ixgbe_hw *hw = &sc->hw; + uint32_t vf_index = IXGBE_VF_INDEX(vf->pool); + uint16_t mbx_size = hw->mbx.size; + uint16_t i; + + for (i = 0; i < mbx_size; ++i) + IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_index), i, 0x0); +} /* ixgbe_clear_vfmbmem */ static boolean_t ixgbe_vf_frame_size_compatible(struct ixgbe_softc *sc, struct ixgbe_vf *vf) @@ -310,6 +321,8 @@ ixgbe_process_vf_reset(struct ixgbe_softc *sc, struct ixgbe_vf *vf) // XXX clear multicast addresses ixgbe_clear_rar(&sc->hw, vf->rar_index); + ixgbe_clear_vfmbmem(sc, vf); + ixgbe_toggle_txdctl(&sc->hw, IXGBE_VF_INDEX(vf->pool)); vf->api_ver = IXGBE_API_VER_UNKNOWN; } /* ixgbe_process_vf_reset */ @@ -371,7 +384,7 @@ ixgbe_vf_reset_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) vf->flags |= IXGBE_VF_CTS; - resp[0] = IXGBE_VF_RESET | ack | IXGBE_VT_MSGTYPE_CTS; + resp[0] = IXGBE_VF_RESET | ack; bcopy(vf->ether_addr, &resp[1], ETHER_ADDR_LEN); resp[3] = hw->mac.mc_filter_type; ixgbe_write_mbx(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN, vf->pool); @@ -582,7 +595,8 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) hw = &sc->hw; - error = ixgbe_read_mbx(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); + error = hw->mbx.ops[vf->pool].read(hw, msg, IXGBE_VFMAILBOX_SIZE, + vf->pool); if (error != 0) return; @@ -643,13 +657,13 @@ ixgbe_handle_mbx(void *context) vf = &sc->vfs[i]; if (vf->flags & IXGBE_VF_ACTIVE) { - if (hw->mbx.ops[0].check_for_rst(hw, vf->pool) == 0) + if (hw->mbx.ops[vf->pool].check_for_rst(hw, vf->pool) == 0) ixgbe_process_vf_reset(sc, vf); - if (hw->mbx.ops[0].check_for_msg(hw, vf->pool) == 0) + if (hw->mbx.ops[vf->pool].check_for_msg(hw, vf->pool) == 0) ixgbe_process_vf_msg(ctx, vf); - if (hw->mbx.ops[0].check_for_ack(hw, vf->pool) == 0) + if (hw->mbx.ops[vf->pool].check_for_ack(hw, vf->pool) == 0) ixgbe_process_vf_ack(sc, vf); } } @@ -698,8 +712,10 @@ ixgbe_if_iov_init(if_ctx_t ctx, u16 num_vfs, const nvlist_t *config) } sc->num_vfs = num_vfs; - ixgbe_if_init(sc->ctx); + ixgbe_init_mbx_params_pf(&sc->hw); + sc->feat_en |= IXGBE_FEATURE_SRIOV; + ixgbe_if_init(sc->ctx); return (retval); @@ -769,7 +785,7 @@ ixgbe_init_vf(struct ixgbe_softc *sc, struct ixgbe_vf *vf) ixgbe_vf_enable_transmit(sc, vf); ixgbe_vf_enable_receive(sc, vf); - ixgbe_send_vf_msg(sc, vf, IXGBE_PF_CONTROL_MSG); + ixgbe_send_vf_msg(&sc->hw, vf, IXGBE_PF_CONTROL_MSG); } /* ixgbe_init_vf */ void From nobody Sat Sep 28 09:23:13 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 4XG21s3lmJz5Y396; Sat, 28 Sep 2024 09:23:13 +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 4XG21s2ZC2z4qNs; Sat, 28 Sep 2024 09:23:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515393; 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=vfx2iuC5QSuHrU0pHdLabzZVEPMTyGjCzydUgVLtx9I=; b=jSqBXeON+egllnIBtCTLy7XRXr0yUhCrD2FRu8tneFsG7kLnOQ1Cha0owJ4mZHUz47YuEA Mlr5h2NA2B+5vQ0noyG53Jdrpcr3Q70f9L1ckmHGz/bzsn/qV16IBKUy6d6OPX0qFlRwjI qqcEabcerXaPQ7qfEf6GGWy7/dmrX/fiyinazqbam4Ir90jCg3ikijQyezx8Bt3CA9/lPI rZ/yg/9e9AM/aqUGzCLdiCWCuI6BvqXfKWYHSogVNR6flBsUyhlCjzNvhIxscLOI/Htbtm qH7EeP8HlwluMDU/7y+FTQqWkbNAc8TLUxs8gSer6V4b9XuioFSTdO5L3teiLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515393; 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=vfx2iuC5QSuHrU0pHdLabzZVEPMTyGjCzydUgVLtx9I=; b=T4s+brY9TUNcm8c4Z9Arl87VpAkpGQGI09s4mUvR7bo1KhrPM53DcrYD9x/vi38N4YyWDT whvTmTYGhksSdxpJ5GP1zYr/1ltULVdDlQ/9RdnFL77KIko74aaHWnVY2QkxFVDfFVhnCO 8EALJP0FCxkUh8GXQtwQy39ZBTWC199MJDb0V5kUESRVwXvNfnxploQhuRBk0EuvO6kf2j 12tsQDjldTVMsLH4Y0IG0JbqtfDI5sL620B072FWCyKgli93Ak6rGB1dp5Z6aywEly5X69 SrNkoPO4aorc+sqzLYGi7x+bXoqk3hVHRNhpAWMtThvKHF4xCBt62rtYtTEkUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515393; a=rsa-sha256; cv=none; b=bFUzY77HOmnlbN4esPPtBp9s3AZNO86YId1jO2UGfv4vtQdsfH16lftNwYEeAtOXn4bHfg tR17iHwf/NIpFF70iDGa2TKwRnLD3KSrpMrjde47Rl8qboamGhgBj0oajYwXIqhA9pkMhD /9YZZByqCmfOxg55PUwD47aKJRfLH8LMvw+b1STbPCwmYqfZ2NDd7WfZUxckKipuxhjx4L Lmg+28mlxO9Zb4bF//sXyCJCUSz40oASasK4byR1sFVQJPiuRimDoxQ8/dfV5se3XcIJu0 /2yn2AX0Q41p2o91P/dzJqA0NJO5mgJGbqCk/m2Icfg0kbe2vrkSCSOWi8oo/Q== 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 4XG21s29ryzJrK; Sat, 28 Sep 2024 09:23:13 +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 48S9ND4g076325; Sat, 28 Sep 2024 09:23:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9ND7r076322; Sat, 28 Sep 2024 09:23:13 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:23:13 GMT Message-Id: <202409280923.48S9ND7r076322@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: edf4f6a6ecd4 - stable/14 - ixgbe: fix fw_recovery_mode callout 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: edf4f6a6ecd402c1aafb76f131b507f90191da19 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=edf4f6a6ecd402c1aafb76f131b507f90191da19 commit edf4f6a6ecd402c1aafb76f131b507f90191da19 Author: Kevin Bowling AuthorDate: 2024-09-21 11:10:11 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:22:42 +0000 ixgbe: fix fw_recovery_mode callout Need to pass the softc in with the callout arg (cherry picked from commit a924b5ee6a1b4456b5bde979bb9e15d18726de4f) --- sys/dev/ixgbe/if_ix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 74bde3497279..80f288a4ccf0 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1150,7 +1150,7 @@ ixgbe_if_attach_post(if_ctx_t ctx) callout_init(&sc->fw_mode_timer, true); /* Start the task */ - callout_reset(&sc->fw_mode_timer, hz, ixgbe_fw_mode_timer, 0); + callout_reset(&sc->fw_mode_timer, hz, ixgbe_fw_mode_timer, sc); } return (0); From nobody Sat Sep 28 09:26:06 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 4XG25B5hC1z5Y37j; Sat, 28 Sep 2024 09:26:06 +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 4XG25B55bMz4s68; Sat, 28 Sep 2024 09:26:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515566; 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=+kk7FKllKclOht/KaL9GzAAewi3CkyQKtzPBmSlgpLg=; b=FTh77R+8Kw0B5fuFrMAwFVXbsGZkrAtxYwKLMvo01/mBlfEtFs0CD53wSXp7K8jNKuvMtu mbeHVtoleBAZEvjmZQvKofIdkpxygPKrwBbPz4Gnuceb1LnFZ0xzyOYTAkfxzvneNDkd3m 3JhE5vZbpAAyeYMDbgt15SDxYqbhhwZnm+MDJ4ksa+u69dEehv2Hll/4MIEdcZ8qtCLzjo lRqGmpg5KLqddO9pdkfEgPRYIjZtspTo9DY9O2Cg9nd/snCJhL+ssaMbkpxENA9w/HFSSk nd7bKpnI55lQqoBFhJqjge5umWBI/Qr6qTEHv0igvtbveeKyDHNIMDeKJqOveQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515566; 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=+kk7FKllKclOht/KaL9GzAAewi3CkyQKtzPBmSlgpLg=; b=ffBp4WObEp7/O3wYBSxGcGaTJd3v4T2rsNrHBaIdJVYqNGVOAe71aC7OuNp+o9YnhOFCdG 2Eb9/R3JnaoIp7baz/mbl8x0965p7cq4w6i0/V49B+ntxYBrZHWfYVYLPuU+tSKNJNyMfi /1tcvbDDixF4l2Fq4yW8X8BWvyFVHMp1YXrsuBqhnbo+S/owL41m8Dcex57rUSxbOftJfE FuCPbKBUJw6hBv7BokkvDcTPXGsro6e5eUj9SPFMCRnzYg3jy7BXQOG8L3iDhJJqgMCBlx DeB5vmfES8Pd+4BU9lxgx+jcKLBqlfPK1OEuFrU4crJmu4pMPcYfdtOtDsdCxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515566; a=rsa-sha256; cv=none; b=Ur871geYFKzzGDOwkWKctxyo43RbRqUPMjHbveMXGwKKqPH81nwnhh8m3VGscpYocbbs0a faTROt3eUY6DLl1QrsXoVOQWHbquprNpdBz3G1IvbACnAA+OjWv87u+0YAuENAMf5/TJod 6nwHZaqWan5d//OpSHTXr9tnuYjf1BqVfY8blM5w+9nf0EZCJGHiFJCBcYW3Im2plnjCQD BZpWu0i9cSw8ys9YfHgnHb4VsplNRTIkCD4etAuhH6K0Ucvl5NcFQMKadqD4S/BUvBSagw 9y9bHu1cL56gcfdKlsnkywA7UU0SzaatDeUYNQjaBgSKwvEjc0QjygKk2slBTA== 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 4XG25B4YRTzK43; Sat, 28 Sep 2024 09:26:06 +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 48S9Q6bI077002; Sat, 28 Sep 2024 09:26:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9Q6Pj076999; Sat, 28 Sep 2024 09:26:06 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:26:06 GMT Message-Id: <202409280926.48S9Q6Pj076999@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: a446e9481531 - stable/13 - e1000: Update igb driver version to 2.5.28-fbsd 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/13 X-Git-Reftype: branch X-Git-Commit: a446e9481531807cdb4aa3427a339f0b8aa7970f Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a446e9481531807cdb4aa3427a339f0b8aa7970f commit a446e9481531807cdb4aa3427a339f0b8aa7970f Author: Kevin Bowling AuthorDate: 2024-09-21 06:27:54 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:24:09 +0000 e1000: Update igb driver version to 2.5.28-fbsd Bump to the current out of tree driver version since we only have some gratuitous changes. (cherry picked from commit ddfec1fb6814088abc5805f45c4a18c5731d51b9) --- sys/dev/e1000/e1000_base.c | 3 ++- sys/dev/e1000/e1000_i210.c | 14 +++++++------- sys/dev/e1000/e1000_phy.c | 2 +- sys/dev/e1000/if_em.c | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/sys/dev/e1000/e1000_base.c b/sys/dev/e1000/e1000_base.c index d83dc48c4d4d..ae44a0b91aac 100644 --- a/sys/dev/e1000/e1000_base.c +++ b/sys/dev/e1000/e1000_base.c @@ -162,7 +162,8 @@ void e1000_rx_fifo_flush_base(struct e1000_hw *hw) rfctl |= E1000_RFCTL_IPV6_EX_DIS; E1000_WRITE_REG(hw, E1000_RFCTL, rfctl); - if (!(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN)) + if (hw->mac.type != e1000_82575 || + !(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN)) return; /* Disable all Rx queues */ diff --git a/sys/dev/e1000/e1000_i210.c b/sys/dev/e1000/e1000_i210.c index c7ca56914dba..4005034d7d31 100644 --- a/sys/dev/e1000/e1000_i210.c +++ b/sys/dev/e1000/e1000_i210.c @@ -362,7 +362,7 @@ s32 e1000_read_invm_version(struct e1000_hw *hw, E1000_INVM_RECORD_SIZE_IN_BYTES); u32 buffer[E1000_INVM_SIZE]; s32 status = -E1000_ERR_INVM_VALUE_NOT_FOUND; - u16 version = 0; + u16 nvm_version = 0; DEBUGFUNC("e1000_read_invm_version"); @@ -379,14 +379,14 @@ s32 e1000_read_invm_version(struct e1000_hw *hw, /* Check if we have first version location used */ if ((i == 1) && ((*record & E1000_INVM_VER_FIELD_ONE) == 0)) { - version = 0; + nvm_version = 0; status = E1000_SUCCESS; break; } /* Check if we have second version location used */ else if ((i == 1) && ((*record & E1000_INVM_VER_FIELD_TWO) == 0)) { - version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; + nvm_version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; status = E1000_SUCCESS; break; } @@ -397,7 +397,7 @@ s32 e1000_read_invm_version(struct e1000_hw *hw, else if ((((*record & E1000_INVM_VER_FIELD_ONE) == 0) && ((*record & 0x3) == 0)) || (((*record & 0x3) != 0) && (i != 1))) { - version = (*next_record & E1000_INVM_VER_FIELD_TWO) + nvm_version = (*next_record & E1000_INVM_VER_FIELD_TWO) >> 13; status = E1000_SUCCESS; break; @@ -408,16 +408,16 @@ s32 e1000_read_invm_version(struct e1000_hw *hw, */ else if (((*record & E1000_INVM_VER_FIELD_TWO) == 0) && ((*record & 0x3) == 0)) { - version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; + nvm_version = (*record & E1000_INVM_VER_FIELD_ONE) >> 3; status = E1000_SUCCESS; break; } } if (status == E1000_SUCCESS) { - invm_ver->invm_major = (version & E1000_INVM_MAJOR_MASK) + invm_ver->invm_major = (nvm_version & E1000_INVM_MAJOR_MASK) >> E1000_INVM_MAJOR_SHIFT; - invm_ver->invm_minor = version & E1000_INVM_MINOR_MASK; + invm_ver->invm_minor = nvm_version & E1000_INVM_MINOR_MASK; } /* Read Image Type */ for (i = 1; i < invm_blocks; i++) { diff --git a/sys/dev/e1000/e1000_phy.c b/sys/dev/e1000/e1000_phy.c index dcce60fc50d5..4e2afc43a684 100644 --- a/sys/dev/e1000/e1000_phy.c +++ b/sys/dev/e1000/e1000_phy.c @@ -1037,7 +1037,7 @@ static s32 e1000_set_master_slave_mode(struct e1000_hw *hw) break; case e1000_ms_auto: phy_data &= ~CR_1000T_MS_ENABLE; - /* FALLTHROUGH */ + break; default: break; } diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 5c62eef489d2..b1883d5cc9ab 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -37,7 +37,7 @@ * Driver version: *********************************************************************/ static const char em_driver_version[] = "7.7.8-fbsd"; -static const char igb_driver_version[] = "2.5.19-fbsd"; +static const char igb_driver_version[] = "2.5.28-fbsd"; /********************************************************************* * PCI Device ID Table From nobody Sat Sep 28 09:26:07 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 4XG25C6vS1z5Y2tk; Sat, 28 Sep 2024 09:26:07 +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 4XG25C6B5kz4s1j; Sat, 28 Sep 2024 09:26:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515567; 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=hnbsP/Z6xdEGiU+lactcjYUv6XoLh7qIXva9HiDRYnc=; b=aElHjO/JQfm1WJ9hAKoE03peuLLjNcv6Aq62/9WVqjmTrjnf8coznZ9D/KWK+ePZhIsqoG YidFb4QvpkeXmzttpFi16YAD1ZFRNnRk0nHCSuCBC6QUm3DvNLWawYd83dUe1vQQWlYqiW SRDZjZ50yYrFD3LGBn1K/3fw8r1PSrAK2R0k0tn4L5p2svKkLqFgn4Sv8geYgBNTx0QguK KLzUQGmr2D2QYMhWlMxxZxz73To8KRjli4sThCRFjuDAudUiDE5b1r4hvJIS+JpC9tIWdT X11Udd4+5yqozfRHIXxQ+zeaC5y7XvV7ZdDyPl/PCgyTAeA9CHfkTiiyaBV0TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515567; 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=hnbsP/Z6xdEGiU+lactcjYUv6XoLh7qIXva9HiDRYnc=; b=ilLGDPurUcJUxh0gQENgDLvyT2VxmTFaq0lY8yOZ8sv0mAPHjI9v6QhtDqN2dhZvkRW0r8 u0oMT/xsekHlerM1LpHYp8LzMnqH0nGRorpxSn7aOfUSNYe9Li+zHW5HpWcGOEuetHdhLB ULef8yGr6GBF/CmlrBdmcyyixzrf530fSRUvhqvXQ7rtJ5GJrs+/3QULc4O+FA06JOavgy wmgDM5z9ZA/6Zs3pBbQTb9XmGww9JMPW0hiK9Nhu29x+AvhFlGjCPJCt7fuTKzbOOMElEO pdlzS9YeobWU/gBHQmzXF72kc8xrex97bu0ImartEohCzhnzvQqsYfO1ZJVZRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515567; a=rsa-sha256; cv=none; b=vwpqyJyH9+XahDqf6c0do0zN77CJSK+4YFLntfPRo6kkcIdNqPDKoUAYE2BueaHQth3QTz 6+w424WyWrCLYPfjdxLrnQVWH6ywCfDXwb6zw5Te887G1Vb8bcoA7aEzFCh+gtqVOZsgCG 17+Slv9T12qv/40bm/wqCqwgXLUI8YEKK4Uc2wNybeXgnIuxapfFRRs81rLRuDfTSSRhvM YMMq3qD5X8fNftvmqzD8XmW9UuImfwOxU02SDLXs9Zi+Fzo8sLeyXlOGAPZXfe3DqwxBQf crzWja1tIRFg2wIGAX3TZILIneV/IaURT44Pko8zp0WCAKmLVlroQaMWmFTGlQ== 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 4XG25C5S9PzJdD; Sat, 28 Sep 2024 09:26:07 +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 48S9Q7Zi077044; Sat, 28 Sep 2024 09:26:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9Q7dc077041; Sat, 28 Sep 2024 09:26:07 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:26:07 GMT Message-Id: <202409280926.48S9Q7dc077041@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: 5121d1b91209 - stable/13 - ixgbe: update if_bypass to ix-3.3.38 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/13 X-Git-Reftype: branch X-Git-Commit: 5121d1b9120958f7c14dc8e2db779bf73c1f9fcf Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=5121d1b9120958f7c14dc8e2db779bf73c1f9fcf commit 5121d1b9120958f7c14dc8e2db779bf73c1f9fcf Author: Kevin Bowling AuthorDate: 2024-09-21 09:39:54 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:24:31 +0000 ixgbe: update if_bypass to ix-3.3.38 Bring if_bypass up to date with changes in the out of tree driver Drop NEEDGIANT as the sysctl handlers have internal mutex for state changes. (cherry picked from commit c41a0eeea0d69264317401dd3fac46be160081b5) --- sys/dev/ixgbe/if_bypass.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/sys/dev/ixgbe/if_bypass.c b/sys/dev/ixgbe/if_bypass.c index e9ea77dfb49c..166150d75cc6 100644 --- a/sys/dev/ixgbe/if_bypass.c +++ b/sys/dev/ixgbe/if_bypass.c @@ -530,8 +530,7 @@ ixgbe_bp_wd_reset(SYSCTL_HANDLER_ARGS) error = IXGBE_BYPASS_FW_WRITE_FAILURE; break; } - error = hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL1, &reset_wd); - if (error != 0) { + if (hw->mac.ops.bypass_rw(hw, BYPASS_PAGE_CTL1, &reset_wd)) { error = IXGBE_ERR_INVALID_ARGUMENT; break; } @@ -745,8 +744,7 @@ ixgbe_bypass_init(struct ixgbe_softc *sc) */ SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "bypass_log", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "bypass_log", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, ixgbe_bp_log, "I", "Bypass Log"); /* All other setting are hung from the 'bypass' node */ @@ -757,39 +755,39 @@ ixgbe_bypass_init(struct ixgbe_softc *sc) bp_list = SYSCTL_CHILDREN(bp_node); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "version", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + OID_AUTO, "version", CTLTYPE_INT | CTLFLAG_RD, sc, 0, ixgbe_bp_version, "I", "Bypass Version"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_set_state, "I", "Bypass State"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "timeout", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "timeout", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_timeout, "I", "Bypass Timeout"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "main_on", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "main_on", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_main_on, "I", "Bypass Main On"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "main_off", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "main_off", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_main_off, "I", "Bypass Main Off"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "aux_on", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "aux_on", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_aux_on, "I", "Bypass Aux On"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "aux_off", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "aux_off", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_aux_off, "I", "Bypass Aux Off"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "wd_set", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + OID_AUTO, "wd_set", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_bp_wd_set, "I", "Set BP Watchdog"); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), bp_list, - OID_AUTO, "wd_reset", CTLTYPE_INT | CTLFLAG_WR | CTLFLAG_NEEDGIANT, + OID_AUTO, "wd_reset", CTLTYPE_INT | CTLFLAG_WR, sc, 0, ixgbe_bp_wd_reset, "S", "Bypass WD Reset"); sc->feat_en |= IXGBE_FEATURE_BYPASS; From nobody Sat Sep 28 09:26:08 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 4XG25F1f2tz5Y2tl; Sat, 28 Sep 2024 09:26:09 +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 4XG25D6xQ8z4rwl; Sat, 28 Sep 2024 09:26:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515569; 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=BU0Z5suMuFOunzIzv5Teu4vWkICOGd9VpJcSAQuoKt0=; b=CyBB1IdXiu8mil/EccUQOgjVXfVAIMismqO3weyMrWqFuMYnawDAvn6O8KzL2ZnBWw0lpg YwENV8pMIsgyG1aptJqAVKCCo89mBz2b7WqJtyIBNgwyJ7bq3WT20BJSF2aaltsNllgVL5 PZmynC5um9mFJC53cFGOy04qC/bSJrZFBj/m/A4hrutL2Ne8l8r8qz6kzJ5TlPbQHdsXxE AXLK3EWh7nEJh3RkrAyekdaY7b4LuEQ0I6qwlfWbLBXd2N8JxF34XREJeEhokouEZgTgmZ qizsiR6d9yVGLQ23h5Tm7yW/N+WtVMQsCZ5ahlQ4BGTi282yQ20KRLiAlNjAkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515569; 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=BU0Z5suMuFOunzIzv5Teu4vWkICOGd9VpJcSAQuoKt0=; b=mFTitbw4tqbbrnn2mnPCuDbclVBDlmcBGSa2Zk0LMmxlak8A1Wy1Z5HgQpzmp+P9fayY8A dIbr49rU66/nso40g2AmaCNiWuUcJE5bt1z3hhCrc4yk3l0jPU3BG/YmvXRRm6hTiaSIYp aMhXku9Oo94+DtyF43ENZklGglUdEVozvj2q9vDXKa0ms1Gbtz1FTheICSbgJhMVT8pJZi HexQb4e6rtcAgXJxq5NA5LCOTDe9dtR2HWi9UU+KtaB1fJLf623YhlxqdW8EPW+to+VOac a4HW0Y/gZEyRi53u9jYyPHHufcRg0qyj4DMf74dkPx6FkDRlFnjPx3wx6b0fow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515569; a=rsa-sha256; cv=none; b=KXH+f5WbSL5wqOEQlPPj/5AVy7mMFKzsxpFZGdw/kzAjeFvYJY2FHffbkLI/rSeRzb0x3X c2o6dRJscGQ33pBkW8heayTABXCTf2AsjcGDuS7U7CWHmwMfgM1/TOSZVFx2ujzdLwCDdP 0CrhRqCIJHUF1Jz8cTNQF0VSG34f5Kn0GBjPLkiWF9rqZxlGZryKdQYbufaryb7+boGfkn s2XTtW+d9wzajnkk+SqLv7vEtMcV/OE0cORhhfw0Ae4t7ZK5S73uZHMAsjgieBRDRzMD16 e+ejwusqLS/d2Uq1VKsLV+n+/AP1tV0AH2mdjgu7N73ubo7MPpTsgg560nWcew== 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 4XG25D6Mx2zK71; Sat, 28 Sep 2024 09:26:08 +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 48S9Q87L077089; Sat, 28 Sep 2024 09:26:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9Q8Fs077086; Sat, 28 Sep 2024 09:26:08 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:26:08 GMT Message-Id: <202409280926.48S9Q8Fs077086@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: b1dadbcebdfd - stable/13 - ixgbe: update ixgbe_phy with ix-3.3.38 changes 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/13 X-Git-Reftype: branch X-Git-Commit: b1dadbcebdfd3e711f792f9aa8cbaeb063e1ce91 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=b1dadbcebdfd3e711f792f9aa8cbaeb063e1ce91 commit b1dadbcebdfd3e711f792f9aa8cbaeb063e1ce91 Author: Kevin Bowling AuthorDate: 2024-09-21 09:45:12 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:24:44 +0000 ixgbe: update ixgbe_phy with ix-3.3.38 changes (cherry picked from commit e06918b94ac44448272a9d6747dcdba142e18b58) --- sys/dev/ixgbe/ixgbe_phy.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index c2f23179476b..e3f311473c38 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1487,6 +1487,11 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) hw->phy.type = ixgbe_phy_sfp_intel; break; default: + if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) + hw->phy.type = ixgbe_phy_sfp_passive_unknown; + else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) + hw->phy.type = ixgbe_phy_sfp_active_unknown; + else hw->phy.type = ixgbe_phy_sfp_unknown; break; } @@ -1495,10 +1500,6 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) /* Allow any DA cable vendor */ if (cable_tech & (IXGBE_SFF_DA_PASSIVE_CABLE | IXGBE_SFF_DA_ACTIVE_CABLE)) { - if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) - hw->phy.type = ixgbe_phy_sfp_passive_unknown; - else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) - hw->phy.type = ixgbe_phy_sfp_active_unknown; status = IXGBE_SUCCESS; goto out; } From nobody Sat Sep 28 09:26:09 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 4XG25G3hpDz5Y3BQ; Sat, 28 Sep 2024 09:26:10 +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 4XG25G1Cdcz4s4x; Sat, 28 Sep 2024 09:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515570; 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=IqHr9WswOV0kIX8n0AonxEpqLRDZ6Fm9eBEaRd/vSnw=; b=H05AgNGsXsOolo4EHoBwRB6s/PJRxdPB7Ji5Y2tU6euOJa+LtuI+LXMjHzqVoPAcfY+E7W rmaGP+lL170DZgJeUYIWvjsTxEUXt9WZrzdV2zjLSI/VRkk5zZv1UgEyukAOFqzvlnwYnA ohQwCUOvQ42z3ctnZ0L4gjnZ/pWg9Ysi1E82RHOAhMARQJBWZmR1EpHfmdM0kfMLXFDDXu NNoP9g4XHIuk4WjOChG6KVqaTNYbE2Dl6A2FTXVD2uOBr7vuhCnNTbgOOssAgR0yaT4t0O aWFFOEJzR39kkb88Ul84gmfPFf6AsL664ldeddBwgiC1Uk/fvC5AHFoPFHQlrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515570; 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=IqHr9WswOV0kIX8n0AonxEpqLRDZ6Fm9eBEaRd/vSnw=; b=UboW/JfgWcg8YnGTx1XLESWZZoMKQwXJWNd0Tz2Hk0E/xuXwN7p9LuPPuWXgzW8rVg3vK0 imirqfSOdEnXvs/Sl5Tqt0b/JvDdlcKT7T8RJo0kYD+sEMlskbEU7DtQd/j+fa09x6ZPu2 EKqWnf0FuAyo5SQtBTz8viE1qcfYGlzj88UvtzL45g0CK3Sqd8MVhfc0k2LiPmeGKIkGeq DC7NKBbZOOtPa3HaZLGO5PP5XNxlsBnLq2D2pSG60911iYJFo59T/VqRjU8MAlYLX3ypA8 NHkE3pMyxNxRjZ9UjOqedZOECviRBAzbRjSGH5qOJhtbCWPsFE1mxjUiFMPPXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515570; a=rsa-sha256; cv=none; b=v0+86FANKqy99f88GKJF7jJxUdHldzAtSFHbR22nH7FG/RTTtrSWccacmCreLeUtVTT2Zz bD+b75PBTTbjsHzrFlzTJ/kFPb86cj+DM4oBIAw2LppiBSrYbFhehwUzNHR+ruSMgj4I1/ XnXJdqNfJ8pTpIqgBIl7nQVSK2T6i/slFDSFHffR2H7mGdYW2W7W36M7vFVM2zLhpf4FgU SxfZ67XeeNp7DCdSudqhCmGEktu/xgga7QIyBvy9gUln/UbV69Xyorf+Po1xgTMPBsET6K 2/JjaL3kFwLqta4eGq2Xxvu9JaK51dKRzhy3Bg+MfpkRM2BRggix5GEQdkFGuA== 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 4XG25G0SjHzK44; Sat, 28 Sep 2024 09:26:10 +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 48S9Q9AS077134; Sat, 28 Sep 2024 09:26:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9Q9NW077131; Sat, 28 Sep 2024 09:26:09 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:26:09 GMT Message-Id: <202409280926.48S9Q9NW077131@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: fa00169e26ff - stable/13 - ixgbe: update ixgbe_mbx with ix-3.3.38 changes 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/13 X-Git-Reftype: branch X-Git-Commit: fa00169e26ff91ae1aa62a00f6a5a57068442a2e Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=fa00169e26ff91ae1aa62a00f6a5a57068442a2e commit fa00169e26ff91ae1aa62a00f6a5a57068442a2e Author: Kevin Bowling AuthorDate: 2024-09-21 09:47:11 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:24:57 +0000 ixgbe: update ixgbe_mbx with ix-3.3.38 changes (cherry picked from commit 0acea458f82d95b75193bf6ce6321906032abf40) --- sys/dev/ixgbe/ixgbe_mbx.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ sys/dev/ixgbe/ixgbe_mbx.h | 1 + 2 files changed, 45 insertions(+) diff --git a/sys/dev/ixgbe/ixgbe_mbx.c b/sys/dev/ixgbe/ixgbe_mbx.c index 0a0c5abde157..5f1f64e02b82 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.c +++ b/sys/dev/ixgbe/ixgbe_mbx.c @@ -199,6 +199,26 @@ s32 ixgbe_check_for_rst(struct ixgbe_hw *hw, u16 mbx_id) return ret_val; } +/** + * ixgbe_clear_mbx - Clear Mailbox Memory + * @hw: pointer to the HW structure + * @mbx_id: id of mailbox to write + * + * Set VFMBMEM of given VF to 0x0. + **/ +s32 ixgbe_clear_mbx(struct ixgbe_hw *hw, u16 mbx_id) +{ + struct ixgbe_mbx_info *mbx = &hw->mbx; + s32 ret_val = IXGBE_ERR_CONFIG; + + DEBUGFUNC("ixgbe_clear_mbx"); + + if (mbx->ops[mbx_id].clear) + ret_val = mbx->ops[mbx_id].clear(hw, mbx_id); + + return ret_val; +} + /** * ixgbe_poll_for_msg - Wait for message notification * @hw: pointer to the HW structure @@ -658,6 +678,7 @@ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) mbx->ops[0].check_for_msg = ixgbe_check_for_msg_vf; mbx->ops[0].check_for_ack = ixgbe_check_for_ack_vf; mbx->ops[0].check_for_rst = ixgbe_check_for_rst_vf; + mbx->ops[0].clear = NULL; mbx->stats.msgs_tx = 0; mbx->stats.msgs_rx = 0; @@ -1054,6 +1075,27 @@ static s32 ixgbe_read_mbx_pf(struct ixgbe_hw *hw, u32 *msg, u16 size, return IXGBE_SUCCESS; } +/** + * ixgbe_clear_mbx_pf - Clear Mailbox Memory + * @hw: pointer to the HW structure + * @vf_id: the VF index + * + * Set VFMBMEM of given VF to 0x0. + **/ +static s32 ixgbe_clear_mbx_pf(struct ixgbe_hw *hw, u16 vf_id) +{ + u16 mbx_size = hw->mbx.size; + u16 i; + + if (vf_id > 63) + return IXGBE_ERR_PARAM; + + for (i = 0; i < mbx_size; ++i) + IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_id), i, 0x0); + + return IXGBE_SUCCESS; +} + /** * ixgbe_init_mbx_params_pf_id - set initial values for pf mailbox * @hw: pointer to the HW structure @@ -1072,6 +1114,7 @@ void ixgbe_init_mbx_params_pf_id(struct ixgbe_hw *hw, u16 vf_id) mbx->ops[vf_id].check_for_msg = ixgbe_check_for_msg_pf; mbx->ops[vf_id].check_for_ack = ixgbe_check_for_ack_pf; mbx->ops[vf_id].check_for_rst = ixgbe_check_for_rst_pf; + mbx->ops[vf_id].clear = ixgbe_clear_mbx_pf; } /** @@ -1147,6 +1190,7 @@ void ixgbe_upgrade_mbx_params_pf(struct ixgbe_hw *hw, u16 vf_id) mbx->ops[vf_id].check_for_msg = ixgbe_check_for_msg_pf; mbx->ops[vf_id].check_for_ack = ixgbe_check_for_ack_pf; mbx->ops[vf_id].check_for_rst = ixgbe_check_for_rst_pf; + mbx->ops[vf_id].clear = ixgbe_clear_mbx_pf; mbx->stats.msgs_tx = 0; mbx->stats.msgs_rx = 0; diff --git a/sys/dev/ixgbe/ixgbe_mbx.h b/sys/dev/ixgbe/ixgbe_mbx.h index 3a9bd34a137f..e6519963242e 100644 --- a/sys/dev/ixgbe/ixgbe_mbx.h +++ b/sys/dev/ixgbe/ixgbe_mbx.h @@ -195,6 +195,7 @@ s32 ixgbe_write_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size, u16 mbx_id); s32 ixgbe_check_for_msg(struct ixgbe_hw *hw, u16 mbx_id); s32 ixgbe_check_for_ack(struct ixgbe_hw *hw, u16 mbx_id); s32 ixgbe_check_for_rst(struct ixgbe_hw *hw, u16 mbx_id); +s32 ixgbe_clear_mbx(struct ixgbe_hw *hw, u16 vf_number); void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw); void ixgbe_upgrade_mbx_params_vf(struct ixgbe_hw *hw); void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw); From nobody Sat Sep 28 09:26:11 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 4XG25H3nV6z5Y3DD; Sat, 28 Sep 2024 09:26:11 +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 4XG25H1pxjz4s8c; Sat, 28 Sep 2024 09:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515571; 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=nEmPEEq1pq4kwoVAf05z6NEK20K+wONN0WOXbjGwPYE=; b=dzYa7p8pThIQgtgxXPPMgwjhJE3shLhQAD6RMHo+XknIiUwwy1y3ccqGIlQL+BXtVG8MBy YDBRF0fB6Qm6XyDdXdQWmCtPp32Oa4eAnEAHQ35k784+0pApkB7QuWn1Kvbq1+K4ijKlyw cHhGa6pW9eH/zMl/zZFcRvf6zmgS5ngbgk5ZLIzxM4LM/o+S1DmwSOYrjvdWj33TEkyF1E pnRjmzOshhYSvuM6z3/36Vj+32z8U0wkcf25D1EURyZHlP27IduGdOmaips2K5Z3o4lv2K /Qk9aFSz0WARFXKip5yvmSJtkx7YW68YHHZ/wKQY70/Z/ATKZq57idkkqypbCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515571; 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=nEmPEEq1pq4kwoVAf05z6NEK20K+wONN0WOXbjGwPYE=; b=jwPhPc70KjEQwmajYUe8UJEl6vbDiKQagwDeG87I72V3fsyfTBizEWiWbv84xcHhE9pcis uAJ7oEIaL+6R+SlL8707ko7gnPykFpx0SC8jsdplAyJAQTT0D9476O97P8FCX5QTFxQVE3 +cp/YJbnQpLnUUtYl/AgfE+P4TBle3KUDF3OdH/eyo+PGqMh8aqztzPNGJFUkxonaFlFBf rhG2STA4rLmVsrMAQ+OmCR1q9IwVdj8ke+KDSnLpGOmrZ7kwbnU2coyHyxA85jw/4Kxvr7 vr07m1uy42SoyJlVZsYoU9Hn8r82H+i8SKTbVr2xuUK7LN4D1+T1YArFnT7zoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515571; a=rsa-sha256; cv=none; b=RtObB/6O2Lrn4adY6CGWBryPe4Un9aVe3zhbZ31hMqZwmYzPOWIhwXW+yiJUXK4Qjlr9Qq 9jfdCxlYL1+i53V6uiLuDsu7+r5rU4b5Re9ca6/hgJ2AaQ4Uc5HsA5BsMPcpMqOeaSBwVJ YYbkBzy88tcp4AIfikS4/Zhi80rf7l4yum26MaaEzFbpygs0bCfHe04lLUS1M7VZCIqa/B PswH6C1w631anv1aA21fFza1xk7Cra0F2fMnThd1N0nBPkuDqC3Jc6+W74iz/zFmpr0keG Mgg9iWPUrGzU3ZOqf0nBIEV2Cwe2mK4W21TJstBzJwuAV5aN16t7NZv2hZ7YpQ== 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 4XG25H11bjzJVP; Sat, 28 Sep 2024 09:26:11 +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 48S9QBfa077188; Sat, 28 Sep 2024 09:26:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9QBVO077185; Sat, 28 Sep 2024 09:26:11 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:26:11 GMT Message-Id: <202409280926.48S9QBVO077185@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: 78d9eb6de856 - stable/13 - ixgbe: update if_ix and ixgbe api with ix-3.3.38 changes 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/13 X-Git-Reftype: branch X-Git-Commit: 78d9eb6de85606c9350f25e6973205a0fc466e67 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=78d9eb6de85606c9350f25e6973205a0fc466e67 commit 78d9eb6de85606c9350f25e6973205a0fc466e67 Author: Kevin Bowling AuthorDate: 2024-09-21 09:51:24 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:25:11 +0000 ixgbe: update if_ix and ixgbe api with ix-3.3.38 changes (cherry picked from commit f72de14ea13259db78b06c50da6c864dea698668) --- sys/dev/ixgbe/if_ix.c | 172 ++++++++++++++++++++++++++++++++++------- sys/dev/ixgbe/ixgbe.h | 4 + sys/dev/ixgbe/ixgbe_api.c | 19 ++++- sys/dev/ixgbe/ixgbe_api.h | 1 + sys/dev/ixgbe/ixgbe_common.c | 161 +++++++++++++++++++++++++++++++++++++- sys/dev/ixgbe/ixgbe_common.h | 3 + sys/dev/ixgbe/ixgbe_features.h | 1 + sys/dev/ixgbe/ixgbe_rss.h | 1 + sys/dev/ixgbe/ixgbe_type.h | 52 +++++++++++++ 9 files changed, 378 insertions(+), 36 deletions(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index e9e5ae980b42..2af927996aca 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -172,6 +172,7 @@ static void ixgbe_add_media_types(if_ctx_t); static void ixgbe_update_stats_counters(struct ixgbe_softc *); static void ixgbe_config_link(if_ctx_t); static void ixgbe_get_slot_info(struct ixgbe_softc *); +static void ixgbe_fw_mode_timer(void *); static void ixgbe_check_wol_support(struct ixgbe_softc *); static void ixgbe_enable_rx_drop(struct ixgbe_softc *); static void ixgbe_disable_rx_drop(struct ixgbe_softc *); @@ -1142,6 +1143,17 @@ ixgbe_if_attach_post(if_ctx_t ctx) /* Add sysctls */ ixgbe_add_device_sysctls(ctx); + /* Init recovery mode timer and state variable */ + if (sc->feat_en & IXGBE_FEATURE_RECOVERY_MODE) { + sc->recovery_mode = 0; + + /* Set up the timer callout */ + callout_init(&sc->fw_mode_timer, true); + + /* Start the task */ + callout_reset(&sc->fw_mode_timer, hz, ixgbe_fw_mode_timer, 0); + } + return (0); err: return (error); @@ -1645,10 +1657,10 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, txr, 0, + CTLTYPE_UINT | CTLFLAG_RD, txr, 0, ixgbe_sysctl_tdh_handler, "IU", "Transmit Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, txr, 0, + CTLTYPE_UINT | CTLFLAG_RD, txr, 0, ixgbe_sysctl_tdt_handler, "IU", "Transmit Descriptor Tail"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "tso_tx", CTLFLAG_RD, &txr->tso_tx, "TSO"); @@ -1665,7 +1677,7 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "interrupt_rate", - CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_UINT | CTLFLAG_RW, &sc->rx_queues[i], 0, ixgbe_sysctl_interrupt_rate_handler, "IU", "Interrupt Rate"); @@ -1673,10 +1685,10 @@ ixgbe_add_hw_stats(struct ixgbe_softc *sc) CTLFLAG_RD, &(sc->rx_queues[i].irqs), "irqs on this queue"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, rxr, 0, + CTLTYPE_UINT | CTLFLAG_RD, rxr, 0, ixgbe_sysctl_rdh_handler, "IU", "Receive Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, rxr, 0, + CTLTYPE_UINT | CTLFLAG_RD, rxr, 0, ixgbe_sysctl_rdt_handler, "IU", "Receive Descriptor Tail"); SYSCTL_ADD_UQUAD(ctx, queue_list, OID_AUTO, "rx_packets", CTLFLAG_RD, &rxr->rx_packets, "Queue Packets Received"); @@ -1805,6 +1817,10 @@ ixgbe_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS) if (!txr) return (0); + + if (atomic_load_acq_int(&txr->sc->recovery_mode)) + return (EPERM); + val = IXGBE_READ_REG(&txr->sc->hw, IXGBE_TDH(txr->me)); error = sysctl_handle_int(oidp, &val, 0, req); if (error || !req->newptr) @@ -1828,6 +1844,9 @@ ixgbe_sysctl_tdt_handler(SYSCTL_HANDLER_ARGS) if (!txr) return (0); + if (atomic_load_acq_int(&txr->sc->recovery_mode)) + return (EPERM); + val = IXGBE_READ_REG(&txr->sc->hw, IXGBE_TDT(txr->me)); error = sysctl_handle_int(oidp, &val, 0, req); if (error || !req->newptr) @@ -1851,6 +1870,9 @@ ixgbe_sysctl_rdh_handler(SYSCTL_HANDLER_ARGS) if (!rxr) return (0); + if (atomic_load_acq_int(&rxr->sc->recovery_mode)) + return (EPERM); + val = IXGBE_READ_REG(&rxr->sc->hw, IXGBE_RDH(rxr->me)); error = sysctl_handle_int(oidp, &val, 0, req); if (error || !req->newptr) @@ -1874,6 +1896,9 @@ ixgbe_sysctl_rdt_handler(SYSCTL_HANDLER_ARGS) if (!rxr) return (0); + if (atomic_load_acq_int(&rxr->sc->recovery_mode)) + return (EPERM); + val = IXGBE_READ_REG(&rxr->sc->hw, IXGBE_RDT(rxr->me)); error = sysctl_handle_int(oidp, &val, 0, req); if (error || !req->newptr) @@ -2145,6 +2170,7 @@ ixgbe_perform_aim(struct ixgbe_softc *sc, struct ix_rx_queue *que) { uint32_t newitr = 0; struct rx_ring *rxr = &que->rxr; + /* FIXME struct tx_ring *txr = ... ->txr; */ /* * Do Adaptive Interrupt Moderation: @@ -2160,12 +2186,18 @@ ixgbe_perform_aim(struct ixgbe_softc *sc, struct ix_rx_queue *que) que->eitr_setting = 0; /* Idle, do nothing */ if (rxr->bytes == 0) { + /* FIXME && txr->bytes == 0 */ return; } - if ((rxr->bytes) && (rxr->packets)) { - newitr = (rxr->bytes / rxr->packets); - } + if ((rxr->bytes) && (rxr->packets)) + newitr = rxr->bytes / rxr->packets; + /* FIXME for transmit accounting + * if ((txr->bytes) && (txr->packets)) + * newitr = txr->bytes/txr->packets; + * if ((rxr->bytes) && (rxr->packets)) + * newitr = max(newitr, (rxr->bytes / rxr->packets)); + */ newitr += 24; /* account for hardware frame, crc */ /* set an upper boundary */ @@ -2188,6 +2220,8 @@ ixgbe_perform_aim(struct ixgbe_softc *sc, struct ix_rx_queue *que) que->eitr_setting = newitr; /* Reset state */ + /* FIXME txr->bytes = 0; */ + /* FIXME txr->packets = 0; */ rxr->bytes = 0; rxr->packets = 0; @@ -2645,6 +2679,9 @@ ixgbe_sysctl_interrupt_rate_handler(SYSCTL_HANDLER_ARGS) int error; unsigned int reg, usec, rate; + if (atomic_load_acq_int(&que->sc->recovery_mode)) + return (EPERM); + reg = IXGBE_READ_REG(&que->sc->hw, IXGBE_EITR(que->msix)); usec = ((reg & 0x0FF8) >> 3); if (usec > 0) @@ -2684,12 +2721,12 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) /* Sysctls for all devices */ SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fc", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_flowcntl, "I", IXGBE_SYSCTL_DESC_SET_FC); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "advertise_speed", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_advertise, "I", IXGBE_SYSCTL_DESC_ADV_SPEED); @@ -2698,35 +2735,35 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) &sc->enable_aim, 0, "Interrupt Moderation"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fw_version", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_STRING | CTLFLAG_RD, sc, 0, ixgbe_sysctl_print_fw_version, "A", "Prints FW/NVM Versions"); #ifdef IXGBE_DEBUG /* testing sysctls (for all devices) */ SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "power_state", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_power_state, "I", "PCI Power State"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "print_rss_config", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_STRING | CTLFLAG_RD, sc, 0, ixgbe_sysctl_print_rss_config, "A", "Prints RSS Configuration"); #endif /* for X550 series devices */ if (hw->mac.type >= ixgbe_mac_X550) SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "dmac", - CTLTYPE_U16 | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_U16 | CTLFLAG_RW, sc, 0, ixgbe_sysctl_dmac, "I", "DMA Coalesce"); /* for WoL-capable devices */ if (hw->device_id == IXGBE_DEV_ID_X550EM_X_10G_T) { SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "wol_enable", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_wol_enable, "I", "Enable/Disable Wake on LAN"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "wufc", - CTLTYPE_U32 | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_U32 | CTLFLAG_RW, sc, 0, ixgbe_sysctl_wufc, "I", "Enable/Disable Wake Up Filters"); } @@ -2741,20 +2778,20 @@ ixgbe_add_device_sysctls(if_ctx_t ctx) phy_list = SYSCTL_CHILDREN(phy_node); SYSCTL_ADD_PROC(ctx_list, phy_list, OID_AUTO, "temp", - CTLTYPE_U16 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_U16 | CTLFLAG_RD, sc, 0, ixgbe_sysctl_phy_temp, "I", "Current External PHY Temperature (Celsius)"); SYSCTL_ADD_PROC(ctx_list, phy_list, OID_AUTO, "overtemp_occurred", - CTLTYPE_U16 | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_U16 | CTLFLAG_RD, sc, 0, ixgbe_sysctl_phy_overtemp_occurred, "I", "External PHY High Temperature Event Occurred"); } if (sc->feat_cap & IXGBE_FEATURE_EEE) { SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "eee_state", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, ixgbe_sysctl_eee_state, "I", "EEE Power Save State"); } } /* ixgbe_add_device_sysctls */ @@ -2818,6 +2855,8 @@ ixgbe_if_detach(if_ctx_t ctx) ctrl_ext &= ~IXGBE_CTRL_EXT_DRV_LOAD; IXGBE_WRITE_REG(&sc->hw, IXGBE_CTRL_EXT, ctrl_ext); + callout_drain(&sc->fw_mode_timer); + ixgbe_free_pci_resources(ctx); free(sc->mta, M_IXGBE); @@ -3484,6 +3523,34 @@ ixgbe_if_timer(if_ctx_t ctx, uint16_t qid) } /* ixgbe_if_timer */ +/************************************************************************ + * ixgbe_fw_mode_timer - FW mode timer routine + ************************************************************************/ +static void +ixgbe_fw_mode_timer(void *arg) +{ + struct ixgbe_softc *sc = arg; + struct ixgbe_hw *hw = &sc->hw; + + if (ixgbe_fw_recovery_mode(hw)) { + if (atomic_cmpset_acq_int(&sc->recovery_mode, 0, 1)) { + /* Firmware error detected, entering recovery mode */ + device_printf(sc->dev, "Firmware recovery mode detected. Limiting" + " functionality. Refer to the Intel(R) Ethernet Adapters" + " and Devices User Guide for details on firmware recovery" + " mode.\n"); + + if (hw->adapter_stopped == FALSE) + ixgbe_if_stop(sc->ctx); + } + } else + atomic_cmpset_acq_int(&sc->recovery_mode, 1, 0); + + + callout_reset(&sc->fw_mode_timer, hz, + ixgbe_fw_mode_timer, sc); +} /* ixgbe_fw_mode_timer */ + /************************************************************************ * ixgbe_sfp_probe * @@ -3935,7 +4002,7 @@ ixgbe_intr(void *arg) } /* Check for fan failure */ - if ((hw->device_id == IXGBE_DEV_ID_82598AT) && + if ((sc->feat_en & IXGBE_FEATURE_FAN_FAIL) && (eicr & IXGBE_EICR_GPI_SDP1)) { device_printf(sc->dev, "\nCRITICAL: FAN FAILURE!! REPLACE IMMEDIATELY!!\n"); @@ -4129,6 +4196,9 @@ ixgbe_sysctl_advertise(SYSCTL_HANDLER_ARGS) int error, advertise; sc = (struct ixgbe_softc *)arg1; + if (atomic_load_acq_int(&sc->recovery_mode)) + return (EPERM); + advertise = sc->advertise; error = sysctl_handle_int(oidp, &advertise, 0, req); @@ -4480,6 +4550,9 @@ ixgbe_sysctl_print_rss_config(SYSCTL_HANDLER_ARGS) int error = 0, reta_size; u32 reg; + if (atomic_load_acq_int(&sc->recovery_mode)) + return (EPERM); + buf = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (!buf) { device_printf(dev, "Could not allocate sbuf for output.\n"); @@ -4535,6 +4608,9 @@ ixgbe_sysctl_phy_temp(SYSCTL_HANDLER_ARGS) struct ixgbe_hw *hw = &sc->hw; u16 reg; + if (atomic_load_acq_int(&sc->recovery_mode)) + return (EPERM); + if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) { device_printf(iflib_get_dev(sc->ctx), "Device has no supported external thermal sensor.\n"); @@ -4567,6 +4643,9 @@ ixgbe_sysctl_phy_overtemp_occurred(SYSCTL_HANDLER_ARGS) struct ixgbe_hw *hw = &sc->hw; u16 reg; + if (atomic_load_acq_int(&sc->recovery_mode)) + return (EPERM); + if (hw->device_id != IXGBE_DEV_ID_X550EM_X_10G_T) { device_printf(iflib_get_dev(sc->ctx), "Device has no supported external thermal sensor.\n"); @@ -4604,6 +4683,9 @@ ixgbe_sysctl_eee_state(SYSCTL_HANDLER_ARGS) int curr_eee, new_eee, error = 0; s32 retval; + if (atomic_load_acq_int(&sc->recovery_mode)) + return (EPERM); + curr_eee = new_eee = !!(sc->feat_en & IXGBE_FEATURE_EEE); error = sysctl_handle_int(oidp, &new_eee, 0, req); @@ -4668,15 +4750,20 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) sc->feat_cap |= IXGBE_FEATURE_BYPASS; break; case ixgbe_mac_X550: + sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; sc->feat_cap |= IXGBE_FEATURE_TEMP_SENSOR; sc->feat_cap |= IXGBE_FEATURE_SRIOV; sc->feat_cap |= IXGBE_FEATURE_FDIR; break; case ixgbe_mac_X550EM_x: + sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; sc->feat_cap |= IXGBE_FEATURE_SRIOV; sc->feat_cap |= IXGBE_FEATURE_FDIR; + if (sc->hw.device_id == IXGBE_DEV_ID_X550EM_X_KR) + sc->feat_cap |= IXGBE_FEATURE_EEE; break; case ixgbe_mac_X550EM_a: + sc->feat_cap |= IXGBE_FEATURE_RECOVERY_MODE; sc->feat_cap |= IXGBE_FEATURE_SRIOV; sc->feat_cap |= IXGBE_FEATURE_FDIR; sc->feat_cap &= ~IXGBE_FEATURE_LEGACY_IRQ; @@ -4712,6 +4799,9 @@ ixgbe_init_device_features(struct ixgbe_softc *sc) /* Thermal Sensor */ if (sc->feat_cap & IXGBE_FEATURE_TEMP_SENSOR) sc->feat_en |= IXGBE_FEATURE_TEMP_SENSOR; + /* Recovery mode */ + if (sc->feat_cap & IXGBE_FEATURE_RECOVERY_MODE) + sc->feat_en |= IXGBE_FEATURE_RECOVERY_MODE; /* Enabled via global sysctl... */ /* Flow Director */ @@ -4763,14 +4853,42 @@ static void ixgbe_sbuf_fw_version(struct ixgbe_hw *hw, struct sbuf *buf) { struct ixgbe_nvm_version nvm_ver = {0}; - uint16_t phyfw = 0; - int status; const char *space = ""; + ixgbe_get_nvm_version(hw, &nvm_ver); /* NVM version */ ixgbe_get_oem_prod_version(hw, &nvm_ver); /* OEM's NVM version */ - ixgbe_get_orom_version(hw, &nvm_ver); /* Option ROM */ ixgbe_get_etk_id(hw, &nvm_ver); /* eTrack identifies a build in Intel's SCM */ - status = ixgbe_get_phy_firmware_version(hw, &phyfw); + ixgbe_get_orom_version(hw, &nvm_ver); /* Option ROM */ + + /* FW version */ + if ((nvm_ver.phy_fw_maj == 0x0 && + nvm_ver.phy_fw_min == 0x0 && + nvm_ver.phy_fw_id == 0x0) || + (nvm_ver.phy_fw_maj == 0xF && + nvm_ver.phy_fw_min == 0xFF && + nvm_ver.phy_fw_id == 0xF)) { + /* If major, minor and id numbers are set to 0, + * reading FW version is unsupported. If major number + * is set to 0xF, minor is set to 0xFF and id is set + * to 0xF, this means that number read is invalid. */ + } else + sbuf_printf(buf, "fw %d.%d.%d ", + nvm_ver.phy_fw_maj, nvm_ver.phy_fw_min, nvm_ver.phy_fw_id); + + /* NVM version */ + if ((nvm_ver.nvm_major == 0x0 && + nvm_ver.nvm_minor == 0x0 && + nvm_ver.nvm_id == 0x0) || + (nvm_ver.nvm_major == 0xF && + nvm_ver.nvm_minor == 0xFF && + nvm_ver.nvm_id == 0xF)) { + /* If major, minor and id numbers are set to 0, + * reading NVM version is unsupported. If major number + * is set to 0xF, minor is set to 0xFF and id is set + * to 0xF, this means that number read is invalid. */ + } else + sbuf_printf(buf, "nvm %x.%02x.%x ", + nvm_ver.nvm_major, nvm_ver.nvm_minor, nvm_ver.nvm_id); if (nvm_ver.oem_valid) { sbuf_printf(buf, "NVM OEM V%d.%d R%d", nvm_ver.oem_major, @@ -4785,13 +4903,9 @@ ixgbe_sbuf_fw_version(struct ixgbe_hw *hw, struct sbuf *buf) } if (nvm_ver.etk_id != ((NVM_VER_INVALID << NVM_ETK_SHIFT) | - NVM_VER_INVALID)) { + NVM_VER_INVALID | 0xFFFFFFFF)) { sbuf_printf(buf, "%seTrack 0x%08x", space, nvm_ver.etk_id); - space = " "; } - - if (phyfw != 0 && status == IXGBE_SUCCESS) - sbuf_printf(buf, "%sPHY FW V%d", space, phyfw); } /* ixgbe_sbuf_fw_version */ /************************************************************************ diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index fb0dba242702..798fb2dcd796 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -434,6 +434,10 @@ struct ixgbe_softc { /* Bypass */ struct ixgbe_bp_data bypass; + /* Firmware error check */ + int recovery_mode; + struct callout fw_mode_timer; + /* Misc stats maintained by the driver */ unsigned long dropped_pkts; unsigned long mbuf_header_failed; diff --git a/sys/dev/ixgbe/ixgbe_api.c b/sys/dev/ixgbe/ixgbe_api.c index 7767e9a5571c..4c50f10ed92e 100644 --- a/sys/dev/ixgbe/ixgbe_api.c +++ b/sys/dev/ixgbe/ixgbe_api.c @@ -1133,6 +1133,19 @@ s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, IXGBE_NOT_IMPLEMENTED); } +/** + * ixgbe_toggle_txdctl - Toggle VF's queues + * @hw: pointer to hardware structure + * @vind: VMDq pool index + * + * Enable and disable each queue in VF. + */ +s32 ixgbe_toggle_txdctl(struct ixgbe_hw *hw, u32 vind) +{ + return ixgbe_call_func(hw, hw->mac.ops.toggle_txdctl, (hw, + vind), IXGBE_NOT_IMPLEMENTED); +} + /** * ixgbe_fc_enable - Enable flow control * @hw: pointer to hardware structure @@ -1417,15 +1430,15 @@ s32 ixgbe_bypass_rw(struct ixgbe_hw *hw, u32 cmd, u32 *status) /** * ixgbe_bypass_valid_rd - Verify valid return from bit-bang. + * @hw: pointer to hardware structure + * @in_reg: The register cmd for the bit-bang read. + * @out_reg: The register returned from a bit-bang read. * * If we send a write we can't be sure it took until we can read back * that same register. It can be a problem as some of the fields may * for valid reasons change inbetween the time wrote the register and * we read it again to verify. So this function check everything we * can check and then assumes it worked. - * - * @u32 in_reg - The register cmd for the bit-bang read. - * @u32 out_reg - The register returned from a bit-bang read. **/ bool ixgbe_bypass_valid_rd(struct ixgbe_hw *hw, u32 in_reg, u32 out_reg) { diff --git a/sys/dev/ixgbe/ixgbe_api.h b/sys/dev/ixgbe/ixgbe_api.h index 33c1cd1baeaf..b81510dacb95 100644 --- a/sys/dev/ixgbe/ixgbe_api.h +++ b/sys/dev/ixgbe/ixgbe_api.h @@ -131,6 +131,7 @@ s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, u32 *vfta_delta, u32 vfta, bool vlvf_bypass); +s32 ixgbe_toggle_txdctl(struct ixgbe_hw *hw, u32 vind); s32 ixgbe_fc_enable(struct ixgbe_hw *hw); s32 ixgbe_setup_fc(struct ixgbe_hw *hw); s32 ixgbe_set_fw_drv_ver(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build, diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index 7643d4028529..df7ab90e72ab 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -133,6 +133,7 @@ s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw) mac->ops.init_uta_tables = NULL; mac->ops.enable_rx = ixgbe_enable_rx_generic; mac->ops.disable_rx = ixgbe_disable_rx_generic; + mac->ops.toggle_txdctl = ixgbe_toggle_txdctl_generic; /* Flow Control */ mac->ops.fc_enable = ixgbe_fc_enable_generic; @@ -4138,6 +4139,62 @@ s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw) return IXGBE_SUCCESS; } + +/** + * ixgbe_toggle_txdctl_generic - Toggle VF's queues + * @hw: pointer to hardware structure + * @vf_number: VF index + * + * Enable and disable each queue in VF. + */ +s32 ixgbe_toggle_txdctl_generic(struct ixgbe_hw *hw, u32 vf_number) +{ + u8 queue_count, i; + u32 offset, reg; + + if (vf_number > 63) + return IXGBE_ERR_PARAM; + + /* + * Determine number of queues by checking + * number of virtual functions + */ + reg = IXGBE_READ_REG(hw, IXGBE_GCR_EXT); + switch (reg & IXGBE_GCR_EXT_VT_MODE_MASK) { + case IXGBE_GCR_EXT_VT_MODE_64: + queue_count = 2; + break; + case IXGBE_GCR_EXT_VT_MODE_32: + queue_count = 4; + break; + case IXGBE_GCR_EXT_VT_MODE_16: + queue_count = 8; + break; + default: + return IXGBE_ERR_CONFIG; + } + + /* Toggle queues */ + for (i = 0; i < queue_count; ++i) { + /* Calculate offset of current queue */ + offset = queue_count * vf_number + i; + + /* Enable queue */ + reg = IXGBE_READ_REG(hw, IXGBE_PVFTXDCTL(offset)); + reg |= IXGBE_TXDCTL_ENABLE; + IXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(offset), reg); + IXGBE_WRITE_FLUSH(hw); + + /* Disable queue */ + reg = IXGBE_READ_REG(hw, IXGBE_PVFTXDCTL(offset)); + reg &= ~IXGBE_TXDCTL_ENABLE; + IXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(offset), reg); + IXGBE_WRITE_FLUSH(hw); + } + + return IXGBE_SUCCESS; +} + /** * ixgbe_need_crosstalk_fix - Determine if we need to do cross talk fix * @hw: pointer to hardware structure @@ -5151,15 +5208,14 @@ s32 ixgbe_bypass_rw_generic(struct ixgbe_hw *hw, u32 cmd, u32 *status) /** * ixgbe_bypass_valid_rd_generic - Verify valid return from bit-bang. + * @in_reg: The register cmd for the bit-bang read. + * @out_reg: The register returned from a bit-bang read. * * If we send a write we can't be sure it took until we can read back * that same register. It can be a problem as some of the fields may * for valid reasons change inbetween the time wrote the register and * we read it again to verify. So this function check everything we * can check and then assumes it worked. - * - * @u32 in_reg - The register cmd for the bit-bang read. - * @u32 out_reg - The register returned from a bit-bang read. **/ bool ixgbe_bypass_valid_rd_generic(u32 in_reg, u32 out_reg) { @@ -5210,7 +5266,7 @@ bool ixgbe_bypass_valid_rd_generic(u32 in_reg, u32 out_reg) * ixgbe_bypass_set_generic - Set a bypass field in the FW CTRL Regiter. * * @hw: pointer to hardware structure - * @cmd: The control word we are setting. + * @ctrl: The control word we are setting. * @event: The event we are setting in the FW. This also happens to * be the mask for the event we are setting (handy) * @action: The action we set the event to in the FW. This is in a @@ -5395,6 +5451,103 @@ void ixgbe_get_etk_id(struct ixgbe_hw *hw, struct ixgbe_nvm_version *nvm_ver) } } +/** + * ixgbe_get_nvm_version - Return version of NVM and its components + * + * @hw: pointer to hardware structure + * @nvm_ver: pointer to output structure + * + * irrelevant component fields will return 0, read errors will return 0xff + **/ +void ixgbe_get_nvm_version(struct ixgbe_hw *hw, + struct ixgbe_nvm_version *nvm_ver) +{ + u16 word, phy_ver; + + DEBUGFUNC("ixgbe_get_nvm_version"); + + memset(nvm_ver, 0, sizeof(struct ixgbe_nvm_version)); + + /* eeprom version is mac-type specific */ + switch (hw->mac.type) { + case ixgbe_mac_82598EB: + /* version of eeprom section */ + if (ixgbe_read_eeprom(hw, NVM_EEP_OFFSET_82598, &word)) + word = NVM_VER_INVALID; + nvm_ver->nvm_major = ((word & NVM_EEP_MAJOR_MASK) + >> NVM_EEP_MAJ_SHIFT); + nvm_ver->nvm_minor = ((word & NVM_EEP_MINOR_MASK) + >> NVM_EEP_MIN_SHIFT); + nvm_ver->nvm_id = (word & NVM_EEP_ID_MASK); + break; + case ixgbe_mac_X540: + /* version of eeprom section */ + if (ixgbe_read_eeprom(hw, NVM_EEP_OFFSET_X540, &word)) + word = NVM_VER_INVALID; + nvm_ver->nvm_major = ((word & NVM_EEP_MAJOR_MASK) + >> NVM_EEP_MAJ_SHIFT); + nvm_ver->nvm_minor = ((word & NVM_EEP_MINOR_MASK) + >> NVM_EEP_MIN_SHIFT); + nvm_ver->nvm_id = (word & NVM_EEP_ID_MASK); + break; + + case ixgbe_mac_X550: + case ixgbe_mac_X550EM_x: + case ixgbe_mac_X550EM_a: + /* version of eeprom section */ + if (ixgbe_read_eeprom(hw, NVM_EEP_OFFSET_X540, &word)) + word = NVM_VER_INVALID; + nvm_ver->nvm_major = ((word & NVM_EEP_MAJOR_MASK) + >> NVM_EEP_MAJ_SHIFT); + nvm_ver->nvm_minor = (word & NVM_EEP_X550_MINOR_MASK); + + break; + default: + break; + } + + /* phy version is mac-type specific */ + switch (hw->mac.type) { + case ixgbe_mac_X540: + case ixgbe_mac_X550: + case ixgbe_mac_X550EM_x: + case ixgbe_mac_X550EM_a: + /* intel phy firmware version */ + if (ixgbe_read_eeprom(hw, NVM_EEP_PHY_OFF_X540, &word)) + word = NVM_VER_INVALID; + nvm_ver->phy_fw_maj = ((word & NVM_PHY_MAJOR_MASK) + >> NVM_PHY_MAJ_SHIFT); + nvm_ver->phy_fw_min = ((word & NVM_PHY_MINOR_MASK) + >> NVM_PHY_MIN_SHIFT); + nvm_ver->phy_fw_id = (word & NVM_PHY_ID_MASK); + break; + default: + break; + } + + ixgbe_get_etk_id(hw, nvm_ver); + + /* devstarter image */ + if (ixgbe_read_eeprom(hw, NVM_DS_OFFSET, &word)) + word = NVM_VER_INVALID; + nvm_ver->devstart_major = ((word & NVM_DS_MAJOR_MASK) >> NVM_DS_SHIFT); + nvm_ver->devstart_minor = (word & NVM_DS_MINOR_MASK); + + /* OEM customization word */ + if (ixgbe_read_eeprom(hw, NVM_OEM_OFFSET, &nvm_ver->oem_specific)) + nvm_ver->oem_specific = NVM_VER_INVALID; + + /* vendor (not intel) phy firmware version */ + if (ixgbe_get_phy_firmware_version(hw, &phy_ver)) + phy_ver = NVM_VER_INVALID; + nvm_ver->phy_vend_maj = ((phy_ver & NVM_PHYVEND_MAJOR_MASK) + >> NVM_PHYVEND_SHIFT); + nvm_ver->phy_vend_min = (phy_ver & NVM_PHYVEND_MINOR_MASK); + + /* Option Rom may or may not be present. Start with pointer */ + ixgbe_get_orom_version(hw, nvm_ver); + return; +} /** * ixgbe_dcb_get_rtrup2tc_generic - read rtrup2tc reg diff --git a/sys/dev/ixgbe/ixgbe_common.h b/sys/dev/ixgbe/ixgbe_common.h index 0ff5c60d40af..a2da9c834f8f 100644 --- a/sys/dev/ixgbe/ixgbe_common.h +++ b/sys/dev/ixgbe/ixgbe_common.h @@ -141,6 +141,7 @@ s32 ixgbe_set_vlvf_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlvf_bypass); s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw); s32 ixgbe_find_vlvf_slot(struct ixgbe_hw *hw, u32 vlan, bool vlvf_bypass); +s32 ixgbe_toggle_txdctl_generic(struct ixgbe_hw *hw, u32 vind); s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed, @@ -195,6 +196,8 @@ void ixgbe_get_oem_prod_version(struct ixgbe_hw *hw, struct ixgbe_nvm_version *nvm_ver); void ixgbe_get_orom_version(struct ixgbe_hw *hw, struct ixgbe_nvm_version *nvm_ver); +void ixgbe_get_nvm_version(struct ixgbe_hw *hw, + struct ixgbe_nvm_version *nvm_ver); void ixgbe_disable_rx_generic(struct ixgbe_hw *hw); void ixgbe_enable_rx_generic(struct ixgbe_hw *hw); s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, diff --git a/sys/dev/ixgbe/ixgbe_features.h b/sys/dev/ixgbe/ixgbe_features.h index ed35a6ed458c..0cef334a185f 100644 --- a/sys/dev/ixgbe/ixgbe_features.h +++ b/sys/dev/ixgbe/ixgbe_features.h @@ -56,6 +56,7 @@ #define IXGBE_FEATURE_EEE (u32)(1 << 11) #define IXGBE_FEATURE_LEGACY_IRQ (u32)(1 << 12) #define IXGBE_FEATURE_NEEDS_CTXD (u32)(1 << 13) +#define IXGBE_FEATURE_RECOVERY_MODE (u32)(1 << 15) /* Check for OS support. Undefine features if not included in the OS */ #ifndef PCI_IOV diff --git a/sys/dev/ixgbe/ixgbe_rss.h b/sys/dev/ixgbe/ixgbe_rss.h index c00273587aaa..84c802671195 100644 --- a/sys/dev/ixgbe/ixgbe_rss.h +++ b/sys/dev/ixgbe/ixgbe_rss.h @@ -48,6 +48,7 @@ #define RSS_HASHTYPE_RSS_IPV6_EX (1 << 5) #define RSS_HASHTYPE_RSS_TCP_IPV6_EX (1 << 6) #define RSS_HASHTYPE_RSS_UDP_IPV4 (1 << 7) +#define RSS_HASHTYPE_RSS_UDP_IPV4_EX (1 << 8) #define RSS_HASHTYPE_RSS_UDP_IPV6 (1 << 9) #define RSS_HASHTYPE_RSS_UDP_IPV6_EX (1 << 10) diff --git a/sys/dev/ixgbe/ixgbe_type.h b/sys/dev/ixgbe/ixgbe_type.h index dbcc6544133e..a414e27142ec 100644 --- a/sys/dev/ixgbe/ixgbe_type.h +++ b/sys/dev/ixgbe/ixgbe_type.h @@ -202,6 +202,10 @@ #define IXGBE_FLA_X550EM_x IXGBE_FLA #define IXGBE_FLA_X550EM_a 0x15F68 #define IXGBE_FLA_BY_MAC(_hw) IXGBE_BY_MAC((_hw), FLA) +#define IXGBE_FLA_FL_SIZE_SHIFT_X540 17 +#define IXGBE_FLA_FL_SIZE_SHIFT_X550 12 +#define IXGBE_FLA_FL_SIZE_MASK_X540 (0x7 << IXGBE_FLA_FL_SIZE_SHIFT_X540) +#define IXGBE_FLA_FL_SIZE_MASK_X550 (0x7 << IXGBE_FLA_FL_SIZE_SHIFT_X550) #define IXGBE_EEMNGCTL 0x10110 #define IXGBE_EEMNGDATA 0x10114 @@ -284,6 +288,41 @@ #define IXGBE_I2C_CLK_OE_N_EN_BY_MAC(_hw) IXGBE_BY_MAC((_hw), I2C_CLK_OE_N_EN) #define IXGBE_I2C_CLOCK_STRETCHING_TIMEOUT 500 +/* NVM component version fields */ +#define NVM_VERSZ_LONG 64 +#define NVM_VERSZ_SHORT 32 +#define NVM_VER_LONG \ + "DS_%x.%x NVM_%x.%02x.%x PHY_%x.%02x.%x OEM_%04x EtkId_%x OR_%x.%x.%x\n" +#define NVM_VER_SHORT1 "%02x.%02x %x %x.%x.%x\n" +#define NVM_VER_SHORT2 "%02x.%02x.%x %x.%02x.%x %x %x.%x.%x\n" + +#define NVM_EEP_MAJOR_MASK 0xF000 +#define NVM_EEP_MINOR_MASK 0xFF0 +#define NVM_EEP_ID_MASK 0xF +#define NVM_EEP_MAJ_SHIFT 12 +#define NVM_EEP_MIN_SHIFT 4 + +#define NVM_EEP_OFFSET_82598 0x2A +#define NVM_EEP_OFFSET_X540 0x18 +#define NVM_EEP_X550_MINOR_MASK 0xFF +#define NVM_EEP_PHY_OFF_X540 0x19 +#define NVM_PHY_MAJOR_MASK 0xF000 +#define NVM_PHY_MINOR_MASK 0xFF0 +#define NVM_PHY_ID_MASK 0xF +#define NVM_PHY_MAJ_SHIFT 12 +#define NVM_PHY_MIN_SHIFT 4 + +#define NVM_DS_OFFSET 0x29 +#define NVM_DS_MAJOR_MASK 0xF000 +#define NVM_DS_MINOR_MASK 0xF +#define NVM_DS_SHIFT 12 + +#define NVM_OEM_OFFSET 0x2A + +#define NVM_PHYVEND_MAJOR_MASK 0xFF00 +#define NVM_PHYVEND_MINOR_MASK 0xFF +#define NVM_PHYVEND_SHIFT 8 + #define IXGBE_I2C_THERMAL_SENSOR_ADDR 0xF8 #define IXGBE_EMC_INTERNAL_DATA 0x00 #define IXGBE_EMC_INTERNAL_THERM_LIMIT 0x20 @@ -344,6 +383,16 @@ struct ixgbe_nvm_version { u16 or_build; u8 or_patch; + u8 phy_fw_maj; + u16 phy_fw_min; + u8 phy_fw_id; + + u8 devstart_major; + u8 devstart_minor; + u16 oem_specific; + + u8 phy_vend_maj; + u8 phy_vend_min; }; /* Interrupt Registers */ @@ -1443,6 +1492,7 @@ struct ixgbe_dmac_config { #define IXGBE_BARCTRL_FLSIZE 0x0700 #define IXGBE_BARCTRL_FLSIZE_SHIFT 8 #define IXGBE_BARCTRL_CSRSIZE 0x2000 +#define IXGBE_BARCTRL_CSRSIZE_SHIFT 13 /* RSCCTL Bit Masks */ #define IXGBE_RSCCTL_RSCEN 0x01 @@ -3414,6 +3464,7 @@ struct ixgbe_adv_tx_context_desc { #define IXGBE_ADVTXD_POPTS_RSV 0x00002000 /* POPTS Reserved */ #define IXGBE_ADVTXD_PAYLEN_SHIFT 14 /* Adv desc PAYLEN shift */ #define IXGBE_ADVTXD_MACLEN_SHIFT 9 /* Adv ctxt desc mac len shift */ +#define IXGBE_ADVTXD_MACLEN_MASK (0x7F << IXGBE_ADVTXD_MACLEN_SHIFT) /* Adv ctxt desc mac len mask */ #define IXGBE_ADVTXD_VLAN_SHIFT 16 /* Adv ctxt vlan tag shift */ #define IXGBE_ADVTXD_TUCMD_IPV4 0x00000400 /* IP Packet Type: 1=IPv4 */ #define IXGBE_ADVTXD_TUCMD_IPV6 0x00000000 /* IP Packet Type: 0=IPv6 */ @@ -4030,6 +4081,7 @@ struct ixgbe_mac_operations { s32 (*init_uta_tables)(struct ixgbe_hw *); void (*set_mac_anti_spoofing)(struct ixgbe_hw *, bool, int); void (*set_vlan_anti_spoofing)(struct ixgbe_hw *, bool, int); + s32 (*toggle_txdctl)(struct ixgbe_hw *hw, u32 vf_index); s32 (*update_xcast_mode)(struct ixgbe_hw *, int); s32 (*set_rlpml)(struct ixgbe_hw *, u16); From nobody Sat Sep 28 09:26:12 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 4XG25J3Z3Cz5Y2jQ; Sat, 28 Sep 2024 09:26:12 +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 4XG25J2JmLz4s7F; Sat, 28 Sep 2024 09:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515572; 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=2EHziPwX23LrMl+rbv0s525hbncMQtX+BpeJeRl7Pfo=; b=QaTxtIh0ifjLjGmTNDCODnwGdbXkkG/Tt20LYwVcSk6zs6OoZgH5gx2s0Gg2Jx1adLRqcO tZq/wWzHeAPs3ODnjXp8Uz/P1b8ScIuzjHH9dzobuNZbtqFTXz7FyfMjmTECe3MIJ3cqnp IHlTAPyt9J50O7OuMPDmIMUFvLZki6M2imoLQNYIMfIUr+jdx7lL3rXwjxTET/z2cF7Gau Er8d9DfCFDEjV0RBpfBicmVBDpnvVUodWV1oIVal26DI7kOEH3j4iGawbSev6aiyOGYaJE o7+SSpC2ukD8JGreeKZYIFbPE2Mw+DaymkIDYKE1Oaf+2qh46KCDkmffcGAaSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515572; 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=2EHziPwX23LrMl+rbv0s525hbncMQtX+BpeJeRl7Pfo=; b=ilaZ6j6zCS5qB/yKSulqj4yuCA3sZHeY9XoXvD9TPim0befeAYrc0r2iSb84UImJXYWwaE QTuJbHtoedgpG9rxBEofoLVgBm5yrvljmrm96eMULaErX6foscD1RoIuako926Hh/UoSaZ qZMNwQ9f4T3+lm76jgMjkoLEUB4iz5XX/RdjnQoQUl/YrnjAtRAGrx+Oi1DbI9wKYA3Zd2 Aa8JnWABDx1gQwvEBeWKkkDSRHNRaXWYxkAC2hRkMkfKMeTznpy9aTZXEoGYXkOeNU4S/I ciMR3UGxX+s16BPqfcOae/W53zF1DlEuWwXytQTzq1QnL29c15tuHu5Jy1Sv/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515572; a=rsa-sha256; cv=none; b=RGNt5uEot/2ly+HNKIo2UTe+7xRHETlYBRlplMd8AakRTFm9m0NMGPUGjFnVM3RmYabwW5 bHcVzalUBj/7sqsdRx62LZ6rkvPewJeEfDIVFI4/zUekx0hYB4Vi2bQF/Ul1jbcO5TBZnD EC0E7Z02ywOC73iz0LaBqAA+nVOCmpp5FbYfoir86tjSK9L32S53KuHLts/HLa5kuPrced XAzaSJoHWp5TKHx9ZbY31auv8cG1GSkOfzxKgBlkA0YEPqY8BYJVyDcX4eEYQKKONK80YU eOD26GIg9ILcBNQfors474fKN6YQx4KyZYMBMOoAtISuZjZPs9dYbQOngbmtEg== 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 4XG25J1rTqzJrM; Sat, 28 Sep 2024 09:26:12 +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 48S9QC3k077240; Sat, 28 Sep 2024 09:26:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9QCgM077237; Sat, 28 Sep 2024 09:26:12 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:26:12 GMT Message-Id: <202409280926.48S9QCgM077237@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: deea1953820e - stable/13 - ixgbe: update if_sriov with ix-3.3.38 changes 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/13 X-Git-Reftype: branch X-Git-Commit: deea1953820ef658e919ebcd86cb5939910d07de Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=deea1953820ef658e919ebcd86cb5939910d07de commit deea1953820ef658e919ebcd86cb5939910d07de Author: Kevin Bowling AuthorDate: 2024-09-21 09:56:19 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:25:23 +0000 ixgbe: update if_sriov with ix-3.3.38 changes There are some critical fixes here. The PF must communicate with each VF slot (vf->pool), only VFs shall use 0 for everything. IXGBE_FEATURE_SRIOV needs to be set before calling ixgbe_if_init(). With these changes, ixv(4) now attaches to VFs, but after bringing up VFs, the PF and VF still are not correctly passing traffic. (cherry picked from commit b6cd053e6da9bb8f77d2c6069260e52bbd53fa4a) --- sys/dev/ixgbe/if_sriov.c | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index 0b94c8626b0e..4ee0784ba74a 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -95,26 +95,26 @@ ixgbe_align_all_queue_indices(struct ixgbe_softc *sc) /* Support functions for SR-IOV/VF management */ static inline void -ixgbe_send_vf_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) +ixgbe_send_vf_msg(struct ixgbe_hw *hw, struct ixgbe_vf *vf, u32 msg) { if (vf->flags & IXGBE_VF_CTS) msg |= IXGBE_VT_MSGTYPE_CTS; - ixgbe_write_mbx(&sc->hw, &msg, 1, vf->pool); + hw->mbx.ops[vf->pool].write(hw, &msg, 1, vf->pool); } static inline void ixgbe_send_vf_success(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) { msg &= IXGBE_VT_MSG_MASK; - ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_SUCCESS); + ixgbe_send_vf_msg(&sc->hw, vf, msg | IXGBE_VT_MSGTYPE_SUCCESS); } static inline void ixgbe_send_vf_failure(struct ixgbe_softc *sc, struct ixgbe_vf *vf, u32 msg) { msg &= IXGBE_VT_MSG_MASK; - ixgbe_send_vf_msg(sc, vf, msg | IXGBE_VT_MSGTYPE_FAILURE); + ixgbe_send_vf_msg(&sc->hw, vf, msg | IXGBE_VT_MSGTYPE_FAILURE); } static inline void @@ -210,7 +210,7 @@ ixgbe_ping_all_vfs(struct ixgbe_softc *sc) for (int i = 0; i < sc->num_vfs; i++) { vf = &sc->vfs[i]; if (vf->flags & IXGBE_VF_ACTIVE) - ixgbe_send_vf_msg(sc, vf, IXGBE_PF_CONTROL_MSG); + ixgbe_send_vf_msg(&sc->hw, vf, IXGBE_PF_CONTROL_MSG); } } /* ixgbe_ping_all_vfs */ @@ -254,6 +254,17 @@ ixgbe_vf_set_default_vlan(struct ixgbe_softc *sc, struct ixgbe_vf *vf, IXGBE_WRITE_REG(hw, IXGBE_VMVIR(vf->pool), vmvir); } /* ixgbe_vf_set_default_vlan */ +static void +ixgbe_clear_vfmbmem(struct ixgbe_softc *sc, struct ixgbe_vf *vf) +{ + struct ixgbe_hw *hw = &sc->hw; + uint32_t vf_index = IXGBE_VF_INDEX(vf->pool); + uint16_t mbx_size = hw->mbx.size; + uint16_t i; + + for (i = 0; i < mbx_size; ++i) + IXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_index), i, 0x0); +} /* ixgbe_clear_vfmbmem */ static boolean_t ixgbe_vf_frame_size_compatible(struct ixgbe_softc *sc, struct ixgbe_vf *vf) @@ -310,6 +321,8 @@ ixgbe_process_vf_reset(struct ixgbe_softc *sc, struct ixgbe_vf *vf) // XXX clear multicast addresses ixgbe_clear_rar(&sc->hw, vf->rar_index); + ixgbe_clear_vfmbmem(sc, vf); + ixgbe_toggle_txdctl(&sc->hw, IXGBE_VF_INDEX(vf->pool)); vf->api_ver = IXGBE_API_VER_UNKNOWN; } /* ixgbe_process_vf_reset */ @@ -371,7 +384,7 @@ ixgbe_vf_reset_msg(struct ixgbe_softc *sc, struct ixgbe_vf *vf, uint32_t *msg) vf->flags |= IXGBE_VF_CTS; - resp[0] = IXGBE_VF_RESET | ack | IXGBE_VT_MSGTYPE_CTS; + resp[0] = IXGBE_VF_RESET | ack; bcopy(vf->ether_addr, &resp[1], ETHER_ADDR_LEN); resp[3] = hw->mac.mc_filter_type; ixgbe_write_mbx(hw, resp, IXGBE_VF_PERMADDR_MSG_LEN, vf->pool); @@ -582,7 +595,8 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) hw = &sc->hw; - error = ixgbe_read_mbx(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); + error = hw->mbx.ops[vf->pool].read(hw, msg, IXGBE_VFMAILBOX_SIZE, + vf->pool); if (error != 0) return; @@ -643,13 +657,13 @@ ixgbe_handle_mbx(void *context) vf = &sc->vfs[i]; if (vf->flags & IXGBE_VF_ACTIVE) { - if (hw->mbx.ops[0].check_for_rst(hw, vf->pool) == 0) + if (hw->mbx.ops[vf->pool].check_for_rst(hw, vf->pool) == 0) ixgbe_process_vf_reset(sc, vf); - if (hw->mbx.ops[0].check_for_msg(hw, vf->pool) == 0) + if (hw->mbx.ops[vf->pool].check_for_msg(hw, vf->pool) == 0) ixgbe_process_vf_msg(ctx, vf); - if (hw->mbx.ops[0].check_for_ack(hw, vf->pool) == 0) + if (hw->mbx.ops[vf->pool].check_for_ack(hw, vf->pool) == 0) ixgbe_process_vf_ack(sc, vf); } } @@ -698,8 +712,10 @@ ixgbe_if_iov_init(if_ctx_t ctx, u16 num_vfs, const nvlist_t *config) } sc->num_vfs = num_vfs; - ixgbe_if_init(sc->ctx); + ixgbe_init_mbx_params_pf(&sc->hw); + sc->feat_en |= IXGBE_FEATURE_SRIOV; + ixgbe_if_init(sc->ctx); return (retval); @@ -769,7 +785,7 @@ ixgbe_init_vf(struct ixgbe_softc *sc, struct ixgbe_vf *vf) ixgbe_vf_enable_transmit(sc, vf); ixgbe_vf_enable_receive(sc, vf); - ixgbe_send_vf_msg(sc, vf, IXGBE_PF_CONTROL_MSG); + ixgbe_send_vf_msg(&sc->hw, vf, IXGBE_PF_CONTROL_MSG); } /* ixgbe_init_vf */ void From nobody Sat Sep 28 09:26:13 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 4XG25L0rNFz5Y36P; Sat, 28 Sep 2024 09:26:14 +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 4XG25K4r6lz4s5S; Sat, 28 Sep 2024 09:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515573; 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=gCs3j7OqP+8P933fetQ6kI8+Am60LeTuEimO5JRONHM=; b=upsZRbqfw4nB8NnmBwuCUSARIPuTPoyoYPcVLsAOndymG2eI8MzCH3EzuMWT6/EMEAHw/b pY1remULCmjfL581KbHxaEyjl1jXu7rYZ6XaaAMXAW155+CtZmNln4wYXui9Vov1rhw6+b EsmHbFO5q1vezclPO8+TJLVI6qY6ZbByZbbR/+7IUwpreQZIHoPJfRePgwKfqraNTO4Jhj oOww0ckeIrMIYEttBfbjfpqjxgqX3h7ahZos+JaAs3Xx0vT2ccVKEx1MjTuY0/wPZ/Qc4s 2YMGd0EEBldrbOv08H83Coio/4SfSw+inL8G94AzsoahMfLbk9k7+cB1TQhucw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727515573; 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=gCs3j7OqP+8P933fetQ6kI8+Am60LeTuEimO5JRONHM=; b=ZcNj+3Be0RV7oPq+Pe2JDkzZr978mooFLljC/IvLrqmZik5UotJYcoSx3NJYyRW1uUc70p BQhgPGOgudr4stEyTELk6K454a41K0E6KDKaqvEmL5MbqijtROSi31dTNhoAXTuOInRYkC wZT5OqyHiXklEu4capgl6HjWnCz6536OrNP8Q6mc6tWOGaiDuha3rDYTsVfM0RpjLK11er x23QIHpIC+/37LDli6iCRliqo8+mH0dvt+Mt+ryKyA3GpyiH1l7sMCVcQjnA2vBqn1tfTJ 4tkhTMaKfUnFSbu8JUIZ/SHwtfI8iFcEahNaG6JcapWCLckNe83zbm6Eqhv3dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727515573; a=rsa-sha256; cv=none; b=ZeLUGj8/V8x7Iw6MHJ14bVVN/+4J+XFc+lrZtP/afDf+6aehONhOZ1RjL2rM8CWMl1HmYm lrE9OOvCoSbhx58dCl8huqjpFRy/PjfOoq3l3Z62BB8yATWbI4wgEqvyh0k7XwFoQ15SMH PNzTwOM3vcXjCIeIxcZ1gjWA4bOjEduSnJ3iCisuMCLSzAIQ9hZDPCJs2L21HI1NkiH7aO NZMaSzIm9FAc/46QYQRLKTnAJj52fZJMe7y3rhxUMjHYgztXsFeELUIIwKep5mSChsybeL j+eHQ14PIuViuBYfyPryLgnfN8XIY9o5Idsio6cSuyXGsQZppb/Q5T7pLiY18w== 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 4XG25K2nkxzK45; Sat, 28 Sep 2024 09:26:13 +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 48S9QDe8077280; Sat, 28 Sep 2024 09:26:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48S9QDbD077277; Sat, 28 Sep 2024 09:26:13 GMT (envelope-from git) Date: Sat, 28 Sep 2024 09:26:13 GMT Message-Id: <202409280926.48S9QDbD077277@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: 76e57cf9ded8 - stable/13 - ixgbe: fix fw_recovery_mode callout 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/13 X-Git-Reftype: branch X-Git-Commit: 76e57cf9ded8df8263a7b0e5eac56840821a0634 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=76e57cf9ded8df8263a7b0e5eac56840821a0634 commit 76e57cf9ded8df8263a7b0e5eac56840821a0634 Author: Kevin Bowling AuthorDate: 2024-09-21 11:10:11 +0000 Commit: Kevin Bowling CommitDate: 2024-09-28 09:25:43 +0000 ixgbe: fix fw_recovery_mode callout Need to pass the softc in with the callout arg (cherry picked from commit a924b5ee6a1b4456b5bde979bb9e15d18726de4f) --- sys/dev/ixgbe/if_ix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index 2af927996aca..23e378ba70c6 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1151,7 +1151,7 @@ ixgbe_if_attach_post(if_ctx_t ctx) callout_init(&sc->fw_mode_timer, true); /* Start the task */ - callout_reset(&sc->fw_mode_timer, hz, ixgbe_fw_mode_timer, 0); + callout_reset(&sc->fw_mode_timer, hz, ixgbe_fw_mode_timer, sc); } return (0); From nobody Sat Sep 28 10:38:04 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 4XG3hF0dH6z5X8V5; Sat, 28 Sep 2024 10:38:05 +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 4XG3hD6yHQz46VJ; Sat, 28 Sep 2024 10:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519885; 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=jFMtQ1z1NWufItF3k5M31mO5Wn0FiBcUPyJIakvCLoY=; b=dtWqJh3c3Km4RvtQA/lWggPPeoy+jS403Ihw6tw7uT+hjXtwa4qAZobcDUEeSielAjRZ03 T6HU9AS/hR4jUpM5EvsapChMFQ8tqan6By2mCxpyToRx8zQQP+unTLGO31UIBJ0cAsjGB+ r70On2DhpKXbSsHm7C67mRaBtOedHy2La0c0/Gj7IN8BMcF4q1NbSyCmlZFX/dlskkWmB9 t77I8WLZBmCgo/xGAWkdUiZghMtpxvrkH7V8duST7k9eOJ4WwcWaFBVAI1hHvPaXVX2n7+ EUfKCH6B6Q3DVWbxpROtszHj1B0nA+NPELk9vDfuFfBOYvBDs3p1GZGTimBcDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519885; 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=jFMtQ1z1NWufItF3k5M31mO5Wn0FiBcUPyJIakvCLoY=; b=vSfA9vaZwojcwvUTMt1iwW4La3JxWz5Y2x4H53Cq5R4DfOmreA947Ex5koqKCae3mJtRWj vy73NFDCYChwWLvX67ukMCJjkaW7S/a7nwmZQvrzSFmvrz+oFG6s2+aZoDWO/QDw3RgvsT uAhd2c1gMN4o+XKZUiLZGy4TP7jtMTEAliETfMP9nAnZDFo4s0cMT+/dkpN4ut4rfDwFwN LMgFTWvsxs63nVR1MSrrETmtNErlEAfZxjX8ECI+Ut1YhCIxFwJqo3dn/xem7nR7QaH+hN oYDE+3FoB+04rugMS78oBrd9Xx7wTMwtEMB+bvgnKo71v1NZzXzXHdLjqX5WwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519885; a=rsa-sha256; cv=none; b=QlYv/rLLfYyHNjqiLIJQylICcaaj0Q9jSFbbB6nmOZBxOT0rJDh6kxGXYDcTwnINFFsGNQ 75lbCIsj4fv5zHuRVZkO9w1bkCkk2heJOiia5BUPizaDMOSQuSvtt4JRpV29xiq4qseG+a j1F9hME+/h96kjpWJWi9qmjGZn1gH53W0JnXZ6LV1iQlrL/QBhZxyJtQnvNZBMruxSe8Hu ai9GHTIlkT+TLh64FKvq2DWmp+0N8wd9RrYBVcCkU/JlhzqjXAfKCCa+ErRony/zA0Dymg huLNRwqsc9A2bWskT7PgaCSZVjVhOmlDFjMTFxIkJE1qcYBoVJH07hd7EjsqmA== 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 4XG3hD686vzKyx; Sat, 28 Sep 2024 10:38:04 +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 48SAc4LK097335; Sat, 28 Sep 2024 10:38:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAc4M7097332; Sat, 28 Sep 2024 10:38:04 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:04 GMT Message-Id: <202409281038.48SAc4M7097332@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ff26fd77ee44 - stable/14 - libc/getnameinfo: stop adding NI_NUMERICHOST where inappropriate 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ff26fd77ee44de1b2a4c0a527deb6eb44c2fa238 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ff26fd77ee44de1b2a4c0a527deb6eb44c2fa238 commit ff26fd77ee44de1b2a4c0a527deb6eb44c2fa238 Author: Bjoern A. Zeeb AuthorDate: 2024-06-10 11:34:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:11 +0000 libc/getnameinfo: stop adding NI_NUMERICHOST where inappropriate Checking the first nibble of the IPv6 address to be 0 and then excluding two well known cases (v4-mapped, loopback) leaves us with more cases where the first nibble could be 0, e.g., the RFC 6052, 2.1 Well-Known Prefix 64:ff9b::/96. It is not practical to track them all and it is not clear what lead to this special casing originally, so remove them. While here also remove the IN6_IS_ADDR_LINKLOCAL() + NI_NUMERICHOST case as link-local address resolution does exist. We do leave the IN6_IS_ADDR_MULTICAST() case for now as I could not find any references to any official reverse lookups for these. Adding comments for more case (and some historic behaviour) in order to make it easier to follow the logic. PR: 279618 Fixes: 6cb9418289f90 Reviewed by: hrs Differential Revision: https://reviews.freebsd.org/D45547 (cherry picked from commit c179937b986ec3959d89bfeb8eed0a6f58a28649) --- lib/libc/net/getnameinfo.c | 54 +++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/lib/libc/net/getnameinfo.c b/lib/libc/net/getnameinfo.c index 7ab490abb67f..01bceaa98fce 100644 --- a/lib/libc/net/getnameinfo.c +++ b/lib/libc/net/getnameinfo.c @@ -229,24 +229,44 @@ getnameinfo_inet(const struct afd *afd, case AF_INET6: { const struct sockaddr_in6 *sin6; + sin6 = (const struct sockaddr_in6 *)sa; - switch (sin6->sin6_addr.s6_addr[0]) { - case 0x00: - if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) - ; - else if (IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr)) - ; - else - flags |= NI_NUMERICHOST; - break; - default: - if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { - flags |= NI_NUMERICHOST; - } - else if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) - flags |= NI_NUMERICHOST; - break; - } + + /* + * https://pubs.opengroup.org/onlinepubs/9699919799/functions/getnameinfo.html + * "[IP6] [Option Start] If the socket address structure + * contains an IPv4-mapped IPv6 address or an IPv4-compatible + * IPv6 address, the implementation shall extract the embedded + * IPv4 address and lookup the node name for that IPv4 address. + * [Option End]" + * => getipnodebyaddr() handles this case for us. + * => in case of NI_NUMERICHOST being set, inet_ntop[6] will + * handle it too. + * + * "If the address is the IPv6 unspecified address ( "::" ), + * a lookup shall not be performed and the behavior shall be + * the same as when the node's name cannot be located." + * => getipnodebyaddr() handles this case for us. + * => in case of NI_NUMERICHOST being set, + * ip6_parsenumeric() -> inet_ntop[6] will handle it too. + */ + + /* + * We used to exclude link-local from lookups. + * Even though calles in the resolver chain may not (yet) + * properly deal with them, we no longer do as for link-local + * there is a path to resolve these. See: + * RFC 6303 4.5. IPv6 Link-Local Addresses + * RFC 6762 4. Reverse Address Mapping + * + * XXX For IPv6 MC the only reference found was + * https://www.ietf.org/archive/id/draft-michaelson-as112-ipv6-02.html + * but there are also no "empty zone"s for x.0.f.f.ip6.arpa + * in DNS servers. Keep catching it here for now and + * do not attempt name resolution but return the address string. + */ + if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) + flags |= NI_NUMERICHOST; } break; #endif From nobody Sat Sep 28 10:38:05 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 4XG3hG2Tw5z5X8PZ; Sat, 28 Sep 2024 10:38:06 +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 4XG3hG0JWrz46mX; Sat, 28 Sep 2024 10:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519886; 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=w25uqO8mHEL3yboGbCV7ioUkf64JMjLIRnz6K0etaBA=; b=sN15J0B5+Ee2ZSA2pMst1QbBNHVmzWcTvvhCN2c5zfJnELUo+/e6xafKJeLJ0JETRtc/4u FMrx0eQi439Uc6VpUvtBiGrtUCah57dT7quHyFYbAKiXX562EYmnTQyf9505OBn2aB3HSV GFAUMi0a27ZeCnrJohMnnMese+XbFnp8F3Z2AuRl+hsia6AJKjyBkLg4q2YQzeu2O92/Pj rKHkidNJLlwIzH7/sYithOPcwsq5crjPTzemSltDUoHUmxFGOe4/1XFPi4Qzc2sLHb6csS E4pTm2H5tE98M8zfhnkInaaRzByAlsEtWSEeP4+Kahgc/RetDOUzQgToiBKyJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519886; 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=w25uqO8mHEL3yboGbCV7ioUkf64JMjLIRnz6K0etaBA=; b=B3cheRH/j2AodYc0/IOPXtY4lEY4Y1plWj148sFezTE/3DYWpWtS5q3tyS2q6jQt4llktL qlxzIV78SdhCOf2XXI3U0GBI6+OpQkTgCfGmGFknNBpUqkQ6lqQjiU+QHSUtCPxVNi2/q8 mbnNkBNPcsRR8Mg/+RoR3aGj8KChq+Q83u08B6M+wv14ZA6R2tPf3DvrGwV71/+dI6wiqe sG5/LU1oqWX+GdwJF+OCYOxhejGf3tDuDqACCOmlZJnh80T4pwk3f91l9PWYYiBmRVOyrz mllq1sRLlEKYWpI4jnZUFdZ1417NeaJd80MqnoBzWz1GFd75zJ0B5jooQSo/lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519886; a=rsa-sha256; cv=none; b=X0mDOWIJZ1AEkWpS74rx8JxVhfywkZALaT5tAmBmVQ/LLnvsl9RWDbXe7c4b2yK+xtdCaX +Djxfzd8jTR8zn7jqd5fKWkZKdQzw2Zx7oFqNvIvqn3y6xysgHj0Nax5o8DU1SYfOjLsQb GGfn/3aYY1hGlB6hax46gTrycXljypREr921PBIZGDw4qC5kQ8cCvM8FUcxY+e3/744NUn wYJQdDpS/hSRUiNB7N5u9f6oZVRwNqTrI1ESv78cRu2VXBtvdj4EAAthiaOfiZz+4TFcQr B/4zk8C5WMgH8PHFBLCQfd+nD5qD5xUmmaeOcidC9oby/dtMAwNY7XXu9VD/7Q== 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 4XG3hF6sS8zLYp; Sat, 28 Sep 2024 10:38:05 +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 48SAc5hh097395; Sat, 28 Sep 2024 10:38:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAc5vE097392; Sat, 28 Sep 2024 10:38:05 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:05 GMT Message-Id: <202409281038.48SAc5vE097392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: d60a0ffecfdf - stable/14 - rc: network.subr update consitency with older change (v6/v4 order) 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d60a0ffecfdf6f29ff52c9b71d2d5b6d2a34fddb Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d60a0ffecfdf6f29ff52c9b71d2d5b6d2a34fddb commit d60a0ffecfdf6f29ff52c9b71d2d5b6d2a34fddb Author: Bjoern A. Zeeb AuthorDate: 2024-09-04 19:03:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:11 +0000 rc: network.subr update consitency with older change (v6/v4 order) As of 1b5be7204eaeeaf58eefdebe5b308f90792c693b we setup parts of IPv6 before IPv4 if configured. For consistency change a case in ifn_start() calling ipv6_up() before ipv4_up() and reverse in ifn_stop(). Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D33426 (cherry picked from commit ed4d2a54fc7a0397c2042f496f176305ca03ebdd) --- libexec/rc/network.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/network.subr b/libexec/rc/network.subr index 257643f48ba5..931fbec19a60 100644 --- a/libexec/rc/network.subr +++ b/libexec/rc/network.subr @@ -46,8 +46,8 @@ ifn_start() ifscript_up ${ifn} && cfg=0 ifconfig_up ${ifn} && cfg=0 if ! noafif $ifn; then - afexists inet && ipv4_up ${ifn} && cfg=0 afexists inet6 && ipv6_up ${ifn} && cfg=0 + afexists inet && ipv4_up ${ifn} && cfg=0 fi childif_create ${ifn} && cfg=0 @@ -67,8 +67,8 @@ ifn_stop() [ -z "$ifn" ] && err 1 "ifn_stop called without an interface" if ! noafif $ifn; then - afexists inet6 && ipv6_down ${ifn} && cfg=0 afexists inet && ipv4_down ${ifn} && cfg=0 + afexists inet6 && ipv6_down ${ifn} && cfg=0 fi ifconfig_down ${ifn} && cfg=0 ifscript_down ${ifn} && cfg=0 From nobody Sat Sep 28 10:38:07 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 4XG3hH4Mcpz5X8Xc; Sat, 28 Sep 2024 10:38:07 +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 4XG3hH1vKlz46mr; Sat, 28 Sep 2024 10:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519887; 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=X5nX1q2pgdpJCzoBMRKEdsSy4P/btljbx250/e9vO/U=; b=vnjEqQdyiHenkasE9YKUz6pkOy4bcEE8hRADyWeF5Npoyz5Qe2aa1R3XRXurnviETy1Gcw Y0X3kerT5qdQyrJEdOZ5n3WHx5ZwLQ3HbH8mNwvpTaaNxw28zJEERM7SnsvrD8+i5PccRr p2+bDd7U0xuGbHtIKGv4wlccw26RJkY0Ktq97e/NwHKBk8yYRKOqZmN/SW4yoKxR9JHNlu eDkB7xxALG1Zbwoav0QOvVovYZK0LUpl8hW6ZlGFVrkzGP0Lw1/HC9aaC3dz6A5cMoZ28e fWAoD0Fl2ise4nZcJmgWK9m0pxRx9/bTgQvb/sGewq18vaBhWQ8CikSAqhmH1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519887; 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=X5nX1q2pgdpJCzoBMRKEdsSy4P/btljbx250/e9vO/U=; b=Be5qa/c2hpEZVvBqdCkX2reZU+ecKwUYXiBkHYrN9NRqbwGtFYVkps7Ya/ea2XUgpls9Xx kyXlW89CfRT/2qEUERTVc9QYuOsq4w0Y/+C2jUYWYxgeEP8My6kndjmh2sw66LDDpD+hhc ybeImbZC0jkVv2tS3+9vRE5qouOUOs7tTosmb/cYB79hSgJh3YvM5HdbSri6xUO0CzAFK5 pvGkIC3GvrZ2p84jQBHV8dCKhfAWmigQtvzX4jbUeRfju6bT/aHAjFPTd2upEjeQSJOGSn X952aOMBaWSCgjSI3sKQBl8RF97x4L6iL3FjPsNqXqhYSvX0FyGg2MexQBEhLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519887; a=rsa-sha256; cv=none; b=h2uit+aFemNR3D+rWgk0wbDXfSKDPpJolyyMhOO8CluvwrOQRJJYUJD3oHs5Ny5bs+rrP6 yMV/lfYDyne3YYpiyNp3hjE9ngz0qEG8bS9nSrszYXKVzj1cgmF2UXuLJQfnap97sKEiQY Y1HTHRQhhzvRC06rIIiZJtCSk5y2vWSJIDTbRHpZZ43HE4ZfvnldWza4VhbXZlnwiZFLfJ E54Hanzzd0IlysUpxIUBdpFG9PAFiuNReS5odu7Xrp1qo/daxb+JEsyV9/pxnZSQOw5Xg0 z7lteHQyFgwxg0IMCJumZjUjyruzI4Vn7ntZNjSqz/eASk2oNHn1MJvOzYCkYg== 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 4XG3hH12YRzLrB; Sat, 28 Sep 2024 10:38:07 +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 48SAc7DL097444; Sat, 28 Sep 2024 10:38:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAc7Eq097440; Sat, 28 Sep 2024 10:38:07 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:07 GMT Message-Id: <202409281038.48SAc7Eq097440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 6f58191b301d - stable/14 - mmccam: fix mmcsd disk aliases 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6f58191b301df3a43aea40c2c98d62f8178e2b60 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6f58191b301df3a43aea40c2c98d62f8178e2b60 commit 6f58191b301df3a43aea40c2c98d62f8178e2b60 Author: Bjoern A. Zeeb AuthorDate: 2024-01-21 19:56:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:11 +0000 mmccam: fix mmcsd disk aliases For EXT_CSD_PART_CONFIG_ACC_BOOT and possibly others with suffixes we fail to create proper disk aliases (symlinks), which shows up as g_dev_taste: make_dev_alias_p() failed (name=mmcsd0, error=17) In this case we ended up with the followng two: /dev/mmcsd0 -> sdda0 /dev/mmcsd1 -> sdda0boot1 Note that (i) it should be mmcsd0boot1 and not mmcsd1 and that (ii) there is no mmcsd0boot0 (failed above as it tried to create a second mmcsd0). Adjust the code (using a highly simplified version--compared to my original approach--suggested by imp) using an extended format string with (sdda/mmcsd) prefix as first argument to create proper names. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43538 (cherry picked from commit a84d91d81a6f3eeb4949c4fb3440e0634f2b953a) --- sys/cam/mmc/mmc_da.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c index 0809de6e0764..de6e89a4da38 100644 --- a/sys/cam/mmc/mmc_da.c +++ b/sys/cam/mmc/mmc_da.c @@ -89,9 +89,11 @@ typedef enum { SDDA_STATE_PART_SWITCH, } sdda_state; -#define SDDA_FMT_BOOT "sdda%dboot" -#define SDDA_FMT_GP "sdda%dgp" -#define SDDA_FMT_RPMB "sdda%drpmb" +/* Purposefully ignore a '%d' argument to snprintf in SDDA_FMT! */ +#define SDDA_FMT "%s" +#define SDDA_FMT_BOOT "%s%dboot" +#define SDDA_FMT_GP "%s%dgp" +#define SDDA_FMT_RPMB "%s%drpmb" #define SDDA_LABEL_ENH "enh" #define SDDA_PART_NAMELEN (16 + 1) @@ -1481,7 +1483,7 @@ finish_hs_tests: sdda_process_mmc_partitions(periph, start_ccb); } else if (mmcp->card_features & CARD_FEATURE_MEMORY) { /* For SD[HC] cards, just add one partition that is the whole card */ - if (sdda_add_part(periph, 0, "sdda", + if (sdda_add_part(periph, 0, SDDA_FMT, periph->unit_number, mmc_get_media_size(periph), sdda_get_read_only(periph, start_ccb)) == false) @@ -1526,7 +1528,7 @@ sdda_add_part(struct cam_periph *periph, u_int type, const char *name, part->type = type; part->ro = ro; part->sc = sc; - snprintf(part->name, sizeof(part->name), name, periph->unit_number); + snprintf(part->name, sizeof(part->name), name, "sdda", periph->unit_number); /* * Due to the nature of RPMB partition it doesn't make much sense @@ -1593,8 +1595,11 @@ sdda_add_part(struct cam_periph *periph, u_int type, const char *name, part->disk->d_fwsectors = 0; part->disk->d_fwheads = 0; - if (sdda_mmcsd_compat) - disk_add_alias(part->disk, "mmcsd"); + if (sdda_mmcsd_compat) { + char cname[SDDA_PART_NAMELEN]; /* This equals the mmcsd namelen. */ + snprintf(cname, sizeof(cname), name, "mmcsd", periph->unit_number); + disk_add_alias(part->disk, cname); + } /* * Acquire a reference to the periph before we register with GEOM. @@ -1683,7 +1688,7 @@ sdda_process_mmc_partitions(struct cam_periph *periph, union ccb *ccb) * data area in case partitions are supported. */ ro = sdda_get_read_only(periph, ccb); - sdda_add_part(periph, EXT_CSD_PART_CONFIG_ACC_DEFAULT, "sdda", + sdda_add_part(periph, EXT_CSD_PART_CONFIG_ACC_DEFAULT, SDDA_FMT, periph->unit_number, mmc_get_media_size(periph), ro); sc->part_curr = EXT_CSD_PART_CONFIG_ACC_DEFAULT; From nobody Sat Sep 28 10:38:08 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 4XG3hJ4Rm9z5X85F; Sat, 28 Sep 2024 10:38:08 +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 4XG3hJ2QLDz46kj; Sat, 28 Sep 2024 10:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519888; 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=j3fkGKtDZP9DIj/bO/3nn0fyg8FnoUuImTJy8NVlPJA=; b=EiWWm/9JnQf3AfpUSZ8MSLYosV6OHD3tCACeS6STcpt5v3lQoE/DCMRZd+juopGO3DnAX7 y1nsmIIGjypoD3sKLAQcUyHdvDAsgyHfE57VlFidlyYVpUsJjotudU2OwNbrAjFIlDdrWn ImGV9kMXicsk19KzTMoMq1WKwoDNJ3oj/HjWS2lh3xsKYv1CTwJFYmil6LS6zFWWvdpTS+ 3Ny0ho1mmwmqNVlSh5BpyvKcQ6dra0YM3MfSgVoQYabPNVGUMGAldQj3hAZD1kjHaWSOl7 nHpmZy+ND+Fx8T1oRnJpwrWIm1vH7iOZ6VLdbnco3ZuwoGDHCDZBK02v3sl/Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519888; 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=j3fkGKtDZP9DIj/bO/3nn0fyg8FnoUuImTJy8NVlPJA=; b=ErgV9YRtPD4Mc9KYB6Xh97mvmWkM6JPIg5ke0S+zvYPgZyIA0kP2x62lril8QY5km2VqiL q97YBwB6PG3yzhDl3mYzztYfjE4ms8QjfDHuLQ17na0LqCCdkn2TlkP0Gq5i5+YPDPrz+H yqsDSL22BI4AMLKotkW5zk2+Zhiw3XYhPKREjamu+tnj7KN96AmmyvBYPPO/xeCbzgs3dM +8sV3+T0xbbk+qOfWuierD4mbFnEnemj9u/Bkt5TsfUaCP0/61BcivbczuEa1mK7VJjse9 Szlhh3CewsFoajr1SCLzoThU3wHJyh64bTAKkIBnN2+HilCyxv4ld6yULBhV1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519888; a=rsa-sha256; cv=none; b=U4kaR9Dkhqy60fgxyVsRnjqzzJeFrmSXu7IEsTSXHU2UoXkRFLFELldTtaK1aopI+1FZ43 LX2OfkAa9nuhSzl6pu3P6E4uMjrYCx00Ugc/SYc2TRywsY7fI9T+W2Dkaga8jg6ZpQWP5Z a9vYgrurPzUFQSxtA9bsxd2pyyYoVNTMIDHqrbGjCTVySM2fMOYB+SOwa4wYD+W7iEofk9 wdExWxiNVFjkHxipl5tVrBUGXDfe4npv8DmbpdwnYsnODRJ4JSlcShqfOYQEOtyFiqztD/ ReLQgTGtkIAEbSw4Tk3s9kNQt/c64VsPhfx6kpw/iX7D5d+SKj16lG+OuyGE5Q== 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 4XG3hJ1l7gzLt3; Sat, 28 Sep 2024 10:38:08 +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 48SAc82W097498; Sat, 28 Sep 2024 10:38:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAc8LH097495; Sat, 28 Sep 2024 10:38:08 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:08 GMT Message-Id: <202409281038.48SAc8LH097495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 1eb6c9cfc9b0 - stable/14 - malloc(9): extend contigmalloc(9) by a "slab cookie" 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1eb6c9cfc9b0aa4d3bcef342faed25391c421b24 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1eb6c9cfc9b0aa4d3bcef342faed25391c421b24 commit 1eb6c9cfc9b0aa4d3bcef342faed25391c421b24 Author: Bjoern A. Zeeb AuthorDate: 2024-06-30 19:00:44 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:11 +0000 malloc(9): extend contigmalloc(9) by a "slab cookie" Extend kern_malloc.c internals to also cover contigmalloc(9) by a "slab cookie" and not just malloc/malloc_large. This allows us to call free(9) even on contigmalloc(9) addresses and deprecate contigfree(9). Update the contigmalloc(9) man page accordingly. The way this is done (free(9) working for contigmalloc) will hide the UMA/VM bits from a consumer which may otherwise need to know whether the original allocation was by malloc or contigmalloc by looking at the cookie (likely via an accessor function). This simplifies the implementation of consumers of mixed environments a lot. This is preliminary work to allow LinuxKPI to be adjusted to better play by the rules Linux puts out for various allocations. Most of this was described/explained to me by jhb. One may observe that realloc(9) is currently unchanged (and contrary to [contig]malloc/[contig]free an implementation may need access the "slab cookie" information given it will likely be implementation dependent which allocation type to use if size changes beyond the usable size of the initial allocation). Described by: jhb Sponsored by: The FreeBSD Foundation Reviewed by: markj, kib Differential Revision: https://reviews.freebsd.org/D45812 (cherry picked from commit 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b) --- share/man/man9/contigmalloc.9 | 9 ++- sys/kern/kern_malloc.c | 128 +++++++++++++++++++++++++++++++++--------- 2 files changed, 108 insertions(+), 29 deletions(-) diff --git a/share/man/man9/contigmalloc.9 b/share/man/man9/contigmalloc.9 index f52cb7bde0ed..9e7086885870 100644 --- a/share/man/man9/contigmalloc.9 +++ b/share/man/man9/contigmalloc.9 @@ -23,7 +23,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 30, 2018 +.Dd July 22, 2024 .Dt CONTIGMALLOC 9 .Os .Sh NAME @@ -113,6 +113,13 @@ function deallocates memory allocated by a previous call to .Fn contigmalloc or .Fn contigmalloc_domainset . +Its use is deprecated in favor of +.Xr free 9 +which no longer requires the caller to know the +.Fa size +and also accepts +.Dv NULL +as an address. .Sh IMPLEMENTATION NOTES The .Fn contigmalloc diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 08530b2a8930..90fc88480a40 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -118,6 +118,16 @@ dtrace_malloc_probe_func_t __read_mostly dtrace_malloc_probe; #define DEBUG_REDZONE_ARG #endif +typedef enum { + SLAB_COOKIE_SLAB_PTR = 0x0, + SLAB_COOKIE_MALLOC_LARGE = 0x1, + SLAB_COOKIE_CONTIG_MALLOC = 0x2, +} slab_cookie_t; +#define SLAB_COOKIE_MASK 0x3 +#define SLAB_COOKIE_SHIFT 2 +#define GET_SLAB_COOKIE(_slab) \ + ((slab_cookie_t)(uintptr_t)(_slab) & SLAB_COOKIE_MASK) + /* * When realloc() is called, if the new size is sufficiently smaller than * the old size, realloc() will allocate a new, smaller block to avoid @@ -453,6 +463,21 @@ malloc_type_freed(struct malloc_type *mtp, unsigned long size) * If M_NOWAIT is set, this routine will not block and return NULL if * the allocation fails. */ +#define IS_CONTIG_MALLOC(_slab) \ + (GET_SLAB_COOKIE(_slab) == SLAB_COOKIE_CONTIG_MALLOC) +#define CONTIG_MALLOC_SLAB(_size) \ + ((void *)(((_size) << SLAB_COOKIE_SHIFT) | SLAB_COOKIE_CONTIG_MALLOC)) +static inline size_t +contigmalloc_size(uma_slab_t slab) +{ + uintptr_t va; + + KASSERT(IS_CONTIG_MALLOC(slab), + ("%s: called on non-contigmalloc allocation: %p", __func__, slab)); + va = (uintptr_t)slab; + return (va >> SLAB_COOKIE_SHIFT); +} + void * contigmalloc(unsigned long size, struct malloc_type *type, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, @@ -462,8 +487,11 @@ contigmalloc(unsigned long size, struct malloc_type *type, int flags, ret = (void *)kmem_alloc_contig(size, flags, low, high, alignment, boundary, VM_MEMATTR_DEFAULT); - if (ret != NULL) + if (ret != NULL) { + /* Use low bits unused for slab pointers. */ + vsetzoneslab((uintptr_t)ret, NULL, CONTIG_MALLOC_SLAB(size)); malloc_type_allocated(type, round_page(size)); + } return (ret); } @@ -476,25 +504,28 @@ contigmalloc_domainset(unsigned long size, struct malloc_type *type, ret = (void *)kmem_alloc_contig_domainset(ds, size, flags, low, high, alignment, boundary, VM_MEMATTR_DEFAULT); - if (ret != NULL) + if (ret != NULL) { + /* Use low bits unused for slab pointers. */ + vsetzoneslab((uintptr_t)ret, NULL, CONTIG_MALLOC_SLAB(size)); malloc_type_allocated(type, round_page(size)); + } return (ret); } /* - * contigfree: + * contigfree (deprecated). * * Free a block of memory allocated by contigmalloc. * * This routine may not block. */ void -contigfree(void *addr, unsigned long size, struct malloc_type *type) +contigfree(void *addr, unsigned long size __unused, struct malloc_type *type) { - - kmem_free(addr, size); - malloc_type_freed(type, round_page(size)); + free(addr, type); } +#undef IS_CONTIG_MALLOC +#undef CONTIG_MALLOC_SLAB #ifdef MALLOC_DEBUG static int @@ -564,22 +595,19 @@ malloc_dbg(caddr_t *vap, size_t *sizep, struct malloc_type *mtp, /* * Handle large allocations and frees by using kmem_malloc directly. */ -static inline bool -malloc_large_slab(uma_slab_t slab) -{ - uintptr_t va; - - va = (uintptr_t)slab; - return ((va & 1) != 0); -} - +#define IS_MALLOC_LARGE(_slab) \ + (GET_SLAB_COOKIE(_slab) == SLAB_COOKIE_MALLOC_LARGE) +#define MALLOC_LARGE_SLAB(_size) \ + ((void *)(((_size) << SLAB_COOKIE_SHIFT) | SLAB_COOKIE_MALLOC_LARGE)) static inline size_t malloc_large_size(uma_slab_t slab) { uintptr_t va; va = (uintptr_t)slab; - return (va >> 1); + KASSERT(IS_MALLOC_LARGE(slab), + ("%s: called on non-malloc_large allocation: %p", __func__, slab)); + return (va >> SLAB_COOKIE_SHIFT); } static caddr_t __noinline @@ -591,8 +619,8 @@ malloc_large(size_t size, struct malloc_type *mtp, struct domainset *policy, size = roundup(size, PAGE_SIZE); va = kmem_malloc_domainset(policy, size, flags); if (va != NULL) { - /* The low bit is unused for slab pointers. */ - vsetzoneslab((uintptr_t)va, NULL, (void *)((size << 1) | 1)); + /* Use low bits unused for slab pointers. */ + vsetzoneslab((uintptr_t)va, NULL, MALLOC_LARGE_SLAB(size)); uma_total_inc(size); } malloc_type_allocated(mtp, va == NULL ? 0 : size); @@ -615,6 +643,8 @@ free_large(void *addr, size_t size) kmem_free(addr, size); uma_total_dec(size); } +#undef IS_MALLOC_LARGE +#undef MALLOC_LARGE_SLAB /* * malloc: @@ -916,18 +946,30 @@ free(void *addr, struct malloc_type *mtp) vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); if (slab == NULL) - panic("free: address %p(%p) has not been allocated.\n", + panic("free: address %p(%p) has not been allocated", addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); - if (__predict_true(!malloc_large_slab(slab))) { + switch (GET_SLAB_COOKIE(slab)) { + case __predict_true(SLAB_COOKIE_SLAB_PTR): size = zone->uz_size; #if defined(INVARIANTS) && !defined(KASAN) free_save_type(addr, mtp, size); #endif uma_zfree_arg(zone, addr, slab); - } else { + break; + case SLAB_COOKIE_MALLOC_LARGE: size = malloc_large_size(slab); free_large(addr, size); + break; + case SLAB_COOKIE_CONTIG_MALLOC: + size = contigmalloc_size(slab); + kmem_free(addr, size); + size = round_page(size); + break; + default: + panic("%s: addr %p slab %p with unknown cookie %d", __func__, + addr, slab, GET_SLAB_COOKIE(slab)); + /* NOTREACHED */ } malloc_type_freed(mtp, size); } @@ -959,7 +1001,8 @@ zfree(void *addr, struct malloc_type *mtp) panic("free: address %p(%p) has not been allocated.\n", addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); - if (__predict_true(!malloc_large_slab(slab))) { + switch (GET_SLAB_COOKIE(slab)) { + case __predict_true(SLAB_COOKIE_SLAB_PTR): size = zone->uz_size; #if defined(INVARIANTS) && !defined(KASAN) free_save_type(addr, mtp, size); @@ -967,11 +1010,22 @@ zfree(void *addr, struct malloc_type *mtp) kasan_mark(addr, size, size, 0); explicit_bzero(addr, size); uma_zfree_arg(zone, addr, slab); - } else { + break; + case SLAB_COOKIE_MALLOC_LARGE: size = malloc_large_size(slab); kasan_mark(addr, size, size, 0); explicit_bzero(addr, size); free_large(addr, size); + break; + case SLAB_COOKIE_CONTIG_MALLOC: + size = round_page(contigmalloc_size(slab)); + explicit_bzero(addr, size); + kmem_free(addr, size); + break; + default: + panic("%s: addr %p slab %p with unknown cookie %d", __func__, + addr, slab, GET_SLAB_COOKIE(slab)); + /* NOTREACHED */ } malloc_type_freed(mtp, size); } @@ -1018,10 +1072,20 @@ realloc(void *addr, size_t size, struct malloc_type *mtp, int flags) ("realloc: address %p out of range", (void *)addr)); /* Get the size of the original block */ - if (!malloc_large_slab(slab)) + switch (GET_SLAB_COOKIE(slab)) { + case __predict_true(SLAB_COOKIE_SLAB_PTR): alloc = zone->uz_size; - else + break; + case SLAB_COOKIE_MALLOC_LARGE: alloc = malloc_large_size(slab); + break; + default: +#ifdef INVARIANTS + panic("%s: called for addr %p of unsupported allocation type; " + "slab %p cookie %d", __func__, addr, slab, GET_SLAB_COOKIE(slab)); +#endif + return (NULL); + } /* Reuse the original block if appropriate */ if (size <= alloc && @@ -1103,10 +1167,18 @@ malloc_usable_size(const void *addr) panic("malloc_usable_size: address %p(%p) is not allocated.\n", addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); - if (!malloc_large_slab(slab)) + switch (GET_SLAB_COOKIE(slab)) { + case __predict_true(SLAB_COOKIE_SLAB_PTR): size = zone->uz_size; - else + break; + case SLAB_COOKIE_MALLOC_LARGE: size = malloc_large_size(slab); + break; + default: + __assert_unreachable(); + size = 0; + break; + } #endif /* From nobody Sat Sep 28 10:38:09 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 4XG3hK6JZPz5X8M1; Sat, 28 Sep 2024 10:38:09 +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 4XG3hK3gRTz46kw; Sat, 28 Sep 2024 10:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519889; 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=h+0qmLGeosD9dKZtIqtgJjCicL0zuuxSQkPWK9FD8LU=; b=qE/0x+87mPGs2oyzPRBeI7p3YMMnuAMcD6BIVbvAIC6kjt5CIPz+/O3vorP9tkm/bJEpBU 9fUOFMuNlxi9F5x7z7mRuddlH88sa7CK9WW47MAVhSRG7NMOCA+6gnWOlSHGkI7WaQVeH+ TwJtar5MWtvpcl3ca73rpBg/B0ZjVPO2e8SB32p0JjoNJhiVJsnP/EON7eM4rGdpzHTgSN ZmmyOeOH7ap5y45oDWVjqusGHTVz7XrYdrxlnRQDSHbdTz9RRjwDJMoGfS0b3lKFJgg0W6 j7WIqOOxiY2CmWZ0yZZVKsM+PsY9H62i9GpftF09tFoL5ZbQZLRbf8j1wRuO6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519889; 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=h+0qmLGeosD9dKZtIqtgJjCicL0zuuxSQkPWK9FD8LU=; b=ctKvV2ZgGTyxmaI8SZGoQ/szOaqaUR9XNDeBQxCFTRHfwGMS1XqT43f8Plagb60JsqV84D QJZPV+aMPJ+Lid4Mq+DN04ZD1dA069ECxsBwztMx9eLTCRVe8y/rXZR0sfxZIDawOUNt3K GmKwBoZu/H2jv9dXpx4Qdvos6BKO86Yv9yUIVu7XKWjHiP7vblWw3cgewG7/Zh+MTcLbQ0 ZzV/pYm7vMUbmVduLC8bZY/24I5+dkoXh1nQKFhtE/M3I/AgPj5KUer+tBRm97pZ7ML2jY GNd7jx4jtasw8iqbZSiLuCzUua0/f8JKD6R5Ic94Ln3qaT/IGvilzrhrvUHsww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519889; a=rsa-sha256; cv=none; b=qHLoKN+v3EjekeLIPxygsqhbiYJ/EGjRtdd6pEZ3VtCxYZKakz6JiO7MiQ8w1sGdQQZIV+ nki8fbcbFR2OgazJdyxjPCr8XngVFAddtPfahW7Lvi8kyHaFPFhWbbTel51M8/vWxm/QUg ZAnZi1y6wkoqpBrtyD/UOgKqoxwqGBljeLfe++vagW7ghh0DMZU0cP5Puy/t6gty4Ld2mQ TnGHSpF0euqc9DEI0u28BwQ5rusewjxfimVsxiBlhqmw7cIqCP30bx18UNpW/RJfM+VVKx 1NXUO7mwPHAx0f/PhXKTiFq4ZZ3bGbttwhL3Cn2P8PEpA/6SAfo6ZbqoQkGQ1w== 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 4XG3hK2n2PzLc1; Sat, 28 Sep 2024 10:38:09 +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 48SAc9TF097549; Sat, 28 Sep 2024 10:38:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAc9iG097546; Sat, 28 Sep 2024 10:38:09 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:09 GMT Message-Id: <202409281038.48SAc9iG097546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 1364bc30deec - stable/14 - kern_malloc: remove '.' and '\n' from KASSERT/panic 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1364bc30deec992a3aee2bcec0ad4a3ceb0b8934 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1364bc30deec992a3aee2bcec0ad4a3ceb0b8934 commit 1364bc30deec992a3aee2bcec0ad4a3ceb0b8934 Author: Bjoern A. Zeeb AuthorDate: 2024-07-23 18:27:46 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:11 +0000 kern_malloc: remove '.' and '\n' from KASSERT/panic KASSERT and panic calls should not have a '.' at the end of the message and do not need '\n'. Remove these. No functional changes. Reported by: markj (during review of D45812) Sponsored by: The FreeBSD Foundation Reviewed by: markj, kib Differential Revision: https://reviews.freebsd.org/D46093 (cherry picked from commit c0df224ba5b1fe6257dd197f8298bf59fb6e520f) --- sys/kern/kern_malloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 90fc88480a40..403f5fe11455 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -715,7 +715,7 @@ malloc_domain(size_t *sizep, int *indxp, struct malloc_type *mtp, int domain, size = *sizep; KASSERT(size <= kmem_zmax && (flags & M_EXEC) == 0, - ("malloc_domain: Called with bad flag / size combination.")); + ("malloc_domain: Called with bad flag / size combination")); if (size & KMEM_ZMASK) size = (size & ~KMEM_ZMASK) + KMEM_ZBASE; indx = kmemsize[size >> KMEM_ZSHIFT]; @@ -998,7 +998,7 @@ zfree(void *addr, struct malloc_type *mtp) vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); if (slab == NULL) - panic("free: address %p(%p) has not been allocated.\n", + panic("free: address %p(%p) has not been allocated", addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); switch (GET_SLAB_COOKIE(slab)) { @@ -1164,7 +1164,7 @@ malloc_usable_size(const void *addr) #else vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); if (slab == NULL) - panic("malloc_usable_size: address %p(%p) is not allocated.\n", + panic("malloc_usable_size: address %p(%p) is not allocated", addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); switch (GET_SLAB_COOKIE(slab)) { From nobody Sat Sep 28 10:38:10 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 4XG3hL6qKrz5X8M5; Sat, 28 Sep 2024 10:38:10 +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 4XG3hL4Rb9z46SL; Sat, 28 Sep 2024 10:38:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519890; 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=MKT34wffquTaHjsFqNJ+HG9WS7cOMWkV8ZiryTqMeoM=; b=Hkz+srYkJl7bTgmBbZciw4bMHqZngtPUKBFq6Jo5Is9HieDIE1MK5/EqJcLfLZbebWdDTo NlK/2hv+yfIt0hdxBo6pcGGrwQiFoayCgqOLYs0+gjnstk11rhHoTAbNVWN7PwvHxQ+CBi tP2BbnBCE4XA+qWMeCAXhcsoJQAvvGvy9XFnr2GNACYc3gKZYErAtFpY4f3f61COPv5WhY fpQ2cP201AwWaLIC7ufs+OmZhF7oe0cUwRZYNyqDyS4cagi+0NtUozsxs249eWdJtdNwKS ezh33cW4cZxcYGTPV/PmaSNIAmUXPYWwTCWl9WOOHBLUIIWzQk9G0y7QA3YBCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519890; 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=MKT34wffquTaHjsFqNJ+HG9WS7cOMWkV8ZiryTqMeoM=; b=p0Eu15sAzMv0fwoV2XifF4+OFdJDd1H0jGyLH5ZwTKdFgUoR1F5T/u1lbXh7dTAHhZ43m5 AoYoEQzntAxHf/o808TGb4Jq9FwqivkDOwu02kNaIExKX5b+4cr54jg79LSfpzdKRyvMf1 sysGz5Xzwm5wP76I9sxZBMw+3jm0jQJ5KjyNFF290/FigtRv68/+9HOq3sMfb2yh39vn44 GLqxiSJJmwpyjl28Is08sdZj91+yEQEhb7si5xfDBPqtOmWgSzlc1mLu5XtczwMLyY2rt7 1gkiyWaHPgiiloo7NOoBJPVn9QEXg60udUVcz+Daiw7PB8FwFQ/C1VYwFPV8dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519890; a=rsa-sha256; cv=none; b=KgJJK5xfdD6t1p12KWSa/bHGqsd/4hc9ypvIaYY7aAppQK2KzavTK5p4YotzgmPbeh60XP FPmH2eMgwdAnb0+/YdxW04VQY8Yluf0PIgRGDzrdcdopmycrAeJBYgFnOn8fienYA01b0U j0FUmC7AxlXVX9xpgAWFagCVzmN5cGAXIYp50A6CXG9uXewOv2+hlY0v/K1zeo6tqoysmL 33T6ia+AZqegBQc3P+wT14eNvOXFxuDVvh6mBE9brSKRziwZ7bGDnW36IZWX6/RGgoQY3g +aTLpYV2k1wL6WuX2QFVNKB4nNxmCKOfghcF3PtiyPGCTVctYhsdXKaf/TSVWg== 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 4XG3hL3pRDzKyy; Sat, 28 Sep 2024 10:38:10 +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 48SAcAOo097609; Sat, 28 Sep 2024 10:38:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcA1Z097606; Sat, 28 Sep 2024 10:38:10 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:10 GMT Message-Id: <202409281038.48SAcA1Z097606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 87d3af98590b - stable/14 - kern_malloc: fold free and zfree together into one __always_inline func 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 87d3af98590bbf09509822ec94c596d69f53411e Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=87d3af98590bbf09509822ec94c596d69f53411e commit 87d3af98590bbf09509822ec94c596d69f53411e Author: Bjoern A. Zeeb AuthorDate: 2024-07-24 15:56:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:12 +0000 kern_malloc: fold free and zfree together into one __always_inline func free() and zfree() are essentially the same copy and pasted code with the extra explicit_bzero() (and formerly kasan) calls. Add a bool to add the extra functionality and make both functions a wrapper around the common code and let the compiler do the optimization based on the bool input when inlining. No functional changes intended. Suggested by: kib (in D45812) Sponsored by: The FreeBSD Foundation Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D46101 And the fix from Olivier Certner (olce): kern_malloc: Restore working KASAN runtime after free() and zfree() folding In the zfree() case, the explicit_bzero() calls zero all the allocation, including the redzone which malloc() has marked as invalid. So calling kasan_mark() before those is in fact necessary. This fixes a crash at boot when 'ldconfig' is run and tries to get random bytes through getrandom() (relevant part of the stack is read_random_uio() -> zfree() -> explicit_bzero()) for kernels with KASAN compiled in. Approved by: markj (mentor) Fixes: 4fab5f005482 ("kern_malloc: fold free and zfree together into one __always_inline func") Sponsored by: The FreeBSD Foundation (cherry picked from commit 4fab5f005482aa88bc0f7d7a0a5e81b436869112) (cherry picked from commit 28391f188ca18b6251ba46040adf81946b0ccb03) --- sys/kern/kern_malloc.c | 94 +++++++++++++++++--------------------------------- 1 file changed, 31 insertions(+), 63 deletions(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 403f5fe11455..3fef90b5fa82 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -922,15 +922,8 @@ free_dbg(void **addrp, struct malloc_type *mtp) } #endif -/* - * free: - * - * Free a block of memory allocated by malloc. - * - * This routine may not block. - */ -void -free(void *addr, struct malloc_type *mtp) +static __always_inline void +_free(void *addr, struct malloc_type *mtp, bool dozero) { uma_zone_t zone; uma_slab_t slab; @@ -946,8 +939,8 @@ free(void *addr, struct malloc_type *mtp) vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); if (slab == NULL) - panic("free: address %p(%p) has not been allocated", - addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); + panic("%s(%d): address %p(%p) has not been allocated", __func__, + dozero, addr, (void *)((uintptr_t)addr & (~UMA_SLAB_MASK))); switch (GET_SLAB_COOKIE(slab)) { case __predict_true(SLAB_COOKIE_SLAB_PTR): @@ -955,79 +948,54 @@ free(void *addr, struct malloc_type *mtp) #if defined(INVARIANTS) && !defined(KASAN) free_save_type(addr, mtp, size); #endif + if (dozero) { + kasan_mark(addr, size, size, 0); + explicit_bzero(addr, size); + } uma_zfree_arg(zone, addr, slab); break; case SLAB_COOKIE_MALLOC_LARGE: size = malloc_large_size(slab); + if (dozero) { + kasan_mark(addr, size, size, 0); + explicit_bzero(addr, size); + } free_large(addr, size); break; case SLAB_COOKIE_CONTIG_MALLOC: - size = contigmalloc_size(slab); + size = round_page(contigmalloc_size(slab)); + if (dozero) + explicit_bzero(addr, size); kmem_free(addr, size); - size = round_page(size); break; default: - panic("%s: addr %p slab %p with unknown cookie %d", __func__, - addr, slab, GET_SLAB_COOKIE(slab)); + panic("%s(%d): addr %p slab %p with unknown cookie %d", + __func__, dozero, addr, slab, GET_SLAB_COOKIE(slab)); /* NOTREACHED */ } malloc_type_freed(mtp, size); } /* - * zfree: - * - * Zero then free a block of memory allocated by malloc. - * + * free: + * Free a block of memory allocated by malloc/contigmalloc. * This routine may not block. */ void -zfree(void *addr, struct malloc_type *mtp) +free(void *addr, struct malloc_type *mtp) { - uma_zone_t zone; - uma_slab_t slab; - u_long size; - -#ifdef MALLOC_DEBUG - if (free_dbg(&addr, mtp) != 0) - return; -#endif - /* free(NULL, ...) does nothing */ - if (addr == NULL) - return; - - vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); - if (slab == NULL) - panic("free: address %p(%p) has not been allocated", - addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); + _free(addr, mtp, false); +} - switch (GET_SLAB_COOKIE(slab)) { - case __predict_true(SLAB_COOKIE_SLAB_PTR): - size = zone->uz_size; -#if defined(INVARIANTS) && !defined(KASAN) - free_save_type(addr, mtp, size); -#endif - kasan_mark(addr, size, size, 0); - explicit_bzero(addr, size); - uma_zfree_arg(zone, addr, slab); - break; - case SLAB_COOKIE_MALLOC_LARGE: - size = malloc_large_size(slab); - kasan_mark(addr, size, size, 0); - explicit_bzero(addr, size); - free_large(addr, size); - break; - case SLAB_COOKIE_CONTIG_MALLOC: - size = round_page(contigmalloc_size(slab)); - explicit_bzero(addr, size); - kmem_free(addr, size); - break; - default: - panic("%s: addr %p slab %p with unknown cookie %d", __func__, - addr, slab, GET_SLAB_COOKIE(slab)); - /* NOTREACHED */ - } - malloc_type_freed(mtp, size); +/* + * zfree: + * Zero then free a block of memory allocated by malloc/contigmalloc. + * This routine may not block. + */ +void +zfree(void *addr, struct malloc_type *mtp) +{ + _free(addr, mtp, true); } /* From nobody Sat Sep 28 10:38:11 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 4XG3hN092jz5X8V8; Sat, 28 Sep 2024 10:38:12 +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 4XG3hM56mwz46nw; Sat, 28 Sep 2024 10:38:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519891; 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=lgB+JCkDwmwMXRIzb1t6fLICgcQUSlKO/TEQiD1jycU=; b=JyUVDjXDKryd98QFUFCwgTfNDvZEYNcCD/Vopvy8kScugqkzRwXSTg0ZTF8oXmXyzD82pI vqYuTXPRamLSr5E4HdtdEbKXZal5tMSqKaVPIBuSN7KeYYXWwhZslOXZskMwhw9DBAImHG LSevK0/jriE6NIzwNsfIdtiHhvr8ES4kQLt2jHZrNkJlu6zrx5+VBBqhHiaKakKuODwZe4 Ll8qgvy7XsCzKIgC4oPgbgeQ8m/nxwG6z3TKHGZykRDXYCKHbMo/kZTR9VSsztKM1WcuHK KYZOZ2sy6uoLr5dzdDIT5p5tIS0hyS1nsvCySra8TEml947UDVcwQRJklgTJqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519891; 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=lgB+JCkDwmwMXRIzb1t6fLICgcQUSlKO/TEQiD1jycU=; b=bG5ICZz+DWpwStDV3VimgF/94m+9i12p2il22DjTsbjH4KYNbjeqGj9KGGyU/8KoflmWFG roWltxUJEVoqkQn0501CPB0xsMmgf+JVb7VpJ69jKWTlPFeE941mm8nUCvR8/7TPk43kyz EHH9t2BpVNKf6/9pdvGn2BTliIor7hdVKnPY1gzPBKIv2nNRRfWdu4xXLzYCSqxjhhW+UI xT+JSrJUbpTT1i68yS/HJJCILjS/0rcgKRvpYJPv2JG++iE+QGMteI5eJ/KVeW5AmciD6f PZEibO3QZxk7K10euypyyddc3PqxkCLCj1/tjuiHPTEDjxbcihRGn4USmz+IoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519891; a=rsa-sha256; cv=none; b=wcb1UMSPzWkQOEiMxkfFq9jztnNaFHH0r0l9zlxopXHEmQpc+qQHr2TEObtO0TQHI7vuNE B12IuKXTLpfOeGxQduQ5oDUCDHLoZUaWTkX+WBoTxGhUmWTsEg3DNNWT+vhaaNAfsPaC7F n87gC4LPyEDN2p7PU7lJWnUnPaI3HNykpQ2pZzKAmWGbszB9+59fD+Jwty6IZmWPH9RUGP pOyWXMdA/sRz++GG578Gt0MWOHNZXqCrM40tCYHFSYRcZDJ+SyBczjsdXIhEfE52ku7X+3 smKATuS58IkVA1tGhcUEuYYcihXtItay2qjpvG79Dt8GzS45YXKg4wvsoyzfcQ== 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 4XG3hM4Jg2zLc2; Sat, 28 Sep 2024 10:38:11 +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 48SAcBQA097660; Sat, 28 Sep 2024 10:38:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcBeR097657; Sat, 28 Sep 2024 10:38:11 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:11 GMT Message-Id: <202409281038.48SAcBeR097657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f9edc5b3f687 - stable/14 - LinuxKPI: move __kmalloc from slab.h to slab.c 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f9edc5b3f687ad0cd01ee4cac664a95d21413f3c Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f9edc5b3f687ad0cd01ee4cac664a95d21413f3c commit f9edc5b3f687ad0cd01ee4cac664a95d21413f3c Author: Bjoern A. Zeeb AuthorDate: 2024-06-30 20:37:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:12 +0000 LinuxKPI: move __kmalloc from slab.h to slab.c In order to allow the allocator to change in the future move it into the implementation file from being an inline function in the header. While here factor out the size calculation and add a comment as-to why this is done. We will need the size (_s) in the future to make a decision on how to allocate. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D45815 (cherry picked from commit 1f7df757017404011732196e65981d9325f7a89f) --- sys/compat/linuxkpi/common/include/linux/slab.h | 9 ++------- sys/compat/linuxkpi/common/src/linux_slab.c | 11 +++++++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h index 3f2d1621e148..07c16884b00e 100644 --- a/sys/compat/linuxkpi/common/include/linux/slab.h +++ b/sys/compat/linuxkpi/common/include/linux/slab.h @@ -92,6 +92,8 @@ struct linux_kmem_cache; #define ZERO_OR_NULL_PTR(x) ((x) == NULL || (x) == ZERO_SIZE_PTR) extern void *lkpi_kmalloc(size_t size, gfp_t flags); +void *lkpi___kmalloc(size_t size, gfp_t flags); +#define __kmalloc(_s, _f) lkpi___kmalloc(_s, _f) static inline gfp_t linux_check_m_flags(gfp_t flags) @@ -108,13 +110,6 @@ linux_check_m_flags(gfp_t flags) return (flags & GFP_NATIVE_MASK); } -static inline void * -__kmalloc(size_t size, gfp_t flags) -{ - return (malloc(MAX(size, sizeof(struct llist_node)), M_KMALLOC, - linux_check_m_flags(flags))); -} - static inline void * kmalloc_node(size_t size, gfp_t flags, int node) { diff --git a/sys/compat/linuxkpi/common/src/linux_slab.c b/sys/compat/linuxkpi/common/src/linux_slab.c index 68117d1c9fa7..72b35fee9214 100644 --- a/sys/compat/linuxkpi/common/src/linux_slab.c +++ b/sys/compat/linuxkpi/common/src/linux_slab.c @@ -207,6 +207,17 @@ linux_kmem_cache_destroy(struct linux_kmem_cache *c) free(c, M_KMALLOC); } +void * +lkpi___kmalloc(size_t size, gfp_t flags) +{ + size_t _s; + + /* sizeof(struct llist_node) is used for kfree_async(). */ + _s = MAX(size, sizeof(struct llist_node)); + + return (malloc(_s, M_KMALLOC, linux_check_m_flags(flags))); +} + struct lkpi_kmalloc_ctx { size_t size; gfp_t flags; From nobody Sat Sep 28 10:38:12 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 4XG3hP0hKbz5X8M9; Sat, 28 Sep 2024 10:38:13 +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 4XG3hN62BJz46v0; Sat, 28 Sep 2024 10:38:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519892; 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=9eCmaYVkICN94cnTkAHU6s0U8mBTQlJOPZV4QAtXJKU=; b=eBG0lS0DcmnIBQ6SM+grcWYnBjxQwHhMW2ZnwuoCAkoU6vEM85ZYD8CExlX2emcWqO46vB iE0mc4FXa/UXCpU4duRQUIF7eVypiwZ+bBWQMEDDl3UgVV+hADMALENW6qiFK1TN/B7Gxl FbJSZIJ0Vq9lxHqxEDqrjwua5lmhRbiBGqTtEFKFWVKeInkQKgU6MvH8eE0uNRniSUXs1N t56t4O68trv3JrhHFRVGBN5j9ESKSi592bB+pU+fM6xW8GNXBIQVbouKvTNywKE73S4Ddq 9kahuWIzNv6chhkxITaSgCVUG6yCUyhfahWu+JrPmqqvapp3hAVuzbBIn8pfrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519892; 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=9eCmaYVkICN94cnTkAHU6s0U8mBTQlJOPZV4QAtXJKU=; b=bCy06abwmx2Q11xzDcgPTCA2NqBthTIJV8Sf+kgYMkrAvt8KdGr/eEFNT83hsDhdrW1khs HKNJnfLtUZc5B2XsNgIdKlzt8XuUflK0QATgSKWR7M+VpZjFbUOoFtQpSQzZDsEjXhH+Cx aqBpqZaQ2XTFVIE5Cb+/H1yoZIvYBI/UeqcT+3XmEGZSU5wt6to+0hj98Dguh8EFmo+NCq ZTNVTo9Hosnf/FyszyG2RqVBJdvfwx03Y6YSBFirjR95ZCN2qeuOUC2h8jAQo6LlcrqUNk j00+L6kmRxBKu+LETctyC2ZlGutrb0jLjhEs36W5AjCsDmDF5xPSjfvTJE9KOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519892; a=rsa-sha256; cv=none; b=cZjQCtoCNIp/lvTu33Y2ZppHcRPHM5FOkWKUn7Q4jmUzWSqLWLBk/OtyZeWJ8reOkBt1nR rt9MjB9IZgd8PhMzruE8jr5MU5JhWXDB5MygVeZREgDn0cavslTMlcNjQTsZR6jz16mgyD WZKxqVGNm3iid9ZMj7HmBpW04XO4ZFzeR6Bi9WE8IYqRUdS/OFNYWhNBYg7zz814Z+HQC+ 667ox0s8dKdfgUOYlsYSgBBV+LyOIOdfZBcSTP0lhdbcFL1uXLPi1DCvMDwP+IoEAwnmnS qFytF8PALMjVDAqJIBfwEeIEVdTPQIlNY7D+thsuqGl0kC2qCqIgrjS4mPOfJQ== 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 4XG3hN5fF9zLrC; Sat, 28 Sep 2024 10:38:12 +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 48SAcCLf097717; Sat, 28 Sep 2024 10:38:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcC4K097714; Sat, 28 Sep 2024 10:38:12 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:12 GMT Message-Id: <202409281038.48SAcC4K097714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: af034dcbb242 - stable/14 - LinuxKPI: 802.11 compile in debugging based on IEEE80211 debugging 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: af034dcbb24248f940595d56fab332d008376a99 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=af034dcbb24248f940595d56fab332d008376a99 commit af034dcbb24248f940595d56fab332d008376a99 Author: Bjoern A. Zeeb AuthorDate: 2024-04-06 21:17:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:12 +0000 LinuxKPI: 802.11 compile in debugging based on IEEE80211 debugging If IEEE80211 debugging is turned on in kernel configs also turn on LinuxKPI 802.11 and SKB debugging (sysctls) to have them available. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45820 (cherry picked from commit 59d262fe969af5a8a83f0ccd7586c9bd2c8fb1f3) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 8 ++++++++ sys/compat/linuxkpi/common/src/linux_80211.h | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index ee3f427aa6e9..d3839820d3d5 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -46,7 +46,15 @@ #include #include +#include "opt_wlan.h" + +/* Currently this is only used for wlan so we can depend on that. */ +#if defined(IEEE80211_DEBUG) && !defined(SKB_DEBUG) +#define SKB_DEBUG +#endif + /* #define SKB_DEBUG */ + #ifdef SKB_DEBUG #define DSKB_TODO 0x01 #define DSKB_IMPROVE 0x02 diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index a48cf719c693..80be87ebe231 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -42,6 +42,12 @@ #ifndef _LKPI_SRC_LINUX_80211_H #define _LKPI_SRC_LINUX_80211_H +#include "opt_wlan.h" + +#if defined(IEEE80211_DEBUG) && !defined(LINUXKPI_DEBUG_80211) +#define LINUXKPI_DEBUG_80211 +#endif + /* #define LINUXKPI_DEBUG_80211 */ #ifndef D80211_TODO From nobody Sat Sep 28 10:38:13 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 4XG3hQ3RmWz5X8VG; Sat, 28 Sep 2024 10:38:14 +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 4XG3hQ146wz46rJ; Sat, 28 Sep 2024 10:38:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519894; 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=469mfj5l/9CS50hPT28kW0EXZxtMdOH17CBL19rcBzg=; b=MWd9tNVOZKz9bP8LLsz0P1sqF43weXS+1Cand7KUr4a+XlxIomDlVtAFHZ30SS+Wr7XaFz FLG9fM+sSwyKEHNZgpeUR+oBoB86JqJeYnso9Ox9m8/avEhmf2NPEeYeexI6K7arkjJ58/ Tv78jJwNc26tLcHMmzHcKCPWm8/0rq2pEnX/jnIMW4ecZmWxsnMbtSHtpp8WessFblZT1I 3vystWkxI70DxIW9dGcoAWxdMY5xMmbMSDowevGqVoGMEmucIyDWykTKaV6lXZVBm23gTX 4FBDaExTqV4l9meORnvmxEpnvhmWo0khyBj72HBfG4ZN5wDfE7SVuNXKJbYHGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519894; 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=469mfj5l/9CS50hPT28kW0EXZxtMdOH17CBL19rcBzg=; b=Y05KpBX3NI6I/zjfNm/hSbfkl312M6DCIrC3AZ5Ahvmaxmw2QmxgpdDXVxcpFpJbv6BJgW qaabJIdEw1K3IV+nvP/p5OHhBFXRT9gXtszQoX3A9gaG7yQaNxiBXVEa4SB8WJGtoRWFUy I6lLU8DUBnJ46UrV1Yzw/zEI07yb04f0NgsuUUINbJc2Ew3eIUFBskRYG3D14bw2eOq0n7 W9PJ4ILO0Gz35r/Qgek43cWy9hNd6qnn5S7VR+/UbmDPs8nRqwGgmMPMr5ogf7jokpjTsK K8DRA1AUe2WypioaDBzQADZgNodlnVyLXO3TnfzOu2BpiMEMDSfSsSjL4md8Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519894; a=rsa-sha256; cv=none; b=U84s4nH5Oce7jBpy1MTFZZIpUrFVUhxKkrN0K/GH0LzK2i3aIFtA/8G64OUV3MEmloCd28 K2bFJHC7jfVePSy8At2vTrSuhb0t3uc4+QIwTmub1oaThYlSEOawUDuh2m97ELoseAc5FR 4Lm3T/bXoqo3jbI6Q7Zq75fu5fIb9U3+gJcSPdf9f/Ltc4Q3Wtd1qdMcukP1F8AuExji5K X25S4TNP7vUBJ5gIhUXtyNL0sfTiEDY5RJxDQTZVqIOrmqVEByDEdR4YxyvBpF+jsOSCwJ O5waFTvHzvDt7AtVZefe0wbl1KycWzdZbACTEzX5HsDNk67G3NrCRYU4GFj8gw== 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 4XG3hP6VpKzLrD; Sat, 28 Sep 2024 10:38:13 +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 48SAcDNL097780; Sat, 28 Sep 2024 10:38:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcDlU097777; Sat, 28 Sep 2024 10:38:13 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:13 GMT Message-Id: <202409281038.48SAcDlU097777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e9624aa3f2f8 - stable/14 - net80211: scan/internal: change boolean argument from int to bool 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e9624aa3f2f8b370c42141b83c4b71bf06832142 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e9624aa3f2f8b370c42141b83c4b71bf06832142 commit e9624aa3f2f8b370c42141b83c4b71bf06832142 Author: Bjoern A. Zeeb AuthorDate: 2024-06-30 21:16:39 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:12 +0000 net80211: scan/internal: change boolean argument from int to bool ieee80211_probe_curchan() passes a "force" argument which is bool. Make it such. Adjust the (*sc_scan_probe_curchan)() KPI to bool as well. This is all a big NOP as the only implementor of this function, ieee80211_swscan_probe_curchan(), does not use the argument at all. I came across this when pondering a different scan implementation. Rather than dropping the change remove the argument from the function, and push the cleanup out given it is purely net80211 internal code (the argument may have reason for existance in the future). Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45816 (cherry picked from commit 9776aba34576596cbe49084457ee40730fec55a2) --- sys/net80211/ieee80211_adhoc.c | 2 +- sys/net80211/ieee80211_hostap.c | 2 +- sys/net80211/ieee80211_mesh.c | 2 +- sys/net80211/ieee80211_scan.c | 2 +- sys/net80211/ieee80211_scan.h | 4 ++-- sys/net80211/ieee80211_scan_sw.c | 4 ++-- sys/net80211/ieee80211_sta.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c index 7455500a91ab..021f2af2b0f9 100644 --- a/sys/net80211/ieee80211_adhoc.c +++ b/sys/net80211/ieee80211_adhoc.c @@ -767,7 +767,7 @@ adhoc_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, * XXX check if the beacon we recv'd gives * us what we need and suppress the probe req */ - ieee80211_probe_curchan(vap, 1); + ieee80211_probe_curchan(vap, true); ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN; } ieee80211_add_scan(vap, rxchan, &scan, wh, diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 52832c308c7d..983668a43d4c 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -1816,7 +1816,7 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, * XXX check if the beacon we recv'd gives * us what we need and suppress the probe req */ - ieee80211_probe_curchan(vap, 1); + ieee80211_probe_curchan(vap, true); ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN; } ieee80211_add_scan(vap, ic->ic_curchan, &scan, wh, diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c index 477527b34529..82208b8b6f7b 100644 --- a/sys/net80211/ieee80211_mesh.c +++ b/sys/net80211/ieee80211_mesh.c @@ -1881,7 +1881,7 @@ mesh_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype, * XXX check if the beacon we recv'd gives * us what we need and suppress the probe req */ - ieee80211_probe_curchan(vap, 1); + ieee80211_probe_curchan(vap, true); ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN; } ieee80211_add_scan(vap, rxchan, &scan, wh, diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c index 4e5958e82cc8..04fee33f48f1 100644 --- a/sys/net80211/ieee80211_scan.c +++ b/sys/net80211/ieee80211_scan.c @@ -513,7 +513,7 @@ ieee80211_scan_done(struct ieee80211vap *vap) * then we'll transmit a probe request. */ void -ieee80211_probe_curchan(struct ieee80211vap *vap, int force) +ieee80211_probe_curchan(struct ieee80211vap *vap, bool force) { struct ieee80211com *ic = vap->iv_ic; diff --git a/sys/net80211/ieee80211_scan.h b/sys/net80211/ieee80211_scan.h index a33864b102e2..1afe767ef052 100644 --- a/sys/net80211/ieee80211_scan.h +++ b/sys/net80211/ieee80211_scan.h @@ -104,7 +104,7 @@ struct ieee80211_scan_methods { void (*sc_cancel_anyscan)(struct ieee80211vap *); void (*sc_scan_next)(struct ieee80211vap *); void (*sc_scan_done)(struct ieee80211vap *); - void (*sc_scan_probe_curchan)(struct ieee80211vap *, int); + void (*sc_scan_probe_curchan)(struct ieee80211vap *, bool); void (*sc_add_scan)(struct ieee80211vap *, struct ieee80211_channel *, const struct ieee80211_scanparams *, @@ -179,7 +179,7 @@ void ieee80211_cancel_scan(struct ieee80211vap *); void ieee80211_cancel_anyscan(struct ieee80211vap *); void ieee80211_scan_next(struct ieee80211vap *); void ieee80211_scan_done(struct ieee80211vap *); -void ieee80211_probe_curchan(struct ieee80211vap *, int); +void ieee80211_probe_curchan(struct ieee80211vap *, bool); struct ieee80211_channel *ieee80211_scan_pickchannel(struct ieee80211com *, int); struct ieee80211_scanparams; diff --git a/sys/net80211/ieee80211_scan_sw.c b/sys/net80211/ieee80211_scan_sw.c index 62f6bf24d42a..e1d6b2779cf0 100644 --- a/sys/net80211/ieee80211_scan_sw.c +++ b/sys/net80211/ieee80211_scan_sw.c @@ -522,7 +522,7 @@ ieee80211_swscan_scan_done(struct ieee80211vap *vap) * then we'll transmit a probe request. */ static void -ieee80211_swscan_probe_curchan(struct ieee80211vap *vap, int force) +ieee80211_swscan_probe_curchan(struct ieee80211vap *vap, bool force __unused) { struct ieee80211com *ic = vap->iv_ic; struct ieee80211_scan_state *ss = ic->ic_scan; @@ -569,7 +569,7 @@ scan_curchan(struct ieee80211_scan_state *ss, unsigned long maxdwell) maxdwell); IEEE80211_LOCK(ic); if (ss->ss_flags & IEEE80211_SCAN_ACTIVE) - ieee80211_probe_curchan(vap, 0); + ieee80211_probe_curchan(vap, false); taskqueue_enqueue_timeout(ic->ic_tq, &SCAN_PRIVATE(ss)->ss_scan_curchan, maxdwell); IEEE80211_UNLOCK(ic); diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index 042f5636be29..e48c6e084eb3 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -1694,7 +1694,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype, * XXX check if the beacon we recv'd gives * us what we need and suppress the probe req */ - ieee80211_probe_curchan(vap, 1); + ieee80211_probe_curchan(vap, true); ic->ic_flags_ext &= ~IEEE80211_FEXT_PROBECHAN; } ieee80211_add_scan(vap, rxchan, &scan, wh, From nobody Sat Sep 28 10:38:14 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 4XG3hR4Dvpz5X8Xw; Sat, 28 Sep 2024 10:38:15 +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 4XG3hR1LCWz471k; Sat, 28 Sep 2024 10:38:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519895; 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=POjrCKpRaOTuBayVNJ0CV3d2+gP9q1C6mun/HTCVUIM=; b=EU7U7XQXSvvg/IimxqhpZdH5v1/LU0u43+50aGHDcAj5cR8LtQHEg6Qvo1/BI9Pz3BPNCE Y52I9tI4hnPwPKuSfqHcN3YqTPiEacXbi5K+uZwZvmLwCr13ylV5t1NBjGZdFdKVCaEj/L 5zV7qJR0XlePI9Y51X/x+2v8zWnMJkS4J3DPA6v7dlRkrxUuO4iAKN5AeGHdA41X9PDFFW mv6HJK9ZLNIBwLaWLGn/HY4wIt5p6fBasz13bpLA44uNmbsdFGinnoRtIgId6AI3cmIJQT /O3Dyr6wHnA+PIPkgOi39p60PKr0VW8ivzUxj/SFDp+bwaTwKY3hJ87K7L3egg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519895; 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=POjrCKpRaOTuBayVNJ0CV3d2+gP9q1C6mun/HTCVUIM=; b=J7vfKv708qtJTjzBbd3IjAAjZAyI2JxCO2TlEoEKBhl9J6qjTljPa3UcJKevwq83dt3EYw z0vGJmsf1m0xfDPRIHB/ZqE00bmemPr88aNzAJ7P6v3QnWPKvYCwEXId1DVpkCB0bUtslL sa9pzmyTx7dZaGKU7slrnZhuK86ETzJcpH3lGlsknfsvGO8qdb6SEVCpAz58TEkSNeaDuc Ncj/HE1CfIr4sRBeToPEe6QLt5hdswwkV9cLQJ+WC9Ug+kYOcuYeOWTLcR1uUbvuvc9D95 ksxNBsZPZu9IucWEgURxxtkSEoPKWKUZ1HW+BQ1iC+d/B47jzTXAYB/9iCyPhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519895; a=rsa-sha256; cv=none; b=hfjmPMuE8vOAwLSJkpS+ay02Rh7RoV3KHnWOAPqBUCsCWvgrEsAIviZDREh8Xw+ajUaPC/ +8Ma5VXpz0j8Xezij7c/bWuiGSJ4T8u33P2RHA9wVi6hkFdYbhiI2NEqgABhMQJsJO0GGW ZBfdJS47xg8bq91I3EcEpHHdpgPT/c5Gx/hNROcOkmDt1UsKeOQ/LeFoYtY21PO/81eefB ylRkw7iyT0SvF70pkA1yme5xiTCcI2Vz0Y/4OppKVl5DS0ZPzNkY8fFOGBp6PTIJ04BCxZ DM/Ti9001RGdv9DgkDhHSk1nKVA/u9qpofRccY7h4NOUIKRHrtj0Lru3a4AvgQ== 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 4XG3hR0g8SzLwb; Sat, 28 Sep 2024 10:38:15 +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 48SAcEC8097831; Sat, 28 Sep 2024 10:38:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcE6N097828; Sat, 28 Sep 2024 10:38:14 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:14 GMT Message-Id: <202409281038.48SAcE6N097828@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: d506ab946dea - stable/14 - LinuxKPI/lindebugfs: stop panicing in lindebugfs, fix simple_read_from_buffer 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d506ab946dea5f9692b9f3da5d7a20e9fd59b9ba Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d506ab946dea5f9692b9f3da5d7a20e9fd59b9ba commit d506ab946dea5f9692b9f3da5d7a20e9fd59b9ba Author: Bjoern A. Zeeb AuthorDate: 2024-06-27 12:19:38 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:12 +0000 LinuxKPI/lindebugfs: stop panicing in lindebugfs, fix simple_read_from_buffer Trying to use lindebugfs for debugging wirless drivers two issues became apparent: (a) a panic in lindebugfs calling a hard coded release function if the caller had not provided one. This seems to be based on assumptions that no longer hold up. Remove the hard coded release function to prevent panics. (b) In LinuxKPI simple_read_from_buffer() would call copy_to_user() but buffers weren't setup for this (lindebugfs copies data from its own buffer) and then pseudofs will do another copyout to the user on this; remove the copy_to_user() and simply copy the data over to the provided buffer; this works for as long as the only consumers remain debugfs callers (which currently seems to be the case). [the only out-of-tree consumers I am aware off are two drm-kmod drivers/gpu/drm/amd/pm/* debugfs functions I cannot test]. Sponsored by: The FreeBSD Foundation Tested by: jfree Differential Revision: https://reviews.freebsd.org/D45755 (cherry picked from commit 5668c22a13c6befa9b8486387d38457c40ce7af4) --- sys/compat/lindebugfs/lindebugfs.c | 2 -- sys/compat/linuxkpi/common/include/linux/fs.h | 22 +++++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/sys/compat/lindebugfs/lindebugfs.c b/sys/compat/lindebugfs/lindebugfs.c index c1678c0f3421..eab89d9d13a5 100644 --- a/sys/compat/lindebugfs/lindebugfs.c +++ b/sys/compat/lindebugfs/lindebugfs.c @@ -154,8 +154,6 @@ debugfs_fill(PFS_FILL_ARGS) if (d->dm_fops->release) d->dm_fops->release(&vn, &lf); - else - single_release(&vn, &lf); if (rc < 0) { #ifdef INVARIANTS diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h index 74288f9cd461..3e7e71a0713c 100644 --- a/sys/compat/linuxkpi/common/include/linux/fs.h +++ b/sys/compat/linuxkpi/common/include/linux/fs.h @@ -354,9 +354,8 @@ static inline ssize_t simple_read_from_buffer(void __user *dest, size_t read_size, loff_t *ppos, void *orig, size_t buf_size) { - void *read_pos = ((char *) orig) + *ppos; + void *p, *read_pos = ((char *) orig) + *ppos; size_t buf_remain = buf_size - *ppos; - ssize_t num_read; if (buf_remain < 0 || buf_remain > buf_size) return -EINVAL; @@ -364,13 +363,18 @@ simple_read_from_buffer(void __user *dest, size_t read_size, loff_t *ppos, if (read_size > buf_remain) read_size = buf_remain; - /* copy_to_user returns number of bytes NOT read */ - num_read = read_size - copy_to_user(dest, read_pos, read_size); - if (num_read == 0) - return -EFAULT; - *ppos += num_read; - - return (num_read); + /* + * XXX At time of commit only debugfs consumers could be + * identified. If others will use this function we may + * have to revise this: normally we would call copy_to_user() + * here but lindebugfs will return the result and the + * copyout is done elsewhere for us. + */ + p = memcpy(dest, read_pos, read_size); + if (p != NULL) + *ppos += read_size; + + return (read_size); } MALLOC_DECLARE(M_LSATTR); From nobody Sat Sep 28 10:38:16 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 4XG3hS59DNz5X8Pq; Sat, 28 Sep 2024 10:38:16 +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 4XG3hS32Lvz4776; Sat, 28 Sep 2024 10:38:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519896; 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=Zpkgp0W/vdWPjmWdWTWJKHBztTABiZz7kZpNVITUUtk=; b=FG977BGUOi5MD+zN/BoXBkSbeqj4qE9XMXn6lZOrZExrNy5TwJqKKbDDXX3AocxfU590uK IvZsY2VWra0rKPi8cxqbivcumqekEIdJjjyz3BNpxC29y+KrX//2A0nDuyIbU8KyzTMrkE UN2ktVMLyGMkVNMGHCd50e492J0SMXR31oM10jbJy5wuQGibx6un4l7B6pbJh/yb7TJead 67FpuS7sBYMwg8UN6TmGOsi3uP7/6YBH6Zle1gOgPJr83QLl9yQwtfrzS11YDy8N9d/JLb KuPOH2EMPuBVRuqEox3ZZ8k04uVyjeFfnAx0xn+nCMJlcL9d6eywuppBHmM2KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519896; 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=Zpkgp0W/vdWPjmWdWTWJKHBztTABiZz7kZpNVITUUtk=; b=jFkRFppuacjJujJluPXIA9cS2udeuZgYizCT2FbY2Cf3VJY+EGYrdJIOjM2FtIXhv3fzWI 4hXFhFQcdPddqjGqXEF4md6hGF/wuES7io7qLv+1J7NJbJhBmr1ekeG1GL7uz7xKX6bh+b QUCkVk1cqwsMCC0lDNpAGmZRCkni8DtzBiHd1oet+OGi5ZEZ8i8IlKCQFbs0gk27PhJpDU MkGa86CGJL/RinPfA67Ih0XAQmc1TPmO3AAMvu84WTRzgJ2cBN+jfXIflkPLkqLbgff6fj iTs+5ehmImSxGpdNKQ+1+L0n2TX0ORXYkyZTl9KK2C/E9RuBXAUrHIJwwljhqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519896; a=rsa-sha256; cv=none; b=dELr6gNDsQ0NdVeHOiU1vg9HfrHElRJFC45nBjS+Ckvz1P6+Dap0kCpiKoUYVqGndlqNxL cpSx4Qa2J//w/TDd8qSNfiojudAOHLO/VhrhKpShD6SmJwlSjjplMqc9nFiGDwPIkE12yX g1YAqf8z0cvqmoeH9vuUd/jV4ZuFAu56aXvrD0TPXJuEkgJqdgC7nsuo3H7tFyhH6rzHYR l3tR/MUCI6SmZjDdsqmFkMHgczUhRouHJO5lDs0y+srp3REmF3oEGjdwDvtJYcp5S2hfW+ OhmZ/gY1Aw6/0YbWoSwRK/WKPjqnSrEWbDm/PrZol17QWx1K0CFZXtgtNRh5mg== 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 4XG3hS1N8SzLc3; Sat, 28 Sep 2024 10:38:16 +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 48SAcGJG097882; Sat, 28 Sep 2024 10:38:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcG4t097879; Sat, 28 Sep 2024 10:38:16 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:16 GMT Message-Id: <202409281038.48SAcG4t097879@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 78556119d502 - stable/14 - LinuxKPI: 802.11: consistently spell TRACE-RX: as such 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 78556119d502f15de0ea7140e87dd24285f1ffb3 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=78556119d502f15de0ea7140e87dd24285f1ffb3 commit 78556119d502f15de0ea7140e87dd24285f1ffb3 Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:31:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:13 +0000 LinuxKPI: 802.11: consistently spell TRACE-RX: as such We have TRACE in one place and TRACE-RX in another. Spell it "TRACE-RX: %s: ..." everywhere. Helps with pattern matching. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45818 (cherry picked from commit bd206a6f4a87214ae8c1b32f1051b07362080361) --- sys/compat/linuxkpi/common/src/linux_80211.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index ca8db481347e..948d96bd64ac 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4997,7 +4997,7 @@ lkpi_80211_lhw_rxq_rx_one(struct lkpi_hw *lhw, struct mbuf *m) #ifdef LINUXKPI_DEBUG_80211 if (linuxkpi_debug_80211 & D80211_TRACE_RX) - printf("TRACE %s: handled frame type %#0x\n", __func__, ok); + printf("TRACE-RX: %s: handled frame type %#0x\n", __func__, ok); #endif } @@ -5012,8 +5012,8 @@ lkpi_80211_lhw_rxq_task(void *ctx, int pending) #ifdef LINUXKPI_DEBUG_80211 if (linuxkpi_debug_80211 & D80211_TRACE_RX) - printf("%s:%d lhw %p pending %d mbuf_qlen %d\n", - __func__, __LINE__, lhw, pending, mbufq_len(&lhw->rxq)); + printf("TRACE-RX: %s: lhw %p pending %d mbuf_qlen %d\n", + __func__, lhw, pending, mbufq_len(&lhw->rxq)); #endif mbufq_init(&mq, IFQ_MAXLEN); @@ -5095,7 +5095,7 @@ linuxkpi_ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, /* Implement a dump_rxcb() !!! */ if (linuxkpi_debug_80211 & D80211_TRACE_RX) - printf("TRACE %s: RXCB: %ju %ju %u, %#0x, %u, %#0x, %#0x, " + printf("TRACE-RX: %s: RXCB: %ju %ju %u, %#0x, %u, %#0x, %#0x, " "%u band %u, %u { %d %d %d %d }, %d, %#x %#x %#x %#x %u %u %u\n", __func__, (uintmax_t)rx_status->boottime_ns, @@ -5182,7 +5182,7 @@ no_trace_beacons: #ifdef LINUXKPI_DEBUG_80211 if (linuxkpi_debug_80211 & D80211_TRACE_RX) - printf("TRACE %s: sta %p lsta %p state %d ni %p vap %p%s\n", + printf("TRACE-RX: %s: sta %p lsta %p state %d ni %p vap %p%s\n", __func__, sta, lsta, (lsta != NULL) ? lsta->state : -1, ni, vap, is_beacon ? " beacon" : ""); #endif From nobody Sat Sep 28 10:38:17 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 4XG3hT6ggpz5X8KS; Sat, 28 Sep 2024 10:38:17 +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 4XG3hT4jVrz474y; Sat, 28 Sep 2024 10:38:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519897; 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=TEJo1l21HoRGRVFcVjpBieqwKdP5af9JEg2eqkjOyEY=; b=en7Sh1/kmtQQtpagp/hOfJuw9LKpvl9xkA0+tmmfaKtMWW4etqw/z+l7X0rCbWTDATItwJ nS/dbn2tt9YCR8hxIWa5Vn5eu0BjVf2UUpks0fNeYAPeHVHE0YhK2Yh5ymSSdUwrBrUYtS rZW7VnJu02V+GjmIQantUVXHPxGREth5g+pk3dUK4jcIvr5+cq8OBFr4V5Kk7mEbV8TuY+ QzALQvN50KRU4y+hswe2zb4XNbuL8U0Wzama8n4BC+WtknMVtgt6QD+G/6OPqW/LgOB4ZC KTwOv0Qjk0yKwGzj1rewbZR+VLI4OiyxIQymDfVuXrW/ajEp1ot3F2JWfJpn8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519897; 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=TEJo1l21HoRGRVFcVjpBieqwKdP5af9JEg2eqkjOyEY=; b=ZQhhNrHemBjo0oV7bChG9bJW6hiooWiqw8iNYZxpdguDP6xEUcaen07xXgA2Qp+kemNQ78 01GhzsUbmgRLe/To4YOjRo5wmUyWOqpCxKv5XXtLYd66mtJ2lSEKXBz63Kzch+oM2q7F/F dZnlfMwePBrSzyzl4spuQg02uz2Brrs1LDVpQR0VldFXth7hgERW4MktQRD4/ftE2cAMQr U4qaa65G9BtRZ1yiSmENzoGE6URCfLZhpAE27yvdMB9jlfKW5WPuP4xHcgP23A0QpmyS1I 3uioCpKDFnVVa/VFmNu9rBeaMl1wzNqH/4TBnty3/T/UDAgs5R4bLQSrskECjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519897; a=rsa-sha256; cv=none; b=Du29IWLfy8RD5bUivqfSAdmmzaxio8h6A90eb63gKwZJoAytuTYmsetOd0+ae4WgBPH8B/ wAz7l3+CUHRsrT9SrAi2O+ZxNgVVbgCuQMuwpgXe/xQQTAr3YWOGRjygIiY/1fe8+K6CGa dMi4j/4iM3MnVcN01e4PA0lszLcShIqtm7Ra+mY7gDNXCueMwdIt8Y8NODtcweVgVq/Awj Jvi+t0v1gjYmDnI4x8UNXtvsAZ8A+c1JfmssJwI59pcr0boWl8Yt1F0GNCJGupBiA+gRUJ iiN7JW+eO+T2G9kz5ENdMpNc0B/yVp5VJayrs2LH/nL8fhchxHEdHWP5xvaieQ== 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 4XG3hT2NC2zL00; Sat, 28 Sep 2024 10:38:17 +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 48SAcHqJ097928; Sat, 28 Sep 2024 10:38:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcHuI097925; Sat, 28 Sep 2024 10:38:17 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:17 GMT Message-Id: <202409281038.48SAcHuI097925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 52fdc7dacef9 - stable/14 - LinuxKPI: 802.11: implement ieee80211_sn_*() 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 52fdc7dacef94d34b53993163bba844735347ede Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=52fdc7dacef94d34b53993163bba844735347ede commit 52fdc7dacef94d34b53993163bba844735347ede Author: Bjoern A. Zeeb AuthorDate: 2024-06-05 22:12:56 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:13 +0000 LinuxKPI: 802.11: implement ieee80211_sn_*() Implement ieee80211_sn_*() using the equivalent net80211 macros. We need those implemented for at least 11n. While here also sort all the BA functions together next to the "sn" functions. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45819 (cherry picked from commit db8b3578627b5be93eba019ab2bbe3c03f7366f4) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 77 +++++++++++------------ 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 6a477ae5c32a..c102ada6def2 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -2077,6 +2077,32 @@ ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif, TODO(); } +/* -------------------------------------------------------------------------- */ + +static inline bool +ieee80211_sn_less(uint16_t sn1, uint16_t sn2) +{ + return (IEEE80211_SEQ_BA_BEFORE(sn1, sn2)); +} + +static inline uint16_t +ieee80211_sn_inc(uint16_t sn) +{ + return (IEEE80211_SEQ_INC(sn)); +} + +static inline uint16_t +ieee80211_sn_add(uint16_t sn, uint16_t a) +{ + return (IEEE80211_SEQ_ADD(sn, a)); +} + +static inline uint16_t +ieee80211_sn_sub(uint16_t sa, uint16_t sb) +{ + return (IEEE80211_SEQ_SUB(sa, sb)); +} + static __inline void ieee80211_mark_rx_ba_filtered_frames(struct ieee80211_sta *sta, uint8_t tid, uint32_t ssn, uint64_t bitmap, uint16_t received_mpdu) @@ -2084,33 +2110,35 @@ ieee80211_mark_rx_ba_filtered_frames(struct ieee80211_sta *sta, uint8_t tid, TODO(); } -static __inline bool -ieee80211_sn_less(uint16_t sn1, uint16_t sn2) +static __inline void +ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, uint32_t x, uint8_t *addr) { TODO(); - return (false); } -static __inline uint16_t -ieee80211_sn_inc(uint16_t sn) +static __inline void +ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif, uint8_t *addr, + uint8_t tid) { TODO(); - return (sn + 1); } -static __inline uint16_t -ieee80211_sn_add(uint16_t sn, uint16_t a) +static __inline void +ieee80211_start_rx_ba_session_offl(struct ieee80211_vif *vif, uint8_t *addr, + uint8_t tid) { TODO(); - return (sn + a); } static __inline void -ieee80211_stop_rx_ba_session(struct ieee80211_vif *vif, uint32_t x, uint8_t *addr) +ieee80211_stop_rx_ba_session_offl(struct ieee80211_vif *vif, uint8_t *addr, + uint8_t tid) { TODO(); } +/* -------------------------------------------------------------------------- */ + static __inline void ieee80211_rate_set_vht(struct ieee80211_tx_rate *r, uint32_t f1, uint32_t f2) { @@ -2143,27 +2171,12 @@ ieee80211_unreserve_tid(struct ieee80211_sta *sta, uint8_t tid) TODO(); } -static __inline void -ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif, uint8_t *addr, - uint8_t tid) -{ - TODO(); -} - static __inline void ieee80211_send_eosp_nullfunc(struct ieee80211_sta *sta, uint8_t tid) { TODO(); } -static __inline uint16_t -ieee80211_sn_sub(uint16_t sa, uint16_t sb) -{ - - return ((sa - sb) & - (IEEE80211_SEQ_SEQ_MASK >> IEEE80211_SEQ_SEQ_SHIFT)); -} - static __inline void ieee80211_sta_block_awake(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool disable) @@ -2459,20 +2472,6 @@ ieee80211_report_low_ack(struct ieee80211_sta *sta, int x) TODO(); } -static __inline void -ieee80211_start_rx_ba_session_offl(struct ieee80211_vif *vif, uint8_t *addr, - uint8_t tid) -{ - TODO(); -} - -static __inline void -ieee80211_stop_rx_ba_session_offl(struct ieee80211_vif *vif, uint8_t *addr, - uint8_t tid) -{ - TODO(); -} - static __inline void ieee80211_tx_rate_update(struct ieee80211_hw *hw, struct ieee80211_sta *sta, struct ieee80211_tx_info *info) From nobody Sat Sep 28 10:38:18 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 4XG3hW0scdz5X8bD; Sat, 28 Sep 2024 10:38:19 +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 4XG3hV5TjSz46wr; Sat, 28 Sep 2024 10:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519898; 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=+IzAdofVJ06Vlhiw2TsaI5scSCgDoTsiI2gPp7qTtsw=; b=trXxIVCegGlKWkamZhVJDGdo4yidWhayhgBsMv8T52yyBzzwmh3L6pTHGiY/z8IJ3lwfox E/hXsWMkUW/sn5HDLpZW//y6Tv0JKSzWEAn0XE3fCsbkLxZneaYRWJN4qnAGq3DgsAupan B57Kv0LGtWbGu/NXDMZAVOK+OoBS7Hm4BxiUHc9RXFCTRPLoxFkKiNStubkkT7ZTUxaMjd XwL3OZ6JEG+tOaDW0/YiCLl/6hHVMnUMnnMxKaICr7N+8ZMt1gt+N9ahEK+gkZAQMBm+Uf kUgyBu07wgO0Xy6drTEAOs9tETX/3UBcTdOx4Wvysj30s6hAEyZrae/4yxayig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519898; 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=+IzAdofVJ06Vlhiw2TsaI5scSCgDoTsiI2gPp7qTtsw=; b=n2DMwcpRswBtbJDk5LjPC+WpbIkBpcyPB5UtHCO4zdibKvZgyaYkMsE6oVKM3Wzw+snSdw fxg5g+Q1IR3wT1RnOH/mMalQ+GEP371X77PTIJQBN89ONLxk5bxUIWD6rDkeTObALI8Dzb zDkqYOEAao3b3zUHv5BpqFG8Fryl0u1ejvpcL2FRZkOACLi17dcJ1XeNe0dQu/RxaLvQ6w Sa367mA0NedTmo2WXKChBh6n2pVyiTcmX5OsIqX/WMJoOmjXDvJY0P7mbR7IGdRYsCMTnA lFd8J/cMqb72XZZelo7uhc8YcTVHrRJ1NwTZRJTnatO6b+V3Z2OoK1+0hTWPFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519898; a=rsa-sha256; cv=none; b=gOr0C86VlyCRVDHaKew96eJa7s8Tt2NX02yYHjgpPsY7E+Pa8fO3cDIzM2TonEVl3aRk2y 0WK+0zJQJ0edvO76yM7C84LKAfzMfZtv4WxkZcHaNM/lUfNDnwqxIcbjq1/3SxT960fqGs 0bNQ5LGynmmvteTi2tronPDe+yVPN3pk19pcnHgR4v9Xj1UcYShJJ8R24GnKnVxnoHMGEc 37yXFHiF8R7A7o+Bk9Q/BxAwAzBdj7fePgYEMvNUnQLIEzu35xD1UCMZvt6FkMlKwoMxd/ x21TI2m/K2SdpS5CLe4N5soZiyV1fGXOthrjm3grHYWpOlU5ZLuyWCEZAtN6AQ== 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 4XG3hV3RZyzLwc; Sat, 28 Sep 2024 10:38:18 +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 48SAcI3T097977; Sat, 28 Sep 2024 10:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcICF097974; Sat, 28 Sep 2024 10:38:18 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:18 GMT Message-Id: <202409281038.48SAcICF097974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 314069ff8c35 - stable/14 - LinuxKPI: 802.11: support manual lladdr changes 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 314069ff8c35ff4f2824746b6301da7fe5b48f4e Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=314069ff8c35ff4f2824746b6301da7fe5b48f4e commit 314069ff8c35ff4f2824746b6301da7fe5b48f4e Author: Bjoern A. Zeeb AuthorDate: 2024-07-25 07:53:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:13 +0000 LinuxKPI: 802.11: support manual lladdr changes Allow a user to change the "ether" address by ifconfig while a VAP is not UP. Compared to net80211 (given we have no callback) we register an eventhandler per-vif (a global one would force us to use hacks to derive if a vap is indeed also a lkpi_80211 vif). Sponsored by: The FreeBSD Foundation PR: 277356 Tested by: lwhsu Differential Revision: https://reviews.freebsd.org/D46121 (cherry picked from commit 4aff4048f5b1b6ab0b905726853ba6083e37cc37) --- sys/compat/linuxkpi/common/src/linux_80211.c | 30 ++++++++++++++++++++++++++++ sys/compat/linuxkpi/common/src/linux_80211.h | 1 + 2 files changed, 31 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 948d96bd64ac..a4b5545e0c3c 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2751,6 +2751,32 @@ lkpi_ic_wme_update(struct ieee80211com *ic) return (0); /* unused */ } +/* + * Change link-layer address on the vif (if the vap is not started/"UP"). + * This can happen if a user changes 'ether' using ifconfig. + * The code is based on net80211/ieee80211_freebsd.c::wlan_iflladdr() but + * we do use a per-[l]vif event handler to be sure we exist as we + * cannot assume that from every vap derives a vif and we have a hard + * time checking based on net80211 information. + */ +static void +lkpi_vif_iflladdr(void *arg, struct ifnet *ifp) +{ + struct epoch_tracker et; + struct ieee80211_vif *vif; + + NET_EPOCH_ENTER(et); + /* NB: identify vap's by if_init; left as an extra check. */ + if (ifp->if_init != ieee80211_init || (ifp->if_flags & IFF_UP) != 0) { + NET_EPOCH_EXIT(et); + return; + } + + vif = arg; + IEEE80211_ADDR_COPY(vif->bss_conf.addr, IF_LLADDR(ifp)); + NET_EPOCH_EXIT(et); +} + static struct ieee80211vap * lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, enum ieee80211_opmode opmode, int flags, @@ -2799,6 +2825,8 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], vif->bss_conf.vif = vif; /* vap->iv_myaddr is not set until net80211::vap_setup or vap_attach. */ IEEE80211_ADDR_COPY(vif->bss_conf.addr, mac); + lvif->lvif_ifllevent = EVENTHANDLER_REGISTER(iflladdr_event, + lkpi_vif_iflladdr, vif, EVENTHANDLER_PRI_ANY); vif->bss_conf.link_id = 0; /* Non-MLO operation. */ vif->bss_conf.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; vif->bss_conf.use_short_preamble = false; /* vap->iv_flags IEEE80211_F_SHPREAMBLE */ @@ -2972,6 +3000,8 @@ lkpi_ic_vap_delete(struct ieee80211vap *vap) lhw = ic->ic_softc; hw = LHW_TO_HW(lhw); + EVENTHANDLER_DEREGISTER(iflladdr_event, lvif->lvif_ifllevent); + LKPI_80211_LHW_LVIF_LOCK(lhw); TAILQ_REMOVE(&lhw->lvif_head, lvif, lvif_entry); LKPI_80211_LHW_LVIF_UNLOCK(lhw); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 80be87ebe231..7675a8b6cebf 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -165,6 +165,7 @@ struct lkpi_sta { struct lkpi_vif { TAILQ_ENTRY(lkpi_vif) lvif_entry; struct ieee80211vap iv_vap; + eventhandler_tag lvif_ifllevent; struct mtx mtx; struct wireless_dev wdev; From nobody Sat Sep 28 10:38:19 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 4XG3hX18qHz5X8Py; Sat, 28 Sep 2024 10:38:20 +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 4XG3hW50ryz475c; Sat, 28 Sep 2024 10:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519899; 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=RlVAhMsBxvkiqjl3Xx6VpHtV//o/6ycx22vqFjaSk9Q=; b=O0QYlAI7SpYfcjcelP1FokWyX8nwf4tNX4ne81r4IxkNi0iex9abC/vIt8rh9o78qYchn6 ckBhD3J5VdnR2QOlOizcTNd3BSQ5Mt1J+QWEExaC4LfZKS1JX5EF2ZOtNrmcZHedMIbfUW ozmEPfK7Ho4MgBfOh3ZNYxuPDEglOEYnJ9hmr2GqDV4Vm2PDp9gW2qWWH/+EDsrv2muMCy Y+GNfSbvgJ3DlSQmN/PT+bKKr9yCGs7vBuZFlfkry7OjXZqqf/Pgvmff4IMO98BOTGNmd+ iB0F8SOVYhRDOyflRCaYlw6xZ8z/UsOPYfT3+HIi6D54TD6o9nj1vSaFliRPSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519899; 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=RlVAhMsBxvkiqjl3Xx6VpHtV//o/6ycx22vqFjaSk9Q=; b=UiRpYVTf5OS8cy+1HS47qy/rqISIjyvd+lLzyKLnL7ATXSPsvuJSQEGushss35Np5wzf6U vpV+B3otfQGAT7NydSVu/2ZBm7pT91fjCEBXiVQuo1Z8U1oz5yTMO5/aUNkKdi5nL8E+6C +A9NgSRaEH+oo+HY6iLv5IXyAEJiHuUlsMXZtiTWPIUHPZ1KIIohVeQF1cdsy9Ae3L65BS deiZXzfN60a8Az+oMZlbem0bGyQB7l722OuRP/ESZlKqLRxwZnHw/Nc/VY4q08Kb3hfMwq DQrs2FBWxR/jpVQsDXdy6xKwOTrqsVgmq7IvslCZ3hxnb4c8a2QT5MyrQq27Eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519899; a=rsa-sha256; cv=none; b=E41KaTB/etcCA3Eb2Agcpmk8xUc6yzjMpIsJ97fwhaC/dH8xM0IpTC0mHVm1T7tyHYxk3T 6WHyS1p6tg6Nw9OBDgkXpmMYySQ3MhgSCcF+fOWCoOGcgGDr1m1kMPfLka1U+GgY+NA9Z/ H2eHp9ASlHpFUWNzdrqCDHoFg07XuP2DQEVwPgry88gETYW4DZQaUbFIW/VHET6OQSwjeB 7dFqDvuL0mpqgFUYzXze0G/+p8RaAOiQAuw+RXdlNRp718b+T6RWn8QhuXzMh6dwrg/Jt6 LCbDvesO/qn9YZnhGv+JjaDlk7QpId/tnmDJpHX9gYnzyejLLyN0tgeywzUfdA== 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 4XG3hW420TzLc4; Sat, 28 Sep 2024 10:38:19 +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 48SAcJV6098022; Sat, 28 Sep 2024 10:38:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcJLG098019; Sat, 28 Sep 2024 10:38:19 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:19 GMT Message-Id: <202409281038.48SAcJLG098019@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: d5025c491639 - stable/14 - LinuxKPI: add get_random_u8() 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d5025c4916393771c2759331c4308c7e4d11efc7 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d5025c4916393771c2759331c4308c7e4d11efc7 commit d5025c4916393771c2759331c4308c7e4d11efc7 Author: Bjoern A. Zeeb AuthorDate: 2024-08-27 21:20:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:13 +0000 LinuxKPI: add get_random_u8() Add a get_random_u8() implementation following the u36 and u64 versions. We'll likely want to macro-ify them in the future and add all the types which makes sense just to be done. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46464 (cherry picked from commit f29e915bc0d216a87f222a208caeb2172c93e4ea) --- sys/compat/linuxkpi/common/include/linux/random.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/random.h b/sys/compat/linuxkpi/common/include/linux/random.h index 808c5bc55974..893ee2b7b728 100644 --- a/sys/compat/linuxkpi/common/include/linux/random.h +++ b/sys/compat/linuxkpi/common/include/linux/random.h @@ -54,6 +54,15 @@ get_random_int(void) return (val); } +static inline uint8_t +get_random_u8(void) +{ + uint8_t val; + + get_random_bytes(&val, sizeof(val)); + return (val); +} + #define get_random_u32() get_random_int() /* From nobody Sat Sep 28 10:38:20 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 4XG3hY2y0Cz5X8MJ; Sat, 28 Sep 2024 10:38:21 +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 4XG3hX5zVcz475y; Sat, 28 Sep 2024 10:38:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519900; 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=FaShbjKYbXv/NFOwo8py2xkg0uEJglaFJnMd3ANmxW8=; b=T14rr2nSxMSHafGptlabkEb0s2LP9tdgSSBoAg6dC1C506yOdYeYIwyhQUgb6gIpsm5fYf yR61XsguWi5R2unISq2VwlKcmHlTwsySLRJ0R02kD8OB9Wp+5djwAth1adUuBB7hbP3RZw gRgtNQV0kPR9r0dPoVOh9i34+1t92c4iHy6dhDm6q2T9SLENfkuzXjmiPalEdlQcvu3K4m 3wad3UbdEw2tCqFNeQDVP8T41bneOLyfydSF/Vs42daAPcP8f4jCE044OdGywFANSNXKi1 CTsqr9iGSLv5A+cesx/DzUt33Si1/7wqoKNQBNrMsaxq2tDx0CIpnRwsdiTjBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519900; 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=FaShbjKYbXv/NFOwo8py2xkg0uEJglaFJnMd3ANmxW8=; b=ijKCglvq/UjLGLMDY9it7QvfcsoIAkpSJhu1NIIc4QQlhbjVuu6T1U/wBp4odzn/8XWMj1 HqapfgbuG06zvkQBWOLAj0vIRn0FySwLzt6Okwsa0fCQ7Iu4w/cayctzt2hodPZ5ozO3ub p0UhONdVbzjwfaorFt7esfuzsJsvCxsjgTztaU9uV1K3Vh/dsVOEf7roJhquKaGlNDcnLY k0gVStibLB84t7X3mx+PLQ5tpYbjqP3KluCnOvTXaZ6OAX+6QYjPFMpiyoHTdNI0EVo3Jq hDRFublJZkrQVBui53AhBazzvgEIF+X1VOcUnxj/T+kGar2triN7x/bgLu31ZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519900; a=rsa-sha256; cv=none; b=enJiq9B/oWqUcsDZsQDL5Gq8QiF7tDLwUBfezZCaQEZbBwlVIX57hYjgc8Gv4YzR4iKhyW bOTmJpwpXNK6cvwJUHv8Z5SpIt1sqV4H0EuB/oBdT5ATqCRoeIneG8b2gZoZDXLLs94bqz 9/mfYBTyo0/HvLQgpJL3vZCq5S7y75RbZiTcGl7xSiG5fxjp7eMShgeNxfcOTIPGQKjBnV VsscJ5NAEbU2JuEEpGrlwQFeUmz8+tRRMQXGQ/vGz6pEIPF9KJE2op7O9SNY8dTAq376qp 49WHJxYNLkXaoWEZV7qc7+j1tIDoUq14H8DuVP8P/tWBMGry8Ba6ODQQn2eNuA== 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 4XG3hX53z0zLt4; Sat, 28 Sep 2024 10:38:20 +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 48SAcKdG098067; Sat, 28 Sep 2024 10:38:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcK96098064; Sat, 28 Sep 2024 10:38:20 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:20 GMT Message-Id: <202409281038.48SAcK96098064@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 8e5f4f5f75a7 - stable/14 - LinuxKPI: add ENAVAIL error code 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8e5f4f5f75a7348a86470916bab9107f53040242 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8e5f4f5f75a7348a86470916bab9107f53040242 commit 8e5f4f5f75a7348a86470916bab9107f53040242 Author: Bjoern A. Zeeb AuthorDate: 2024-08-27 21:05:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:13 +0000 LinuxKPI: add ENAVAIL error code Used by an updated wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46461 (cherry picked from commit 8adb745dc9716e769ef0f7e993cea8a07735d5d8) --- sys/compat/linuxkpi/common/include/linux/errno.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/errno.h b/sys/compat/linuxkpi/common/include/linux/errno.h index ea258587c6f7..d634675d43d0 100644 --- a/sys/compat/linuxkpi/common/include/linux/errno.h +++ b/sys/compat/linuxkpi/common/include/linux/errno.h @@ -68,5 +68,6 @@ #define ENOMEDIUM 532 #define ENOSR 533 #define ELNRNG 534 +#define ENAVAIL 535 #endif /* _LINUXKPI_LINUX_ERRNO_H_ */ From nobody Sat Sep 28 10:38:21 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 4XG3hZ1g0Zz5X8SP; Sat, 28 Sep 2024 10:38:22 +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 4XG3hZ0NJLz478N; Sat, 28 Sep 2024 10:38:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519902; 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=V+f5eIHsxfffamSiQWy7q68i0postq8ehqfWb9SLEBw=; b=mMY2rePhrcCTsWFbX5dfgrN9XsKOcvtvpacRtjvnUz3ajdYiTcZxw7TN6cGUyYZPYcsSjw FCqibg1+dsDbLugOl4geq/jjHeFtnVuDfK0bEHl5Vp98W4GTR4zodev1sdbfIyo18gML0V CNfTNEX2BQVLzaOKAkmfIOuDBBlNUmSy0bVtU15RLAEzkSjI/vHyBnhf04oU9OI2DabIC8 nAXxkLBv7XdOcozWO+xkQSVZgt6Z3SiThSOJdiyWYJAvM/ecEEJALJjAR5otSZO+I2zVG1 Hs5UQQDPM000PMBydOW4T1G2lOlPbAOlzN2WKvv3P0WVS1nFVefA5AsbOmhOCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519902; 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=V+f5eIHsxfffamSiQWy7q68i0postq8ehqfWb9SLEBw=; b=Yi0Z1V4gXf6uOJH81QD5svLaQjZT/aD3XoYBlXeJTJroGNrypztqD94LstUR+aRTa/kqqO Tey9tFZomJ8+XwJ7t9cAhwx8/RpqzeDCXMJ2ssj4tAX+1d9M444TRiweMgi8TdHSHrE4/5 Q7mG57Sj5h1zWScD6yTQIO0wCGepPUrBBX345vDMwDWRWB2F9l6dGeHIF0epVfctoSDDNZ La7psEm1LUePQAElkCbFZVGqbseGGFFRMxUJCbCFQiYfh70+yvMvRUHs3NTDf+myu6iaZ1 Vme8yBX0pxYsPFnhblq3H9EJmmJrzYzaPPpfhIHKBnAHtaoss4XawcJWA7yuhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519902; a=rsa-sha256; cv=none; b=u6uKLMqwPiNpR7mXO5mP6J/0ISiiHW684fDe333mjGfSdNuUVYT/yT+3NXezN/aD9lRkt5 mnbJ7kcan4iPn1sfzxY25Smn3rIp60HFudzF8zhLrkUsm7Js8qTk9daO8q8MKz3TNMYDzA SCkXyJfvhREnXvKG2ZOvxQlfRdUo5yGHoNAa1UXhAE6K9vJlvGwfrDurjXj3wbj+Y63Mr/ y4G/qh8m8uMasIJLPrvyz+xLo67xQ6dqyuJtaNUhJ909fUkiDPr34PbnH5dRbTgcSQ3SN/ CXkyi18QJ1ZyR7uiV8ZDbkEQ9dqz0N8+rq8VWh37mLEbDNmgpnRgjmG87PfK/w== 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 4XG3hY67QyzLNG; Sat, 28 Sep 2024 10:38:21 +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 48SAcLhR098107; Sat, 28 Sep 2024 10:38:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcL5o098104; Sat, 28 Sep 2024 10:38:21 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:21 GMT Message-Id: <202409281038.48SAcL5o098104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 6dedd620cfe3 - stable/14 - LinuxKPI: add eth_hdr() 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6dedd620cfe35b6a0a637132c772c5f2c7c2b40b Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6dedd620cfe35b6a0a637132c772c5f2c7c2b40b commit 6dedd620cfe35b6a0a637132c772c5f2c7c2b40b Author: Bjoern A. Zeeb AuthorDate: 2024-08-27 21:07:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:13 +0000 LinuxKPI: add eth_hdr() Add an implementation of eth_hdr() needed by a wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46462 (cherry picked from commit 273cf7d36336eeed5fc2ad42e5e12a36e36650a0) --- sys/compat/linuxkpi/common/include/linux/if_ether.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/if_ether.h b/sys/compat/linuxkpi/common/include/linux/if_ether.h index 3735ad2f5527..6676e8fc142f 100644 --- a/sys/compat/linuxkpi/common/include/linux/if_ether.h +++ b/sys/compat/linuxkpi/common/include/linux/if_ether.h @@ -34,6 +34,7 @@ #define _LINUXKPI_LINUX_IF_ETHER_H_ #include +#include #include @@ -69,4 +70,13 @@ struct ethhdr { uint16_t h_proto; } __packed; +static inline struct ethhdr * +eth_hdr(const struct sk_buff *skb) +{ + struct ethhdr *hdr; + + hdr = (struct ethhdr *)skb_mac_header(skb); + return (hdr); +} + #endif /* _LINUXKPI_LINUX_IF_ETHER_H_ */ From nobody Sat Sep 28 10:38:22 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 4XG3hb34jyz5X8SS; Sat, 28 Sep 2024 10:38:23 +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 4XG3hb0Lysz470R; Sat, 28 Sep 2024 10:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519903; 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=W9URgyKzT0eMv7evW5XZfydzb7C/8atQ64obH8el3O0=; b=eOWTMybI9LovldsHZx2C5+fP4ZbEPwK8LzGn/hx7sWgYIq7FJAlYTN1lXUY80KiUZUsDUK JM5HDPDTSLXCzG2lv/ywrS2YoErug1Z6L4uuthAgKynKP5dfvWPszJo/ud7Un6wGZGfaZr 3V4AinoS/MnOKUryt8V1wmqKqS8fBmxrFikNQVxHPTdDcFb9RGQxqdIab1VorUjvwL1FNH et0sKV5xe/nSdhftCBu9vXDCyYOQraotcG6/Ta+oyYk8sNHm0FAHrIPzqnRttGkxJlJjyb Esaub69IvcsiyLXpH3Ah/BkoMDHIcWbYbNadGz2zrlZBJZ/9XrzwsWig/ml9nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519903; 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=W9URgyKzT0eMv7evW5XZfydzb7C/8atQ64obH8el3O0=; b=yTWGl1k5jk4AEECFtaqbWUjhk8KFFaQlqtxigZYyM+8kvSDsitORNNa7xDnZ7AU0i4YPOn /u6QIfN9j9Hb8UPk8RmdKBu/uHeZfElWuVMd3i59Jqp5KJ6ovq1rPFg2JI/rUkzVOHdUmb yU7fVLATApkRHLkISoWFhW/j6Fb8sB2ZOQ1ySPisuUerfNHactPa3vGIxFZGVuy6JvrJkO KcYeJk/UNv7gjgmlRTcPll3WBlBMtdVFQL+qh543jtnUgk+qL6Z///F/6mtzKfoo1MBObw fwk53NcLJMcG0O9CiBu0ojvgV7v9D4NlT1cmZGNq1tRkL071SQK9cdtlD0VxQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519903; a=rsa-sha256; cv=none; b=CRAn7RVTB15uVeHS5Y9JzCHBHL8vKtpwDPFvs6rAeGApfPJFT56dftoZB4ogw8L2h8XZqX qzJ/b50ae6f/nmAtYY3d4Pn+ptwLDa+DMLA/dNdPmeSA540eQzlAabRGBv8VEk6k0SMNve EUY1NxZ099ieENvAOJx4aR3oBy0orSS06gVIjKirmgLoNp3j2BIWXrWHrQyzG39b5gRpXL Jxg9hB+8rHNHadrImQPFXYd9iY1Kgc5f8rpdZQdapl/V8xTJEUynU4MqosviNvK6O5ZqXD kWfmoLggCM4ec/AhVtcnJPmfk6RaZ0h6adD3lrLxk9GhgFIhnY3i5HedqiZ6AQ== 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 4XG3hZ74f7zLrF; Sat, 28 Sep 2024 10:38:22 +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 48SAcMsm098146; Sat, 28 Sep 2024 10:38:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcMw5098143; Sat, 28 Sep 2024 10:38:22 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:22 GMT Message-Id: <202409281038.48SAcMw5098143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: cedae002cba4 - stable/14 - LinuxKPI: add no_printk 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cedae002cba47fbeb5e0de2393eb3a4673590019 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cedae002cba47fbeb5e0de2393eb3a4673590019 commit cedae002cba47fbeb5e0de2393eb3a4673590019 Author: Bjoern A. Zeeb AuthorDate: 2024-08-27 21:12:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:14 +0000 LinuxKPI: add no_printk Add a version of no_printk(), which seems to be there to have format string checking while never calling the printk. It seems a very weird thing and it needs a return code and for some reason my initial while (0) { } version hadn't worked while porting over new code but could have been further downstream format string problems. if (0) seems to do the job though I would have expected that to more likely simply get optimised out without any futher format checking. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46463 (cherry picked from commit 1847e63d63f440cfcb2f4ee2c2ee8990f0272d88) --- sys/compat/linuxkpi/common/include/linux/printk.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/printk.h b/sys/compat/linuxkpi/common/include/linux/printk.h index 933d5aa6f94a..3840a6e5fb8a 100644 --- a/sys/compat/linuxkpi/common/include/linux/printk.h +++ b/sys/compat/linuxkpi/common/include/linux/printk.h @@ -125,4 +125,11 @@ print_hex_dump_bytes(const char *prefix_str, const int prefix_type, #define pr_info_ratelimited(fmt, ...) \ printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) +#define no_printk(fmt, ...) \ +({ \ + if (0) \ + printk(pr_fmt(fmt), ##__VA_ARGS__); \ + 0; \ +}) + #endif /* _LINUXKPI_LINUX_PRINTK_H_ */ From nobody Sat Sep 28 10:38:24 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 4XG3hc60kCz5X8MP; Sat, 28 Sep 2024 10:38: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 4XG3hc1mMCz47FS; Sat, 28 Sep 2024 10:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519904; 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=s/bO9JY/ixDi82/5I6MDhdrujR4SxdyaIfqEebxREqo=; b=tQj50mH48YVD0wfZX+xMcrTqVdapdNPMQI+S7IVFJwMyjpDNyPifGLWPRVm3TaFV+eUBCX Yk6ACl5PNr41xp/UbD10EtCNVX4H2X4dv9KOkSYx1SfUQj0S2vZEa/FQgLr2L89jtSlSD6 0wutxfer3XcypyBwgCAZ94ukbotBAZV1VrE15eTHPXayFiXbUJKLEUimSKCciM8GscOEU0 gmX52zJvyRK32Dsdn4pixUu/GmlCQs4D+4nFIF33oaUg0aUB4EYavluWXpij70ohIzEUD+ 2/87H3rcCyaiMOO8zlgtPiB+r9ChNxsrshqtTlsAVZp6uQ5WjwMuTZnio69YYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519904; 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=s/bO9JY/ixDi82/5I6MDhdrujR4SxdyaIfqEebxREqo=; b=gjBnAKEgrS9ZLy9eQRj3TLk9EvtIOqu2TJpnTU/AAKxsa84CSjRjOzXtuDtF5jnE/fNQ8d w1WxOzaheR/VQsPMhwcYVFVKRnnBfajPZxH5UTLhwa7JYYKuGiWSu2nOON2orhWKMHFwN4 4XMkwhOFIEts5/wDnCVYG4VTz9KYvI3kwsZPyyRzIioqQo5D3bitmVkniLiWKxPI+HHMyd /MTLvDw5f9vTxc4/GHuI2RAb6ksuLTU4TDcLpfRgshXfR6KSeK4An4TVaTBggGQaA2Rdrc SGvdujFNoHzeuoQiMcSMGfy9tWGy+3PyKFyYWeobAWhFRbg/0t3yMMTBcArodw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519904; a=rsa-sha256; cv=none; b=T8dw5S3r9QbPIHmG5F1X4rrOnc9zyhX01c78hh6jfsNQpIR87JgIcrxodRlxBNzxeT1YwQ 1HAHeiFtmvynAQNSpPdPRfcM/OCjQcjxozUN9sqFDYa9mRLIluShRt+XKhYhLn57YN7Ka0 zNj/rFNqEvlibnT9hcXAxqr8kcMxmVt37PpNNWtYxEEHEcTrLtDZ6l7bW8mneHbIVldNw7 nem93chJXCQin5Kqw5umGIbuxvIr9vf9LEzbxcH2CXrN5nB3TtK/zK1wrEW8F7uEcnrcfo pqJgxuhe/ZBykOB2kdnLk2oWglkRDYqUSPn734+UGjHg5KDWnzappz1vS2S4SQ== 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 4XG3hc0vZ9zLnR; Sat, 28 Sep 2024 10:38: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 48SAcOon098205; Sat, 28 Sep 2024 10:38:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcOAQ098202; Sat, 28 Sep 2024 10:38:24 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:24 GMT Message-Id: <202409281038.48SAcOAQ098202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e138f36f6422 - stable/14 - LinuxKPI: add general module_driver(), use it for module_pci_driver() 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e138f36f6422212ac8b459ecfb2f0677404a3a7d Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e138f36f6422212ac8b459ecfb2f0677404a3a7d commit e138f36f6422212ac8b459ecfb2f0677404a3a7d Author: Bjoern A. Zeeb AuthorDate: 2024-08-28 14:21:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:14 +0000 LinuxKPI: add general module_driver(), use it for module_pci_driver() Factor out module_pci_driver() from 366d68f283793 into a general module_driver() so other bus attachments can also use the same kind of macro without duplicating all the lines. Redefine module_pci_driver() using the new general macro. No functional changes intended. Sponsored by: The FreeBSD Foundation Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D46467 (cherry picked from commit f5c7feee7129dc88a2e5dc3ce0a075cb5e4f534a) --- .../linuxkpi/common/include/linux/device/driver.h | 33 ++++++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/pci.h | 21 ++------------ 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/device/driver.h b/sys/compat/linuxkpi/common/include/linux/device/driver.h new file mode 100644 index 000000000000..03b510c9c8b7 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/device/driver.h @@ -0,0 +1,33 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2021 Bjoern A. Zeeb + * Copyright (c) 2024 The FreeBSD Foundation + * + * Portions of this software were developed by Björn Zeeb + * under sponsorship from the FreeBSD Foundation. + */ + +#ifndef LINUXKPI_LINUX_DEVICE_DRIVER_H +#define LINUXKPI_LINUX_DEVICE_DRIVER_H + +#include +#include + +#define module_driver(_drv, _regf, _unregf) \ +static inline int \ +__CONCAT(__CONCAT(_, _drv), _init)(void) \ +{ \ + return (_regf(&(_drv))); \ +} \ + \ +static inline void \ +__CONCAT(__CONCAT(_, _drv), _exit)(void) \ +{ \ + _unregf(&(_drv)); \ +} \ + \ +module_init(__CONCAT(__CONCAT(_, _drv), _init)); \ +module_exit(__CONCAT(__CONCAT(_, _drv), _exit)) + +#endif /* LINUXKPI_LINUX_DEVICE_DRIVER_H */ diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index f9b60ae186b5..73882b312db5 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -36,6 +36,7 @@ #define CONFIG_PCI_MSI #include +#include #include #include @@ -274,24 +275,8 @@ extern spinlock_t pci_lock; #define __devexit_p(x) x -#define module_pci_driver(_driver) \ - \ -static inline int \ -_pci_init(void) \ -{ \ - \ - return (linux_pci_register_driver(&_driver)); \ -} \ - \ -static inline void \ -_pci_exit(void) \ -{ \ - \ - linux_pci_unregister_driver(&_driver); \ -} \ - \ -module_init(_pci_init); \ -module_exit(_pci_exit) +#define module_pci_driver(_drv) \ + module_driver(_drv, linux_pci_register_driver, linux_pci_unregister_driver) struct msi_msg { uint32_t data; From nobody Sat Sep 28 10:38:25 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 4XG3hd60wZz5X85c; Sat, 28 Sep 2024 10:38:25 +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 4XG3hd5NJbz47VB; Sat, 28 Sep 2024 10:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519905; 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=n6f4cjDQkUvlgWwTLBmos52KOx0EakTGDbhfafvX5jM=; b=BSb47zv10v1xFo5JZalLJek3XQ6hBf70W8V6kSeH6FgoYLIgf1nPNkqV6mgPfA3omcHL9z T5i67shyUx1AlOk6dp5r53wZb453dw36cuGQqGGfhep9SE/I7s+5wiyXq4wHIIIzlcLx3Y oNpTpGu/2/UzO63KWUGN/ajta874H8hr8gw7f45g92UlsmoadsG7itm1+xv9BanULkcbo0 XUXYIZUi0JQJQl573rkVKJB2oHqz4vn1A9zAug3RGUFWeLfHaUTakKl1IFiv+DlJqT/WS+ uUXgqVcKdtuzHw+TuWqv7JWf1XJalkKB4x2eqezm6H5SUc4v/ZR5IIdkusjnHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519905; 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=n6f4cjDQkUvlgWwTLBmos52KOx0EakTGDbhfafvX5jM=; b=VlFW3jlJp1kc1YMzOUByOj+KkJ0uL3vsziXdjdIKVsdfc3Gw/Y9JpdYOxfbVBz2JNFkHo7 zMmKPVsqz/omsf62Erv9nxaWTjDH7BiCgECOehTGwah8k++giyA4Wvk3cMjyvo3nA1t986 ciRfqsEA6Pk51YKFdE8JdyJ5Rkh1gXhnxKQqR+cRl2BXQPEoZg9G427Up76lMIyBiYwU0h CeV2RWL2KfUvzGWLFh4BoCQ47NPkdSUo9XrIFUluOL6Ox5utuUTnmncnY4sguV4YCtLOCY /peiB2PjOBa9DnJFJk/zRorX64y698ZNYXRfOo8/OuaeHxZoWrXDphhCrpg64Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519905; a=rsa-sha256; cv=none; b=eiOl1AU0RdB9PHF2pNQoL5VKxe3M9V/s76GsnRZ4K27Wc/SJ+69bGGuKTs31K3kFHMIZWM btirMY9laghITFyjF/qh35RcCoOT+uIxklPGHrBg4/XAhBXKq5g8NBnla7jjGe6jh3i0eW FryCdWdSygLjPEelb6aEFLk7d0vI7l9enZMaJpBYrOMWqY5I3h+p30ZA4+B+xe23qWEw6Z FdZGAxJSLDIELmIG1E2eAInAFycJXRo6FukBR8qwq6CJ2mjsaNgqeI/8rtKGEzGSxT8zJB 49yzy09LzAaTsszeUR1WJf123N7U/5yN4UhRJ52CMR5AiQNF++MqyhRA/Egitg== 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 4XG3hd1zVtzLYq; Sat, 28 Sep 2024 10:38:25 +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 48SAcP5T098252; Sat, 28 Sep 2024 10:38:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcP48098249; Sat, 28 Sep 2024 10:38:25 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:25 GMT Message-Id: <202409281038.48SAcP48098249@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 286250daf5a3 - stable/14 - LinuxKPI: add pci_err() 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 286250daf5a335f111a897333888f68f4f6220e7 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=286250daf5a335f111a897333888f68f4f6220e7 commit 286250daf5a335f111a897333888f68f4f6220e7 Author: Bjoern A. Zeeb AuthorDate: 2024-09-12 20:40:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:14 +0000 LinuxKPI: add pci_err() Add pci_err() as a wrapper to dev_err() as needed by an updated driver. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46660 (cherry picked from commit 01e1131e4a20ea377d580ecce210aa86726e71c6) --- sys/compat/linuxkpi/common/include/linux/pci.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 73882b312db5..aa756c6e5b09 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -367,6 +367,9 @@ struct msi_desc *lkpi_pci_msi_desc_alloc(int); struct device *lkpi_pci_find_irq_dev(unsigned int irq); int _lkpi_pci_enable_msi_range(struct pci_dev *pdev, int minvec, int maxvec); +#define pci_err(pdev, fmt, ...) \ + dev_err(&(pdev)->dev, fmt, __VA_ARGS__) + static inline bool dev_is_pci(struct device *dev) { From nobody Sat Sep 28 10:38:26 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 4XG3hf6pMZz5X8QD; Sat, 28 Sep 2024 10:38:26 +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 4XG3hf3cKdz47Pv; Sat, 28 Sep 2024 10:38:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519906; 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=lzuv0TSbTGa6if2HwrQH2GbN4U1A4yqxhCcxPEb6Q34=; b=wChNzvNYtK6fiuSf5mhgGkf/40lykUNHJfHPSMXIedyi5SckIZGOWq1OVOJr8QoEhi3UWc j80ONKvEEzCPTgVwcmm8sXxpEsAlWBMV1WhAM6CzIN8Xm1iA63t1xAgUT1F2tUWaYGkejo XUkbbBBjGFLj1osVqbMCe1UVCB6GQOwmKB5H3AYiHXGSDh2W3pCoiSz/7oB9ZcIjAR34Rk YqD8PMzO1EtkI0mYNTH1GG/RufJokn1T/msgeteGbgy9Z8s+OxaBx0TnkBZNRJh4QVCHJi oX13s+Zut7uLwE5Ak1K5b4TUMd9MV8anG5o6gz4JX4uU8+cpsPeAQ0OdMTVkOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519906; 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=lzuv0TSbTGa6if2HwrQH2GbN4U1A4yqxhCcxPEb6Q34=; b=YAL7ny0FGZ/poOsf9TErDxmXCb1ll5Rb69C9SNoL44HFndyGC7Z5IlzRFUxUCVQwIo4q4a FNocDHjH3YfrFB2jOYHwbWlyLxV4UIf9SYd1cgj31N+KmLum89tmTTWkQasuaTfggjhrZk WNTnroJvgUDIbsKVOzsGPmWIztKZSnPVWVchAg4niCQ4FXAeGPXg9YUi0LqUzEMGEaPgHw WyqZPhq3ovREkkWg31S8j2x/uIWIhUEHSEXfRpf78LfpFDC/IwUbZmg/aQWkkmez5HYMp4 enWAjw+j1W/DQ7r7Vq2yhoPUGck6KzihQ9/njedS03y1biMn/sqVMnW0tL1fAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519906; a=rsa-sha256; cv=none; b=GAEuJAzqIzGWMj7mD1r1tPptRPjjvZGZYUJS6f+NRZOQWa2D3SCSVCChM4i7nZIVugsS1a 2ROBmCH020upavuH2pb5vPGt9SJ1VMBmM2FhxGxTrw7dKlLSSov3rx++gQqO6GT2v8LKVu yFXyyQvnKCxaQOgC8XnmcVd70ONkXpHPTdVA1pI2qyf/LVG2ffOBOF1hqdXW3CnRNhXMpX TncfHqu9FI55GOokY+iGiOOstf1qPYmnN/aLx8BFfzQ+7KmtALV9gw8K17fMTMXeESnuR5 59wQ7U08Mgxer4E/+5KoztGqURaHoyyQhN3eiFU15+KoxGZ8lfSIgeeQGGIXuw== 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 4XG3hf34kfzLt5; Sat, 28 Sep 2024 10:38:26 +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 48SAcQKj098300; Sat, 28 Sep 2024 10:38:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcQN0098297; Sat, 28 Sep 2024 10:38:26 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:26 GMT Message-Id: <202409281038.48SAcQN0098297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ea18ffdf6e91 - stable/14 - LinuxKPI: add more fields to mhi.h 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ea18ffdf6e91a42fa07be355c0c1afb7ff7bace6 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ea18ffdf6e91a42fa07be355c0c1afb7ff7bace6 commit ea18ffdf6e91a42fa07be355c0c1afb7ff7bace6 Author: Bjoern A. Zeeb AuthorDate: 2024-09-12 20:44:06 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:14 +0000 LinuxKPI: add more fields to mhi.h Add more fields required by updated wireless drivers to mhi.h. Sponsored by: The FreeBSD Foundation (cherry picked from commit c12e3a05252ac9f43a6db379f88e4b4a07c06d46) --- sys/compat/linuxkpi/common/include/linux/mhi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mhi.h b/sys/compat/linuxkpi/common/include/linux/mhi.h index 2e0b74f29def..24b3205d6f5a 100644 --- a/sys/compat/linuxkpi/common/include/linux/mhi.h +++ b/sys/compat/linuxkpi/common/include/linux/mhi.h @@ -75,6 +75,8 @@ struct mhi_controller { void *regs; int *irq; const char *fw_image; + const u8 *fw_data; + size_t fw_sz; bool fbc_download; size_t rddm_size; From nobody Sat Sep 28 10:38:27 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 4XG3hh0BZ7z5X8Vc; Sat, 28 Sep 2024 10:38:28 +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 4XG3hg4dxnz47Rk; Sat, 28 Sep 2024 10:38:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519907; 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=ecns0IU7H7lfDINptqhhXwXfJ47rDhgzTo4l2Y7JUyE=; b=pvlnZEjigxIVog8g2G7jXHzmg+Axn1K+7fvo+J+TOhhzN4E8D5LjwWLITmbjQsFXJRuk7J CEAT7ijOyPECEWsaSp6cBE/p8mMVU/7f/lAng12iB+nBNY06k80Ax8Qc28YStTHvOPJt6D UvDEsb0L49rbJYvvYQlaQc9t5MCOYiqWOgDZZoRi5yxJceHEVcZ3r+gx5hBJYp2TPfbWz2 RK5RFawERqUeddKVx5UoZH1gbxFn9eAaZFfcfm5jHCWEMOtq9XRrStb9SqvwvqblA2jiUw 7E2Q1GDu99T8l4LsoKNYHxf0hoSlW8IL8wRE9yF1jPFX9oAt1QDTLfaynSAOpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519907; 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=ecns0IU7H7lfDINptqhhXwXfJ47rDhgzTo4l2Y7JUyE=; b=axuuKe8MqmKvpmNIT8O4D8lkVKLQ3Y1yGv2gayWOS9CReH9yp1TSYViJNK3h9AA/wzS2Fa 7710rtE8P7spBHftwK5wCOPrTgIrIStO2HE54W+FZahXl9bnkDvkiiWPzmyTYsUEzvV6bI NxUG4l9YcfogfopRlQeERgYnBHr0ALUQ9F/8iCDKzcudZDo93+O6FkSeFzyTiSkrue/2RT wFly+hTnMdL6PKZ0ruLexFb0MbqCxeCuCWyhSQZirzq2swuwdxL1Uhg7lK9mBr+vhrMI32 yQSV0RobGh7PKi07VZsMC1fkX2YTyNtSk47uuUOnxd6Y2aWSl47Sb+ZhUT7XOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519907; a=rsa-sha256; cv=none; b=h8z6f+36rqq/6OarMwE8O3PMaHyrvNEYkth2DNzMwmfTs3A+awSrG5zh/GwoE2VvmEN1SZ oAkn9bSdwGGEh9XBQ9sexDV2NYsRC3Gf3eyd+XSAF81v518EmYciKyHlF+n0lUPfwWmyEj mzx6n6rNJzYaF1CRgpBxi9pyzBh9qt0Yxw6b7+kzEM/0evmSh0One8ueoraZgjl1kNABu3 hOp5yTzuKCyUdawkyuso2+1dkF+i18NSZPAqQRe3tbA5Eguv8JQe5Udw735HgVDeW7a9Mk 3eH6M8HScMdtHTcs74I9mcsU1PkBK+IRh8X5ENcS06+YTigjUR+zgZAhn0WVaw== 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 4XG3hg4G99zLt6; Sat, 28 Sep 2024 10:38:27 +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 48SAcRmE098348; Sat, 28 Sep 2024 10:38:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcRPF098345; Sat, 28 Sep 2024 10:38:27 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:27 GMT Message-Id: <202409281038.48SAcRPF098345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: f00e737be055 - stable/14 - LinuxKPI; add more defintions to netdevice.h 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f00e737be0558f4bc8ae858783ab8cadf519ec69 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f00e737be0558f4bc8ae858783ab8cadf519ec69 commit f00e737be0558f4bc8ae858783ab8cadf519ec69 Author: Bjoern A. Zeeb AuthorDate: 2024-09-12 20:46:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:14 +0000 LinuxKPI; add more defintions to netdevice.h Add new enums to netdevice.h (including one which is referenced but no value of it is used in a driver so we have to add a "dummy" value to avoid an empty enum). Sponsored by: The FreeBSD Foundation (cherry picked from commit 6ed447b51a9d6cf22aae2dfba6efce3922ae6d57) --- sys/compat/linuxkpi/common/include/linux/netdevice.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/netdevice.h b/sys/compat/linuxkpi/common/include/linux/netdevice.h index 3d2b309909b4..dde3ad07dec2 100644 --- a/sys/compat/linuxkpi/common/include/linux/netdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/netdevice.h @@ -75,6 +75,10 @@ struct wireless_dev; /* net/cfg80211.h */ #define NET_NAME_UNKNOWN 0 +enum net_addr_assign_type { + NET_ADDR_RANDOM, +}; + enum netdev_tx { NETDEV_TX_OK = 0, }; @@ -95,6 +99,10 @@ enum net_device_reg_state { NETREG_REGISTERED, }; +enum tc_setup_type { + TC_SETUP_MAX_DUMMY, +}; + struct net_device_ops { int (*ndo_open)(struct net_device *); int (*ndo_stop)(struct net_device *); @@ -122,6 +130,7 @@ struct net_device { unsigned long tx_errors; unsigned long tx_packets; } stats; + enum net_addr_assign_type addr_assign_type; enum net_device_reg_state reg_state; const struct ethtool_ops *ethtool_ops; const struct net_device_ops *netdev_ops; From nobody Sat Sep 28 10:38:28 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 4XG3hj1rFxz5X8YC; Sat, 28 Sep 2024 10:38:29 +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 4XG3hh6BsJz47Kr; Sat, 28 Sep 2024 10:38:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519908; 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=lO2HL0LCgI0rD5LNlJnqi34PaLqHY7hYq5TL4KItynE=; b=WRCAXeaRRWmrn+nKmq3RvWnXEvAcZK7zL4sQySyeeS239HD8LuX7+7yydtRS1jFfvWLRAp sB04FGUBmFwe5VeECWxhnQFS4/b0JINpCuV0fIv7wwDrA0N/clpYuuN2KTgmKM3o8levr2 Ot20O3AoUD2uQEkszO22osjKS3+Ss/Tzk8Kv8cphxrcfIR/zk2SETI28wlFXveTwTTZ0oS HLf1bYIUJBymrA9iNXS7C66F3G+g6IWJTJ+QeyhtIDy1BhYnP05PKL7i8am3yVfCJPO2P5 hsLXO3stG6qOhPaHaXipviEpgPDrmncLVSBpBm5meSY1f6Hmnuv2C3325B3sRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519908; 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=lO2HL0LCgI0rD5LNlJnqi34PaLqHY7hYq5TL4KItynE=; b=eqrxgEljv57Qe+H9SVkCxuh9WwsPczP7xo7vJF6aCnGBAlruqOl7gnGTUbS+rlWk/5uS5r 3q8UAF5DLueEPKXGFbin5WTDaHxcl+2W0MxqzqxyKCkodjSZCHYhqUAQatWWXFTjmuuo5e tuTauYj6SyA2dEtBrNzrCK1GbZKNI4O9bwlRfQ0jrXj+0joV/lUpg1IlTD6MT/rzgjfkpZ bZX5XKrIBJEGBgoEBs6oTFoHS3niCICXVg4/D+4oyMMm9XIBazN0mags76iO/feESicHwz bBk8I/jnKHKoTcVLln+q3OojAvECEBcpvjo72sWNJ1vTBkAMCzu6g3prLnI3jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519908; a=rsa-sha256; cv=none; b=VMZPHm19Ha2YYexlIruVE5QvQQ5ZeZkOTAuQcALpFC14bXgxsKi4IFyEEg2WcIe/ISVuGy 5BAIrj4yDkWmh8CXMQuOlA4neME/asN+K502teuFOejGozeilHmHUXzfEFNUUGFcYjOKVo yjd3EZkuhv9o5J6cqLgIKBAQDDZ5kWALscTukPCswELq8qUTL+gQiUPn5Ct1jnlI1rzzVv qx5/M3VVfcK5khB84T537vvTtCT2aRaCucMZXp9IuF449cNhsNa4C6twTNnahvHCBjOXIA euAI6bxUABQJ9Jx8noPjGXyXjbTViTVGhuJ+ERDBBZJOT/ox+FWGZVNv7yud6g== 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 4XG3hh5T9xzLNH; Sat, 28 Sep 2024 10:38:28 +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 48SAcSV2098393; Sat, 28 Sep 2024 10:38:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcSjV098390; Sat, 28 Sep 2024 10:38:28 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:28 GMT Message-Id: <202409281038.48SAcSjV098390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 5ea0b0130112 - stable/14 - LinuxKPI: some additions for mt76 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5ea0b01301121cb9da9a05431bb8ce34a5743428 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5ea0b01301121cb9da9a05431bb8ce34a5743428 commit 5ea0b01301121cb9da9a05431bb8ce34a5743428 Author: Bjoern A. Zeeb AuthorDate: 2024-09-12 23:08:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:15 +0000 LinuxKPI: some additions for mt76 Add changes required for later mt76 drivers. Sponsored by: The FreeBSD Foundation (cherry picked from commit 4b972f77a16f9a217c211c8c4f28a41eca98554e) --- sys/compat/linuxkpi/common/include/linux/soc/mediatek/mtk_wed.h | 1 + sys/compat/linuxkpi/common/include/net/page_pool.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/soc/mediatek/mtk_wed.h b/sys/compat/linuxkpi/common/include/linux/soc/mediatek/mtk_wed.h index b0aec2d4afbd..74038f0e7520 100644 --- a/sys/compat/linuxkpi/common/include/linux/soc/mediatek/mtk_wed.h +++ b/sys/compat/linuxkpi/common/include/linux/soc/mediatek/mtk_wed.h @@ -42,6 +42,7 @@ struct mtk_wed_device { #define mtk_wed_device_ppe_check(_dev, _skb, _reason, _entry) \ do {} while (0) #define mtk_wed_device_stop(_dev) do { } while(0) +#define mtk_wed_device_start_hw_rro(_dev, _mask, _b) do { } while(0) static inline bool mtk_wed_device_active(struct mtk_wed_device *dev __unused) diff --git a/sys/compat/linuxkpi/common/include/net/page_pool.h b/sys/compat/linuxkpi/common/include/net/page_pool.h index 82dbeff82167..2dc8f74b31f3 100644 --- a/sys/compat/linuxkpi/common/include/net/page_pool.h +++ b/sys/compat/linuxkpi/common/include/net/page_pool.h @@ -29,6 +29,7 @@ #include /* pr_debug */ #include #include +#include struct device; @@ -41,6 +42,7 @@ struct page_pool_params { uint32_t offset; int nid; /* NUMA */ enum dma_data_direction dma_dir; + struct napi_struct *napi; }; struct page_pool { From nobody Sat Sep 28 10:38:29 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 4XG3hk3K5Nz5X8Vj; Sat, 28 Sep 2024 10:38:30 +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 4XG3hk08Kkz47c4; Sat, 28 Sep 2024 10:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519910; 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=E6TjIXQJIYOa2Nvj6B68BKEz6JOnDE6EjKkRiMYg+c0=; b=mYiC1MpFP8NazaAH1Vt5KhJW4XaJEkq9hgehlUfaqHofVAYY1+R7mB/X4MkNZSZyQK+Rb9 EmIrMpLhWnRgKbFUEdkrCp86X6qK2cbrvMTb5OHklC+K+0O5EWDqorX5vcDJczY5H38W2B 0M9NN25jaGoqggTAcY6/01+w1K2gc1hENUVNru9b8pntKrEZVmsGJgnPuNDTUkxfzGWTz/ npAPRgWeO4V6oyHjKx6TnsB3X73J+5ot2y4ME2UP6oHf+3A0qgsqEvA4kAY7gv9cowZcti E6wJbKfZjDAdTi6r0nxw36b+geyQ1n57cVo80+rUPaZdqqMFGNV3A8d3pcUitw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727519910; 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=E6TjIXQJIYOa2Nvj6B68BKEz6JOnDE6EjKkRiMYg+c0=; b=JwC4c7u+HrEKtIA98tVVlqfFNX4V2c4iHz2+w4Zd+24EaCrhZWtcHQaYk1fwK++H+U3jDs YQwRSbRGLebrOwjtuEcFP4SGCQVhmCfoe46S7VHTFOXaxd+PNRHbncpbVEPF0wRImr40A8 5jfs9CHzSxv7JqRTSSR8yQIspowd9hQwEM+cxN81XPT5SrTpNzqgMs37s9wZRn/CUcOw03 gRBkdoD1Ul655JWI2JDYsi18kKfaDm3+IOviZ8oI7A+/m6ZqE0ebD8VcXANI5JxywKFnQB pMRB4c4807R4Hi0oty/lMCsrOW1pHcfC/IrkztonzUm4VGgu7r2jAORh54PMMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727519910; a=rsa-sha256; cv=none; b=CSOZQWGFoqJKJjGB0Id2i7pS4ZXDeTeN6+0gtB+gHBBIELyOvHB4uHrBvKH4tTlXAxrZYb na/G5DGJWCYTYeTsQ4TAxhTi+E07jzFKmrMaKtJmUqwKq44AjlahQJOUY+BD8JBKiEBfCQ Ejiv/5BM2DDsfqciqxTwxM/6wVPW/RZlFAWrHGDgAtdCIT61dyQPNPcZA0ARQ45m3MHnXL IwkPwixaY927AAvlTUsW8IeCSAp/xGWD/V+4XwkpShjjjaTadus2hEM0zjnLGUF+O5RZVO /QKX4/3bjoE2qu1n2gBEteH5SBGDPedEMh28FqzhNl/WZpBkqsfusqeedAjXvA== 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 4XG3hj6HnDzLwd; Sat, 28 Sep 2024 10:38:29 +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 48SAcTpP098457; Sat, 28 Sep 2024 10:38:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SAcTER098454; Sat, 28 Sep 2024 10:38:29 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:38:29 GMT Message-Id: <202409281038.48SAcTER098454@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 70da94bb52ec - stable/14 - LinuxKPI: 802.11: add futher defines to ieee80211.h and nl80211.h 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 70da94bb52eccfc4c341b6b08a73725b649c3992 Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=70da94bb52eccfc4c341b6b08a73725b649c3992 commit 70da94bb52eccfc4c341b6b08a73725b649c3992 Author: Bjoern A. Zeeb AuthorDate: 2024-09-12 20:34:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 10:35:15 +0000 LinuxKPI: 802.11: add futher defines to ieee80211.h and nl80211.h Upstream new defines, enum values, etc. for coming driver updates which are non-conflicting with the current state. The only notable change is the rename of the enum ieee80211_ap_reg_power but the enum name had not been used so far by any driver in the tree (only in mac80211.h) but an updated version of ath11k does use it so we need to correct our initial naming. Sponsored by: The FreeBSD Foundation (cherry picked from commit c1c989588df67396392edceb0e7e7028abc06c49) --- .../linuxkpi/common/include/linux/ieee80211.h | 63 ++++++++++++++++++++-- sys/compat/linuxkpi/common/include/linux/nl80211.h | 18 ++++++- sys/compat/linuxkpi/common/include/net/mac80211.h | 2 +- 3 files changed, 76 insertions(+), 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index aa1a0a4f3c5f..9a43a571d390 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2020-2023 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -33,6 +33,7 @@ #include #include +#include #include #include @@ -125,8 +126,9 @@ enum wlan_ht_cap_sm_ps { WLAN_HT_CAP_SM_PS_DISABLED, }; -#define WLAN_MAX_KEY_LEN 32 /* TODO FIXME brcmfmac */ -#define WLAN_PMKID_LEN 16 /* TODO FIXME brcmfmac */ +#define WLAN_MAX_KEY_LEN 32 +#define WLAN_PMKID_LEN 16 +#define WLAN_PMK_LEN_SUITE_B_192 48 #define WLAN_KEY_LEN_WEP40 5 #define WLAN_KEY_LEN_WEP104 13 @@ -178,6 +180,7 @@ enum ieee80211_min_mpdu_start_spacing { #define IEEE80211_STYPE_CTS IEEE80211_FC0_SUBTYPE_CTS #define IEEE80211_STYPE_RTS IEEE80211_FC0_SUBTYPE_RTS #define IEEE80211_STYPE_ACTION IEEE80211_FC0_SUBTYPE_ACTION +#define IEEE80211_STYPE_DATA IEEE80211_FC0_SUBTYPE_DATA #define IEEE80211_STYPE_QOS_DATA IEEE80211_FC0_SUBTYPE_QOS_DATA #define IEEE80211_STYPE_QOS_NULLFUNC IEEE80211_FC0_SUBTYPE_QOS_NULL #define IEEE80211_STYPE_QOS_CFACK 0xd0 /* XXX-BZ reserved? */ @@ -277,6 +280,8 @@ enum ieee80211_ac_numbers { #define IEEE80211_HT_MCS_MASK_LEN 10 #define IEEE80211_MLD_MAX_NUM_LINKS 15 +#define IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP 0x0060 +#define IEEE80211_MLD_CAP_OP_TID_TO_LINK_MAP_NEG_SUPP_SAME 1 struct ieee80211_mcs_info { uint8_t rx_mask[IEEE80211_HT_MCS_MASK_LEN]; @@ -328,6 +333,7 @@ enum ieee80211_chanctx_change_flags { IEEE80211_CHANCTX_CHANGE_RX_CHAINS = BIT(2), IEEE80211_CHANCTX_CHANGE_WIDTH = BIT(3), IEEE80211_CHANCTX_CHANGE_CHANNEL = BIT(4), + IEEE80211_CHANCTX_CHANGE_PUNCTURING = BIT(5), }; enum ieee80211_frame_release_type { @@ -543,6 +549,7 @@ struct ieee80211_mgmt { } wnm_timing_msr; } u; } action; + DECLARE_FLEX_ARRAY(uint8_t, body); } u; }; @@ -567,6 +574,8 @@ struct ieee80211_rts { /* net80211::ieee80211_frame_rts */ #define IEEE80211_SEQ_TO_SN(_seqn) (((_seqn) & IEEE80211_SEQ_SEQ_MASK) >> \ IEEE80211_SEQ_SEQ_SHIFT) +#define IEEE80211_SN_TO_SEQ(_sn) (((_sn) << IEEE80211_SEQ_SEQ_SHIFT) & \ + IEEE80211_SEQ_SEQ_MASK) /* Time unit (TU) to .. See net80211: IEEE80211_DUR_TU */ #define TU_TO_JIFFIES(_tu) (usecs_to_jiffies(_tu) * 1024) @@ -640,10 +649,10 @@ struct ieee80211_trigger { /* Table 9-29c-Trigger Type subfield encoding */ enum { IEEE80211_TRIGGER_TYPE_BASIC = 0x0, + IEEE80211_TRIGGER_TYPE_MU_BAR = 0x2, #if 0 /* Not seen yet. */ BFRP = 0x1, - MU-BAR = 0x2, MU-RTS = 0x3, BSRP = 0x4, GCR MU-BAR = 0x5, @@ -654,6 +663,12 @@ enum { IEEE80211_TRIGGER_TYPE_MASK = 0xf }; +#define IEEE80211_TRIGGER_ULBW_MASK 0xc0000 +#define IEEE80211_TRIGGER_ULBW_20MHZ 0x0 +#define IEEE80211_TRIGGER_ULBW_40MHZ 0x1 +#define IEEE80211_TRIGGER_ULBW_80MHZ 0x2 +#define IEEE80211_TRIGGER_ULBW_160_80P80MHZ 0x3 + /* 802.11-2020, Figure 9-687-Control field format; 802.11ax-2021 */ #define IEEE80211_TWT_CONTROL_NEG_TYPE_BROADCAST BIT(3) #define IEEE80211_TWT_CONTROL_RX_DISABLED BIT(4) @@ -694,12 +709,50 @@ struct ieee80211_bssid_index { int bssid_index; }; -enum ieee80211_reg_ap_power { +enum ieee80211_ap_reg_power { + IEEE80211_REG_UNSET_AP, IEEE80211_REG_LPI_AP, IEEE80211_REG_SP_AP, IEEE80211_REG_VLP_AP, }; +/* + * 802.11ax-2021, Table 9-277-Meaning of Maximum Transmit Power Count subfield + * if Maximum Transmit Power Interpretation subfield is 1 or 3 + */ +#define IEEE80211_MAX_NUM_PWR_LEVEL 8 + +/* + * 802.11ax-2021, Table 9-275a-Maximum Transmit Power Interpretation subfield + * encoding (4) * Table E-12-Regulatory Info subfield encoding in the + * United States (2) + */ +#define IEEE80211_TPE_MAX_IE_NUM 8 + +/* 802.11ax-2021, 9.4.2.161 Transmit Power Envelope element */ +struct ieee80211_tx_pwr_env { + uint8_t tx_power_info; + uint8_t tx_power[IEEE80211_MAX_NUM_PWR_LEVEL]; +}; + +/* 802.11ax-2021, Figure 9-617-Transmit Power Information field format */ +/* These are field masks (3bit/3bit/2bit). */ +#define IEEE80211_TX_PWR_ENV_INFO_COUNT 0x07 +#define IEEE80211_TX_PWR_ENV_INFO_INTERPRET 0x38 +#define IEEE80211_TX_PWR_ENV_INFO_CATEGORY 0xc0 + +/* + * 802.11ax-2021, Table 9-275a-Maximum Transmit Power Interpretation subfield + * encoding + */ +enum ieee80211_tx_pwr_interpretation_subfield_enc { + IEEE80211_TPE_LOCAL_EIRP, + IEEE80211_TPE_LOCAL_EIRP_PSD, + IEEE80211_TPE_REG_CLIENT_EIRP, + IEEE80211_TPE_REG_CLIENT_EIRP_PSD, +}; + + /* net80211: IEEE80211_IS_CTL() */ static __inline bool ieee80211_is_ctl(__le16 fc) diff --git a/sys/compat/linuxkpi/common/include/linux/nl80211.h b/sys/compat/linuxkpi/common/include/linux/nl80211.h index 5b43ff675e19..6916957731e2 100644 --- a/sys/compat/linuxkpi/common/include/linux/nl80211.h +++ b/sys/compat/linuxkpi/common/include/linux/nl80211.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2020-2023 The FreeBSD Foundation + * Copyright (c) 2020-2024 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -80,6 +80,10 @@ enum nl80211_reg_rule_flags { NL80211_RRF_NO_OFDM = BIT(10), NL80211_RRF_NO_320MHZ = BIT(11), NL80211_RRF_NO_EHT = BIT(12), + NL80211_RRF_DFS_CONCURRENT = BIT(13), + NL80211_RRF_NO_6GHZ_VLP_CLIENT = BIT(14), + NL80211_RRF_NO_6GHZ_AFC_CLIENT = BIT(15), + NL80211_RRF_PSD = BIT(16), }; #define NL80211_RRF_NO_HT40 (NL80211_RRF_NO_HT40MINUS|NL80211_RRF_NO_HT40PLUS) @@ -230,6 +234,13 @@ enum nl80211_ext_feature { NL80211_EXT_FEATURE_BEACON_PROTECTION, NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT, NL80211_EXT_FEATURE_PUNCT, + NL80211_EXT_FEATURE_DFS_CONCURRENT, + NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS, + NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT, + NL80211_EXT_FEATURE_SECURE_LTF, + NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE, + NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK, + NL80211_EXT_FEATURE_SAE_OFFLOAD_AP, /* Keep this last. */ NUM_NL80211_EXT_FEATURES @@ -241,6 +252,7 @@ enum nl80211_sta_info { NL80211_STA_INFO_BEACON_SIGNAL_AVG, NL80211_STA_INFO_BSS_PARAM, NL80211_STA_INFO_CHAIN_SIGNAL, + NL80211_STA_INFO_CHAIN_SIGNAL_AVG, NL80211_STA_INFO_CONNECTED_TIME, NL80211_STA_INFO_INACTIVE_TIME, NL80211_STA_INFO_SIGNAL, @@ -416,6 +428,10 @@ enum nl80211_user_reg_hint_type { NL80211_USER_REG_HINT_USER, }; +enum nl80211_hidden_ssid { + NL80211_HIDDEN_SSID_NOT_IN_USE, +}; + #define NL80211_KCK_LEN 16 #define NL80211_KCK_EXT_LEN 24 #define NL80211_KEK_LEN 16 diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index c102ada6def2..29fb335a8db9 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -303,7 +303,7 @@ struct ieee80211_bss_conf { int16_t txpower; uint32_t basic_rates; int mcast_rate[NUM_NL80211_BANDS]; - enum ieee80211_reg_ap_power power_type; + enum ieee80211_ap_reg_power power_type; struct cfg80211_bitrate_mask beacon_tx_rate; struct mac80211_fils_discovery fils_discovery; struct ieee80211_chanctx_conf *chanctx_conf; From nobody Sat Sep 28 14:24:25 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 4XG8jP5wFjz5XQN1; Sat, 28 Sep 2024 14:24:25 +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 4XG8jP5Q1mz4Yy7; Sat, 28 Sep 2024 14:24:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727533465; 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=bgxC9JdmKdpLf3C4gr40a2k0DegxmsNqFwHXlB/rqFk=; b=TFpnygnZc+cWdLsOOYOZO+n+XyrpbLg3HILP0gDszxEKGcdIyCZ+8d0GrTXNFenNApDMjH U4pllb56/Z/M0r9sRhrC0huRh0zTFa4lgeIgpwTqxKpMo/ojlIssTzOvoD8kOngq41G1hp kK3JR+Ma70O5s82xl3OUjlfZ1vsyVd4URkFg+pNNuw1jBriYyHEzfNHcakQU80dG884R/b 1bqzqwIK6tDBMHqAqRXlfXfXyjw+jbFzUXQUuck5O9bEff5Lw0u73silN5NcoV64LGYL+Q JFPTlokCAj1H/NdAV/duIh2eTsVavyDkCEaWCOZ6gViiUxpGTN9KYPBed0aJow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727533465; 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=bgxC9JdmKdpLf3C4gr40a2k0DegxmsNqFwHXlB/rqFk=; b=cH6sBjK/HgQPqo8KtP8G6R6z9O05/waKr+MjKi9JuorXcOe0SAC3oiOQz01ldVupITrAJs njzF20MwQ5AXyn4uW1QKfmsvdJ2JQbjRuIoK4shj47hgQuk9MzEMquNB6yEXPzJkA7nRvj DJ58/Jz+ghLG/ywX52b3jZghHJTadASqbbsbhMWDnARmXmuWmswKaI1z1y4FwUBzBnxoFD D8CjtfHrTjUzjKsWtvhGJaxkRxFafc7QgfSOjYxpGJEPFcA1h7XH7WnBlLKrozNsGW2Yr8 78XUce1cM8Pl18I48GgNyzIyehx8XTMznjcPFHahNTln2Pra1tJXQPWcuzfkmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727533465; a=rsa-sha256; cv=none; b=wpJn3ng4VdS0e3P5RwgfsbXkZZyFjUjaALQLEu+gLFQTUkwl4DPn7BdZJD7hQEReoNkjcq HAj2fDPKQQEVApKsTxfpJ9p+fVI8JFBOaSm7VvHvphBx8QEXx7jRvPUZiipKnB0JrhQCOI fVOXIcpxv6e2Noe9Y8m8W5vavpl3iYrZ4xx/F6edzK5j3Vi186wxDwWSce5fFffyHt8LEY aiy9IUNnoPKMEOJHzZo/Hmf+/T62MwIM70HkiisK00RDQADVV9Q2oo6xpm5D2xeLipWf0k rEvOxK2/W6ZM8BlZvrPxCWOlWJcNYnIwGtceFJXYMz17PN1wucUofY4TU5Djmw== 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 4XG8jP4vWJzShV; Sat, 28 Sep 2024 14:24:25 +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 48SEOPMt088440; Sat, 28 Sep 2024 14:24:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SEOPHu088437; Sat, 28 Sep 2024 14:24:25 GMT (envelope-from git) Date: Sat, 28 Sep 2024 14:24:25 GMT Message-Id: <202409281424.48SEOPHu088437@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: ffd294a1f4c2 - main - MFV: expat 2.6.3 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ffd294a1f4c23863c3e515d16dce31d5509bcb01 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=ffd294a1f4c23863c3e515d16dce31d5509bcb01 commit ffd294a1f4c23863c3e515d16dce31d5509bcb01 Merge: 911b3c3aa648 8e1eae2319cd Author: Enji Cooper AuthorDate: 2024-09-28 14:19:59 +0000 Commit: Enji Cooper CommitDate: 2024-09-28 14:19:59 +0000 MFV: expat 2.6.3 The 2.6.1 - 2.6.3 releases address several security issues with the library. The release notes for the 2.6.1-2.6.3 releases can be found at https://github.com/libexpat/libexpat/blob/R_2_6_3/expat/Changes . MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46829 Merge commit '8e1eae2319cd3a651941c88b46d95e8ee8507c6c' contrib/expat/Changes | 136 ++++++++++++++++++- contrib/expat/Makefile.am | 6 +- contrib/expat/Makefile.in | 8 +- contrib/expat/README.md | 14 +- contrib/expat/buildconf.sh | 24 +--- contrib/expat/configure.ac | 39 ++++-- contrib/expat/doc/Makefile.am | 21 ++- contrib/expat/doc/Makefile.in | 58 ++++----- contrib/expat/doc/reference.html | 19 ++- contrib/expat/doc/xmlwf.1 | 2 +- contrib/expat/doc/xmlwf.xml | 2 +- contrib/expat/examples/Makefile.in | 2 +- contrib/expat/expat_config.h.in | 3 - contrib/expat/fix-xmltest-log.sh | 12 +- contrib/expat/lib/Makefile.am | 19 +-- contrib/expat/lib/Makefile.in | 79 ++++++++---- contrib/expat/lib/expat.h | 5 +- contrib/expat/lib/internal.h | 17 ++- contrib/expat/lib/siphash.h | 3 +- contrib/expat/lib/xmlparse.c | 73 ++++++++--- contrib/expat/tests/Makefile.am | 11 +- contrib/expat/tests/Makefile.in | 19 +-- contrib/expat/tests/README.md | 11 ++ contrib/expat/tests/README.txt | 13 -- contrib/expat/tests/acc_tests.c | 59 +++++++++ contrib/expat/tests/basic_tests.c | 208 ++++++++++++++++++++---------- contrib/expat/tests/benchmark/Makefile.in | 2 +- contrib/expat/tests/misc_tests.c | 2 +- contrib/expat/xmlwf/Makefile.in | 2 +- 29 files changed, 605 insertions(+), 264 deletions(-) diff --cc contrib/expat/README.md index 43c4f4f3dbb3,000000000000..180a68e4abbe mode 100644,000000..100644 --- a/contrib/expat/README.md +++ b/contrib/expat/README.md @@@ -1,270 -1,0 +1,276 @@@ +[![Run Linux CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml) +[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/libexpat/libexpat?svg=true)](https://ci.appveyor.com/project/libexpat/libexpat) +[![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions) +[![Downloads SourceForge](https://img.shields.io/sourceforge/dt/expat?label=Downloads%20SourceForge)](https://sourceforge.net/projects/expat/files/) +[![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases) + ++> [!CAUTION] ++> ++> Expat is **understaffed** and without funding. ++> There is a [call for help with details](https://github.com/libexpat/libexpat/blob/master/expat/Changes) ++> at the top of the `Changes` file. + - # Expat, Release 2.6.0 ++ ++# Expat, Release 2.6.3 + +This is Expat, a C99 library for parsing +[XML 1.0 Fourth Edition](https://www.w3.org/TR/2006/REC-xml-20060816/), started by +[James Clark](https://en.wikipedia.org/wiki/James_Clark_%28programmer%29) in 1997. +Expat is a stream-oriented XML parser. This means that you register +handlers with the parser before starting the parse. These handlers +are called when the parser discovers the associated structures in the +document being parsed. A start tag is an example of the kind of +structures for which you may register handlers. + +Expat supports the following compilers: + +- GNU GCC >=4.5 +- LLVM Clang >=3.5 - - Microsoft Visual Studio >=15.0/2017 (rolling `${today} minus 5 years`) ++- Microsoft Visual Studio >=16.0/2019 (rolling `${today} minus 5 years`) + +Windows users can use the +[`expat-win32bin-*.*.*.{exe,zip}` download](https://github.com/libexpat/libexpat/releases), +which includes both pre-compiled libraries and executables, and source code for +developers. + +Expat is [free software](https://www.gnu.org/philosophy/free-sw.en.html). +You may copy, distribute, and modify it under the terms of the License +contained in the file +[`COPYING`](https://github.com/libexpat/libexpat/blob/master/expat/COPYING) +distributed with this package. +This license is the same as the MIT/X Consortium license. + + +## Using libexpat in your CMake-Based Project + +There are two ways of using libexpat with CMake: + +### a) Module Mode + +This approach leverages CMake's own [module `FindEXPAT`](https://cmake.org/cmake/help/latest/module/FindEXPAT.html). + +Notice the *uppercase* `EXPAT` in the following example: + +```cmake +cmake_minimum_required(VERSION 3.0) # or 3.10, see below + +project(hello VERSION 1.0.0) + +find_package(EXPAT 2.2.8 MODULE REQUIRED) + +add_executable(hello + hello.c +) + +# a) for CMake >=3.10 (see CMake's FindEXPAT docs) +target_link_libraries(hello PUBLIC EXPAT::EXPAT) + +# b) for CMake >=3.0 +target_include_directories(hello PRIVATE ${EXPAT_INCLUDE_DIRS}) +target_link_libraries(hello PUBLIC ${EXPAT_LIBRARIES}) +``` + +### b) Config Mode + +This approach requires files from… + +- libexpat >=2.2.8 where packaging uses the CMake build system +or +- libexpat >=2.3.0 where packaging uses the GNU Autotools build system + on Linux +or +- libexpat >=2.4.0 where packaging uses the GNU Autotools build system + on macOS or MinGW. + +Notice the *lowercase* `expat` in the following example: + +```cmake +cmake_minimum_required(VERSION 3.0) + +project(hello VERSION 1.0.0) + +find_package(expat 2.2.8 CONFIG REQUIRED char dtd ns) + +add_executable(hello + hello.c +) + +target_link_libraries(hello PUBLIC expat::expat) +``` + + +## Building from a Git Clone + +If you are building Expat from a check-out from the +[Git repository](https://github.com/libexpat/libexpat/), +you need to run a script that generates the configure script using the +GNU autoconf and libtool tools. To do this, you need to have +autoconf 2.58 or newer. Run the script like this: + +```console +./buildconf.sh +``` + +Once this has been done, follow the same instructions as for building +from a source distribution. + + +## Building from a Source Distribution + +### a) Building with the configure script (i.e. GNU Autotools) + +To build Expat from a source distribution, you first run the +configuration shell script in the top level distribution directory: + +```console +./configure +``` + +There are many options which you may provide to configure (which you +can discover by running configure with the `--help` option). But the +one of most interest is the one that sets the installation directory. +By default, the configure script will set things up to install +libexpat into `/usr/local/lib`, `expat.h` into `/usr/local/include`, and +`xmlwf` into `/usr/local/bin`. If, for example, you'd prefer to install +into `/home/me/mystuff/lib`, `/home/me/mystuff/include`, and +`/home/me/mystuff/bin`, you can tell `configure` about that with: + +```console +./configure --prefix=/home/me/mystuff +``` + +Another interesting option is to enable 64-bit integer support for +line and column numbers and the over-all byte index: + +```console +./configure CPPFLAGS=-DXML_LARGE_SIZE +``` + +However, such a modification would be a breaking change to the ABI +and is therefore not recommended for general use — e.g. as part of +a Linux distribution — but rather for builds with special requirements. + +After running the configure script, the `make` command will build +things and `make install` will install things into their proper +location. Have a look at the `Makefile` to learn about additional +`make` options. Note that you need to have write permission into +the directories into which things will be installed. + +If you are interested in building Expat to provide document +information in UTF-16 encoding rather than the default UTF-8, follow +these instructions (after having run `make distclean`). +Please note that we configure with `--without-xmlwf` as xmlwf does not +support this mode of compilation (yet): + +1. Mass-patch `Makefile.am` files to use `libexpatw.la` for a library name: +
- `find -name Makefile.am -exec sed ++ `find . -name Makefile.am -exec sed + -e 's,libexpat\.la,libexpatw.la,' + -e 's,libexpat_la,libexpatw_la,' - -i {} +` ++ -i.bak {} +` + +1. Run `automake` to re-write `Makefile.in` files:
+ `automake` + +1. For UTF-16 output as unsigned short (and version/error strings as char), + run:
+ `./configure CPPFLAGS=-DXML_UNICODE --without-xmlwf`
+ For UTF-16 output as `wchar_t` (incl. version/error strings), run:
+ `./configure CFLAGS="-g -O2 -fshort-wchar" CPPFLAGS=-DXML_UNICODE_WCHAR_T + --without-xmlwf` +
Note: The latter requires libc compiled with `-fshort-wchar`, as well. + +1. Run `make` (which excludes xmlwf). + +1. Run `make install` (again, excludes xmlwf). + +Using `DESTDIR` is supported. It works as follows: + +```console +make install DESTDIR=/path/to/image +``` + +overrides the in-makefile set `DESTDIR`, because variable-setting priority is + +1. commandline +1. in-makefile +1. environment + +Note: This only applies to the Expat library itself, building UTF-16 versions +of xmlwf and the tests is currently not supported. + +When using Expat with a project using autoconf for configuration, you +can use the probing macro in `conftools/expat.m4` to determine how to +include Expat. See the comments at the top of that file for more +information. + +A reference manual is available in the file `doc/reference.html` in this +distribution. + + +### b) Building with CMake + +The CMake build system is still *experimental* and may replace the primary +build system based on GNU Autotools at some point when it is ready. + + +#### Available Options + +For an idea of the available (non-advanced) options for building with CMake: + +```console +# rm -f CMakeCache.txt ; cmake -D_EXPAT_HELP=ON -LH . | grep -B1 ':.*=' | sed 's,^--$,,' +// Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ... +CMAKE_BUILD_TYPE:STRING= + +// Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +// Path to a program. +DOCBOOK_TO_MAN:FILEPATH=/usr/bin/docbook2x-man + +// Build man page for xmlwf +EXPAT_BUILD_DOCS:BOOL=ON + +// Build the examples for expat library +EXPAT_BUILD_EXAMPLES:BOOL=ON + +// Build fuzzers for the expat library +EXPAT_BUILD_FUZZERS:BOOL=OFF + +// Build pkg-config file +EXPAT_BUILD_PKGCONFIG:BOOL=ON + +// Build the tests for expat library +EXPAT_BUILD_TESTS:BOOL=ON + +// Build the xmlwf tool for expat library +EXPAT_BUILD_TOOLS:BOOL=ON + +// Character type to use (char|ushort|wchar_t) [default=char] +EXPAT_CHAR_TYPE:STRING=char + +// Install expat files in cmake install target +EXPAT_ENABLE_INSTALL:BOOL=ON + +// Use /MT flag (static CRT) when compiling in MSVC +EXPAT_MSVC_STATIC_CRT:BOOL=OFF + +// Build fuzzers via ossfuzz for the expat library +EXPAT_OSSFUZZ_BUILD:BOOL=OFF + +// Build a shared expat library +EXPAT_SHARED_LIBS:BOOL=ON + +// Treat all compiler warnings as errors +EXPAT_WARNINGS_AS_ERRORS:BOOL=OFF + +// Make use of getrandom function (ON|OFF|AUTO) [default=AUTO] +EXPAT_WITH_GETRANDOM:STRING=AUTO + +// Utilize libbsd (for arc4random_buf) +EXPAT_WITH_LIBBSD:BOOL=OFF + +// Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO] +EXPAT_WITH_SYS_GETRANDOM:STRING=AUTO +``` diff --cc contrib/expat/tests/README.md index 000000000000,010ca95e9e21..010ca95e9e21 mode 000000,100644..100644 --- a/contrib/expat/tests/README.md +++ b/contrib/expat/tests/README.md From nobody Sat Sep 28 14:24:26 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 4XG8jQ73LVz5XQ4P; Sat, 28 Sep 2024 14:24:26 +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 4XG8jQ64f5z4YyD; Sat, 28 Sep 2024 14:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727533466; 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=7Gd2QsfGavkF+lBpDXAIAjDqby1xgbU6NBY4Fw3Ob1E=; b=Gohw9yTAJBz9159gHqapjWIC+wdjbuuJljcO9Gd8zQ6d28AVm9EKbG9ajTAXcFB5vqK45C B7/BdSYuEpdkxf+xikHAOM/Gy+8Wuz+wZt58DbJ9+mXTVeeL1xX7RmFc8plQUf/tjH69gL dJbbnqt08gI1gTEZ+19BTG7wfXaDxXPMyUGFpu8ZMyhenqvGV4HDWWE2688V82mFLC6b/c 8n5/1g3GYB2cTOB7k+DfR1wV64c/HOXh1P6H7cjAeAcn5ZhIb36MzZSTV5YtiZTGo67SG+ crzULFfdhttJEYgJ+QDAQk+E944BAD+oacd9t9j+znN+jwWpPZB1tA1e0z4jfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727533466; 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=7Gd2QsfGavkF+lBpDXAIAjDqby1xgbU6NBY4Fw3Ob1E=; b=jbI1+6IjOvWCfKVcrN3WDEPzyZfyJUpUAprfjFZOEn04h3e8YKDCh9Dk0DIvP5qSrvEUd6 MYLG3tzt6yxRwYBmHXToxdAPLPyjBJ9+vx1nIQr+52P2HA9kLT4nNPBxuKzEd7sN18nRIY +vNJT55OyIC5dl/AEJBrY5h/GOy27RzFEZ3C+8RwCcGluJ3Av0kVbSpS3srxOMBUXg872t m5O590w/YA/59swee7bkkLkh42sH4nk//hUKhzhIJmuZBMUcbWiLk1dFeR3+H9Db1QxGDd UCGRL01UVONYQuaNKmcK+tfsB9UJzQ+rdZcoa+oWQDJpRIxK6xL0uNYgIr8Fnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727533466; a=rsa-sha256; cv=none; b=AMSPUio9Qfc3v2WlRPrx3E2BacanLziacpAIvTB49QpuSDcUkhnAnENF5pkgnV7J4n/OEV rG4qBi2lBaj2R4TXt9a19bbCKCgCtfJlke6SbjOWIK88WzmYEOTqLwXElsqfeazsfGtc5G jT+izctk5Q7EMzgpB09Q6I4fHfoaq2lfWBlPT9YREEMRM7+TimsfHebzKv18RLKeOwow5y mJGpQK72zGCCBSpeXl3bH8alNbdAvmIHTS+WBzDHln/qxEJ/NEEt/3pWVEuPaA/OCMUiJ6 +JELKSSb5AWUwETmldvfTZxAS0eGJGwKkrTKgu7FXRKbJOegmy/Uk2ZDN4mKWA== 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 4XG8jQ5bqnzScN; Sat, 28 Sep 2024 14:24:26 +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 48SEOQJw088492; Sat, 28 Sep 2024 14:24:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SEOQep088489; Sat, 28 Sep 2024 14:24:26 GMT (envelope-from git) Date: Sat, 28 Sep 2024 14:24:26 GMT Message-Id: <202409281424.48SEOQep088489@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: c284f45dc796 - main - lib/libexpat: update build config for 2.6.3 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c284f45dc796693ef63ccb38df361968b733e294 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=c284f45dc796693ef63ccb38df361968b733e294 commit c284f45dc796693ef63ccb38df361968b733e294 Author: Enji Cooper AuthorDate: 2024-09-28 14:22:11 +0000 Commit: Enji Cooper CommitDate: 2024-09-28 14:23:32 +0000 lib/libexpat: update build config for 2.6.3 MFC after: 1 week MFC with: ffd294a1f4c23863c3e515d16dce31d5509bcb01 Differential Revision: https://reviews.freebsd.org/D46830 --- lib/libexpat/expat_config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libexpat/expat_config.h b/lib/libexpat/expat_config.h index 0d581a431a53..5d39aeb2e870 100644 --- a/lib/libexpat/expat_config.h +++ b/lib/libexpat/expat_config.h @@ -89,7 +89,7 @@ #define PACKAGE_NAME "expat" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "expat 2.6.0" +#define PACKAGE_STRING "expat 2.6.3" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "expat" @@ -98,7 +98,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.6.0" +#define PACKAGE_VERSION "2.6.3" /* Define to 1 if all of the C90 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for @@ -106,7 +106,7 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "2.6.0" +#define VERSION "2.6.3" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ From nobody Sat Sep 28 16:55:21 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 4XGD3Y1g87z5XZtt; Sat, 28 Sep 2024 16:55:21 +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 4XGD3Y1P3rz4qfw; Sat, 28 Sep 2024 16:55:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727542521; 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=sFS6kiZ8Hh8VBLJIBlyJtF+l1AnY32HRgEMdIj85tf0=; b=msN/fn6E9gkyrtGK0xZEzd7/YJnoP79KNMU5JkJCqnY7PaKeKn8DlUftJMdN/aBuGQ5F6A YY3oDnIaKlmsvOk0wdIl4m8XCLOjJHp3PQEwmTJCk9Jar2e8DtT6zSGKLuBnSygreZZ4vg TtqvGQ5NwsrPKNGdyGZjOpbKTYzI6RV6WKGLVefM48dFj0mQOpEiXp8wyTlWNCscvvikBS PIzB6C7jP2Jd37sqz9VBQTKk06SoP8wFDn3ubrw6BZvUbh771kj/mJlz7X5z3jXAp5hfrs Yz4CnfnkZEr75bvYzqxCMVjLMJlCUpzBONSyZmuFTAurtqXcO0/oqW2MyVv3dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727542521; 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=sFS6kiZ8Hh8VBLJIBlyJtF+l1AnY32HRgEMdIj85tf0=; b=VT5iQXTKTknUwC0gS8rwX+1Tylfsz5BksFOr204LachDHY+8UWCYHkNriIO2bRCxvML624 K3dzFkBPnciR3CGGhqWGGDLU1rlhc1ofMLWHIM+RgGput6sDl7D98zBIiTQQS6mdbyKpde f0jq3AEh+I7LKCQUHCeN8NLIRc7HvZvHNIk29KSaZE7ZIInkOVXrjmC0h7E+ZBHNYJbhr4 KaVPjg2UfFtafA0Wcfr65G04wwykgnQLbIwgJA5LQAvp/5Q4213dj1cj5ve4WH33tbAP3D n5v0RHQFfUHN4I7z9aj8Y3+wl6ohpiBRTeg3NxzHLVHu60SVRDlKU6EWW4c+/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727542521; a=rsa-sha256; cv=none; b=B2DV+RJIZ+8aw2KEsqvLD3kdHEfQzlgKLhfnzhGQkvVQcf9eaNU7k8BUsBRmx7qkf/FnHV iZXcHJmnZUvAb3ZKyKaVx2lMq+/UVOyj1+e8Qgi/NaMsRy2EH3RGTEltjhiH5jpoKjMWQT g5JLbhit5WT3ag1ltgw0AWV+o0Pyqrl2ydRr+ukNNpaG6XMYkF7qAqk84j9E8H1OJtCbTa NQFrENVU3SNvoyqrwGBjaEFxGpwTOknZWHyVald5aLNigvhEH2egA5Bx9ZCsS8fbi0QjnU UaT4+B2cdVX4PqoQh/uRs8Je9BxUM/Qr0xL5Yx+2vUH411VwZbF0wZyOTjOD6A== 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 4XGD3Y0smwzYlb; Sat, 28 Sep 2024 16:55:21 +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 48SGtL0r042281; Sat, 28 Sep 2024 16:55:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SGtLkk042278; Sat, 28 Sep 2024 16:55:21 GMT (envelope-from git) Date: Sat, 28 Sep 2024 16:55:21 GMT Message-Id: <202409281655.48SGtLkk042278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 6ffd4aeba5b9 - main - pf tests: add a test for max-src-conn 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ffd4aeba5b997c4c538711d259200da193d949d Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6ffd4aeba5b997c4c538711d259200da193d949d commit 6ffd4aeba5b997c4c538711d259200da193d949d Author: Kajetan Staszkiewicz AuthorDate: 2024-09-28 13:37:45 +0000 Commit: Kristof Provost CommitDate: 2024-09-28 16:54:50 +0000 pf tests: add a test for max-src-conn Switch tests using pft_ping.py to inetd. Netcat can only accept a single connection, we need multiple parallel connections to test max-src-conn. Use the discard service and modify pft_ping.py to use proper port number. Implement functionality of 3-way handshake test in pft_ping.py. Make send_params accessible to sniffer, because answers to SYN+ACK packets should be send with the same parameters as the original SYN packet. Finally add a test for max-src-conn and overload. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D46798 --- tests/sys/netpfil/common/pft_ping.py | 185 +++++++++++++++++++++++++++-------- tests/sys/netpfil/pf/src_track.sh | 62 ++++++++++++ tests/sys/netpfil/pf/utils.subr | 10 +- 3 files changed, 210 insertions(+), 47 deletions(-) diff --git a/tests/sys/netpfil/common/pft_ping.py b/tests/sys/netpfil/common/pft_ping.py index befe757406be..d8aafc884265 100644 --- a/tests/sys/netpfil/common/pft_ping.py +++ b/tests/sys/netpfil/common/pft_ping.py @@ -49,8 +49,17 @@ def build_payload(l): return ret -def prepare_ipv6(dst_address, send_params): +def clean_params(params): + # Prepare a copy of safe copy of params + ret = copy(params) + ret.pop('src_address') + ret.pop('dst_address') + ret.pop('flags') + return ret + +def prepare_ipv6(send_params): src_address = send_params.get('src_address') + dst_address = send_params.get('dst_address') hlim = send_params.get('hlim') tc = send_params.get('tc') ip6 = sp.IPv6(dst=dst_address) @@ -63,8 +72,9 @@ def prepare_ipv6(dst_address, send_params): return ip6 -def prepare_ipv4(dst_address, send_params): +def prepare_ipv4(send_params): src_address = send_params.get('src_address') + dst_address = send_params.get('dst_address') flags = send_params.get('flags') tos = send_params.get('tc') ttl = send_params.get('hlim') @@ -84,13 +94,13 @@ def prepare_ipv4(dst_address, send_params): return ip -def send_icmp_ping(dst_address, sendif, send_params): +def send_icmp_ping(send_params): send_length = send_params['length'] send_frag_length = send_params['frag_length'] packets = [] ether = sp.Ether() - if ':' in dst_address: - ip6 = prepare_ipv6(dst_address, send_params) + if ':' in send_params['dst_address']: + ip6 = prepare_ipv6(send_params) icmp = sp.ICMPv6EchoRequest(data=sp.raw(build_payload(send_length))) if send_frag_length: for packet in sp.fragment(ip6 / icmp, fragsize=send_frag_length): @@ -99,7 +109,7 @@ def send_icmp_ping(dst_address, sendif, send_params): packets.append(ether / ip6 / icmp) else: - ip = prepare_ipv4(dst_address, send_params) + ip = prepare_ipv4(send_params) icmp = sp.ICMP(type='echo-request') raw = sp.raw(build_payload(send_length)) if send_frag_length: @@ -108,10 +118,10 @@ def send_icmp_ping(dst_address, sendif, send_params): else: packets.append(ether / ip / icmp / raw) for packet in packets: - sp.sendp(packet, sendif, verbose=False) + sp.sendp(packet, iface=send_params['sendif'], verbose=False) -def send_tcp_syn(dst_address, sendif, send_params): +def send_tcp_syn(send_params): tcpopt_unaligned = send_params.get('tcpopt_unaligned') seq = send_params.get('seq') mss = send_params.get('mss') @@ -119,23 +129,26 @@ def send_tcp_syn(dst_address, sendif, send_params): opts=[('Timestamp', (1, 1)), ('MSS', mss if mss else 1280)] if tcpopt_unaligned: opts = [('NOP', 0 )] + opts - if ':' in dst_address: - ip = prepare_ipv6(dst_address, send_params) + if ':' in send_params['dst_address']: + ip = prepare_ipv6(send_params) else: - ip = prepare_ipv4(dst_address, send_params) + ip = prepare_ipv4(send_params) tcp = sp.TCP( sport=send_params.get('sport'), dport=send_params.get('dport'), flags='S', options=opts, seq=seq, ) req = ether / ip / tcp - sp.sendp(req, iface=sendif, verbose=False) + sp.sendp(req, iface=send_params['sendif'], verbose=False) -def send_ping(dst_address, sendif, ping_type, send_params): +def send_ping(ping_type, send_params): if ping_type == 'icmp': - send_icmp_ping(dst_address, sendif, send_params) - elif ping_type == 'tcpsyn': - send_tcp_syn(dst_address, sendif, send_params) + send_icmp_ping(send_params) + elif ( + ping_type == 'tcpsyn' or + ping_type == 'tcp3way' + ): + send_tcp_syn(send_params) else: raise Exception('Unspported ping type') @@ -147,20 +160,21 @@ def check_ipv4(expect_params, packet): tos = expect_params.get('tc') ttl = expect_params.get('hlim') ip = packet.getlayer(sp.IP) + LOGGER.debug(f'Packet: {ip}') if not ip: LOGGER.debug('Packet is not IPv4!') return False if src_address and ip.src != src_address: - LOGGER.debug('Source IPv4 address does not match!') + LOGGER.debug(f'Wrong IPv4 source {ip.src}, expected {src_address}') return False if dst_address and ip.dst != dst_address: - LOGGER.debug('Destination IPv4 address does not match!') + LOGGER.debug(f'Wrong IPv4 destination {ip.dst}, expected {dst_address}') return False chksum = ip.chksum ip.chksum = None new_chksum = sp.IP(sp.raw(ip)).chksum if chksum != new_chksum: - LOGGER.debug(f'Expected IP checksum {new_chksum} but found {chksum}') + LOGGER.debug(f'Wrong IPv4 checksum {chksum}, expected {new_chksum}') return False if flags and ip.flags != flags: LOGGER.debug(f'Wrong IP flags value {ip.flags}, expected {flags}') @@ -185,10 +199,10 @@ def check_ipv6(expect_params, packet): LOGGER.debug('Packet is not IPv6!') return False if src_address and ip6.src != src_address: - LOGGER.debug('Source IPv6 address does not match!') + LOGGER.debug(f'Wrong IPv6 source {ip6.src}, expected {src_address}') return False if dst_address and ip6.dst != dst_address: - LOGGER.debug('Destination IPv6 address does not match!') + LOGGER.debug(f'Wrong IPv6 destination {ip6.dst}, expected {dst_address}') return False # IPv6 has no IP-level checksum. if flags: @@ -268,32 +282,32 @@ def check_ping_reply_6(expect_params, packet): return True -def check_ping_request(expect_params, packet): - src_address = expect_params.get('src_address') - dst_address = expect_params.get('dst_address') +def check_ping_request(args, packet): + src_address = args['expect_params'].get('src_address') + dst_address = args['expect_params'].get('dst_address') if not (src_address or dst_address): raise Exception('Source or destination address must be given to match the ping request!') if ( (src_address and ':' in src_address) or (dst_address and ':' in dst_address) ): - return check_ping_request_6(expect_params, packet) + return check_ping_request_6(args['expect_params'], packet) else: - return check_ping_request_4(expect_params, packet) + return check_ping_request_4(args['expect_params'], packet) -def check_ping_reply(expect_params, packet): - src_address = expect_params.get('src_address') - dst_address = expect_params.get('dst_address') +def check_ping_reply(args, packet): + src_address = args['expect_params'].get('src_address') + dst_address = args['expect_params'].get('dst_address') if not (src_address or dst_address): raise Exception('Source or destination address must be given to match the ping reply!') if ( (src_address and ':' in src_address) or (dst_address and ':' in dst_address) ): - return check_ping_reply_6(expect_params, packet) + return check_ping_reply_6(args['expect_params'], packet) else: - return check_ping_reply_4(expect_params, packet) + return check_ping_reply_4(args['expect_params'], packet) def check_tcp(expect_params, packet): @@ -308,7 +322,7 @@ def check_tcp(expect_params, packet): tcp.chksum = None newpacket = sp.Ether(sp.raw(packet[sp.Ether])) new_chksum = newpacket[sp.TCP].chksum - if chksum != new_chksum: + if new_chksum and chksum != new_chksum: LOGGER.debug(f'Wrong TCP checksum {chksum}, expected {new_chksum}!') return False if tcp_flags and tcp.flags != tcp_flags: @@ -339,7 +353,7 @@ def check_tcp_syn_request_4(expect_params, packet): return True -def check_tcp_syn_reply_4(expect_params, packet): +def check_tcp_syn_reply_4(send_params, expect_params, packet): if not check_ipv4(expect_params, packet): return False if not check_tcp(expect_params | {'tcp_flags': 'SA'}, packet): @@ -347,6 +361,36 @@ def check_tcp_syn_reply_4(expect_params, packet): return True +def check_tcp_3way_4(args, packet): + send_params = args['send_params'] + + expect_params_sa = clean_params(args['expect_params']) + expect_params_sa['src_address'] = send_params['dst_address'] + expect_params_sa['dst_address'] = send_params['src_address'] + + # Sniff incoming SYN+ACK packet + if ( + check_ipv4(expect_params_sa, packet) and + check_tcp(expect_params_sa | {'tcp_flags': 'SA'}, packet) + ): + ether = sp.Ether() + ip_sa = packet.getlayer(sp.IP) + tcp_sa = packet.getlayer(sp.TCP) + reply_params = clean_params(send_params) + reply_params['src_address'] = ip_sa.dst + reply_params['dst_address'] = ip_sa.src + ip_a = prepare_ipv4(reply_params) + tcp_a = sp.TCP( + sport=tcp_sa.dport, dport=tcp_sa.sport, flags='A', + seq=tcp_sa.ack, ack=tcp_sa.seq + 1, + ) + req = ether / ip_a / tcp_a + sp.sendp(req, iface=send_params['sendif'], verbose=False) + return True + + return False + + def check_tcp_syn_request_6(expect_params, packet): if not check_ipv6(expect_params, packet): return False @@ -363,7 +407,38 @@ def check_tcp_syn_reply_6(expect_params, packet): return True -def check_tcp_syn_request(expect_params, packet): +def check_tcp_3way_6(args, packet): + send_params = args['send_params'] + + expect_params_sa = clean_params(args['expect_params']) + expect_params_sa['src_address'] = send_params['dst_address'] + expect_params_sa['dst_address'] = send_params['src_address'] + + # Sniff incoming SYN+ACK packet + if ( + check_ipv6(expect_params_sa, packet) and + check_tcp(expect_params_sa | {'tcp_flags': 'SA'}, packet) + ): + ether = sp.Ether() + ip6_sa = packet.getlayer(sp.IPv6) + tcp_sa = packet.getlayer(sp.TCP) + reply_params = clean_params(send_params) + reply_params['src_address'] = ip6_sa.dst + reply_params['dst_address'] = ip6_sa.src + ip_a = prepare_ipv6(reply_params) + tcp_a = sp.TCP( + sport=tcp_sa.dport, dport=tcp_sa.sport, flags='A', + seq=tcp_sa.ack, ack=tcp_sa.seq + 1, + ) + req = ether / ip_a / tcp_a + sp.sendp(req, iface=send_params['sendif'], verbose=False) + return True + + return False + + +def check_tcp_syn_request(args, packet): + expect_params = args['expect_params'] src_address = expect_params.get('src_address') dst_address = expect_params.get('dst_address') if not (src_address or dst_address): @@ -377,7 +452,8 @@ def check_tcp_syn_request(expect_params, packet): return check_tcp_syn_request_4(expect_params, packet) -def check_tcp_syn_reply(expect_params, packet): +def check_tcp_syn_reply(args, packet): + expect_params = args['expect_params'] src_address = expect_params.get('src_address') dst_address = expect_params.get('dst_address') if not (src_address or dst_address): @@ -390,8 +466,24 @@ def check_tcp_syn_reply(expect_params, packet): else: return check_tcp_syn_reply_4(expect_params, packet) +def check_tcp_3way(args, packet): + expect_params = args['expect_params'] + src_address = expect_params.get('src_address') + dst_address = expect_params.get('dst_address') + if not (src_address or dst_address): + raise Exception('Source or destination address must be given to match the tcp syn reply!') + if ( + (src_address and ':' in src_address) or + (dst_address and ':' in dst_address) + ): + return check_tcp_3way_6(args, packet) + else: + return check_tcp_3way_4(args, packet) + -def setup_sniffer(recvif, ping_type, sniff_type, expect_params, defrag): +def setup_sniffer( + recvif, ping_type, sniff_type, expect_params, defrag, send_params, +): if ping_type == 'icmp' and sniff_type == 'request': checkfn = check_ping_request elif ping_type == 'icmp' and sniff_type == 'reply': @@ -400,10 +492,15 @@ def setup_sniffer(recvif, ping_type, sniff_type, expect_params, defrag): checkfn = check_tcp_syn_request elif ping_type == 'tcpsyn' and sniff_type == 'reply': checkfn = check_tcp_syn_reply + elif ping_type == 'tcp3way' and sniff_type == 'reply': + checkfn = check_tcp_3way else: raise Exception('Unspported ping or sniff type') - return Sniffer(expect_params, checkfn, recvif, defrag=defrag) + return Sniffer( + {'send_params': send_params, 'expect_params': expect_params}, + checkfn, recvif, defrag=defrag, + ) def parse_args(): @@ -416,8 +513,8 @@ def parse_args(): parser.add_argument('--to', required=True, help='The destination IP address for the ping request') parser.add_argument('--ping-type', - choices=('icmp', 'tcpsyn'), - help='Type of ping: ICMP (default) or TCP SYN', + choices=('icmp', 'tcpsyn', 'tcp3way'), + help='Type of ping: ICMP (default) or TCP SYN or 3-way TCP handshake', default='icmp') parser.add_argument('--fromaddr', help='The source IP address for the ping request') @@ -444,7 +541,7 @@ def parse_args(): help='TCP sequence number') parser_send.add_argument('--send-sport', type=int, help='TCP source port') - parser_send.add_argument('--send-dport', type=int, default=666, + parser_send.add_argument('--send-dport', type=int, default=9, help='TCP destination port') parser_send.add_argument('--send-length', type=int, default=len(PAYLOAD_MAGIC), help='ICMP Echo Request payload size') @@ -500,6 +597,8 @@ def main(): send_params['tcpopt_unaligned'] = args.send_tcpopt_unaligned send_params['nop'] = args.send_nop send_params['src_address'] = args.fromaddr if args.fromaddr else None + send_params['dst_address'] = args.to + send_params['sendif'] = args.sendif # We may not have a default route. Tell scapy where to start looking for routes sp.conf.iface6 = args.sendif @@ -525,7 +624,7 @@ def main(): LOGGER.debug(f'Installing receive sniffer on {iface}') sniffers.append( setup_sniffer(iface, args.ping_type, 'request', - sniffer_params, defrag, + sniffer_params, defrag, send_params, )) if args.replyif: @@ -536,12 +635,12 @@ def main(): LOGGER.debug(f'Installing reply sniffer on {iface}') sniffers.append( setup_sniffer(iface, args.ping_type, 'reply', - sniffer_params, defrag, + sniffer_params, defrag, send_params, )) LOGGER.debug(f'Installed {len(sniffers)} sniffers') - send_ping(args.to, args.sendif, args.ping_type, send_params) + send_ping(args.ping_type, send_params) err = 0 sniffer_num = 0 diff --git a/tests/sys/netpfil/pf/src_track.sh b/tests/sys/netpfil/pf/src_track.sh index 27eb62abcf41..eb053dd84a90 100755 --- a/tests/sys/netpfil/pf/src_track.sh +++ b/tests/sys/netpfil/pf/src_track.sh @@ -2,6 +2,7 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2020 Kristof Provost +# Copyright (c) 2024 Kajetan Staszkiewicz # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -59,7 +60,68 @@ source_track_cleanup() pft_cleanup } + +max_src_conn_rule_head() +{ + atf_set descr 'Max connections per source per rule' + atf_set require.user root +} + +max_src_conn_rule_body() +{ + setup_router_server_ipv6 + + # Clients will connect from another network behind the router. + # This allows for using multiple source addresses and for tester jail + # to not respond with RST packets for SYN+ACKs. + jexec router route add -6 2001:db8:44::0/64 2001:db8:42::2 + jexec server route add -6 2001:db8:44::0/64 2001:db8:43::1 + + pft_set_rules router \ + "block" \ + "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ + "pass in on ${epair_tester}b inet6 proto tcp keep state (max-src-conn 3 source-track rule overload )" \ + "pass out on ${epair_server}a inet6 proto tcp keep state" + + # Limiting of connections is done for connections which have successfully + # finished the 3-way handshake. Once the handshake is done, the state + # is moved to CLOSED state. We use pft_ping.py to check that the handshake + # was really successful and after that we check what is in pf state table. + + # 3 connections from host ::1 will be allowed. + ping_server_check_reply exit:0 --ping-type=tcp3way --send-sport=4201 --fromaddr 2001:db8:44::1 + ping_server_check_reply exit:0 --ping-type=tcp3way --send-sport=4202 --fromaddr 2001:db8:44::1 + ping_server_check_reply exit:0 --ping-type=tcp3way --send-sport=4203 --fromaddr 2001:db8:44::1 + # The 4th connection from host ::1 will have its state killed. + ping_server_check_reply exit:0 --ping-type=tcp3way --send-sport=4204 --fromaddr 2001:db8:44::1 + # A connection from host :2 is will be allowed. + ping_server_check_reply exit:0 --ping-type=tcp3way --send-sport=4205 --fromaddr 2001:db8:44::2 + + states=$(mktemp) || exit 1 + jexec router pfctl -qss | grep 'tcp 2001:db8:43::2\[9\] <-' > $states + + grep -qE '2001:db8:44::1\[4201\]\s+ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4201 not found or not established" + grep -qE '2001:db8:44::1\[4202\]\s+ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4202 not found or not established" + grep -qE '2001:db8:44::1\[4203\]\s+ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4203 not found or not established" + grep -qE '2001:db8:44::2\[4205\]\s+ESTABLISHED:ESTABLISHED' $states || atf_fail "State for port 4205 not found or not established" + + if ( + grep -qE '2001:db8:44::1\[4204\]\s+' $states && + ! grep -qE '2001:db8:44::1\[4204\]\s+CLOSED:CLOSED' $states + ); then + atf_fail "State for port 4204 found but not closed" + fi + + jexec router pfctl -T test -t bad_hosts 2001:db8:44::1 || atf_fail "Host not found in overload table" +} + +max_src_conn_rule_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "source_track" + atf_add_test_case "max_src_conn_rule" } diff --git a/tests/sys/netpfil/pf/utils.subr b/tests/sys/netpfil/pf/utils.subr index f02dfc22049f..0b7ee621e6fa 100644 --- a/tests/sys/netpfil/pf/utils.subr +++ b/tests/sys/netpfil/pf/utils.subr @@ -215,8 +215,9 @@ setup_router_server_ipv4() vnet_mkjail server ${epair_server}b jexec server ifconfig ${epair_server}b ${net_server_host_server}/${net_server_mask} up jexec server route add -net ${net_tester} ${net_server_host_router} - jexec server nc -4l 666 & - sleep 1 # Give nc time to start and listen + inetd_conf=$(mktemp) + echo "discard stream tcp nowait root internal" > $inetd_conf + jexec server inetd $inetd_conf } # Create a bare router jail. @@ -268,8 +269,9 @@ setup_router_server_ipv6() vnet_mkjail server ${epair_server}b jexec server ifconfig ${epair_server}b inet6 ${net_server_host_server}/${net_server_mask} up no_dad jexec server route add -6 ${net_tester} ${net_server_host_router} - jexec server nc -6l 666 & - sleep 1 # Give nc time to start and listen + inetd_conf=$(mktemp) + echo "discard stream tcp6 nowait root internal" > $inetd_conf + jexec server inetd $inetd_conf } # Ping the dummy static NDP target. From nobody Sat Sep 28 17:01:35 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 4XGDBl5vXtz5XbKM; Sat, 28 Sep 2024 17:01:35 +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 4XGDBl5N5Yz4rMW; Sat, 28 Sep 2024 17:01:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727542895; 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=UCbmwcwPXuiwXGlD1/n+qTMQ4bYNMm1tzu1mNH8g2vM=; b=vHQfa1NjVjosmBm2tpeLJVOqC1TncXXs0X8JumyuEu8+sHdRnD2Kl+SXQY8FfLBGk9YSIa uhL/o3ie7GTAjL+ABr+QQKApR66vuxjF3K5r/642g45c6pd6Kf12nxa+zRjZxrd6eQFpwZ 8sD14d4lg2Zlc+tbikXpFX0fbClF0exreWZZmisFMMxZdU5a5qXC82MpIdJye2AG1dfg4J fooUwrThEwyNSKDMIoKQ2uuQFRfaceewQz/GsrUiJRoN09jXNrVBO9kUilmjqL5eGZ2r4q lECnsAD35AK6SH6IgC20600gmq59oVN/skz5GKwh3YI/xpfWfuKMRcHTEBuuVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727542895; 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=UCbmwcwPXuiwXGlD1/n+qTMQ4bYNMm1tzu1mNH8g2vM=; b=Y5Oq48iRgxjykFf4kJJZvrwMdO15Il2FOmUNyHVfLv4fTXBB4S+ICQlYfxABYD+7gzWVKr UnZRmI0HR0O6s5dlJ6mcIrIc6bGJ1A+C/mIC//6GsxpmwxUdJWL1OsZ6yVIS+7usQQNipK ifawHkuRbT/E3aWaJMVViL3BsSd5bj15+qwsik5skv71+VA70qsbm0vVzB+6MnJU5gOFI8 KGaldHEr/Yh6lgEv44mdjuitSTkR5TTDCg3INmtsLOdGIvTne+8+1yl43NRFEjK8xN4Q8P 87hVwXvNPDl/UycHjrs7XcvfnZg01wK+3Zmuw3b09xy8QQXAwt1tjLBAMuckzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727542895; a=rsa-sha256; cv=none; b=Erb10kCi2UvliiKOI2ClRJ6hPQY77aDmoYtlNh1HHARJPCwTwqlkD0jYUx7Rhw+mPP7UAx SZQj9RD/K17CzAApyxNzjOUfDwjo49JjfIj8GOeZNsd95AiubvCqg/kesBA30hjcoF56dV q1dwP195Xd8n6e+ecRcGUSfFxwKmy66kK2gIin+JWhl11bJvtHh3Q9fpdbHoL+WEZFsg3j 4NlT3wuX6R8wJMGmYEWXHmmRxo7sYuhjSuhugg8uOVB8sChhWmQYZ1bgUlIC/0ubRYTy9n Pru5dYf8Uo1CUyH7jh0NFGj4bq+fqMG/cZ5hK89lFt+nss56MwVrzGGFTHdDEQ== 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 4XGDBl4zPjzYp8; Sat, 28 Sep 2024 17:01:35 +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 48SH1ZjR058454; Sat, 28 Sep 2024 17:01:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SH1ZWm058451; Sat, 28 Sep 2024 17:01:35 GMT (envelope-from git) Date: Sat, 28 Sep 2024 17:01:35 GMT Message-Id: <202409281701.48SH1ZWm058451@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: c44fbfdb5686 - main - roundup_pow_of_two: don't take the log of it 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c44fbfdb56862c4c8d2563483b4fff8f9a5a1d43 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=c44fbfdb56862c4c8d2563483b4fff8f9a5a1d43 commit c44fbfdb56862c4c8d2563483b4fff8f9a5a1d43 Author: Doug Moore AuthorDate: 2024-09-28 17:00:06 +0000 Commit: Doug Moore CommitDate: 2024-09-28 17:00:06 +0000 roundup_pow_of_two: don't take the log of it Based on the definitions, ilog2(roundup_pow_of_two(x)) == order_base_2(x). Replace the former with the latter in a few places to save a few calculations. Reviewed by: bz, kib Differential Revision: https://reviews.freebsd.org/D46827 --- sys/dev/mlx4/mlx4_en/en.h | 2 +- sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx4/mlx4_en/en.h b/sys/dev/mlx4/mlx4_en/en.h index a29b40ddaf10..838894f7b02f 100644 --- a/sys/dev/mlx4/mlx4_en/en.h +++ b/sys/dev/mlx4/mlx4_en/en.h @@ -232,7 +232,7 @@ enum cq_type { /* * Useful macros */ -#define ROUNDUP_LOG2(x) ilog2(roundup_pow_of_two(x)) +#define ROUNDUP_LOG2(x) order_base_2(x) #define XNOR(x, y) (!(x) == !(y)) #define ILLEGAL_MAC(addr) (addr == 0xffffffffffffULL || addr == 0x0) diff --git a/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c b/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c index 3cda28752592..b391946440b9 100644 --- a/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c +++ b/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c @@ -488,7 +488,7 @@ static int set_kernel_sq_size(struct mlx4_ib_dev *dev, struct ib_qp_cap *cap, MLX4_IB_QPT_PROXY_GSI | MLX4_IB_QPT_TUN_SMI_OWNER))) qp->sq.wqe_shift = ilog2(64); else - qp->sq.wqe_shift = ilog2(roundup_pow_of_two(s)); + qp->sq.wqe_shift = order_base_2(s); for (;;) { qp->sq_max_wqes_per_wr = DIV_ROUND_UP(s, 1U << qp->sq.wqe_shift); @@ -544,7 +544,7 @@ static int set_user_sq_size(struct mlx4_ib_dev *dev, /* Sanity check SQ size before proceeding */ if ((1 << ucmd->log_sq_bb_count) > dev->dev->caps.max_wqes || ucmd->log_sq_stride > - ilog2(roundup_pow_of_two(dev->dev->caps.max_sq_desc_sz)) || + order_base_2(dev->dev->caps.max_sq_desc_sz) || ucmd->log_sq_stride < MLX4_IB_MIN_SQ_STRIDE) return -EINVAL; From nobody Sat Sep 28 17:05:24 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 4XGDH82Yymz5Xbf7 for ; Sat, 28 Sep 2024 17:05: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 4XGDH81zQnz4rjm; Sat, 28 Sep 2024 17:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727543124; 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=bZx4v7Iktxm9eGdGfIzvJ6bLXBi1a7qonzSQl/CxnUI=; b=OK/gDPtQDBveUMY8pRI+RkXaLb5ZIRMe+X4FG8ZFpANzjxNjujTvgjKe9xxHtzrB7ydyCp oKYXOhhJO/Vbmzt0XWY1cYOo4NVqqz0GN5BrmuvLfJIoCPsoFxFGP+vM4pbzANxecVq5kS 1clPu3u5dBCQLkBPe2y+/vrY22TK9GbKpSzeWjijHY6cBeC5fd+J2kzY2UsE7kZ0LLCI9J F+HepHPKOPXkl4Q37FqLw6F9vu13Q8Je3HAogV+26wG1MzspQKsJ1Qc7TYYNYk8EIxLFSN LpH4jYcG9XdbVKepI9bCh91P+vhlshJNMRAx3Rp+uB2aN2YBZFKbJHHgxcT+rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727543124; 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=bZx4v7Iktxm9eGdGfIzvJ6bLXBi1a7qonzSQl/CxnUI=; b=L9Rq8yJddFD/EIt1afS4BjPwNNe7KyMdSwIqBnAuTzR4Rz1wTQrinY5DODKrJJkOs09iZt u3UTdRLwLk6/uKakqGXIMhnFPwE0dnxI7TyJxSXkP15dnCTmroMYojKnttBXIdWSziwK/9 BiGM4HxltqDNkBzgCOoC0omHLFIfXbRcPcq689DgOhsgi4TDsWUBP0jJFpqhoMx9KE2TuH DrWjm2fUlxb0lM+CQIgswSAQ0XAn1e0HVkGFQcPdXx4GpvPWxBVsOf+iKxTkQcCOJYYWNM 903VCTaW7nmiTa6ePlm2I02Zn0m//0bxnnUa0pFD6rZIASx+dzX9wXHNxBR9zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727543124; a=rsa-sha256; cv=none; b=YzluoiiIr6mz5N6O9L8+A1Nca5RmfJgSVutixnFIjvdhfnWEbZVQowoXVkmYciPi+VPUmj /ZhqZa/eABgnKuBfod304QWzOXKlQ9N+LdNZonVn/YphSDPwjiCk6XOIbUfar20VH2N4qI rJiCJBJGnpTBXqJNn3qRkgv5yjc6xho1OMoeqqtz5wvsucQRJMnFEo9F3TdVHgvH38xFTC 1t7RGZ6oXGv2KTE1GCFWBq9bECTBFCUcj4I77gheR1lgLC//LhLdrP9SvfYuKHsHQMB27t dlLIjjVq/2ZJfAm+BIlxhU+1V/HlOUmQQCSkz4xp9G8jRz8xdj0yRSuXthBCzQ== 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 4XGDH81RvYzYRq; Sat, 28 Sep 2024 17:05: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 48SH5OK2060428; Sat, 28 Sep 2024 17:05:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SH5OXZ060427; Sat, 28 Sep 2024 17:05:24 GMT (envelope-from git) Date: Sat, 28 Sep 2024 17:05:24 GMT Message-Id: <202409281705.48SH5OXZ060427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Enji Cooper Subject: git: 45777d97fb74 - Create tag vendor/google/googletest/1.14.0 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: ngie X-Git-Repository: src X-Git-Refname: refs/tags/vendor/google/googletest/1.14.0 X-Git-Reftype: annotated tag X-Git-Commit: 45777d97fb74fe2762bcd35547981c56f283ec89 Auto-Submitted: auto-generated The annotated tag vendor/google/googletest/1.14.0 has been created by ngie: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/google/googletest/1.14.0 tag vendor/google/googletest/1.14.0 Tagger: Enji Cooper TaggerDate: 2024-09-28 17:04:40 +0000 vendor/googletest: tag 1.14.0 commit 8ef491440fcaec96f899d73e08873426c78583a4 Author: Enji Cooper AuthorDate: 2023-08-08 05:56:32 +0000 Commit: Enji Cooper CommitDate: 2023-08-08 06:03:09 +0000 Import GoogleTest v1.14.0 Imported via the following general commands: ``` git rm -rf * git archive --format=tar v1.14.0 | tar -xvf - -C /path/to/git/vendor/clone git commit -A ``` Obtained from: https://github.com/google/googletest From nobody Sat Sep 28 17:05:24 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 4XGDH82Z0qz5XbY3 for ; Sat, 28 Sep 2024 17:05: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 4XGDH825x4z4rm0; Sat, 28 Sep 2024 17:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727543124; 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=mhwpAXieNF0xivMJANCNoTJLDN12yKhrLTAx3c4dLR8=; b=s4c+ryEsssRlo6vCpN71WKW9CXmyN1mRCVf5CfacStuMmk0j+jY2kzCZ3t9/HZHo4+MNrl miIDDDMFJHDmQG+48e5r+rYyZtnUNrVxiI71qeXspUYYZXrBU1s93fjXQ1EFefYiouBBtR 87ePLbSELAcOxyIkng75wsbD8hXdJomDE+v39IaiFLsNHt/4iM6vaDLmj/AOJJm8m2hJpS eVinKMQJMgUp123oEbSW2tWBiOOON0EdrdkGvoUpB/yHTOZKwxjTUqFoE0/n3N07Rvcccf jPeDx3FMwmOCoXu0qHlMd001ubpdeAHehZ8VE15WpW/vVzkSnwSYmNrTwumjmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727543124; 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=mhwpAXieNF0xivMJANCNoTJLDN12yKhrLTAx3c4dLR8=; b=rQkb6YVdPx8YALsJcgSxSHbdnBajM5GCkz6m43gsO4gKVSyUeEoZrsa5Yy7zdTW2QpnIeh Nhu935TE81W8k7CMJAXRVp8uUI4tvCjsPOo+EyC4tnxl8Mn1QNvEyHjajvYIlA35oC4q+2 e3i4mXwQ8ADGwBMgKvpO/1MNMzqu7V/OFfJurm36JuvDSjatUzNqMOwbUUOy7VHFrhKraZ rahZP8VhbxMuSrVVP4IFtKct6M7shk/7aNjskTordP9fYIvX9SKUrP0HwTqw6slQOiGYYC F37IWQc41wEdCLyPzybPGvt2p2VD/qoc4JnFGn/TfEB4Uy7CInTNCTwEPvmGfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727543124; a=rsa-sha256; cv=none; b=pSc3VFAi6Y4H0V2eh5bz++rsvRoj95P2A76LL2AnSDoZ1U+X87n9CNUchdDeY7OK8W8ETz gOrJEq8qkPiJpkF/DzGQFXRUK5UVOsY+QpVjUdHDXkzPtqUT8KgSAobWiUN2xbLdZhTVRv 29gjCFRMGoubyJzYf3Jmm+NI0F0BzlJtuCiMKrV6Mg91axpKIlFDpPg/yQJT+IRikjhf/T FiwrK7ApEk0I/i1HTtfv0JTQZIx0iWbpxJXym0CDckW35+7t7zmaynsSQhO7gqyNzOLfoV wkaRmM+NoXf/Ih5n7OsIjJXBgGWR/4jkacONe/5blleg3TwjMWfFbRENo3PWFQ== 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 4XGDH819j6zYRp; Sat, 28 Sep 2024 17:05: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 48SH5O3V060409; Sat, 28 Sep 2024 17:05:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SH5OQr060408; Sat, 28 Sep 2024 17:05:24 GMT (envelope-from git) Date: Sat, 28 Sep 2024 17:05:24 GMT Message-Id: <202409281705.48SH5OQr060408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Enji Cooper Subject: git: 8ef491440fca..14f7077fed7d - vendor/google/googletest - vendor branch updated 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: ngie X-Git-Repository: src X-Git-Refname: refs/heads/vendor/google/googletest X-Git-Reftype: branch X-Git-Commit: 14f7077fed7d82046bdcbe347004132f08aba886 X-Git-Oldrev: 8ef491440fcaec96f899d73e08873426c78583a4 X-Git-Newrev: 14f7077fed7d82046bdcbe347004132f08aba886 Auto-Submitted: auto-generated The branch vendor/google/googletest has been updated by ngie: URL: https://cgit.FreeBSD.org/src/log/?id=8ef491440fca..14f7077fed7d 14f7077fed7d vendor/googletest: import 1.15.2 From nobody Sat Sep 28 19:23:35 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 4XGHLb3Mrtz5Xkvn; Sat, 28 Sep 2024 19:23:35 +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 4XGHLb2WcMz53WC; Sat, 28 Sep 2024 19:23:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727551415; 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=ZSgmzBjFUX1WMcLt8twPvyzABopP5t/I0cPzb3G5kUg=; b=nmRjo0RAFqPiSWsVxSyHqrzLZ1v3cyk60xcawSU6HVupyISeEat/CgL76HQ/IEldm4Hsho 8Ku0/NTzbokqFjMKrdwH9nS2BlPvW9VaV/Uif1UwKEnjSkbTFpz7ZjQqUt/Dsr+yVH+IsB cUefHY3ctb4Ttwf/X6V+zfU65YraayGLuVSrm9d4TxItKQwH+yb0uVFwrW+3tG6xMOqKB3 d72KFPuVEWf+h9MQZltXgsYnv/rmW8pOLfY8xBU0/G5gBPOn2tzu+yWsnwbk0iBWxtj2UF U7b6Ew5c4xg87m6bBN1J/WO/oZq7fWdJw1TyCf+EN4j6D31OaIWIlUO+QYmfxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727551415; 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=ZSgmzBjFUX1WMcLt8twPvyzABopP5t/I0cPzb3G5kUg=; b=Yln/HrkSPYq9pNqraJ+V54KmNOOjM9cmFKfd05tJjJvKrPVpg/dwiLUqspdedZAVx0DhM3 z0Eqq0IcINknlh8g9AVqJdJf5gChnw+hEwjdKPAws1gvsvs5/eFh9cCdI/Za8HqGVfg567 lfKrA8Uu/QMc01Ay9evs9bNzYbgsMO6lPTtx/BAYQGG+pg1NlKRiCYytmbOcAqID5v352X w2MHjEvdZyykG2Kv+GSeDVduyZTQBoU41BXXGeoaL6TivrZOXuKU+Wyv9vewVWA6ZvZnNp /qCTzQGnuWt58zuRJ7Aw9mAnYggXb6xoDF9YgXNPk9OJ3H356tfcuvBdM/B01Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727551415; a=rsa-sha256; cv=none; b=kGv3DeVJGvcklW3jpItsUvdE93ACwYwx+u18Q0nxTKLFZHOC22jHXbpA6aK1tJ600eSWw7 uX6fxnDiSI1Q043nBpitk63Wz/DYnlvuvXK0nqaiXGKmTpW71HLBqgZzy2TCeOcMkkgv0J Px84GoVdgMSnPSTAWFBGK7Hwjn1MvQb/7Qdm29zb5hvsuq+JrWO3GtctmPxRNn7koczHJn /oSYtTc0UsFBHj+OaNP3/kz+qloE/BYEINQ7kQeByBjUD+8ovcBIcSxTz2Db5lzGpgyej3 K8ueo8IgJDIjjRNHkV86WTyuRitxJyJYu/0XH/slrtKvqrfXAbRkL8kQfXz2qg== 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 4XGHLb1pmLzdNZ; Sat, 28 Sep 2024 19:23:35 +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 48SJNZsq096622; Sat, 28 Sep 2024 19:23:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SJNZ4Z096619; Sat, 28 Sep 2024 19:23:35 GMT (envelope-from git) Date: Sat, 28 Sep 2024 19:23:35 GMT Message-Id: <202409281923.48SJNZ4Z096619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 37881f65eacd - main - pf: pf_clear_srcnodes() is always called with NULL 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37881f65eacd200b6aa31bcf75bdda089b83fbd5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=37881f65eacd200b6aa31bcf75bdda089b83fbd5 commit 37881f65eacd200b6aa31bcf75bdda089b83fbd5 Author: Kajetan Staszkiewicz AuthorDate: 2024-09-28 16:59:13 +0000 Commit: Kristof Provost CommitDate: 2024-09-28 19:23:14 +0000 pf: pf_clear_srcnodes() is always called with NULL The functions pf_clear_srcnodes() is only used to perform a removal of all source nodes, never of a given one. Remove the code allowing for removal of a given source node. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D46819 --- sys/netpfil/pf/pf_ioctl.c | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 0a573a017ef3..6e2fcd358b68 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -233,7 +233,7 @@ static int pf_clearstates_nv(struct pfioc_nv *); static int pf_getstate(struct pfioc_nv *); static int pf_getstatus(struct pfioc_nv *); static int pf_clear_tables(void); -static void pf_clear_srcnodes(struct pf_ksrc_node *); +static void pf_clear_srcnodes(void); static void pf_kill_srcnodes(struct pfioc_src_node_kill *); static int pf_keepcounters(struct pfioc_nv *); static void pf_tbladdr_copyout(struct pf_addr_wrap *); @@ -5427,7 +5427,7 @@ DIOCCHANGEADDR_error: } case DIOCCLRSRCNODES: { - pf_clear_srcnodes(NULL); + pf_clear_srcnodes(); pf_purge_expired_src_nodes(); break; } @@ -5904,40 +5904,32 @@ pf_clear_tables(void) } static void -pf_clear_srcnodes(struct pf_ksrc_node *n) +pf_clear_srcnodes(void) { - struct pf_kstate *s; - int i; + struct pf_kstate *s; + struct pf_srchash *sh; + struct pf_ksrc_node *sn; + int i; for (i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; PF_HASHROW_LOCK(ih); LIST_FOREACH(s, &ih->states, entry) { - if (n == NULL || n == s->src_node) - s->src_node = NULL; - if (n == NULL || n == s->nat_src_node) - s->nat_src_node = NULL; + s->src_node = NULL; + s->nat_src_node = NULL; } PF_HASHROW_UNLOCK(ih); } - if (n == NULL) { - struct pf_srchash *sh; - - for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; - i++, sh++) { - PF_HASHROW_LOCK(sh); - LIST_FOREACH(n, &sh->nodes, entry) { - n->expire = 1; - n->states = 0; - } - PF_HASHROW_UNLOCK(sh); + for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; + i++, sh++) { + PF_HASHROW_LOCK(sh); + LIST_FOREACH(sn, &sh->nodes, entry) { + sn->expire = 1; + sn->states = 0; } - } else { - /* XXX: hash slot should already be locked here. */ - n->expire = 1; - n->states = 0; + PF_HASHROW_UNLOCK(sh); } } @@ -6406,7 +6398,7 @@ shutdown_pf(void) pf_clear_all_states(); - pf_clear_srcnodes(NULL); + pf_clear_srcnodes(); /* status does not use malloced mem so no need to cleanup */ /* fingerprints and interfaces have their own cleanup code */ From nobody Sat Sep 28 20:09:56 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 4XGJN42vDKz5XnL6; Sat, 28 Sep 2024 20:09:56 +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 4XGJN42Qsnz57Xr; Sat, 28 Sep 2024 20:09:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727554196; 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=6W8lKXBAwmrYahOlErRbnvnbgzjA1TpTNPkjp+gaCgs=; b=wbV95VUmpc+YXIpqTHpus+IxnB/Np5LY5oraAj2TqFS7eV+XTkxcsk7ca9PV4JwPNTb4Xr SCVd5u90jSpFeBCSKW6zTH+KeHYg2yTSW8sR6nEhZh1JlcCZxVVJy9IViELWXAplO6IDRw Tjo0m8DvaxuvlTUIjJ8TQ5ORFZ5tPXw22NJivbLgEXIH2uUOn7NlypFVB+vnDTc8NtgyHh mw+V4zlLQL83d5yJLtNCUAD6Sa9vYp3zxLA/GwhrrmngfWj8zfn9L6wNJobR3muh8e0QQi lZ98JN+Bju/Q67ZEkruXkTPrCxbqphLdF9CcvjxJ5UZsENVT5JJ9mu+rso1e5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727554196; 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=6W8lKXBAwmrYahOlErRbnvnbgzjA1TpTNPkjp+gaCgs=; b=BjoxZVK0Z/moYTJqkvTJTGCi9OKSkOVK7gDdgX3hUQxZIr3qt4198DVGwbstGpu36AG3Mo Mfh/awMVaMHQbki4InQFBJYdxp/iAbL5jx/DvAfbenmdLtuQYgfOSCj985gnEUZKnVw+dI tpEOK90oz/HdgeuBcQYYqaQC5ZoyklOdpcwFHTVUhmXXG3fUgCSdVFvE6B3DKv6uC8hCXZ shKvC9lCbr6xUiWCa2nhJ3XkqwHWuKc9VPOm5QORypCYSSSh+16C8DhL2m7lQsNoCpjJdX x8RaJy5dsrtyFSfQziNtwjKe2jh4Imwuw0fqqiIJv6XczITITF5s2oFOLdEKNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727554196; a=rsa-sha256; cv=none; b=bKTvev0S/joxh+CPI23RDScAAw7nEe8FSxwOZox3rinjMQPREoe0Hmqg1z/LVdWn+/Cl02 SJPHiGZLn2Dqf8AqvJ1AGycIfzqbg8N8e3Z5eUkZhb9TcVAlNU74rpBu8+dazgLFsdaAZK 2ivGvcYmrvBv2hlzm9ZynfAWON6lL9kcuFKkavA/o2DMogAGWTlECpaXCM0kAXicvPydLT NkQpafth+ILzTH+nlRmqm//IDT7ERvpEir0PZExyn8conEFETVhmSw1n6qdwn1w9+ibYOh vWhfC82+sUoUuMDuvwDui6rtMdECH88jqsDWrtUJoe61VIN6+24y3bXYG+CgOw== 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 4XGJN41k8Pzfd2; Sat, 28 Sep 2024 20:09:56 +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 48SK9ueI065751; Sat, 28 Sep 2024 20:09:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SK9uZc065748; Sat, 28 Sep 2024 20:09:56 GMT (envelope-from git) Date: Sat, 28 Sep 2024 20:09:56 GMT Message-Id: <202409282009.48SK9uZc065748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: cbc9438f0505 - main - tcp: improve ref count handling when processing SYN 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cbc9438f0505bd971e9eba635afdae38a267d76e Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=cbc9438f0505bd971e9eba635afdae38a267d76e commit cbc9438f0505bd971e9eba635afdae38a267d76e Author: Michael Tuexen AuthorDate: 2024-09-28 20:06:41 +0000 Commit: Michael Tuexen CommitDate: 2024-09-28 20:06:41 +0000 tcp: improve ref count handling when processing SYN Don't leak a reference count for so->so_cred when processing an incoming SYN segment with an on-stack syncache entry and the sysctl variable net.inet.tcp.syncache.see_other is false. Reviewed by: cc, markj, rscheff MFC after: 1 week Sponsored by: Netflix, Inc. Pull Request: https://reviews.freebsd.org/D46793 --- sys/netinet/tcp_syncache.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index ed131421207d..19145446988e 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1375,7 +1375,6 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, struct label *maclabel = NULL; #endif struct syncache scs; - struct ucred *cred; uint64_t tfo_response_cookie; unsigned int *tfo_pending = NULL; int tfo_cookie_valid = 0; @@ -1392,7 +1391,6 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, */ KASSERT(SOLISTENING(so), ("%s: %p not listening", __func__, so)); tp = sototcpcb(so); - cred = V_tcp_syncache.see_other ? NULL : crhold(so->so_cred); #ifdef INET6 if (inc->inc_flags & INC_ISIPV6) { @@ -1623,9 +1621,21 @@ skip_alloc: #ifdef MAC sc->sc_label = maclabel; #endif - sc->sc_cred = cred; + /* + * sc_cred is only used in syncache_pcblist() to list TCP endpoints in + * TCPS_SYN_RECEIVED state when V_tcp_syncache.see_other is false. + * Therefore, store the credentials and take a reference count only + * when needed: + * - sc is allocated from the zone and not using the on stack instance. + * - the sysctl variable net.inet.tcp.syncache.see_other is false. + * The reference count is decremented when a zone allocated sc is + * freed in syncache_free(). + */ + if (sc != &scs && !V_tcp_syncache.see_other) + sc->sc_cred = crhold(so->so_cred); + else + sc->sc_cred = NULL; sc->sc_port = port; - cred = NULL; sc->sc_ipopts = ipopts; bcopy(inc, &sc->sc_inc, sizeof(struct in_conninfo)); sc->sc_ip_tos = ip_tos; @@ -1761,8 +1771,6 @@ donenoprobe: tcp_fastopen_decrement_counter(tfo_pending); tfo_expanded: - if (cred != NULL) - crfree(cred); if (sc == NULL || sc == &scs) { #ifdef MAC mac_syncache_destroy(&maclabel); From nobody Sat Sep 28 21:26:49 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 4XGL4n3l6wz5XsRt; Sat, 28 Sep 2024 21:26:49 +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 4XGL4n3993z40bK; Sat, 28 Sep 2024 21:26:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727558809; 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=7aPhN2x5cwgfXf797J514xGU0OI/YazIvx2gBmohqzI=; b=p+30yEY+J6uQZBu6CmjqlYOlKlQenu1ggrMSa0uVkiamqWZEQodk2WCyWvKHZItcPso91X w2ktn7+TprGbsWj54Sj0aLXdz/PsEUriBWZ+zliFNtlH8lsIx0xNLufP88wIVgVtaLc0ZE XgbGwyA9wdZ3JfF0o+tfyEUaYhXwuLdbz/AK7HtnjIdF+jYCI5F4WIaPEuB2z6KAlmx+hp 0854K7qcLPVFTHfsiUmcNIThsii1UfV5kFHAoc0cyjGdl5/ond7ulxnCUsru2rCVqXshi0 XOVsQecRHcYvH9PrzmUoOKCNvnrFGfWMRkI//L7hxucC5m2UAX6Nogo11CD9Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727558809; 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=7aPhN2x5cwgfXf797J514xGU0OI/YazIvx2gBmohqzI=; b=SSmRd6FsY0XzXtGm7OCf+my6gLRbuSvxBVPnzxalng8Dxrm+47tT79MUYmJ3BkEIaCRlD1 2eIr5aeD2Np61RYr2gqAQW8H588GZ9MGM3qQoPNaU1yZ4Zad7zAWmoR77v0D4aLe8BZKm5 sx2hwcqep0o1RMiLEmmKpnHcMy6ZDfseER+x/z9RBRVQ5qWa6tYiYOqWrHi0jS/Q2R+NIp iE75vRJVjVSrCrxa9ut/e1AZRW2AftBqjlio+Caof9aqm8hBobb7mwJtGDpg0nWHVQey4v ETJYUjsUtWA71rNLM2ABA/NOInUgj9oy7gjd9jeIPTA7fRikmTqJpboyXOpxXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727558809; a=rsa-sha256; cv=none; b=wnrIhhJf4XLu97dYc/1Hw/eSTVeSHE9D++F64n6F454Ix5p9TGiNf5h6xLu+T/qhHA4Mw1 gbhyT5JxpgyuC0obXtqAkC+bXrkae9Bna5X90oZzeVCnNa2sqY7nozFDgCM3hOEYvs4wKF QAcEFtG1Kq1dXe6wi3Km1Idebg/GCxtW93FFUvAG6RzvvhYXj2SgLyA3f7a//wb0k2bleq MgoloW11eTR0TTt/8SHEMSYJlpvpMACb/3p2vIVze4Oj+RgD2I6GsQeecUDkWWSFp9IqvH qlWBkfQhiVMJJFRsadYf5rmNHsC6Ia5YQV18ChG+pfwdbQ5lH64CJikUuJPq8Q== 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 4XGL4n2mZ6zhMN; Sat, 28 Sep 2024 21:26:49 +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 48SLQnHa000561; Sat, 28 Sep 2024 21:26:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SLQn8h000558; Sat, 28 Sep 2024 21:26:49 GMT (envelope-from git) Date: Sat, 28 Sep 2024 21:26:49 GMT Message-Id: <202409282126.48SLQn8h000558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 65c4ec887eec - main - gdma: use ispower2 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65c4ec887eec1f1967557cc3f2656df76b5898bb Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=65c4ec887eec1f1967557cc3f2656df76b5898bb commit 65c4ec887eec1f1967557cc3f2656df76b5898bb Author: Doug Moore AuthorDate: 2024-09-28 21:17:03 +0000 Commit: Doug Moore CommitDate: 2024-09-28 21:17:03 +0000 gdma: use ispower2 It's faster to use ispower2(n) than it is to compute roundup_pow_of_two and do a comparison. So do the former. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46838 --- sys/dev/mana/gdma_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mana/gdma_main.c b/sys/dev/mana/gdma_main.c index 13f2617ad7d4..59ac6911c784 100644 --- a/sys/dev/mana/gdma_main.c +++ b/sys/dev/mana/gdma_main.c @@ -221,7 +221,7 @@ mana_gd_alloc_memory(struct gdma_context *gc, unsigned int length, if (!gc || !gmi) return EINVAL; - if (length < PAGE_SIZE || (length != roundup_pow_of_two(length))) + if (length < PAGE_SIZE || !powerof2(length)) return EINVAL; err = bus_dma_tag_create(bus_get_dma_tag(gc->dev), /* parent */ From nobody Sat Sep 28 21:26:50 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 4XGL4p4VPTz5Xs3Q; Sat, 28 Sep 2024 21:26:50 +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 4XGL4p3c2cz40rf; Sat, 28 Sep 2024 21:26:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727558810; 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=UmeHROIHgSeoOvs2/YGNtUxHxttrDD9iVtu6JDTClRo=; b=WzfspCeYOMQZQHaW17gFtT4HhBIufNbRd3xtEV60W9u89CtApxa5+1IRRaOTH/5a4M/78z BXyjT82FrUfJ74xYLXdWQx4kktbCbPXAaj+nX0P6xfAOgBI1CeLSYOH3woMhuJ3rTCHCR4 RDb+6BRIlmCK6hBrkE/pQ52kkijao27NuLQgKLcNHrBxv4JE9ntbt27svRgC+LWpvnpbUx 7OcC2HLoY8Wv9PBdx2L8TzKrI4glCE4jKblVYYCwnmq2Mnkc2D6jCzwDo/nOAtDLExFUFG XlGqAM+nnq2dnZfryjNbEKIcOLVkHirEz2LjhTaQ5rnPZS/zNqv1YN+Z4RvdGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727558810; 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=UmeHROIHgSeoOvs2/YGNtUxHxttrDD9iVtu6JDTClRo=; b=b25lmp2T4FgzyLHz09lii+d9LbSWgfEzEwDfQCVG9RaqTk+UXUn5qAouWqHikSEM/Xfdgb mrNDDmwXJA2M2nmyKqTId7rjrmK65etkV66RE+1JjIQGZHMJJVGX2xTv+1DJhs6hWTR43V 4FQIQ4Eb00Kmo/mmMPqpru9LNq//ZBYDZNZpeSBaTdL9FDLz2rMIlsLeyZ/6jvw0SODe4O R99GueFJP0JKhTzKclvAn4ZxCqs9OeNiFRvK6DMRvCuoFgeSnV+0d/WVbS1nR0hf/Z0Uxl QbQzGZ3qRyTAEf8CD4kYQe2AlIIPlUnceAjKNJNk12mEhiVnSpHxG0hLkYgB9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727558810; a=rsa-sha256; cv=none; b=ypALjhnz9vZP9TJ+RekiQgu1iGidgBEUEhm305tDIuMLNB1ke0hCCRD/5xhXu5J0i59Oqe 48684vejkL5k9BrqpUmhxM7KqQNLPKQZNKeajkg+UdRVAS6HnXcF+CkecHMmsNboLEMQgB 37mlfUrCHonnQ+78xy8lhZe6yoHZ4g5JHUCWGnWcwm6JjMQqY0unK5RYKHVEW8UJWX+L1D D88ax3vcEZvVIZG2O3Fb9z+YdIKUqyyQ/4iDA2SYLIDeNmpIIWf7207I+JzS551RXpXpuo mc1DScJXBBVWe+NotytCMB0Zvbg7oOFy2sEEk8YuTI3gjLfUZNe1I3wEkS6big== 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 4XGL4p3DQzzhWf; Sat, 28 Sep 2024 21:26:50 +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 48SLQo4c000597; Sat, 28 Sep 2024 21:26:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SLQoDD000594; Sat, 28 Sep 2024 21:26:50 GMT (envelope-from git) Date: Sat, 28 Sep 2024 21:26:50 GMT Message-Id: <202409282126.48SLQoDD000594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 3873b9a8b3a5 - main - mlx4: use is_power_of_2 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3873b9a8b3a51731e5db92ab0c5c59797e416015 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=3873b9a8b3a51731e5db92ab0c5c59797e416015 commit 3873b9a8b3a51731e5db92ab0c5c59797e416015 Author: Doug Moore AuthorDate: 2024-09-28 21:23:17 +0000 Commit: Doug Moore CommitDate: 2024-09-28 21:23:17 +0000 mlx4: use is_power_of_2 It's faster to use is_power_of_2 than it is to compute roundup_power_of_two and then compare. So do that. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46838 --- sys/dev/mlx4/mlx4_core/mlx4_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mlx4/mlx4_core/mlx4_alloc.c b/sys/dev/mlx4/mlx4_core/mlx4_alloc.c index dcf6204dfc1a..fa68625f5ab9 100644 --- a/sys/dev/mlx4/mlx4_core/mlx4_alloc.c +++ b/sys/dev/mlx4/mlx4_core/mlx4_alloc.c @@ -173,7 +173,7 @@ int mlx4_bitmap_init(struct mlx4_bitmap *bitmap, u32 num, u32 mask, u32 reserved_bot, u32 reserved_top) { /* num must be a power of 2 */ - if (num != roundup_pow_of_two(num)) + if (!is_power_of_2(num)) return -EINVAL; bitmap->last = 0; From nobody Sat Sep 28 21:26:51 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 4XGL4r12X0z5XsMZ; Sat, 28 Sep 2024 21:26:52 +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 4XGL4q5Jvtz40xZ; Sat, 28 Sep 2024 21:26:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727558811; 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=Oh7fs6tXbiuJ1dDAJifB+h/jye2B2fQaF43ZasL6/co=; b=m1q0iI2NS1ad67OlTuiYqzZ0qp1OAx1T0hbVB8OsQVigm8MFFAKLZZ4vsnRsL2xl0kdrun 1Frzkb7vYflWmOdUghyA6BdCwC/rRSVhqD638E/P2B7QNncj3sNTp7Cchv/Ogj7ElM2fhU InecwugG/pRxD+YFrjcbQe/1FM+JtbLp08GqiBYLCYyCCibqSqlfFV0ZruOmq5t7d9nOr1 VUFd4B9LqMEJT9HKx+UAgLc0JOaqM0XQRACAiNA+WjATcSrmyfX3Socs+v0K4o2TNcfwax QKEv8ihvkXNOqGSuSPq8MjBTJGN3OIhWiSKjDHSUog55sdQmATdX37/WqicApw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727558811; 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=Oh7fs6tXbiuJ1dDAJifB+h/jye2B2fQaF43ZasL6/co=; b=gdzJz4R7avZUOLF16gPawWangkSLowcOiwSlLGjQEG97nhKSkRe9FLOBvktO8o11WThkRH bpap/Z8vsllU0EgEhDFRI2mKpxpWpn0nQPg7IrjFeE1dP3+i5zSX9JtvZ/8IUQ++IId/Pc T5mM+QtRY6/VwtujemdUIdpYWdlxK8wQbDzR/ukFt2Wqzm7SMjO1jTkXgfS5ixYD6EphbJ btM0FzMtCevQwlZ7War8FIU8qMLieRFSKts7w4u+YDYB1N7eIUjz9j2UjHfK6BMz3Yj/oD 9l2/F2kGkMwB0a0zT+2sO18S6Vl2CfwzGwWKgjpRPrxoVe5rRxEocYfXoMapZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727558811; a=rsa-sha256; cv=none; b=GN5lmu0z6OLW2wk8vPPj3AqXwrIN6MYHH8pUlnGhHyQfgb8IFw7P3yWqYwehuNqc1ExKaj yqEHRAnkR+nzXQ7AVC0g90AbTmmuvbiBBmUS348vYjIQm0nMsXcvLD4hEgdhX2Yiexz/Bk WeEYCLHXNchzkry58SsNJrtN1XzUf3fOKzhHXkJJ5a3e1CR0cO7yMfsTo+rcCni/dkZSgs 02FdgSPlZQNOfiKBdP4yDyGpNRdkuIvFY0gYT17Z7j/v7kU30HelrdNkfbJfsSb2RsADjg 9e8NfR9wDi1qfg4fQ1VXqyeKuCiF0qi8vhTRB+OJhlBrYlpjNxG3WGFiYKeRKA== 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 4XGL4q4g9Hzh7b; Sat, 28 Sep 2024 21:26:51 +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 48SLQpkQ000636; Sat, 28 Sep 2024 21:26:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SLQpMd000633; Sat, 28 Sep 2024 21:26:51 GMT (envelope-from git) Date: Sat, 28 Sep 2024 21:26:51 GMT Message-Id: <202409282126.48SLQpMd000633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 5a5da24fc85a - main - mlx5: optimize ilog2 calculation 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a5da24fc85aa7711eed8f3e303c0cf6f5ebcca4 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=5a5da24fc85aa7711eed8f3e303c0cf6f5ebcca4 commit 5a5da24fc85aa7711eed8f3e303c0cf6f5ebcca4 Author: Doug Moore AuthorDate: 2024-09-28 21:24:44 +0000 Commit: Doug Moore CommitDate: 2024-09-28 21:24:44 +0000 mlx5: optimize ilog2 calculation Rather than compute ilog2(roundup_pow_of_two(x)), which invokes ilog2 twice, just use order_base_2 once. And employ that optimization twice. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46838 --- sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c index bd06e531531b..9428e6ece3a4 100644 --- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c +++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_mem.c @@ -78,10 +78,10 @@ void mlx5_ib_cont_pages(struct ib_umem *umem, u64 addr, } if (i) { - m = min_t(unsigned long, ilog2(roundup_pow_of_two(i)), m); + m = min_t(unsigned long, order_base_2(i), m); if (order) - *order = ilog2(roundup_pow_of_two(i) >> m); + *order = order_base_2(i) - m; *ncont = DIV_ROUND_UP(i, (1 << m)); } else { From nobody Sat Sep 28 21:47:46 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 4XGLXy1jCtz5XtR2; Sat, 28 Sep 2024 21:47:46 +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 4XGLXy1BjHz43y8; Sat, 28 Sep 2024 21:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560066; 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=soClXItNKGZ0U+ST0i+lvDk93HyX4vfu8E4Jl+VhmrY=; b=msnMutnaBz9y/rjJh34DkjgNEYoo7DNlQ7npA0jEtKVbrQz2DndBwXxOpUOLdVwL9ySuqB JK49/AzRHFaV+2ov85yYmzK1i+t3rAc47/2dF+jBlq27elx8FNUCCCD7o9Lfn867gtFzPu suyG9OKc4I8SAROm4FDHMum3Gzo86WyvI+CFv4bdHTJ8eV9kkZ67H2Yp0KU4jeWUqINCEF l/oDtdH+53OAOIHezVpCBnbNzeF07fmblxoIOU99VJZyrb+QFXzgZNonJwfggcNc4UjBSm Dyzk8MdZHEMilUWjw3xvjlg7nJeKZPCqkPqRPBW382KUy2nJHCnIpORxC05FyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560066; 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=soClXItNKGZ0U+ST0i+lvDk93HyX4vfu8E4Jl+VhmrY=; b=Foo1XnYUGeo5ozFIX49nnjHGEkXt56bJOE1GtjNfgDgramTUAGMF56yIYm1sKjyXBACgAX GvYNX16AWaWrxnJyN/YnzD6cu2++ehfPbGFb4Tu4m18X4L3EubkmjhlNAMyQCqcwvTb88c U+TUcI53kKLIEPApv14jLxduIFWFFCDfL04w07h+9PRf96u3S0Kv6yxP+aLzMsS0KrXk2A XSfLLBasimnTPom0Ewa7ISS5JwFN9X3qDEkBQl4QJCFZRcEg7Fy9D2sAD0AeANyobJIiuO 8TRX9aHatlDwvBDIDaUYgD0ee2u+mpeKXf29gcwKHKNN25pir+jdTkRsZVhJOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727560066; a=rsa-sha256; cv=none; b=Hy8GY+YLuMaITPPOHnfSl6cjE1FgnzOSIaERfFIwexpbRvjo3C9hwt4OsY5gf/euoOKOGw u2v8kfwFNw9qZyoGZ5igjqfUEOkIiUMhtWJDCYYkT51DO2k+sjHI4igd8yRfme8gSlm0p/ iBgOkwedCkuuOWLgAM2GRZIti4BiCt+GZRw7r1Eap5iwDSJVTM4Sf60WXKppDE9wvCPQn0 wNLIrUrFrDf6PjwqMj2rwmnIjXfQtiHg33y4KRq8WvGGwr7PAEhm1pg8xFqhI+ZYLtji2D EonUTzU99t5nzuaaWKOPlVYXpA+tVnTuQOp+b8GMOHhGV1upPTMUI5WLQLtt7Q== 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 4XGLXy0ngxzj3K; Sat, 28 Sep 2024 21:47:46 +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 48SLlkEe035765; Sat, 28 Sep 2024 21:47:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SLlkXm035762; Sat, 28 Sep 2024 21:47:46 GMT (envelope-from git) Date: Sat, 28 Sep 2024 21:47:46 GMT Message-Id: <202409282147.48SLlkXm035762@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 76c60597fa2a - main - swap_pager: use vm_page_iterators for lookup 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76c60597fa2af9ec5b5a24305794b70ad1530755 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=76c60597fa2af9ec5b5a24305794b70ad1530755 commit 76c60597fa2af9ec5b5a24305794b70ad1530755 Author: Doug Moore AuthorDate: 2024-09-28 21:46:40 +0000 Commit: Doug Moore CommitDate: 2024-09-28 21:46:40 +0000 swap_pager: use vm_page_iterators for lookup Replace the use of page lookups and page next pointers in swap_pager.c with vm_page iterators. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46704 --- sys/vm/swap_pager.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index aa0297daefe9..fbf2967aaf17 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1856,6 +1856,7 @@ swap_pager_swapped_pages(vm_object_t object) static void swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) { + struct pctrie_iter pages; struct page_range range; struct swblk *sb; vm_page_t m; @@ -1870,6 +1871,7 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) pi = 0; i = 0; + vm_page_iter_init(&pages, object); swp_pager_init_freerange(&range); for (;;) { if (i == 0 && (object->flags & OBJ_DEAD) != 0) { @@ -1896,7 +1898,6 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) if (sb == NULL) break; sb_empty = true; - m = NULL; } /* Skip an invalid block. */ @@ -1904,7 +1905,6 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) if (blk == SWAPBLK_NONE || !swp_pager_isondev(blk, sp)) { if (blk != SWAPBLK_NONE) sb_empty = false; - m = NULL; i++; continue; } @@ -1913,8 +1913,7 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) * Look for a page corresponding to this block, If the found * page has pending operations, sleep and restart the scan. */ - m = m != NULL ? vm_page_next(m) : - vm_page_lookup(object, sb->p + i); + m = vm_page_iter_lookup(&pages, sb->p + i); if (m != NULL && (m->oflags & VPO_SWAPINPROG) != 0) { m->oflags |= VPO_SWAPSLEEP; VM_OBJECT_SLEEP(object, &object->handle, PSWP, "swpoff", @@ -2272,6 +2271,7 @@ static void swp_pager_meta_free(vm_object_t object, vm_pindex_t pindex, vm_pindex_t count, vm_size_t *freed) { + struct pctrie_iter pages; struct page_range range; struct swblk *sb; vm_page_t m; @@ -2282,11 +2282,11 @@ swp_pager_meta_free(vm_object_t object, vm_pindex_t pindex, vm_pindex_t count, VM_OBJECT_ASSERT_WLOCKED(object); fc = 0; - m = NULL; if (count == 0 || swblk_is_empty(object)) goto out; swp_pager_init_freerange(&range); + vm_page_iter_init(&pages, object); last = pindex + count; sb = swblk_start_limit(object, pindex, last); start = (sb != NULL && sb->p < pindex) ? pindex - sb->p : 0; @@ -2298,9 +2298,7 @@ swp_pager_meta_free(vm_object_t object, vm_pindex_t pindex, vm_pindex_t count, continue; swp_pager_update_freerange(&range, sb->d[i]); if (freed != NULL) { - m = (m != NULL && m->pindex == sb->p + i - 1) ? - vm_page_next(m) : - vm_page_lookup(object, sb->p + i); + m = vm_page_iter_lookup(&pages, sb->p + i); if (m == NULL || vm_page_none_valid(m)) fc++; } From nobody Sat Sep 28 21:52:11 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 4XGLf35ZXZz5Xtcf; Sat, 28 Sep 2024 21:52:11 +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 4XGLf356tcz44QM; Sat, 28 Sep 2024 21:52:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560331; 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=f7JcX1nxkQnCj12J8qZF95cUikg+kEvbRs+Edo8hDQI=; b=NM7vGQVFIthi8LnljmLyXvGMGhBDNGeU49UBDgf57y1VmJ2rWH3EtEbW52VlYb3q4DCxF1 T6MsBVfFeROZM4iYNpsqonO5ETZjZOfW41YLUshf5P9m0sETvReHqGdNd5F4dC3lDP6+Tx rZ5IOuAbbtKM81/kA7Vtlx7eIcxKYSOMIl+dGMewXEFyivPGi7yy50Y55BEbip3r+AgG5Q K84QED593DkL6erFWXNszOqwAczKlaXGFBplfDaZVoZk363Yuou6reEQCC71S6fFqbvuEC 2jiGYJb1+d8A3wLKF8fDHS7kPQyGzcHMtXGPy/E/zEWpDgXrs9DrxPXduKvWrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560331; 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=f7JcX1nxkQnCj12J8qZF95cUikg+kEvbRs+Edo8hDQI=; b=VL8kvJt5TYMi75PDBBAkytw6ss6Q5A/VGQGAgl7TNSAWlD9Q7vzqUUbeLrKuvL3vjBRiON ofZlH5gbQC2ZP1DDKwyR2antTZ1P64jfpZjNrna3TY/QJBEWW4fAOUlU7D10G2i53L44OE 9wpbf33Mi2+3xrpcNFf+F3++KSp0lF35FDPTS5YDbBN8ONReSM5FqS7J25QfBFWJqMPxhY 9u43haQex71avKN5iOkQu2X7hzdbDtbNdFOo2uK5e2g1B7mZ7BRyUopTX2M+SpZzowUcnB m0NjHHnZNL5ojz3UD95reWi+KkUjRt2xKBw9S9dXXvQMdeP/dq+KpzzVBgansQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727560331; a=rsa-sha256; cv=none; b=FL2kGUVPC7Wz/60inqG9AByOcw2CNcGUKt5Rnc4+6VhbX7aFH/AOtUZfFwjVhWpB7S87LW c8scXsKs0jhd626hpfXIariIXlBeA+oGVLQI8szi1JOCNJrBBXacBvj5bhmJGI4yAv+I1E KM8k1j87lx4bzHsXlG5Z3PbbVJwJ4Z9qp6ye1AbrJwgpUe1qIpsXUYzN8sHWdx5DPydTET N8QLa9dO6aTG9uLQIx6BzM+roVtsZUfYIVFcgBNDS3rPjeah/cHLUs/1GSLQ9USVPblMGr HN3pweCrfehUtRW8Zf4ffUm7I4nBXFy8l/mc5+Gut4MimYrCO+C2gxEfo5vKyA== 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 4XGLf34ksczjLF; Sat, 28 Sep 2024 21:52:11 +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 48SLqBpL051208; Sat, 28 Sep 2024 21:52:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SLqBfX051205; Sat, 28 Sep 2024 21:52:11 GMT (envelope-from git) Date: Sat, 28 Sep 2024 21:52:11 GMT Message-Id: <202409282152.48SLqBfX051205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: e131c310c697 - stable/13 - libc/getnameinfo: stop adding NI_NUMERICHOST where inappropriate 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e131c310c697aea2106728a7619cd0d41ba0d9ff Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e131c310c697aea2106728a7619cd0d41ba0d9ff commit e131c310c697aea2106728a7619cd0d41ba0d9ff Author: Bjoern A. Zeeb AuthorDate: 2024-06-10 11:34:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 11:07:44 +0000 libc/getnameinfo: stop adding NI_NUMERICHOST where inappropriate Checking the first nibble of the IPv6 address to be 0 and then excluding two well known cases (v4-mapped, loopback) leaves us with more cases where the first nibble could be 0, e.g., the RFC 6052, 2.1 Well-Known Prefix 64:ff9b::/96. It is not practical to track them all and it is not clear what lead to this special casing originally, so remove them. While here also remove the IN6_IS_ADDR_LINKLOCAL() + NI_NUMERICHOST case as link-local address resolution does exist. We do leave the IN6_IS_ADDR_MULTICAST() case for now as I could not find any references to any official reverse lookups for these. Adding comments for more case (and some historic behaviour) in order to make it easier to follow the logic. PR: 279618 Fixes: 6cb9418289f90 Reviewed by: hrs Differential Revision: https://reviews.freebsd.org/D45547 (cherry picked from commit c179937b986ec3959d89bfeb8eed0a6f58a28649) --- lib/libc/net/getnameinfo.c | 54 +++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/lib/libc/net/getnameinfo.c b/lib/libc/net/getnameinfo.c index 7ef7fe64e961..fcd9c71051d6 100644 --- a/lib/libc/net/getnameinfo.c +++ b/lib/libc/net/getnameinfo.c @@ -230,24 +230,44 @@ getnameinfo_inet(const struct afd *afd, case AF_INET6: { const struct sockaddr_in6 *sin6; + sin6 = (const struct sockaddr_in6 *)sa; - switch (sin6->sin6_addr.s6_addr[0]) { - case 0x00: - if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) - ; - else if (IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr)) - ; - else - flags |= NI_NUMERICHOST; - break; - default: - if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) { - flags |= NI_NUMERICHOST; - } - else if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) - flags |= NI_NUMERICHOST; - break; - } + + /* + * https://pubs.opengroup.org/onlinepubs/9699919799/functions/getnameinfo.html + * "[IP6] [Option Start] If the socket address structure + * contains an IPv4-mapped IPv6 address or an IPv4-compatible + * IPv6 address, the implementation shall extract the embedded + * IPv4 address and lookup the node name for that IPv4 address. + * [Option End]" + * => getipnodebyaddr() handles this case for us. + * => in case of NI_NUMERICHOST being set, inet_ntop[6] will + * handle it too. + * + * "If the address is the IPv6 unspecified address ( "::" ), + * a lookup shall not be performed and the behavior shall be + * the same as when the node's name cannot be located." + * => getipnodebyaddr() handles this case for us. + * => in case of NI_NUMERICHOST being set, + * ip6_parsenumeric() -> inet_ntop[6] will handle it too. + */ + + /* + * We used to exclude link-local from lookups. + * Even though calles in the resolver chain may not (yet) + * properly deal with them, we no longer do as for link-local + * there is a path to resolve these. See: + * RFC 6303 4.5. IPv6 Link-Local Addresses + * RFC 6762 4. Reverse Address Mapping + * + * XXX For IPv6 MC the only reference found was + * https://www.ietf.org/archive/id/draft-michaelson-as112-ipv6-02.html + * but there are also no "empty zone"s for x.0.f.f.ip6.arpa + * in DNS servers. Keep catching it here for now and + * do not attempt name resolution but return the address string. + */ + if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) + flags |= NI_NUMERICHOST; } break; #endif From nobody Sat Sep 28 21:52:12 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 4XGLf50c3Nz5Xtcg; Sat, 28 Sep 2024 21:52:13 +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 4XGLf45qjyz44ky; Sat, 28 Sep 2024 21:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560332; 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=nxiw/HH3wuhg5NVNZZs4RnR3MN3LbDc+H9+DHjrFzCk=; b=H3svt7BrZkRutJBLCeS9R9Li1iZRolf58q7xDQex4Fj4/fizFEQES7ebljLnUQO1nepCYi Q/nWRMNvbAvdbcWhg0HdVKAIR/4EZL0d38rKk2o4y9ZK8iFt8ffQufjgDAQwha554hSNUC nmo3W04cYlkAv2G4KopfhijS9/rjEWPwSJd9hS0WQuUOwRrFKlkXEJkMAkIHG8zPMgmDZn 33d1NQrIu4hy3FKQv7jHTgycF3k0HFSOUnIcW3OMF3yNwT7t/QFb8jz6q/uUmn2lZVwgTB g6hMTASRqKtTNvuf0MJ6EJPdUgmskglHOc5/heaZEyZ97NM+5hnXCa2YzkxXRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560332; 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=nxiw/HH3wuhg5NVNZZs4RnR3MN3LbDc+H9+DHjrFzCk=; b=ZS8TbMkv3yt85QZJdYKL6EWMEANmnVfaSMkzBNj1euMN83HG6wx/zzlAefkGe896L0GkD4 ziXwYOdzPt3SDKmuLuwBVZU5aSHhLdUE/1x1VNadyB2nBDyoNYUOihxDKiTeE+kEDdbX6e Q5OEiaVIKoMy/ij+/Z3YvW7c13Wrdhf0lIMvgLqUNXcB6jDU94FN2VQFTXf9aZ1XEJY1SU b8yfok7ivZ+a6G7YolKPBKu0CqhpORCIuFsWrYd297cYrn2+3ilFO7C/5Mx8PV34cSV2vH LkPoS5Ednb4iyGCc6HRe/wD3AC4hsf8s1JNLk/04iQceSIO+OzllcNge1jwAWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727560332; a=rsa-sha256; cv=none; b=fS02juls69dwaB8E4dOSQGu8B7Wjztf/0v1mkvlUQdy8i8124myuJXjOJSk92jKkxwBN57 FB8aeIKSUxaR3WWSCMBRY/Zer+gBDmrWxatVALzVyKfYim1C00c3v1QIDT2eb73NKgsF7f qBc33aCX4dcM0x5cbRvLtmLM4Jii5GDqFBiEekVb2laizdM2uiXptXS8Krs3b9LB7xx6Qb 8mhXI5MzDpULd82ioAP453wBo9+mCe+gZC6H5rfFMi20UEkS5hdh3WvPRlyddy1IsooGtB ejcY1BLXcNGFPTSIIVF9Yk+RVdrtjSMwX9e25vuoEQnlY8SHFuU9xRKXwN3n8g== 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 4XGLf45SBKzhmK; Sat, 28 Sep 2024 21:52:12 +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 48SLqC3E051496; Sat, 28 Sep 2024 21:52:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SLqC6x051493; Sat, 28 Sep 2024 21:52:12 GMT (envelope-from git) Date: Sat, 28 Sep 2024 21:52:12 GMT Message-Id: <202409282152.48SLqC6x051493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 267ad286efd8 - stable/13 - rc: network.subr update consitency with older change (v6/v4 order) 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 267ad286efd8454e08916e0bb30f76954100d379 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=267ad286efd8454e08916e0bb30f76954100d379 commit 267ad286efd8454e08916e0bb30f76954100d379 Author: Bjoern A. Zeeb AuthorDate: 2024-09-04 19:03:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 11:07:58 +0000 rc: network.subr update consitency with older change (v6/v4 order) As of 1b5be7204eaeeaf58eefdebe5b308f90792c693b we setup parts of IPv6 before IPv4 if configured. For consistency change a case in ifn_start() calling ipv6_up() before ipv4_up() and reverse in ifn_stop(). Reviewed by: zlei Differential Revision: https://reviews.freebsd.org/D33426 (cherry picked from commit ed4d2a54fc7a0397c2042f496f176305ca03ebdd) --- libexec/rc/network.subr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/network.subr b/libexec/rc/network.subr index 257643f48ba5..931fbec19a60 100644 --- a/libexec/rc/network.subr +++ b/libexec/rc/network.subr @@ -46,8 +46,8 @@ ifn_start() ifscript_up ${ifn} && cfg=0 ifconfig_up ${ifn} && cfg=0 if ! noafif $ifn; then - afexists inet && ipv4_up ${ifn} && cfg=0 afexists inet6 && ipv6_up ${ifn} && cfg=0 + afexists inet && ipv4_up ${ifn} && cfg=0 fi childif_create ${ifn} && cfg=0 @@ -67,8 +67,8 @@ ifn_stop() [ -z "$ifn" ] && err 1 "ifn_stop called without an interface" if ! noafif $ifn; then - afexists inet6 && ipv6_down ${ifn} && cfg=0 afexists inet && ipv4_down ${ifn} && cfg=0 + afexists inet6 && ipv6_down ${ifn} && cfg=0 fi ifconfig_down ${ifn} && cfg=0 ifscript_down ${ifn} && cfg=0 From nobody Sat Sep 28 21:52:13 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 4XGLf62fqXz5Xtcm; Sat, 28 Sep 2024 21:52:14 +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 4XGLf60QQvz44YR; Sat, 28 Sep 2024 21:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560334; 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=oN0bmZBOQEbTHom5ufBX5rOftmRKyOb9f0DhkbhS71k=; b=dUxL+VepUhYBXq32rpoPeywUlO0ekqFvIdehV6v4oeFpZcX0rYsL+Bk1s7xDon/XXCinAo zaBdbQLfhJgC/XHe3emA8EE7wObad5dsOQTkCnBds30p+nK2aWWyzi3n0+JfUbGOLIdptA 9bQAaCNfh41636oPv/82okU2EjLsxIccec+sNe6cu4m21JYRW6A2YKBIAEWiGyrKVOYFDz 9kGe1fnCb+q4c+dPAx3ELTYASJvXSo9LkOQdGLrW0N/l8n2T843F5B75olFuQ5lJDR3+Qh B3hnofZB+3SPtFAgaCMc7vfN/QaCy5giqCmkaZ+1e5ALhNIs7R5bo9JUkRkDEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560334; 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=oN0bmZBOQEbTHom5ufBX5rOftmRKyOb9f0DhkbhS71k=; b=A2oWRh6zHP07kHNy4nvZN1dkOAOAYE7KIVOWwBMQ+8qIWF+GAB9/4kKgCjk7IXlHDFkDOQ 1BX8M1t6DMGMuMBj+Ee8JlSb6UIp0h0yhoVacntF/TxF5JrA7cHy80wHumAenebuCRwP8R GxfGxwRxpPZNbRUv5tTzprQOvNiZAGqc2r8VS7IuvTb+q/d/geXmeXnSquu5siof9ZmcOw IVIP5HnpCzsQUF6bvtogotj9aIUWPo1+TXNBalv25do/xkDHihF4NPuBJwVtPF58VaZ7Ek ykqsl4xoU/q8Y5sm/2/ydJLTIU+8Md+4A9EkZFL+pZeQ5DZTaqelwANawZGphA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727560334; a=rsa-sha256; cv=none; b=sj3jBeIrfEmEme/ICA/LaaRJ0eCMQMq+IM8ZpppHPu01GY0UfqKoBvJ6IDChZVfCKNY0Zx 5EDzbaIoLv3uLfzTrMKUt4wTTIyBpr74uWxQwl8hqwZe5kUWjmUBI7zPop40yE8PQGvXwD 04t8EViHlPVpXdxAnPort9nc3VMK2zPmiOhRZBm27kxOHBpacDvqT9Q5a8C0cFVEjSjuTQ oMVFqoBDWeKwr0lvYjNX5mnbElgnIx4Mq77MdVYoEK+XLvdconvQB15LSIf4x9sGpGw/Wx bJvNYRL+R3vSvzroKwc6xzAm5w9wTDt4DG4t4AUqB4KY9aLfMPnnBB1buJb7lQ== 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 4XGLf56mKLzjLH; Sat, 28 Sep 2024 21:52:13 +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 48SLqD7X051546; Sat, 28 Sep 2024 21:52:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SLqDju051543; Sat, 28 Sep 2024 21:52:13 GMT (envelope-from git) Date: Sat, 28 Sep 2024 21:52:13 GMT Message-Id: <202409282152.48SLqDju051543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 0f629ec68f19 - stable/13 - mmccam: fix mmcsd disk aliases 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0f629ec68f19415ce0d0651df9fb18cf8eb003ae Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0f629ec68f19415ce0d0651df9fb18cf8eb003ae commit 0f629ec68f19415ce0d0651df9fb18cf8eb003ae Author: Bjoern A. Zeeb AuthorDate: 2024-01-21 19:56:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 11:08:04 +0000 mmccam: fix mmcsd disk aliases For EXT_CSD_PART_CONFIG_ACC_BOOT and possibly others with suffixes we fail to create proper disk aliases (symlinks), which shows up as g_dev_taste: make_dev_alias_p() failed (name=mmcsd0, error=17) In this case we ended up with the followng two: /dev/mmcsd0 -> sdda0 /dev/mmcsd1 -> sdda0boot1 Note that (i) it should be mmcsd0boot1 and not mmcsd1 and that (ii) there is no mmcsd0boot0 (failed above as it tried to create a second mmcsd0). Adjust the code (using a highly simplified version--compared to my original approach--suggested by imp) using an extended format string with (sdda/mmcsd) prefix as first argument to create proper names. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43538 (cherry picked from commit a84d91d81a6f3eeb4949c4fb3440e0634f2b953a) --- sys/cam/mmc/mmc_da.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c index 7400f2387add..18d686735082 100644 --- a/sys/cam/mmc/mmc_da.c +++ b/sys/cam/mmc/mmc_da.c @@ -89,9 +89,11 @@ typedef enum { SDDA_STATE_PART_SWITCH, } sdda_state; -#define SDDA_FMT_BOOT "sdda%dboot" -#define SDDA_FMT_GP "sdda%dgp" -#define SDDA_FMT_RPMB "sdda%drpmb" +/* Purposefully ignore a '%d' argument to snprintf in SDDA_FMT! */ +#define SDDA_FMT "%s" +#define SDDA_FMT_BOOT "%s%dboot" +#define SDDA_FMT_GP "%s%dgp" +#define SDDA_FMT_RPMB "%s%drpmb" #define SDDA_LABEL_ENH "enh" #define SDDA_PART_NAMELEN (16 + 1) @@ -1480,7 +1482,7 @@ finish_hs_tests: sdda_process_mmc_partitions(periph, start_ccb); } else if (mmcp->card_features & CARD_FEATURE_MEMORY) { /* For SD[HC] cards, just add one partition that is the whole card */ - if (sdda_add_part(periph, 0, "sdda", + if (sdda_add_part(periph, 0, SDDA_FMT, periph->unit_number, mmc_get_media_size(periph), sdda_get_read_only(periph, start_ccb)) == false) @@ -1525,7 +1527,7 @@ sdda_add_part(struct cam_periph *periph, u_int type, const char *name, part->type = type; part->ro = ro; part->sc = sc; - snprintf(part->name, sizeof(part->name), name, periph->unit_number); + snprintf(part->name, sizeof(part->name), name, "sdda", periph->unit_number); /* * Due to the nature of RPMB partition it doesn't make much sense @@ -1592,8 +1594,11 @@ sdda_add_part(struct cam_periph *periph, u_int type, const char *name, part->disk->d_fwsectors = 0; part->disk->d_fwheads = 0; - if (sdda_mmcsd_compat) - disk_add_alias(part->disk, "mmcsd"); + if (sdda_mmcsd_compat) { + char cname[SDDA_PART_NAMELEN]; /* This equals the mmcsd namelen. */ + snprintf(cname, sizeof(cname), name, "mmcsd", periph->unit_number); + disk_add_alias(part->disk, cname); + } /* * Acquire a reference to the periph before we register with GEOM. @@ -1682,7 +1687,7 @@ sdda_process_mmc_partitions(struct cam_periph *periph, union ccb *ccb) * data area in case partitions are supported. */ ro = sdda_get_read_only(periph, ccb); - sdda_add_part(periph, EXT_CSD_PART_CONFIG_ACC_DEFAULT, "sdda", + sdda_add_part(periph, EXT_CSD_PART_CONFIG_ACC_DEFAULT, SDDA_FMT, periph->unit_number, mmc_get_media_size(periph), ro); sc->part_curr = EXT_CSD_PART_CONFIG_ACC_DEFAULT; From nobody Sat Sep 28 21:52:14 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 4XGLf737kFz5XtfN; Sat, 28 Sep 2024 21:52:15 +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 4XGLf713qkz44nQ; Sat, 28 Sep 2024 21:52:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560335; 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=lEK0vnUZSALcac3zPYOhq8eVQEMX5ggo7/yzo3jOhHo=; b=at8l2ytETIl/V+aeRYJDcjo1qb1khq8v5hNCrDmcgh0Vxhs3nku4ZkpWVDiyQ2pTMEWNeG klWtifewvcRNhDhUEsEL8xrLrgdzBaBnXQPRzivcaHHlrtBtSf8C+s2Qo5CBFJikBEPDAV JGsaKmNQEiByh9ioBZJuv71FHUM39Xq/Jp54xg6kkRXzOTwPofEMWm8yRk9yX7eVxjFXpv myJnIvTaMdYOzFHXvr459l0Wm0SYdHUIdSsRwslhedMNR7TG0dvO3rl20Sd5AOPC5I2uEa fwV1Ke3Z084JsazAzPdH23zCP/9XrTDSzyApbo6zEARw5B9uERMlm4FcHyhUUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560335; 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=lEK0vnUZSALcac3zPYOhq8eVQEMX5ggo7/yzo3jOhHo=; b=hozK1C6JqSRqruGiqk81tRdga0ci0Ms4eGYa+reZvLAxumU6vqaf07MAduiWIoGei1qjcU OIaJFckV2KOiVqMCM8kKFXe0Buxwv2iwca8Pq3n7ndmF9cgpEb1uSZc4D6E4LoBl4P+VdG XueljWccCL1GzAVZPh829X4ZHDD2hjeus4OlRT6DV5qXLVFCC4Dnkwn/kadqPFvodG6cR1 rVUcH4egqTJwugEcphbhR7/hZzV0iIywc+2U3FZXyv+QGj3dFF20zynx5u/mGnTcO4UPxN b6IZX9NYrYvDLp8XBF5wRUpMzEH9IyjShBbolfXICngXgs2m0i8M68S4ROLlHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727560335; a=rsa-sha256; cv=none; b=Ol0t+QmxB5NFJU9ACqx+SkjlOznYNYZ3h7boeufh4bCDw1aBOKhziL9ohSHwpRScYx6MMF rhhDOil/o3nadSQ/DDi/3EzAx2y+8CnTBU99LZnT8+eEbk3TDvK85EwzXjKKG+WcS6Qugx 0ADD1H6cq0uFnSgt8jW+Bmqgd4MbaFQdlL/jzlMlIk2NezjnjoUsvAymJ6hDwSgZenbCWv uIPpNSIeguep9fUNey1nFIgTqjkTfwiHVI5gWpQcWqBO1Bl8aAbXkHXbDNbTsEyt7PIwIT 6CDMrN36zfREGxrA0ZiEPnxSAxiUELGVUhYuU94xw4TBJPAiRRpndQYWDwmYnw== 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 4XGLf70YYnzjLJ; Sat, 28 Sep 2024 21:52:15 +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 48SLqEW6051598; Sat, 28 Sep 2024 21:52:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SLqEds051595; Sat, 28 Sep 2024 21:52:14 GMT (envelope-from git) Date: Sat, 28 Sep 2024 21:52:14 GMT Message-Id: <202409282152.48SLqEds051595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: d2587a699e37 - stable/13 - malloc(9): extend contigmalloc(9) by a "slab cookie" 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d2587a699e37868909b279b109bb0a379c077c5b Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d2587a699e37868909b279b109bb0a379c077c5b commit d2587a699e37868909b279b109bb0a379c077c5b Author: Bjoern A. Zeeb AuthorDate: 2024-06-30 19:00:44 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 18:39:34 +0000 malloc(9): extend contigmalloc(9) by a "slab cookie" Extend kern_malloc.c internals to also cover contigmalloc(9) by a "slab cookie" and not just malloc/malloc_large. This allows us to call free(9) even on contigmalloc(9) addresses and deprecate contigfree(9). Update the contigmalloc(9) man page accordingly. The way this is done (free(9) working for contigmalloc) will hide the UMA/VM bits from a consumer which may otherwise need to know whether the original allocation was by malloc or contigmalloc by looking at the cookie (likely via an accessor function). This simplifies the implementation of consumers of mixed environments a lot. This is preliminary work to allow LinuxKPI to be adjusted to better play by the rules Linux puts out for various allocations. Most of this was described/explained to me by jhb. One may observe that realloc(9) is currently unchanged (and contrary to [contig]malloc/[contig]free an implementation may need access the "slab cookie" information given it will likely be implementation dependent which allocation type to use if size changes beyond the usable size of the initial allocation). Described by: jhb Sponsored by: The FreeBSD Foundation Reviewed by: markj, kib Differential Revision: https://reviews.freebsd.org/D45812 (cherry picked from commit 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b) --- share/man/man9/contigmalloc.9 | 9 ++- sys/kern/kern_malloc.c | 128 +++++++++++++++++++++++++++++++++--------- 2 files changed, 108 insertions(+), 29 deletions(-) diff --git a/share/man/man9/contigmalloc.9 b/share/man/man9/contigmalloc.9 index f52cb7bde0ed..9e7086885870 100644 --- a/share/man/man9/contigmalloc.9 +++ b/share/man/man9/contigmalloc.9 @@ -23,7 +23,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 30, 2018 +.Dd July 22, 2024 .Dt CONTIGMALLOC 9 .Os .Sh NAME @@ -113,6 +113,13 @@ function deallocates memory allocated by a previous call to .Fn contigmalloc or .Fn contigmalloc_domainset . +Its use is deprecated in favor of +.Xr free 9 +which no longer requires the caller to know the +.Fa size +and also accepts +.Dv NULL +as an address. .Sh IMPLEMENTATION NOTES The .Fn contigmalloc diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 0720c36740ee..1a00e184c83f 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -117,6 +117,16 @@ dtrace_malloc_probe_func_t __read_mostly dtrace_malloc_probe; #define DEBUG_REDZONE_ARG #endif +typedef enum { + SLAB_COOKIE_SLAB_PTR = 0x0, + SLAB_COOKIE_MALLOC_LARGE = 0x1, + SLAB_COOKIE_CONTIG_MALLOC = 0x2, +} slab_cookie_t; +#define SLAB_COOKIE_MASK 0x3 +#define SLAB_COOKIE_SHIFT 2 +#define GET_SLAB_COOKIE(_slab) \ + ((slab_cookie_t)(uintptr_t)(_slab) & SLAB_COOKIE_MASK) + /* * When realloc() is called, if the new size is sufficiently smaller than * the old size, realloc() will allocate a new, smaller block to avoid @@ -452,6 +462,21 @@ malloc_type_freed(struct malloc_type *mtp, unsigned long size) * If M_NOWAIT is set, this routine will not block and return NULL if * the allocation fails. */ +#define IS_CONTIG_MALLOC(_slab) \ + (GET_SLAB_COOKIE(_slab) == SLAB_COOKIE_CONTIG_MALLOC) +#define CONTIG_MALLOC_SLAB(_size) \ + ((void *)(((_size) << SLAB_COOKIE_SHIFT) | SLAB_COOKIE_CONTIG_MALLOC)) +static inline size_t +contigmalloc_size(uma_slab_t slab) +{ + uintptr_t va; + + KASSERT(IS_CONTIG_MALLOC(slab), + ("%s: called on non-contigmalloc allocation: %p", __func__, slab)); + va = (uintptr_t)slab; + return (va >> SLAB_COOKIE_SHIFT); +} + void * contigmalloc(unsigned long size, struct malloc_type *type, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, @@ -461,8 +486,11 @@ contigmalloc(unsigned long size, struct malloc_type *type, int flags, ret = (void *)kmem_alloc_contig(size, flags, low, high, alignment, boundary, VM_MEMATTR_DEFAULT); - if (ret != NULL) + if (ret != NULL) { + /* Use low bits unused for slab pointers. */ + vsetzoneslab((uintptr_t)ret, NULL, CONTIG_MALLOC_SLAB(size)); malloc_type_allocated(type, round_page(size)); + } return (ret); } @@ -475,25 +503,28 @@ contigmalloc_domainset(unsigned long size, struct malloc_type *type, ret = (void *)kmem_alloc_contig_domainset(ds, size, flags, low, high, alignment, boundary, VM_MEMATTR_DEFAULT); - if (ret != NULL) + if (ret != NULL) { + /* Use low bits unused for slab pointers. */ + vsetzoneslab((uintptr_t)ret, NULL, CONTIG_MALLOC_SLAB(size)); malloc_type_allocated(type, round_page(size)); + } return (ret); } /* - * contigfree: + * contigfree (deprecated). * * Free a block of memory allocated by contigmalloc. * * This routine may not block. */ void -contigfree(void *addr, unsigned long size, struct malloc_type *type) +contigfree(void *addr, unsigned long size __unused, struct malloc_type *type) { - - kmem_free((vm_offset_t)addr, size); - malloc_type_freed(type, round_page(size)); + free(addr, type); } +#undef IS_CONTIG_MALLOC +#undef CONTIG_MALLOC_SLAB #ifdef MALLOC_DEBUG static int @@ -563,22 +594,19 @@ malloc_dbg(caddr_t *vap, size_t *sizep, struct malloc_type *mtp, /* * Handle large allocations and frees by using kmem_malloc directly. */ -static inline bool -malloc_large_slab(uma_slab_t slab) -{ - uintptr_t va; - - va = (uintptr_t)slab; - return ((va & 1) != 0); -} - +#define IS_MALLOC_LARGE(_slab) \ + (GET_SLAB_COOKIE(_slab) == SLAB_COOKIE_MALLOC_LARGE) +#define MALLOC_LARGE_SLAB(_size) \ + ((void *)(((_size) << SLAB_COOKIE_SHIFT) | SLAB_COOKIE_MALLOC_LARGE)) static inline size_t malloc_large_size(uma_slab_t slab) { uintptr_t va; va = (uintptr_t)slab; - return (va >> 1); + KASSERT(IS_MALLOC_LARGE(slab), + ("%s: called on non-malloc_large allocation: %p", __func__, slab)); + return (va >> SLAB_COOKIE_SHIFT); } static caddr_t __noinline @@ -592,8 +620,8 @@ malloc_large(size_t *size, struct malloc_type *mtp, struct domainset *policy, sz = roundup(*size, PAGE_SIZE); kva = kmem_malloc_domainset(policy, sz, flags); if (kva != 0) { - /* The low bit is unused for slab pointers. */ - vsetzoneslab(kva, NULL, (void *)((sz << 1) | 1)); + /* Use low bits unused for slab pointers. */ + vsetzoneslab((uintptr_t)kva, NULL, MALLOC_LARGE_SLAB(sz)); uma_total_inc(sz); *size = sz; } @@ -618,6 +646,8 @@ free_large(void *addr, size_t size) kmem_free((vm_offset_t)addr, size); uma_total_dec(size); } +#undef IS_MALLOC_LARGE +#undef MALLOC_LARGE_SLAB /* * malloc: @@ -908,18 +938,30 @@ free(void *addr, struct malloc_type *mtp) vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); if (slab == NULL) - panic("free: address %p(%p) has not been allocated.\n", + panic("free: address %p(%p) has not been allocated", addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); - if (__predict_true(!malloc_large_slab(slab))) { + switch (GET_SLAB_COOKIE(slab)) { + case __predict_true(SLAB_COOKIE_SLAB_PTR): size = zone->uz_size; #if defined(INVARIANTS) && !defined(KASAN) free_save_type(addr, mtp, size); #endif uma_zfree_arg(zone, addr, slab); - } else { + break; + case SLAB_COOKIE_MALLOC_LARGE: size = malloc_large_size(slab); free_large(addr, size); + break; + case SLAB_COOKIE_CONTIG_MALLOC: + size = contigmalloc_size(slab); + kmem_free((vm_offset_t)addr, size); + size = round_page(size); + break; + default: + panic("%s: addr %p slab %p with unknown cookie %d", __func__, + addr, slab, GET_SLAB_COOKIE(slab)); + /* NOTREACHED */ } malloc_type_freed(mtp, size); } @@ -951,7 +993,8 @@ zfree(void *addr, struct malloc_type *mtp) panic("free: address %p(%p) has not been allocated.\n", addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); - if (__predict_true(!malloc_large_slab(slab))) { + switch (GET_SLAB_COOKIE(slab)) { + case __predict_true(SLAB_COOKIE_SLAB_PTR): size = zone->uz_size; #if defined(INVARIANTS) && !defined(KASAN) free_save_type(addr, mtp, size); @@ -959,11 +1002,22 @@ zfree(void *addr, struct malloc_type *mtp) kasan_mark(addr, size, size, 0); explicit_bzero(addr, size); uma_zfree_arg(zone, addr, slab); - } else { + break; + case SLAB_COOKIE_MALLOC_LARGE: size = malloc_large_size(slab); kasan_mark(addr, size, size, 0); explicit_bzero(addr, size); free_large(addr, size); + break; + case SLAB_COOKIE_CONTIG_MALLOC: + size = round_page(contigmalloc_size(slab)); + explicit_bzero(addr, size); + kmem_free((vm_offset_t)addr, size); + break; + default: + panic("%s: addr %p slab %p with unknown cookie %d", __func__, + addr, slab, GET_SLAB_COOKIE(slab)); + /* NOTREACHED */ } malloc_type_freed(mtp, size); } @@ -1010,10 +1064,20 @@ realloc(void *addr, size_t size, struct malloc_type *mtp, int flags) ("realloc: address %p out of range", (void *)addr)); /* Get the size of the original block */ - if (!malloc_large_slab(slab)) + switch (GET_SLAB_COOKIE(slab)) { + case __predict_true(SLAB_COOKIE_SLAB_PTR): alloc = zone->uz_size; - else + break; + case SLAB_COOKIE_MALLOC_LARGE: alloc = malloc_large_size(slab); + break; + default: +#ifdef INVARIANTS + panic("%s: called for addr %p of unsupported allocation type; " + "slab %p cookie %d", __func__, addr, slab, GET_SLAB_COOKIE(slab)); +#endif + return (NULL); + } /* Reuse the original block if appropriate */ if (size <= alloc && @@ -1095,10 +1159,18 @@ malloc_usable_size(const void *addr) panic("malloc_usable_size: address %p(%p) is not allocated.\n", addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); - if (!malloc_large_slab(slab)) + switch (GET_SLAB_COOKIE(slab)) { + case __predict_true(SLAB_COOKIE_SLAB_PTR): size = zone->uz_size; - else + break; + case SLAB_COOKIE_MALLOC_LARGE: size = malloc_large_size(slab); + break; + default: + __assert_unreachable(); + size = 0; + break; + } #endif return (size); } From nobody Sat Sep 28 21:52:16 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 4XGLf83T3Nz5XtnP; Sat, 28 Sep 2024 21:52:16 +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 4XGLf8217Vz44lb; Sat, 28 Sep 2024 21:52:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560336; 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=WYMfXVmktpv7BodVPLpSeT/qUACcrs+YrgBwNdeIp9I=; b=DZDFJON/7DuvZCZJPUeWBeI6vapX/b8lUhKmtoSf3CSJnT+mCZZXLuAkcTGBGIS9dIkSG6 95UxevOTPGZXfdGVOSp1fFYprg2GigM4HahhI6xzsX7Vg5UNURNiyrLz5oBVG5HhYFbBZi 4MGo7zlHUSWiK7cjvYj/4HS/zq2hKTn2ta7u4FNWfARYomZ/4l+VtTLgetiyLGoXliIIgF l0MCKF8zDB8sZ75QB2Li/GOxaM6F7LuaCLqEE43DRcxXwaZ0BOVOxDHI6eey2Ypmbmziuq iZzaEtc8P5OsTyt6uDGIQY0Y94nClEnK6vUMiqxLJkorRIAVDx/+8XiBZQbQzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560336; 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=WYMfXVmktpv7BodVPLpSeT/qUACcrs+YrgBwNdeIp9I=; b=gCTlS4RvMNMXr57xlzozBXFOba+0LHkEUEUD093+FnctpHdNZYqB786r8L5XY6gnCmcVQT nXmX9UhFb+GcpawF3pURf74YGShX5lcBGqSyI8QA5G2bg+ELnRJtS12cnPrXDUI79tax4y ZwUWsBA7qiwtK6WZgtYwPjG8NzcJiBekb6FaMIconDmeg3o/tqswSXYLYN4RPGTmrJEYBU Ra6FTWzzqgXgyUujYlSgoDrnhIHYXjT4WYc1G10oEjczz3LtyHe9Xur6fhcXJ94zIaxNRh gj97eX2IJzCXamFHtPtqQDZEF05keG26AWZVrL7LD4EavWBL3FOYcj2z37iIrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727560336; a=rsa-sha256; cv=none; b=AXWynyyeIEOctfr9LXwY5rq+r5aN56Msvq1dUuZDVXQnrzzQrw/km6BcfInzeJvNxIek4H mq7rvqy0XXurf7bu2OEfXYzaR61XQBJ38xZJMn1yYmZcUHPaF2eOSSgoVgEs9Z8R7jX3+x OeolEM3XAxPqG5jyUhK+9E5rjfXTvxBtbYD3VA3bwjqoksT9d9gy43jEWFuIDYp8RViSmO fu9nPhkMVFZvAAYM9EmH1CJdfqq8bOoFtf6bbVttAkrJnizW9nsfE54EQ4lpdQog2/mfti g2MDuM9hG8n1Q7wVdyVSPnI2PO2+FhcDB78fsNl5ty/m7xpRqgzQQKCER00WSQ== 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 4XGLf81bWRzhpW; Sat, 28 Sep 2024 21:52:16 +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 48SLqGLb051649; Sat, 28 Sep 2024 21:52:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SLqGPH051646; Sat, 28 Sep 2024 21:52:16 GMT (envelope-from git) Date: Sat, 28 Sep 2024 21:52:16 GMT Message-Id: <202409282152.48SLqGPH051646@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ef3fefe03103 - stable/13 - kern_malloc: remove '.' and '\n' from KASSERT/panic 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ef3fefe0310355cfe89a7e48acbb353915ffb2f9 Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ef3fefe0310355cfe89a7e48acbb353915ffb2f9 commit ef3fefe0310355cfe89a7e48acbb353915ffb2f9 Author: Bjoern A. Zeeb AuthorDate: 2024-07-23 18:27:46 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 19:29:06 +0000 kern_malloc: remove '.' and '\n' from KASSERT/panic KASSERT and panic calls should not have a '.' at the end of the message and do not need '\n'. Remove these. No functional changes. Reported by: markj (during review of D45812) Sponsored by: The FreeBSD Foundation Reviewed by: markj, kib Differential Revision: https://reviews.freebsd.org/D46093 (cherry picked from commit c0df224ba5b1fe6257dd197f8298bf59fb6e520f) --- sys/kern/kern_malloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 1a00e184c83f..6a36f982cc78 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -713,7 +713,7 @@ malloc_domain(size_t *sizep, int *indxp, struct malloc_type *mtp, int domain, size = *sizep; KASSERT(size <= kmem_zmax && (flags & M_EXEC) == 0, - ("malloc_domain: Called with bad flag / size combination.")); + ("malloc_domain: Called with bad flag / size combination")); if (size & KMEM_ZMASK) size = (size & ~KMEM_ZMASK) + KMEM_ZBASE; indx = kmemsize[size >> KMEM_ZSHIFT]; @@ -990,7 +990,7 @@ zfree(void *addr, struct malloc_type *mtp) vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); if (slab == NULL) - panic("free: address %p(%p) has not been allocated.\n", + panic("free: address %p(%p) has not been allocated", addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); switch (GET_SLAB_COOKIE(slab)) { @@ -1156,7 +1156,7 @@ malloc_usable_size(const void *addr) #else vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); if (slab == NULL) - panic("malloc_usable_size: address %p(%p) is not allocated.\n", + panic("malloc_usable_size: address %p(%p) is not allocated", addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); switch (GET_SLAB_COOKIE(slab)) { From nobody Sat Sep 28 21:52:17 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 4XGLf9423Rz5XtqV; Sat, 28 Sep 2024 21:52:17 +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 4XGLf93BlTz44R6; Sat, 28 Sep 2024 21:52:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560337; 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=WU/uvUN9sZ5+QA72Mnk/Ob5LCK/LW4b8N1k0CgEb8EA=; b=B4VGs8MhK0S9EFGAblbMjxdOEj8KXY7bX8cuEx4UZgz2TrqIL/81mlxyDnJSlpIwW/IC4H arrLTzmxixoZWNQxcii4xZEYSTu93wXaDeInXLbaOSecVXCP75Bm4warJQXjg7beekqia6 3VgFN7rIZUsFzfiiVaj2PciTodKfCKM4x3LUwN++OPThsdyETm6bjQn5bw+3Pe2j2MpbXB SZODmwC/AS+atGOdZ9wddkve5iAHXhGpYdQ+y+7OKvmzXMvVhm1zAYY1Btj39Yw6r45ENt t8KYVYV1IDyoP63O8qKQv4W+wj7JkOEYeJKPRgPMIHSVB999NNvP9ndxjfeLQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727560337; 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=WU/uvUN9sZ5+QA72Mnk/Ob5LCK/LW4b8N1k0CgEb8EA=; b=fwj1fg3J6PgvkkeyLIPe4txNu1oYayrIL046gtbIIUV6fqZI8k7bu2wELhPuezFrPAefb9 090paG/lUn9EnQ6EoNkwvzxgHFdeFdIN88SjTERM6ZJmX41PLpU2/a0ifvEdhxTWJBKQew +6HgpE7AIQ2GrkprnMGRj1JiMZ0TXOdSLM3qgR0MBd3RpdapqNFEDll9yDM8bBDTHPzfH8 iKpgHE9TZzMHYUP+nCXSEzhQxn/1HhL6ErDn1rCyOTfsStFufVRcDG7U5VP3QjSktV8sQX gBFkA0vXksrmeKQPbIAAT7ZnbIrLb1vKhFPSz21Me/RyHG4qSxpEEtucpN3O2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727560337; a=rsa-sha256; cv=none; b=e22SJ4ISG+xeJwmSfD2q5KVWlkj1zotkXNSgHAsDnrlcqxrfeFDv1Tt2NCdlI02IPcxogI TCcvZ2p8xay2raUxgUa+bYKjkO1L4TlYsmkFzFMscE2tAbDSmyvXlLy5Nx8roTmgO69xIH +Zvb/gUhfWJJcyUIWeKJy7vUXZ8LQ/iVnpeqfAdO39FQmCo3UEXmgBBY++sVNbwGJ1gb2s +Yr6yRTjM+rTGS4I3GnTOYEdWZ/9iBGcmWc7TetXYQQat2DMoQtjUKa8eddBL25mOTQu1j UcanvG8mb8LACKGdxCPWsl0dyHPEcaRoVcwrlaono77rbn8XeWvhBc9QCy3UnQ== 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 4XGLf92MT3zhpX; Sat, 28 Sep 2024 21:52:17 +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 48SLqHKi051709; Sat, 28 Sep 2024 21:52:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SLqHsW051706; Sat, 28 Sep 2024 21:52:17 GMT (envelope-from git) Date: Sat, 28 Sep 2024 21:52:17 GMT Message-Id: <202409282152.48SLqHsW051706@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: d7670d965c3f - stable/13 - kern_malloc: fold free and zfree together into one __always_inline func 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: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d7670d965c3fc3dcb36162a5054356524b3fd4ce Auto-Submitted: auto-generated The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d7670d965c3fc3dcb36162a5054356524b3fd4ce commit d7670d965c3fc3dcb36162a5054356524b3fd4ce Author: Bjoern A. Zeeb AuthorDate: 2024-07-24 15:56:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-09-28 19:33:43 +0000 kern_malloc: fold free and zfree together into one __always_inline func free() and zfree() are essentially the same copy and pasted code with the extra explicit_bzero() (and formerly kasan) calls. Add a bool to add the extra functionality and make both functions a wrapper around the common code and let the compiler do the optimization based on the bool input when inlining. No functional changes intended. Suggested by: kib (in D45812) Sponsored by: The FreeBSD Foundation Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D46101 And the fix from Olivier Certner (olce): kern_malloc: Restore working KASAN runtime after free() and zfree() folding In the zfree() case, the explicit_bzero() calls zero all the allocation, including the redzone which malloc() has marked as invalid. So calling kasan_mark() before those is in fact necessary. This fixes a crash at boot when 'ldconfig' is run and tries to get random bytes through getrandom() (relevant part of the stack is read_random_uio() -> zfree() -> explicit_bzero()) for kernels with KASAN compiled in. Approved by: markj (mentor) Fixes: 4fab5f005482 ("kern_malloc: fold free and zfree together into one __always_inline func") MFC with: 4fab5f005482 Sponsored by: The FreeBSD Foundation (cherry picked from commit 4fab5f005482aa88bc0f7d7a0a5e81b436869112) (cherry picked from commit 28391f188ca18b6251ba46040adf81946b0ccb03) --- sys/kern/kern_malloc.c | 94 +++++++++++++++++--------------------------------- 1 file changed, 31 insertions(+), 63 deletions(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 6a36f982cc78..4669e072c966 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -914,15 +914,8 @@ free_dbg(void **addrp, struct malloc_type *mtp) } #endif -/* - * free: - * - * Free a block of memory allocated by malloc. - * - * This routine may not block. - */ -void -free(void *addr, struct malloc_type *mtp) +static __always_inline void +_free(void *addr, struct malloc_type *mtp, bool dozero) { uma_zone_t zone; uma_slab_t slab; @@ -938,8 +931,8 @@ free(void *addr, struct malloc_type *mtp) vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); if (slab == NULL) - panic("free: address %p(%p) has not been allocated", - addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); + panic("%s(%d): address %p(%p) has not been allocated", __func__, + dozero, addr, (void *)((uintptr_t)addr & (~UMA_SLAB_MASK))); switch (GET_SLAB_COOKIE(slab)) { case __predict_true(SLAB_COOKIE_SLAB_PTR): @@ -947,79 +940,54 @@ free(void *addr, struct malloc_type *mtp) #if defined(INVARIANTS) && !defined(KASAN) free_save_type(addr, mtp, size); #endif + if (dozero) { + kasan_mark(addr, size, size, 0); + explicit_bzero(addr, size); + } uma_zfree_arg(zone, addr, slab); break; case SLAB_COOKIE_MALLOC_LARGE: size = malloc_large_size(slab); + if (dozero) { + kasan_mark(addr, size, size, 0); + explicit_bzero(addr, size); + } free_large(addr, size); break; case SLAB_COOKIE_CONTIG_MALLOC: - size = contigmalloc_size(slab); + size = round_page(contigmalloc_size(slab)); + if (dozero) + explicit_bzero(addr, size); kmem_free((vm_offset_t)addr, size); - size = round_page(size); break; default: - panic("%s: addr %p slab %p with unknown cookie %d", __func__, - addr, slab, GET_SLAB_COOKIE(slab)); + panic("%s(%d): addr %p slab %p with unknown cookie %d", + __func__, dozero, addr, slab, GET_SLAB_COOKIE(slab)); /* NOTREACHED */ } malloc_type_freed(mtp, size); } /* - * zfree: - * - * Zero then free a block of memory allocated by malloc. - * + * free: + * Free a block of memory allocated by malloc/contigmalloc. * This routine may not block. */ void -zfree(void *addr, struct malloc_type *mtp) +free(void *addr, struct malloc_type *mtp) { - uma_zone_t zone; - uma_slab_t slab; - u_long size; - -#ifdef MALLOC_DEBUG - if (free_dbg(&addr, mtp) != 0) - return; -#endif - /* free(NULL, ...) does nothing */ - if (addr == NULL) - return; - - vtozoneslab((vm_offset_t)addr & (~UMA_SLAB_MASK), &zone, &slab); - if (slab == NULL) - panic("free: address %p(%p) has not been allocated", - addr, (void *)((u_long)addr & (~UMA_SLAB_MASK))); + _free(addr, mtp, false); +} - switch (GET_SLAB_COOKIE(slab)) { - case __predict_true(SLAB_COOKIE_SLAB_PTR): - size = zone->uz_size; -#if defined(INVARIANTS) && !defined(KASAN) - free_save_type(addr, mtp, size); -#endif - kasan_mark(addr, size, size, 0); - explicit_bzero(addr, size); - uma_zfree_arg(zone, addr, slab); - break; - case SLAB_COOKIE_MALLOC_LARGE: - size = malloc_large_size(slab); - kasan_mark(addr, size, size, 0); - explicit_bzero(addr, size); - free_large(addr, size); - break; - case SLAB_COOKIE_CONTIG_MALLOC: - size = round_page(contigmalloc_size(slab)); - explicit_bzero(addr, size); - kmem_free((vm_offset_t)addr, size); - break; - default: - panic("%s: addr %p slab %p with unknown cookie %d", __func__, - addr, slab, GET_SLAB_COOKIE(slab)); - /* NOTREACHED */ - } - malloc_type_freed(mtp, size); +/* + * zfree: + * Zero then free a block of memory allocated by malloc/contigmalloc. + * This routine may not block. + */ +void +zfree(void *addr, struct malloc_type *mtp) +{ + _free(addr, mtp, true); } /* From nobody Sat Sep 28 22:03:36 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 4XGLvF1WHYz5Xv9S; Sat, 28 Sep 2024 22:03:37 +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 4XGLvF13KKz46fS; Sat, 28 Sep 2024 22:03:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727561017; 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=enjilpyxdGSourLVnziQEVTNIGUXReJ7WWD2hRO+qa0=; b=m3VZIrXIFB0OwcSPMfvPcEG+lxWTQLAg8d8kbCm4Jcc6Fn/0S4G1wG/ML7iUewxsoCDPIA 7zmCOR5/2CreWpZPo5KiJzXJrU5cLFZ/3NTmGRSno1LaG0eIrEICEqcc868BYGUFO1idR5 L+LixYnzrjiB2EU2M+Zo0bqysag+oL2A7MPifb1pXVGUyydxuLhQ6O3ISVv62yr/FhL26W /+fMMhTGg64WTX6Y5EPcYgTmlRLGob47fVEBh94an4UW/tlCuBQce9AKa1WAvnykwdV4U9 SwKpcHZJ0MHN6M6foDn4l8BasvmwifQ0BG53PfLQSYhlfKboLkZbKJGaBSPntQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727561017; 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=enjilpyxdGSourLVnziQEVTNIGUXReJ7WWD2hRO+qa0=; b=YomPX4gc5tf4KGs8qA15lE6bsbcbzg+FF1bjgS4hWOAd0LY0u/lxnFzqJZs/vGEN5Vi033 aKymiw/OyMH5Te3PTEv8cS2lWo3FUosQ0IPcoEiHEzpw7DHKlo60K9i8EzstNLbyGuQFfy 1So3KLC52quiLGBD3yJarcK9cVVJZTgjIfhYUAsCt/gG6NTSsSp4Ib3k8LKEj2KhArE567 1IHsMqqCo9kkSrSRN+wDj8vgmix5EWQamqWC9+zhj5MRr1Xt+4JYJkdGMUeC8/cH7fpS/6 ngp90EcuF/O1dZCRL+fQQP/M0tO68vg7xIxs8uEBU2FeoggIDJd3om4vtxzTfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727561017; a=rsa-sha256; cv=none; b=PilgNr3+xOCvgZ2CS/oxlx3FHMdPWLLYmb8hIQPI7o+2SjdzisJ+sdjeYrLmaxOLIHHIBz /ElvhgYR1qJ8mm7xbUPhKpf6E4JrzqJqFUltd9S3vPWBdGah3wH7koCeHBlHt8PzOzyGT5 s9DJYPqqm6B56l5vzHuuHc6rJ/icht+Qk0J8vuAcPShuGfcjfdMRNDFD9RljXkXNGyLF1/ kM1gZpEQglsmZSyQhnatHoeC1PNWV+rD0uofosHbwwBQUlAG02nmH/dJaOi+3oBAM96KHz 3oC6ibhrvGdhAJcYbS5BzRw2609feNoCuOLmPB6DbYELFvBXd36J6fGV85ck+g== 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 4XGLvF0gDVzj7J; Sat, 28 Sep 2024 22:03:37 +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 48SM3aUJ069785; Sat, 28 Sep 2024 22:03:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SM3aOF069782; Sat, 28 Sep 2024 22:03:36 GMT (envelope-from git) Date: Sat, 28 Sep 2024 22:03:36 GMT Message-Id: <202409282203.48SM3aOF069782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 6df05714da16 - main - Revert "nfscl: Enable support for the Lookup+Open RPC" 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6df05714da160a8ac3e27ee34ff903bd0e760002 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6df05714da160a8ac3e27ee34ff903bd0e760002 commit 6df05714da160a8ac3e27ee34ff903bd0e760002 Author: Rick Macklem AuthorDate: 2024-09-28 22:01:36 +0000 Commit: Rick Macklem CommitDate: 2024-09-28 22:01:36 +0000 Revert "nfscl: Enable support for the Lookup+Open RPC" This reverts commit 9792c7d3eb41dc1e3709e00a98734c3312d1b4fe. The email thread "panic: nfsv4root ref cnt cpuid=1" on freebsd-fs@freebsd.org descibes crashes that occurred for a NFSv4.1 client mount using "oneopenown" where the same file is re-opened many times by different processes. The crashes appear to have been caused by the use of the Lookup+Open RPC (which only happens for mounts using the "oneopenown" option). There appears to be a race between closure of the open and the open acquired by the Lookup+Open RPC. Since Lookup+Open RPCs are only an optimization and can only be done for "oneopenown" at this time, this patch reverts enabling of them. It may be possible to fix the code so that Lookup+Open works reliably, so the code is left in place (although it will never be executed) for now. Reported by: J David MFC after: 2 weeks --- sys/fs/nfsclient/nfs_clvnops.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 13341dfc26e0..bf24a161b94b 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1309,6 +1309,11 @@ nfs_lookup(struct vop_lookup_args *ap) } openmode = 0; +#if 0 + /* + * The use of LookupOpen breaks some builds. It is disabled + * until that is fixed. + */ /* * If this an NFSv4.1/4.2 mount using the "oneopenown" mount * option, it is possible to do the Open operation in the same @@ -1328,6 +1333,7 @@ nfs_lookup(struct vop_lookup_args *ap) openmode |= NFSV4OPEN_ACCESSWRITE; } NFSUNLOCKMNT(nmp); +#endif newvp = NULLVP; NFSINCRGLOBAL(nfsstatsv1.lookupcache_misses); From nobody Sun Sep 29 03:56:46 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 4XGVkl18rWz5YGYq; Sun, 29 Sep 2024 03:56:47 +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 4XGVkl0Bfxz4YQl; Sun, 29 Sep 2024 03:56:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582207; 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=WDFPPW2V0jkjADqSwInMZ7GtVrStSptZeW7IFXeQe0E=; b=tiNCtEiQFHfYO9Nr/b52IMuW1MXGoT88KVfaoEtQIHBjgYbqQVXK3HfAm366TfFkuExrgS /wd+nZTsb+lwWFJiPuVVdEcST7snRsmfxYAqFsSyp0dyOX4yEiGX36xpHdYGhI1Tn0MOs4 1W/VDx3AvsHurWI0ZnxF+360opr1dY4/dE20F7pYoqUoUZO4SqnGf9QTMdSsmzgx4qFlr5 9Jgwa4ayrBZ0z2E4fPcf3Z9sHbazs0QGweFa7EwI6saTC8wqoX6maFTYrg6Q6R9Z6GUSuo 5kKK8nSdgzSeiM5or0MMdfIyhEWsT2FeWPb/aO81tuDRIPilX+lRpT4wyjJ4dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582207; 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=WDFPPW2V0jkjADqSwInMZ7GtVrStSptZeW7IFXeQe0E=; b=SgZnE9rzfXKEqch0mCbzVCLSOJtnQ/BNGm8pRDn4m7L0zb/KzQ7AIWuQpGqxh7W7brc19G xRItljd3gFm1Gp/jHTlEOD9R7rPWZefJftW9uxH2/oisLxhVoekC4JG4OJ2/vqElAh10VW km7JIGo/ZZ9RhVc1GIenaBUoO7FX1YPIgMsFLbfDS6NoooRrxmlrqXHiA8K/YJ92HobB22 f7UdX0pmOurZkAa5YrjVK641p0hZAXqMgQ/Vwhvw2iOCkcfY3JfUaOa8iUVaC0NMjH9lOI CUvgV/46pOtI4VEKifPrZDsJhkvCXtdjA4JDtWyMiWvxehUkNFQE/fNJXmsz4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582207; a=rsa-sha256; cv=none; b=svzvcpvxdtlllPQ1PVVit+XdX6BV6KsH3Hpkhc/FEBh7XeBT4UY0FQKtzwyQiYLPD23KzA xMe7NHJ3ivkklNnAkqTGkwnay9jn8BrhNQEQBUFwx6JwR30DamTK+ZCzTw5T8t6n4XNPcz MxC7JZRFh3cyMHoZQSpQ6981usAgyqVnhOessB8+Q33vFR/cQyBL3K+T75v4HT+PwO54FI pKNaIfrLkpZ0psPJXYwfnLAtJ1gQB65xROoCN0VNXU1TZ1prfm5aIyFiC89wAgjyGbmc0d hWnk9aF/aacs4cKbbJIbFqylLqV8JP6/C85YUytI8kZLDn5XdTHtMZZkEiQb0Q== 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 4XGVkk6tmSztJQ; Sun, 29 Sep 2024 03:56:46 +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 48T3ukso062317; Sun, 29 Sep 2024 03:56:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T3ukhG062314; Sun, 29 Sep 2024 03:56:46 GMT (envelope-from git) Date: Sun, 29 Sep 2024 03:56:46 GMT Message-Id: <202409290356.48T3ukhG062314@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: 1dd49c09eff5 - stable/14 - e1000: remove NEEDGIANT from a couple sysctls 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: 1dd49c09eff52bf088a966b2002e0a127211eeba Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1dd49c09eff52bf088a966b2002e0a127211eeba commit 1dd49c09eff52bf088a966b2002e0a127211eeba Author: Kevin Bowling AuthorDate: 2024-09-22 03:52:48 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:56:34 +0000 e1000: remove NEEDGIANT from a couple sysctls These are internally locked already (cherry picked from commit f6e1b567921187b9331bd71c86e94cf232dd7761) --- sys/dev/e1000/if_em.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 3d815348f5ec..768522a821bd 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -831,11 +831,11 @@ em_if_attach_pre(if_ctx_t ctx) child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "nvm", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, em_sysctl_nvm_info, "I", "NVM Information"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fw_version", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_STRING | CTLFLAG_RD, sc, 0, em_sysctl_print_fw_version, "A", "Prints FW/NVM Versions"); From nobody Sun Sep 29 03:56:48 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 4XGVkm1zmSz5YGbJ; Sun, 29 Sep 2024 03:56:48 +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 4XGVkm16VSz4YSv; Sun, 29 Sep 2024 03:56:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582208; 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=qxcth0hVdTeObDaJn5w7yCfCpUUsfcovARbJLVIA0xM=; b=FUKElMJRUfovtDNIR7dtxcHOvNyItuN6IjY/mLcSlqh+IbjcFRP9ivrItUmvI4RnsJfZXa uP8t0u+vI8r23CotnhK6SXKlPFEH13p0m81pWD9pA5ezno8XG6nmIDbjkaZL4j+EBqtL7b rhTLO+owdExkcKlWy3kF/J2LLnh0+/qOCiZ6J2MchIjsGxw/xHoY0+l1+0a/Y3GeFXWIVx g2Yx7eyJkdsxbQzV4PMs2aNzTe3iqCQgLKrM48bzHx6XWZ4y8Ey1piXQQ6u30L1FgfmfPb epxhaKe8IhZQOpv66q6ozBR0u2x8CKhSOb2dBPr4rguKeSHMerZpnBfNOhX8fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582208; 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=qxcth0hVdTeObDaJn5w7yCfCpUUsfcovARbJLVIA0xM=; b=i62vr+nVrIsQq/35LrD6iMc9GZD5DeSM7IJjrgMw5/cUjSjvcm2HFxOah9XGUj9UD7RbSZ /mbAerZdz1vCqgdQpdWkiH+ETyrMSkWhxsybqAEpccnzS8EQ0x+p8EGZMRnP0mAxLgK8mq IjVtBGThvY9NeQ3z3xUyz1Z7ovN97FCVWZZ21H3XpsHGQKmILpxlmE9y7ooNvL1yKPM6dL NyxZo4aeBLhz5IZN0gAmQbNEWNFrq6WvW7/AZG6aqiUpKxDsYsVAbOxKWlQX83+/v1hJEp S2W9ZmvdoR+MlLkPVm6v+DDZZJa6rFFb9U78UsKc7areLINNI9wELEBGtqtohg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582208; a=rsa-sha256; cv=none; b=YuKTmN3kTCnnHOoxk4UHlgeSCE+v8qBknMoZtMCUdEAlZ4kL8Km7HjD07o2FjJBHV9cP0n MmDwUUmkFFjLkrrUvYsPOfkWVCrGJVE1bBNvMZgGeBFnga1JNLPCPwxSgLybUhsEIGR8lo pxK44J8WHW1bBeuWVLu+kvRiSumgIMCa6SWHXmve+I3zPpSUKEU9VHHyCSq894nryB3ZaU eKDeGHRvb0KGh+UwXDUH1o96CQCuQDCNdxv3FhgsFN83f0MgwEdAZXhcsz1ZJUSSiWVe/n RsPoJpXQc77JoBUvjC5g7v1kKwMYSVIwBzHD49l6qJw4u9TJifXD0mDU3eRWKQ== 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 4XGVkm0kfTztLW; Sun, 29 Sep 2024 03:56:48 +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 48T3umTo062368; Sun, 29 Sep 2024 03:56:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T3umtW062365; Sun, 29 Sep 2024 03:56:48 GMT (envelope-from git) Date: Sun, 29 Sep 2024 03:56:48 GMT Message-Id: <202409290356.48T3umtW062365@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: 0c730611ed73 - stable/14 - ixgbe: fix misleading indentation in ixgbe_phy 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: 0c730611ed731a8e7483ad26864396897e666e70 Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=0c730611ed731a8e7483ad26864396897e666e70 commit 0c730611ed731a8e7483ad26864396897e666e70 Author: Kevin Bowling AuthorDate: 2024-09-22 03:57:48 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:56:34 +0000 ixgbe: fix misleading indentation in ixgbe_phy (cherry picked from commit e3a6e916dbbade2d4047e127c371ee0d0a25a294) --- sys/dev/ixgbe/ixgbe_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index e3f311473c38..da7d16a514d0 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1492,7 +1492,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) hw->phy.type = ixgbe_phy_sfp_active_unknown; else - hw->phy.type = ixgbe_phy_sfp_unknown; + hw->phy.type = ixgbe_phy_sfp_unknown; break; } } From nobody Sun Sep 29 03:56:49 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 4XGVkn5kPfz5YGdg; Sun, 29 Sep 2024 03:56:49 +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 4XGVkn2krxz4YR8; Sun, 29 Sep 2024 03:56:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582209; 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=J5OAFfqvY6emkLBsFXT/qeTKImhftC5+nwSB+cOwJaI=; b=WETeWoSBXZxMtsz4Lu5xv4zg/BsFiFnVdrL3TNq71/UeCQqp4nuQMV1t4njqLEf3vdp6We x9QycaErLKMsN9dHngjv4h3POzGqMdER4bRcUzNVhEfoRZnZRVD6fvm2sWPjKutTLnjdtO MqVJ5LVEsZDPc7OKu+oWs7AR1pSdYVeiz8ZUVAJzE3Rab+TjCNSEkcjtVbQy2+1lgDkMBK 8rTko7nhtxT7a4FqGkeMrVmCt7iX0HlPxgmF1o3PGO/P24STjjxzTTflY1c+ekV9xgoRCu OCSxPJdEQqgB+EiIXguHaAOeNz7lN4T9HUE8CvAggju0zC8ww8KwLeurshetfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582209; 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=J5OAFfqvY6emkLBsFXT/qeTKImhftC5+nwSB+cOwJaI=; b=Rsms8EV12f4IuiKBwGtLwcqBoK0TJE0g93Z8APtlgHWKM/Sh1fixKHg1iPeH+Gx7RR7DtD qYrrvfvuJv+uc387Mjo/aQITcqpxZaR+LuMapdhdP8aBiCFeeykP8ZqjCw0eOqoqd51t4f zP95OADkocLHKCbt9Z+/pY8K7s9Hrgxea7LzSW3oLuVQIpvnaiN/rICojRQ2q3o7uDEsUs j+5isPy3gQzkj3oM3Dhf8A0f2utGngVIwWcRHNhbJpSWjoYLtW/xpy0SthzDuo7DnwFqqa QJcTcPO0Kz7dpNglKpzWRArcw2w3645hw/B0VnfYRyi3kQWg9uPITNR7KE6Ejw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582209; a=rsa-sha256; cv=none; b=ZlmV9qIpOXM+9Qad1KwXIrQfrqDfgaBSUjiSyxWSsKgOE3DhKYluRdrqN/KnLcdNNK8VdF 7iI0W3sMHluuWddDBoXF9C41wCRaPOIw7dkPD7YEWaEiOo4d2F4rEq4dJw0Zg4MtSIUSQF I84oL6fUDXz9i0+l8RXDfYHf/ZMP45oGDuEEmGqrAgqK2Tbhesl80Mm6nL2zT+J1xcvRuZ 1jBGWzg9OXsyt90tR+XbugBIUQcytAjeAZbh5FmF7WCF4kseuxlCG4ctUkyYbulV/gaMgg E2eDgtIE8vIz/O1dVTA7wY0VbhILG445vNbzjsN2QNq+dxbVl9LKmNlV89Et8g== 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 4XGVkn2498ztLX; Sun, 29 Sep 2024 03:56:49 +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 48T3unKX062415; Sun, 29 Sep 2024 03:56:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T3uniG062412; Sun, 29 Sep 2024 03:56:49 GMT (envelope-from git) Date: Sun, 29 Sep 2024 03:56:49 GMT Message-Id: <202409290356.48T3uniG062412@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: c16093be8a1a - stable/14 - e1000: drop NEEDGIANT on em_sysctl_reg_handler uses 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: c16093be8a1a777e8277e72fce3dfbe0cf13b38c Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=c16093be8a1a777e8277e72fce3dfbe0cf13b38c commit c16093be8a1a777e8277e72fce3dfbe0cf13b38c Author: Kevin Bowling AuthorDate: 2024-09-22 04:04:38 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:56:34 +0000 e1000: drop NEEDGIANT on em_sysctl_reg_handler uses These are simple singular diagnostic register reads (cherry picked from commit c11a0649b97281699e39d0fc82818f235c1dfb87) --- sys/dev/e1000/if_em.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 768522a821bd..8d140979fbcd 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -4433,11 +4433,11 @@ em_add_hw_stats(struct e1000_softc *sc) CTLFLAG_RD, &sc->watchdog_events, "Watchdog timeouts"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "device_control", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_CTRL, em_sysctl_reg_handler, "IU", "Device Control Register"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rx_control", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_RCTL, em_sysctl_reg_handler, "IU", "Receiver Control Register"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_high_water", @@ -4455,11 +4455,11 @@ em_add_hw_stats(struct e1000_softc *sc) queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_TDH(txr->me), em_sysctl_reg_handler, "IU", "Transmit Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_TDT(txr->me), em_sysctl_reg_handler, "IU", "Transmit Descriptor Tail"); SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "tx_irq", @@ -4475,11 +4475,11 @@ em_add_hw_stats(struct e1000_softc *sc) queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_RDH(rxr->me), em_sysctl_reg_handler, "IU", "Receive Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_RDT(rxr->me), em_sysctl_reg_handler, "IU", "Receive Descriptor Tail"); SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "rx_irq", From nobody Sun Sep 29 03:56:50 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 4XGVkp6Lc0z5YGQF; Sun, 29 Sep 2024 03:56:50 +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 4XGVkp3mdbz4YRT; Sun, 29 Sep 2024 03:56:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582210; 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=7jcsI6y1dLqd1wcA6c6wqAEaIbTGcatN7FIjyK7+n+I=; b=SAvpJJVQ9NvhX/aZKk5P4fGPHx16xmBRP7VRMIrO0FmvQmE9NKV8VvGIcix8hBZa2rcPl0 xzoy7UV+wQfB1aXYOxdWojcni7fNWWy0KjTkpY1/noY+LF2Q42H6xYVR4xR+IbegvKPE90 j5FUP2To2AcAwaK8SED7e7AN9DvY1wpTQ5lFB9d5et7qpBPdENFgPkGRrNt4ntZFeTs4h4 tJclk/yTGuyz1uelNpmuYcq8bA5mIDvZZpEjgZEWFsW5hTMh/ZB+BU3QtfMd19k3RJhp4W gfSuwoVHJxP6Ija7fDOoDw4pUMebBcepDgWaA4y8Cq4HqUKLvMFIO86YFflRTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582210; 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=7jcsI6y1dLqd1wcA6c6wqAEaIbTGcatN7FIjyK7+n+I=; b=OV7hB7uYZBLCBuHRTBljr6Idl578dWdT5IQJk8oOFG3Zy67HHWulhxMztu4iJp4QwBLRxu gbVbl/DWpi4mm4Uo6lR1whSRsR66aFAmYbezcIq3v1w/PPXACeKVyZAzMOphdz5TkJj1Hz ylTseX+M8aS+nah8hr03ToBkRP5BZhaKZP3DZ+UUSRflo+VbIi5TQlnpzn6IUuT4NpgzBn 9Y1vdQDt4wb429l8danFTzRcUIHVeEQ2UNwO7oxFENBtubqFbCpzvc0bPgTnHRsSn/Hcer c1tanTWlpB6lYcA0a1WIJgoL0nqmuIDz/TTKhFzH38ZQsqmijAkHMOilr85dMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582210; a=rsa-sha256; cv=none; b=TB9etzbTig3aTKjY9M2nSYXhdjP+SNqo/aTtvSHvOHSNpo6UPqDfZCD5dLbK5hYMETcNSv CEhTPxQkyZWsVErriY3wOc09GzscTXwVZKsHEQWAzHxSlK6KcG++EeNXn4929uULdiU6kw dFN2NmVRRgvg3aI/rm2tftbqU8Xsrzzrw0OhQLk9Dv93+8LIFA/PEPAmJy9yMpBR+EtGu/ gDNMg8OiocR3U7N/OJMS3izYZPgj0n+4g9wieGnN0yDYVK7w0UNSYnY1yn2pxRS87cYcon Cxq6XwlEQqVHh1vQqDYEgBsb1MSd3LDn1x0e+iXpFQ++XM7jQ5I2kOlaH7PkmA== 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 4XGVkp30QQztJR; Sun, 29 Sep 2024 03:56:50 +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 48T3uot5062461; Sun, 29 Sep 2024 03:56:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T3uo2Z062458; Sun, 29 Sep 2024 03:56:50 GMT (envelope-from git) Date: Sun, 29 Sep 2024 03:56:50 GMT Message-Id: <202409290356.48T3uo2Z062458@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: a112b062e068 - stable/14 - e1000: drop NEEDGIANT from em_sysctl_debug_info use 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: a112b062e0680c41c5978ae976dc77d0ed117b4d Auto-Submitted: auto-generated The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a112b062e0680c41c5978ae976dc77d0ed117b4d commit a112b062e0680c41c5978ae976dc77d0ed117b4d Author: Kevin Bowling AuthorDate: 2024-09-22 04:17:30 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:56:34 +0000 e1000: drop NEEDGIANT from em_sysctl_debug_info use The write is only used to toggle the debug print function and this is otherwise stateless. (cherry picked from commit 5f6964d9fbf663f85ee60dae7dfff153b82759d8) --- sys/dev/e1000/if_em.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 8d140979fbcd..e2d8535143ef 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -840,7 +840,7 @@ em_if_attach_pre(if_ctx_t ctx) "Prints FW/NVM Versions"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "debug", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, em_sysctl_debug_info, "I", "Debug Information"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fc", From nobody Sun Sep 29 03:58:11 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 4XGVmN0395z5YGfT; Sun, 29 Sep 2024 03:58:12 +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 4XGVmM68GZz4Zvw; Sun, 29 Sep 2024 03:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582291; 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=EqxBwf6Gotr8U7jCacmzUMwQE/U5lqGiM29/DYbV62Q=; b=rg98wg+x951unMAoSKuTqQPVRHKkXcrsiortTXPh7SI2bE65qc7/zqJrXho+FFu6TTSz5y UQWV5hyHcPADJABMD6U5WWhJhUI/V+qdci3+YtPdcrgTAIpWHVqFVkoDQBbD/f77TqaAew 8pI+Mfx5O+tBzyL+RrbN+8NidVabSlAOVOEoNxyXgT8qIkx7LOiL1EP/lDAbg7thKCCImD zCWccPbLZSQ7zBCsP14uRKy7a0XhzrZtLWCv4Fxf99RKAXDDm/0hZhGBIV3A7gYTSCGzvG 8mvxDe8XPnA7ixZusg5yNeYDqjQZTzdlA93WVwG4OvwBW68Gg7nXKP4gkXQ7iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582291; 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=EqxBwf6Gotr8U7jCacmzUMwQE/U5lqGiM29/DYbV62Q=; b=G+ncOmoxVVPZ6uzjsYuJ8ppBLcRn2s6ZN8Lsw4oL2FNTNmZuh+3ces2ftsBhZFTxRXaxeB W1W/Lnk/Hk5MiNMurTWOsW8+y2nIKCzM+y5yKwwAdwK2KLh4fC4eNhhvRUKcPivoDrnFe6 PFc9W4NL6qklEQP3hw1lH8SAYVHJsJUAv0PyFEVA0Lu5bGFEBrS9QLzP5p4q5HUJob9lg6 Z6nZ252YaIKTCVaOi1mMYBGDkmancaU7RHdBPBKmGBzZOejWMYUTqG/0wtlG9cZNtIxiwk Jb4mHTgwz8ueR/gUyFdpwHVrRE07t9TqLgxnU8P6chGsJodGG4GAPMThwYtFJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582291; a=rsa-sha256; cv=none; b=CCfk/uXldQpSJGqvYnlHEsK2p4Th3MvHhtXHD0uYvDiBT2zRn9ILUGieyzCZLqktUfOGNb WvfpEzwoar7QOjlQAv8G6B2OEgLgSW91kgP8SBt7FXH3vo4sDgNly88MPQGqt3mZJ1WMtf P02ay5Z5pzUBYbtmS9oWditAP7GA0FjKbbbdQkpsvip4yn2xsliCm4KWoig6/qpNBj0egi xoYFuh+7k+jqCuMWq72D2OQU1UAjMZsa7MUdFmElPmEJv+ldZxjHckn0m5VWPk97QOp1F6 Us37PxJUHQfdXmVEJAuPo1Q6DdbnOiSBYmaB/jClKy9UC2ke2hdmGByB6RcfYQ== 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 4XGVmM5dvvztHF; Sun, 29 Sep 2024 03:58:11 +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 48T3wBcS062794; Sun, 29 Sep 2024 03:58:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T3wBxK062791; Sun, 29 Sep 2024 03:58:11 GMT (envelope-from git) Date: Sun, 29 Sep 2024 03:58:11 GMT Message-Id: <202409290358.48T3wBxK062791@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: 3a2190633618 - stable/13 - e1000: remove NEEDGIANT from a couple sysctls 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/13 X-Git-Reftype: branch X-Git-Commit: 3a21906336185ca5d71744a59c0dc996f0d5d152 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=3a21906336185ca5d71744a59c0dc996f0d5d152 commit 3a21906336185ca5d71744a59c0dc996f0d5d152 Author: Kevin Bowling AuthorDate: 2024-09-22 03:52:48 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:57:18 +0000 e1000: remove NEEDGIANT from a couple sysctls These are internally locked already (cherry picked from commit f6e1b567921187b9331bd71c86e94cf232dd7761) --- sys/dev/e1000/if_em.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index b1883d5cc9ab..873f06cc272f 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -833,11 +833,11 @@ em_if_attach_pre(if_ctx_t ctx) child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "nvm", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, em_sysctl_nvm_info, "I", "NVM Information"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fw_version", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_STRING | CTLFLAG_RD, sc, 0, em_sysctl_print_fw_version, "A", "Prints FW/NVM Versions"); From nobody Sun Sep 29 03:58:12 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 4XGVmP1kHsz5YGp8; Sun, 29 Sep 2024 03:58:13 +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 4XGVmN743Fz4ZyR; Sun, 29 Sep 2024 03:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582293; 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=a29MvWevWiWAABpG02DbmbppUBpvFk8Oh70l8CfXAp8=; b=YrO3+p+8uoWFxXmueR0TOUdFdmdfUt4ajTU/G7d7Yf2DbM2H5ZXbV6qfHiQOqAkVuuZQ51 +xrqxZlaHReh7b2zFyxxBmXMLru3uTKUCkCsgKvSAQ6OJ1WXNDA9pbZV1pzK1kduYsFZ9a ObkTpOWzE9WnHYjZT5RZ0qcdpZbPfUg95JGK3RHNlBiuJDwrpR7gx48YAmZLxR9EtUaDVS b/hbXwA/EnA5fj4SgrvtmzouFaU2eZ96UJLnRSpHqNdVc3CwVoT2gKHz2/oCmJN/v/Ryg1 qTN0E7cG81kQKH3O3qIbaBoiw1TFV2W0eyNPCEbtHY3wzYkodJNXwtMLsCxJDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582293; 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=a29MvWevWiWAABpG02DbmbppUBpvFk8Oh70l8CfXAp8=; b=V0Z6MuCpvlm/y2YsuJiGGC4k4t9vdFNLBTRlFre+g9wqywf5WP8mv5XwJM13KbMaf4SlDS rOD0Idmro4zyNk5Op7P2gqxdMEeg2FSK+72u6Gte9fVLfAdGQm6Zkhfk7YqeZ0Yuq5RrY1 UdwmImFQFlzFEAj+VO+pvU5QMceOCpsJzEJOwaZY+ED/2LPxJWN0TuCsF3Cl6Z3Yi/ULHr +INmVv9hFn0JIHtUpTYkI9/OtdZZL/BVqs4SysoZfcTSRhocL2dvEE5VySJ+cCYrlIGlWk l+TwWtul8Sv07dKyZMz+OOAMml+d2YGoAMDPGB6CcS49ac4tlWH9EO/GizDhiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582293; a=rsa-sha256; cv=none; b=XwyGo5m6KHH+3ifqYTuhIiEblKVpODcT6VxO1Dg+3l4rh18CDaScEKZbVZ7ik9krVAIt9f pM+SoeQiRswANZb/rlUpBOyC0eHMfZJ9HOaIC/C6wGMlXyz1FdN9r5mmfBJRXiG/d9HpeL uWzHtRbYWoOwfK/XoXCA7T2AfBHfwwEDMUABqEanCnrR0mM4iVQKc/3T4zEoNgUjuXOAxH FFtD0E9QNLeJWf1g6e+xJUAmLPtB1b8lM3nKufz7SEJh/i3sfA0TUAdqM30RtsFmd0doqt +hGM83+r6h6ReTCQZmaxq95zeNRrwgLjnNnHppr8Ddl9keF9n+HvF8o/FOGpUw== 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 4XGVmN6dg3ztJY; Sun, 29 Sep 2024 03:58:12 +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 48T3wC4T062839; Sun, 29 Sep 2024 03:58:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T3wCVQ062836; Sun, 29 Sep 2024 03:58:12 GMT (envelope-from git) Date: Sun, 29 Sep 2024 03:58:12 GMT Message-Id: <202409290358.48T3wCVQ062836@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: d7fcaeca4cec - stable/13 - ixgbe: fix misleading indentation in ixgbe_phy 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/13 X-Git-Reftype: branch X-Git-Commit: d7fcaeca4cec899fe0f73ded3253b365d3baab9f Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=d7fcaeca4cec899fe0f73ded3253b365d3baab9f commit d7fcaeca4cec899fe0f73ded3253b365d3baab9f Author: Kevin Bowling AuthorDate: 2024-09-22 03:57:48 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:57:31 +0000 ixgbe: fix misleading indentation in ixgbe_phy (cherry picked from commit e3a6e916dbbade2d4047e127c371ee0d0a25a294) --- sys/dev/ixgbe/ixgbe_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c index e3f311473c38..da7d16a514d0 100644 --- a/sys/dev/ixgbe/ixgbe_phy.c +++ b/sys/dev/ixgbe/ixgbe_phy.c @@ -1492,7 +1492,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) hw->phy.type = ixgbe_phy_sfp_active_unknown; else - hw->phy.type = ixgbe_phy_sfp_unknown; + hw->phy.type = ixgbe_phy_sfp_unknown; break; } } From nobody Sun Sep 29 03:58:13 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 4XGVmQ2b2nz5YGjV; Sun, 29 Sep 2024 03:58:14 +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 4XGVmQ0j6hz4ZwR; Sun, 29 Sep 2024 03:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582294; 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=TqcNr42g6CMC5GTdXJkPkrJlocJgyZTHe8LwzcGreok=; b=a1FS9dk3JAT+2PZixPbaYG2FM19mt8vrX6AfgU9hIFw/TDXmZkrzHO2cgJf01+Hj25vOTo LW67+LkRvD4PDmitGBmk61hfv9HUvJ/e7vVJycYsXAfHBm0hT8Zk2w0+/pYHcAEoz51FP3 9bjuM7aD3r1QJ/SqEoEtcZbURCX3+vgfnJvzbOh7S94jVa8p1BW/UyH4/GIcsDWPeKOJV4 P27dIh3gWygMZeTscBf38C9TuuW57DWp7dTnr3DFzX5ahfC5Qy5npaDUym3AEHr3knLMXp P0wlGgGbfVCHLqFYOim6SfGxeI494nAWhPDNreRG8ygvfEnw+6Jng9QRIl28WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582294; 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=TqcNr42g6CMC5GTdXJkPkrJlocJgyZTHe8LwzcGreok=; b=mug3VI6NX1uDUt/xayrS06C4XhY2L4FfJJtDkODqm7GX05m064IVymJfDXwaCKYyr6jwZG 9ovO4kT2mmoEQX8gu0FL8bsA0f/8bnOmuNhHVLu1EZbtm55YAEO50rrASdN9fhamw9NmzX UKzCBhZuGT98JlY1I4auquphvjGvpBX+TXM1syb9gXBGl1ct4J+k0jWnDZR/XJsCOW6gFQ +hAJctgsniCmS5APr6CNI77iWAVXELaAtSt+oZ/ZfYpeTdBtA+rvB3qJDS9ZyDOqVVZa6A e93QPrum29JxVtVEuA5Q/6kTrNOIGVX8pcT3rUjEyGjtQ1/xmQXmbPbRFxBqpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582294; a=rsa-sha256; cv=none; b=W7KKirEUQu2DvHb5oo4GFkZ8TaXsr/zo5CTPVlBhJ2es/CwzfI7Nt4ufqAMFzgsErSNgQi JWy8kLv8aH+hpKaLNP8tYi9fCL29EKwYTNKpG6thoZ0jQnMC6iWrD0YcAY7ciEisX3/oz2 NhVVTgVoMRqju5O1U8F1/g+xvy/MkCFEEjGBJsvsL1cy63SAMKyAvjQW5mS4mqQ1dvSRDs jql6wtrwq0A05flKdOBvuoTj8hUbGYatD4qjAUe+hNe774dbIy53E/R90ST2teG6LpEhVG bYdhHetskJgVYeRhsRlDy+qpY+enp9RloeQUYolk/nS0lkJOUjQ0qlmahAbRRA== 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 4XGVmQ0Fxrzt6T; Sun, 29 Sep 2024 03:58:14 +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 48T3wDRR062888; Sun, 29 Sep 2024 03:58:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T3wDcp062884; Sun, 29 Sep 2024 03:58:13 GMT (envelope-from git) Date: Sun, 29 Sep 2024 03:58:13 GMT Message-Id: <202409290358.48T3wDcp062884@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: 61e8ea9c6b2f - stable/13 - e1000: drop NEEDGIANT on em_sysctl_reg_handler uses 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/13 X-Git-Reftype: branch X-Git-Commit: 61e8ea9c6b2f186267ad1745a6d8c3b9f1793790 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=61e8ea9c6b2f186267ad1745a6d8c3b9f1793790 commit 61e8ea9c6b2f186267ad1745a6d8c3b9f1793790 Author: Kevin Bowling AuthorDate: 2024-09-22 04:04:38 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:57:42 +0000 e1000: drop NEEDGIANT on em_sysctl_reg_handler uses These are simple singular diagnostic register reads (cherry picked from commit c11a0649b97281699e39d0fc82818f235c1dfb87) --- sys/dev/e1000/if_em.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 873f06cc272f..156a5640a06e 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -4435,11 +4435,11 @@ em_add_hw_stats(struct e1000_softc *sc) CTLFLAG_RD, &sc->watchdog_events, "Watchdog timeouts"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "device_control", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_CTRL, em_sysctl_reg_handler, "IU", "Device Control Register"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rx_control", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_RCTL, em_sysctl_reg_handler, "IU", "Receiver Control Register"); SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "fc_high_water", @@ -4457,11 +4457,11 @@ em_add_hw_stats(struct e1000_softc *sc) queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_head", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_TDH(txr->me), em_sysctl_reg_handler, "IU", "Transmit Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "txd_tail", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_TDT(txr->me), em_sysctl_reg_handler, "IU", "Transmit Descriptor Tail"); SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "tx_irq", @@ -4477,11 +4477,11 @@ em_add_hw_stats(struct e1000_softc *sc) queue_list = SYSCTL_CHILDREN(queue_node); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_head", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_RDH(rxr->me), em_sysctl_reg_handler, "IU", "Receive Descriptor Head"); SYSCTL_ADD_PROC(ctx, queue_list, OID_AUTO, "rxd_tail", - CTLTYPE_UINT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, + CTLTYPE_UINT | CTLFLAG_RD, sc, E1000_RDT(rxr->me), em_sysctl_reg_handler, "IU", "Receive Descriptor Tail"); SYSCTL_ADD_ULONG(ctx, queue_list, OID_AUTO, "rx_irq", From nobody Sun Sep 29 03:58:15 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 4XGVmR4Zlcz5YGsd; Sun, 29 Sep 2024 03:58:15 +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 4XGVmR1YDLz4b03; Sun, 29 Sep 2024 03:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582295; 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=7aCfugGqkDJcPgAtN7A/A2+7guE/dZnK6Oj5DywnrXQ=; b=HMcODV9UWzd+cEJdy58MK0tWikIMWEpa6+iv1y9jWKB3BDYfPMXTnk/AhCH+4U4r5unKRj j7bkTnSYSHLCMKTsnzk4DGH2b0nTVbUMt3PahP+uGQFUm/ditt0hpy8SdSTy67PhntHH9/ d7JFL6srilZp3en3ajbYfKakUiJuYMP9KUgBW1A6/IZORk+1viSBqIhmcbrZYgm9gEJCtR ruWoJDqbx6bUdIYo1lRE5fj+XiKM9nQiM5YGa/KREAq6e+dFIDGdPd9NSseDzAHVUTmnSw WoEewQfm3eEvvZzdetL7SRifQ3ITAu2fSFrj2jaa3jyzEiT2jWCZEkzaGTkOjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582295; 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=7aCfugGqkDJcPgAtN7A/A2+7guE/dZnK6Oj5DywnrXQ=; b=A0E1l8dtg3jC3TjWEiABu3gei5tSCZlZD8l9YJGq25bcRszqycXxyt8CCI70LkArAYN6fV pnkwDSOdHhDef26PeN8pbtsTWRSZY4p3E/1V/xvBCE/tUOz+Snh3orRVsLdTVa37CuJIQK xSLrYXssW/S+GKGtjjZP9e7bVZ3VwV4OFYIjEd5g4JvCkX67UNg6HGuW+xIWF91Re/KsV2 cJA+8RtYAM3nY7Oh8cya/2zLH+1NUlzsQcVXZ1z0+5Vmlre8F9az6UVNWiP4DpBMYrwK9j ttc3A305WiL8KhGYEcMfENy5JCRelbQbIOayLAEy1sqAwFhLyEHn22evrqbxXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582295; a=rsa-sha256; cv=none; b=sk6CmN1K9TRv2lv2Y5Sd+SrTwsQPaicl1vB93s6pPvo1CsMXjxOiU3i7vdNLLKU/D7r5N4 8EQ/H2L+LvE9h8r8y5rde8FgsAg67crJNCG2XOzkokGE7ZX6vndXkCVDOa84Dgt492o65b gUzmHo0/3+XTUyNdoCkSGQzWzIjO3eC9wmtXQp45UsQ7uHl3gIY71AFvHwNdM2CuwuvQXp 6MZmEUzOzVcUlgr2/ift0cbnyCU7+fxtbAWTix22AODmifT/qy0mXv0Yqi0pCDCECBtCK0 W/J6GeOHTumjudrrJPoyPMSH639rzw382DVRiS/Tu1QtVUzar6h5lRoHokNqkQ== 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 4XGVmR13KNzsw3; Sun, 29 Sep 2024 03:58:15 +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 48T3wF8i062937; Sun, 29 Sep 2024 03:58:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T3wFRe062934; Sun, 29 Sep 2024 03:58:15 GMT (envelope-from git) Date: Sun, 29 Sep 2024 03:58:15 GMT Message-Id: <202409290358.48T3wFRe062934@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: 70d1a43c724e - stable/13 - e1000: drop NEEDGIANT from em_sysctl_debug_info use 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/13 X-Git-Reftype: branch X-Git-Commit: 70d1a43c724e00e6ce8d2454515cc68853460225 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=70d1a43c724e00e6ce8d2454515cc68853460225 commit 70d1a43c724e00e6ce8d2454515cc68853460225 Author: Kevin Bowling AuthorDate: 2024-09-22 04:17:30 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:57:54 +0000 e1000: drop NEEDGIANT from em_sysctl_debug_info use The write is only used to toggle the debug print function and this is otherwise stateless. (cherry picked from commit 5f6964d9fbf663f85ee60dae7dfff153b82759d8) --- sys/dev/e1000/if_em.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 156a5640a06e..bf612d465ef0 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -842,7 +842,7 @@ em_if_attach_pre(if_ctx_t ctx) "Prints FW/NVM Versions"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "debug", - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, + CTLTYPE_INT | CTLFLAG_RW, sc, 0, em_sysctl_debug_info, "I", "Debug Information"); SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "fc", From nobody Sun Sep 29 04:01:53 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 4XGVrd42sRz5YGcr; Sun, 29 Sep 2024 04:01:53 +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 4XGVrd3S61z4c84; Sun, 29 Sep 2024 04:01:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582513; 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=BWu6Mnf60W66DDFf8iDhxH4FVl7Rp+fABAAivY6wt0Y=; b=yVsb6mdd0RuwhwoXZcdl5I48R/dXNsFBQVfQMVzxstpPWoQ/0dzgcwa8TnNfNhgkMux+0b nZQ0TZWhsx60udPmaNUSikKjJUwPtdEdgpDoku/18TUtHwZP6WrESql9+Zkgv5E6kB+9wh tsPVugxVSFSlsycWWSXdTMK9mPnHgr3XXx/3+pQ8MHmtfnXqkI2O6mHaAvROlcD7t5zIuR Tz1el+niWLqjZXMWfiA+pIAU1FinYwSaXlyeHSoTjQFxhMrJ9V2IEXkqV2SVr2g5HTXebn bnEKVeClXU931eD8wRaEn/6kt8FpBezvIHkJoZgHNFfBO82v+0gN0KLJuVc9gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582513; 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=BWu6Mnf60W66DDFf8iDhxH4FVl7Rp+fABAAivY6wt0Y=; b=igJXVys9cMHu1JsioHSRehqARruDSE4CmfcVvCQttMn8/Whxt1knqh60e7vsjfF7tVFt/L 63IuT7v/kQIgenqYu2j5XRiA9HeNSn9d+EtwxsEJhQGvb4HZzYMBxq/RWaA7RYpxVJi+JW 9LXwlFDE1tOpApR8cW1COsUodrnmHXrZA9cnVeobGk5YFVs/n//UE3fqE4WznqAt7IUlfC hfTSBqa8FIRq/YkXlinjUu7iIwefw4CE3Po0DZ8yA9Rgq8Nzax53aGA+Y0doHc6i6SDzbH WXAVw5snenmXG+ZKT78Wf4GuB8pLqsySMpIqVJ/yqhwHJZT4tocq3W/2gi2kCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582513; a=rsa-sha256; cv=none; b=UHqqrOA46d25w4XiKM69CrCD8+kE4NIDZZhH71RiWUJRuPdvF8wfccydJ2WnUe+Cwm9Js+ YPWYS9/5/Gc93ObMIifsCn79VTy/Hx+v2cBzsUfwIme0p6TFn+vweZ/Aas30IcGqw/WS6R PvLnx5bhdLHYkA7VG6whS+B/hcsvNukXWvjJr/BIKV2OXdPktvcHM8jOxI1+78GWVIVyCg nfZ4x6FQFAxcnjKFS0BuzohvDCeqlpZTDd6MVhMUS9V8sc9oy9joJlpBI0alM1hbZNyarf koTnLy9LTuKRfsyoTAtSNjGjT1ko95DU/5p6MG2P3TQb6SPcqm+iV6tKnykkQQ== 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 4XGVrd33h5zswb; Sun, 29 Sep 2024 04:01:53 +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 48T41r51080304; Sun, 29 Sep 2024 04:01:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T41rsT080301; Sun, 29 Sep 2024 04:01:53 GMT (envelope-from git) Date: Sun, 29 Sep 2024 04:01:53 GMT Message-Id: <202409290401.48T41rsT080301@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: 06c854adc984 - stable/13 - qlxgbe: Remove pointer printing in ql_ioctl.c 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/13 X-Git-Reftype: branch X-Git-Commit: 06c854adc98472b9e51cb064446d9f664edba5f4 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=06c854adc98472b9e51cb064446d9f664edba5f4 commit 06c854adc98472b9e51cb064446d9f664edba5f4 Author: Fuqian AuthorDate: 2024-05-28 05:18:52 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:58:54 +0000 qlxgbe: Remove pointer printing in ql_ioctl.c PR: 238653 (cherry picked from commit a58b4ee025fcac480e44e1f56acffe2feacc5845) --- sys/dev/qlxgbe/ql_ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/qlxgbe/ql_ioctl.c b/sys/dev/qlxgbe/ql_ioctl.c index 06dda731ed4f..85e41888d289 100644 --- a/sys/dev/qlxgbe/ql_ioctl.c +++ b/sys/dev/qlxgbe/ql_ioctl.c @@ -652,8 +652,8 @@ ql_slowpath_log(qla_host_t *ha, qla_sp_log_t *log) log->num_entries = ha->hw.sp_log_num_entries; } device_printf(ha->pci_dev, - "%s: exit [rval = %d][%p, next_idx = %d, %d entries, %d bytes]\n", - __func__, rval, log->buffer, log->next_idx, log->num_entries, size); + "%s: exit [rval = %d][next_idx = %d, %d entries, %d bytes]\n", + __func__, rval, log->next_idx, log->num_entries, size); mtx_unlock(&ha->sp_log_lock); return (rval); From nobody Sun Sep 29 04:01:54 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 4XGVrf5LtCz5YGsq; Sun, 29 Sep 2024 04:01:54 +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 4XGVrf4SBzz4cVD; Sun, 29 Sep 2024 04:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582514; 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=3nCpH39+bek8a/lLvU9ODqKnZUL+/Do1DrfVHFKlu+o=; b=ITbPrTNA9tNHMzYM6UXBw5APSq5+zuGeYxJKnKXmVcx1QmztGo3C+w/mB9+GlhyID6aJjx EzRF4ErH2PpgnlyWevPBbM8UYbJSDWI9dzXh/KDSfJ9TmLWrTeoUorWJrojNggfrKVZi3o LiPjH/K8ZTObNGBNr98GBqTGZ+BsMhwnMb7sQb5YhBqOm+fsICf+Sy109Br3FBLpTFENQO i4BkaOaQpI93kpYmkgeuHir3xQFa83/Yu53gEYwi51hamC9u7SmP9RcB45aPJY7OkS/yUQ /Y0f74cEMAnJmXCaUDrsvqHPG0yZ8nt9dfsiHkLKjXwYZH0Oz58vCWDIuijTVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582514; 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=3nCpH39+bek8a/lLvU9ODqKnZUL+/Do1DrfVHFKlu+o=; b=RaHg2np+MbLCiK8pSDYW1WuFW3qf7JNae8xVOQxmFXJ2g7FOfDzXbwmAr9iUa8vmllRe7a xaw00iys55FfvtHvXJ2ppSs6iENrcynRXhkqDZY59DMPRHRBbFo4LcLbwQBtYMR5KwQPSf twxXYsDFKBiPUcYxXLvG6dcDMIBLRrGD2Brj9a3/zSk0BSt03hL5Ind+YREXfmwoCqtvHd TnnBuwUAGWhQacG7hu8QOz25zYX6lxP9hAkMMwsMoP748Epox/n6Fh0FcFJPGxWZE1N5UE L4tjOnxl/07ZPln3eIyuIxOkOEOQdy6WW7KE064vg6GYYQaNKGFX5l3GjsAvuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582514; a=rsa-sha256; cv=none; b=EcWkWn/77c+zmYuEQCEX00e+PNd7ZvgstGvcOcden1ktKeLNZP2/djMfuAQxSsdnfvRjn9 IUJEbbUpKMp1eb5uluHEAR7fZqx9+bN+lHQZY2IVU8Q80D6YPgVkR4NauGmG8eWdP14GuK aGbmO0VKsJZeEJdGu/8ptYh5pub7L4yUqpFM2MdF3km433J610h2ttfyoseSFIUF6PO16R zL8CvA/2I+enXoO51cHxeJlLZBu0y4Y1tAU8Oy085NdLG3RO3IZQPtT+9rQZi6jA9ez2pX LDdCBTrRwJ+NvFgcOLbLuM4jG2ESSXqlRRaDZjYerASwBUv02HP3QpHD7/ekaQ== 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 4XGVrf44T0ztK7; Sun, 29 Sep 2024 04:01:54 +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 48T41sk1080349; Sun, 29 Sep 2024 04:01:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T41stC080346; Sun, 29 Sep 2024 04:01:54 GMT (envelope-from git) Date: Sun, 29 Sep 2024 04:01:54 GMT Message-Id: <202409290401.48T41stC080346@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: eee19d438424 - stable/13 - qlxgbe: fix debug prints in ql_os.c 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/13 X-Git-Reftype: branch X-Git-Commit: eee19d4384241fe47281da90b56cec91348636c8 Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=eee19d4384241fe47281da90b56cec91348636c8 commit eee19d4384241fe47281da90b56cec91348636c8 Author: Fuqian Huang AuthorDate: 2024-05-28 05:31:03 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:59:10 +0000 qlxgbe: fix debug prints in ql_os.c QL_DPRINT2 checks the debug level first and then prints. Replace device_printf with QL_DPRINT2 to check debug level first before printing out the kernel pointers. PR: 238655 (cherry picked from commit 3d6c7ee87e9d7f3c8f617c3803af3effa8eb8a16) --- sys/dev/qlxgbe/ql_os.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/qlxgbe/ql_os.c b/sys/dev/qlxgbe/ql_os.c index c1fbdf60c0aa..5e241f11b938 100644 --- a/sys/dev/qlxgbe/ql_os.c +++ b/sys/dev/qlxgbe/ql_os.c @@ -326,7 +326,7 @@ static int qla_pci_attach(device_t dev) { qla_host_t *ha = NULL; - uint32_t rsrc_len; + uint32_t rsrc_len __unused; int i; uint32_t num_rcvq = 0; @@ -409,10 +409,10 @@ qla_pci_attach(device_t dev) __func__); goto qla_pci_attach_err; } - device_printf(dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" + QL_DPRINT2(ha, (dev, "%s: ha %p pci_func 0x%x rsrc_count 0x%08x" " msix_count 0x%x pci_reg %p pci_reg1 %p num_rcvq = %d\n", __func__, ha, ha->pci_func, rsrc_len, ha->msix_count, - ha->pci_reg, ha->pci_reg1, num_rcvq); + ha->pci_reg, ha->pci_reg1, num_rcvq)); if ((ha->msix_count < 64) || (num_rcvq != 32)) { if (ha->hw.num_sds_rings > 15) { @@ -1279,9 +1279,9 @@ qla_send(qla_host_t *ha, struct mbuf **m_headp, uint32_t txr_idx, "mbuf = %p\n", __func__, __LINE__, txr_idx, tx_idx,\ ha->tx_ring[txr_idx].tx_buf[tx_idx].m_head)); - device_printf(ha->pci_dev, "%s [%d]: txr_idx = %d tx_idx = %d " + QL_DPRINT2(ha, (ha->pci_dev, "%s [%d]: txr_idx = %d tx_idx = %d " "mbuf = %p\n", __func__, __LINE__, txr_idx, tx_idx, - ha->tx_ring[txr_idx].tx_buf[tx_idx].m_head); + ha->tx_ring[txr_idx].tx_buf[tx_idx].m_head)); if (m_head) m_freem(m_head); From nobody Sun Sep 29 04:01:55 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 4XGVrh02T6z5YGl3; Sun, 29 Sep 2024 04:01:56 +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 4XGVrg557xz4c5L; Sun, 29 Sep 2024 04:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582515; 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=ATABQh8ysEftMvMakaUEVjNirc+E+lAdZa4mabF0NH8=; b=L6LUlLiJmmu6B/93ZqyzJjXoP4zYErdRuhL8Oc24+fH3SMyK1kpjbdWqBzXQ40E1fyDO4T B0OC5lHa5syefGkQslw1L8DpbETXFSzMdftXISWkJp1LXrupWPyJ+rEgr4n5/tZLw4M3OH 3RytmDJXA0yRzh4Pfl/vHR7k+E9dxtIL6m2hMtwKn3oQpeVAg511a+4HAgysCssCnIi/R2 Zgx5nhSJFtizB1AemTTxvqf0OcdyJtVY1V+GYOpUe2Jc29KxYza2iS868mJMJNjecATyCU 5D5LMlO8NMV8KFzaICHCrh9/oC2XqCCPkJJhONVlxl0mn6E2K6ImlM0RZLKnLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582515; 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=ATABQh8ysEftMvMakaUEVjNirc+E+lAdZa4mabF0NH8=; b=SsbjLBgUetigsnotTu5kIxYk+Ul+2oesjbKRb/5HPTh9ODbMHonafmiJiiw1wP1yufImC2 YyYxX7HkE7fgERM7uzRh1ujAMpE7TxYRKcnNWoOMfiuDiEq7+fuCOuRHdhwaadS+Vsgoaa TMHcKVYao6rn5iIG4KufFaYU+NSmuKaggTROr3J84cGK3y2SfHXL1XfDLuEqoYYnyr19jX 1mlwm112Ti0uYnhsyICe5C9/6pfhjnjg1lcFC/4SvnQ/Yca02FCQgSDrEnlMBoRdG1nAuj 6QU/ECXDrSEXDgZk8bdEt41mxRqMaxKpZIE6A+tWAwfk6gkmxcdpNXDv3P5U0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582515; a=rsa-sha256; cv=none; b=r9aaAYkFCWi4FfeVxxX3IlKbQ2t0jxQuqtEA2SqZ+euEsZotl25qqDVFtdF+FHSgaVidZx +fpRor8IpS9J4citA535OgZcj3by3VR9Tj/q6O9jZVldr2NkxhCAM7dira6/b/KalgYZXK 2lAR2D+nqOTTOmSVUssVFbPQbDs+9IYRLvCpCrGo5Xp/4W2DO0N6ZG2QyQEIsO5Ahab9oV d2MPn+ypGbSbJYbVAUYx4TmbQa5BP8u0n9xAtPkx0jDiuixg8Y6xdRvUfEUiG0j2e7ENAW NXJxgnHTfp0v9bZT5C/n8L4KZdIAf3euP4G9nMj00/ucbFhv+pvhQaFMJBE3+w== 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 4XGVrg4frqztHh; Sun, 29 Sep 2024 04:01:55 +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 48T41tU2080391; Sun, 29 Sep 2024 04:01:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T41t5r080388; Sun, 29 Sep 2024 04:01:55 GMT (envelope-from git) Date: Sun, 29 Sep 2024 04:01:55 GMT Message-Id: <202409290401.48T41t5r080388@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: 73f5d59061ab - stable/13 - qlxge: replace device_printf with QL_DPRINT2 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/13 X-Git-Reftype: branch X-Git-Commit: 73f5d59061ab5f4d8a7e0bc0fb6483a21c2d99cb Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=73f5d59061ab5f4d8a7e0bc0fb6483a21c2d99cb commit 73f5d59061ab5f4d8a7e0bc0fb6483a21c2d99cb Author: Fuqian Huang AuthorDate: 2024-05-28 05:40:12 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:59:23 +0000 qlxge: replace device_printf with QL_DPRINT2 QL_DPRINT2 checks the debug level first before printing. Replace device_printf with QL_DPRINT2 to check debug level first before printing out the kernel pointers. PR: 238656 (cherry picked from commit ae389777583dca0e354fdd43aca3413e209160f4) --- sys/dev/qlxge/qls_os.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/dev/qlxge/qls_os.c b/sys/dev/qlxge/qls_os.c index b4d4c20350ac..0da1c3153caf 100644 --- a/sys/dev/qlxge/qls_os.c +++ b/sys/dev/qlxge/qls_os.c @@ -162,20 +162,20 @@ qls_sysctl_get_drvr_stats(SYSCTL_HANDLER_ARGS) ha = (qla_host_t *)arg1; for (i = 0; i < ha->num_tx_rings; i++) { - device_printf(ha->pci_dev, + QL_DPRINT2((ha->pci_dev, "%s: tx_ring[%d].tx_frames= %p\n", __func__, i, - (void *)ha->tx_ring[i].tx_frames); + (void *)ha->tx_ring[i].tx_frames)); - device_printf(ha->pci_dev, + QL_DPRINT2((ha->pci_dev, "%s: tx_ring[%d].tx_tso_frames= %p\n", __func__, i, - (void *)ha->tx_ring[i].tx_tso_frames); + (void *)ha->tx_ring[i].tx_tso_frames)); - device_printf(ha->pci_dev, + QL_DPRINT2((ha->pci_dev, "%s: tx_ring[%d].tx_vlan_frames= %p\n", __func__, i, - (void *)ha->tx_ring[i].tx_vlan_frames); + (void *)ha->tx_ring[i].tx_vlan_frames)); device_printf(ha->pci_dev, "%s: tx_ring[%d].txr_free= 0x%08x\n", @@ -199,15 +199,15 @@ qls_sysctl_get_drvr_stats(SYSCTL_HANDLER_ARGS) } for (i = 0; i < ha->num_rx_rings; i++) { - device_printf(ha->pci_dev, + QL_DPRINT2((ha->pci_dev, "%s: rx_ring[%d].rx_int= %p\n", __func__, i, - (void *)ha->rx_ring[i].rx_int); + (void *)ha->rx_ring[i].rx_int)); - device_printf(ha->pci_dev, + QL_DPRINT2((ha->pci_dev, "%s: rx_ring[%d].rss_int= %p\n", __func__, i, - (void *)ha->rx_ring[i].rss_int); + (void *)ha->rx_ring[i].rss_int)); device_printf(ha->pci_dev, "%s: rx_ring[%d].lbq_next= 0x%08x\n", @@ -385,9 +385,9 @@ qls_pci_attach(device_t dev) ha->msix_count = qls_get_msix_count(ha); - device_printf(dev, "\n%s: ha %p pci_func 0x%x msix_count 0x%x" + QL_DPRINT2((dev, "\n%s: ha %p pci_func 0x%x msix_count 0x%x" " pci_reg %p pci_reg1 %p\n", __func__, ha, - ha->pci_func, ha->msix_count, ha->pci_reg, ha->pci_reg1); + ha->pci_func, ha->msix_count, ha->pci_reg, ha->pci_reg1)); if (pci_alloc_msix(dev, &ha->msix_count)) { device_printf(dev, "%s: pci_alloc_msi[%d] failed\n", __func__, From nobody Sun Sep 29 04:01:56 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 4XGVrj2YGwz5YGsr; Sun, 29 Sep 2024 04:01:57 +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 4XGVrh61Xpz4cP3; Sun, 29 Sep 2024 04:01:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582516; 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=hFedaG3m5HGajs7GC2HQ04V2+jODvf1zV+MHpnGubxM=; b=Zqho8BTFRUR/U0vMs79ehciAGsYWXRGlAXyWdv7GfRQfHO1aoro4pOAMUr7Dp0H85V+qIn Yf5d3H94o5YAnF0Rjh+O5giRks3+l81O95Z4l1WnTEqpCD6AoArr65UBMWakgOgV9ZuWr2 VwWHU1Wvpmkp1oDVW19qIY5lIGUF/kuPQ3ebKOpKUFnqrlE/eHdvVGPEMeXx0gg6LU9Jt3 m9pIXlc6gLgZ2XXJYzf5t/aal350FcnY0XAT2ekN4vl6oE/LyDdJ55ugiE/4rP1cYl4RdH UGa6lO5OoYQZIDKIAYxbftypsyNzkjFZ8XDydDDl+g8d86v+Ava1FhbwGkdY2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582516; 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=hFedaG3m5HGajs7GC2HQ04V2+jODvf1zV+MHpnGubxM=; b=oJkvCJxMyuV3Ru6hI1AFUZmTjN6Gxki7RaBd41g383wUEJDrRmH7Txqa+XPOgb7b3IC38W Sr+0CqOuRFoTcD1uH0fzjQnB5e9Mys3FDDCyC9nSXNY4hpN52iGujbbmF+wKshAlLfxMZl C4evhAMncVua16wf0Rcf6+V0wqHgGfp4+FKoGer+m/QzRkqW5LMy9srTGTzxWSSpHcneaP AuCxSDTtcMufeISnLZM5wlz0IxY51F8cX+RpNlv4naPNim3o0cfxIyMhj6Y974vfOuSfZW MBRrQ3UVXu1dkDv19nlagUO/CYvioVIP36jAE8Psm2xgTN/nsp1amJq24axx2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582516; a=rsa-sha256; cv=none; b=t1H5Kp+AncVXGMHIPHlrjv9qw4aRVuMU2WCvyzbvULUUw4iCnum5Ee1D6EqXo0V0x5xOB7 hCObSAfJQElCeUY0wzcdbBKKEvEefLnhKlCgARRidQGJzU7VazpwXj5t4DXNoa4LUjEmKp oMHvKZRdheFy/o3seOp3gDEAAtzlnmjGSN1ps37YooYfys0dc2xoUR6VYgQs/ZRbWtfApg RY87WjGsjrTYL/8SkFqE8ddlH/guY9fyFljiQYVC2rv7VxuOfg2yHS4S6G85ltbW/VZmLY c70D6QwRjbJz5oLwKCjBdeXfmRhUMKnJPuuR3z//pXU4ohi80t1TG3EgrN9tgg== 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 4XGVrh5MN1ztZm; Sun, 29 Sep 2024 04:01:56 +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 48T41u5P080437; Sun, 29 Sep 2024 04:01:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T41uNm080434; Sun, 29 Sep 2024 04:01:56 GMT (envelope-from git) Date: Sun, 29 Sep 2024 04:01:56 GMT Message-Id: <202409290401.48T41uNm080434@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: 288ad162e68c - stable/13 - qlnx: qlnxe: Fix kernel address leakage 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/13 X-Git-Reftype: branch X-Git-Commit: 288ad162e68cb239069b2886ee887e6ca0ac2b7a Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=288ad162e68cb239069b2886ee887e6ca0ac2b7a commit 288ad162e68cb239069b2886ee887e6ca0ac2b7a Author: Fuqian Huang AuthorDate: 2024-05-28 05:45:52 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 03:59:36 +0000 qlnx: qlnxe: Fix kernel address leakage In function qlnx_rdma_deregister_if, the address of object rdma_if will be printed out. rdma_if is the address of a global variable qlnxr_drv, which is passed from dev/qlnx/qlnxr/qlnxr_os.c A kernel address leakage happens. Fix this by removing the printf statement. PR: 238646 (cherry picked from commit 9370f49ad1c4625cd73c4d84d3e42ed3e20fabbf) --- sys/dev/qlnx/qlnxe/qlnx_rdma.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_rdma.c b/sys/dev/qlnx/qlnxe/qlnx_rdma.c index 522ef74cf9ce..e5b7c1a62e01 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_rdma.c +++ b/sys/dev/qlnx/qlnxe/qlnx_rdma.c @@ -256,8 +256,6 @@ qlnx_rdma_deregister_if(qlnx_rdma_if_t *rdma_if) int ret = 0; qlnx_host_t *ha; - printf("%s: enter rdma_if = %p\n", __func__, rdma_if); - if (mtx_initialized(&qlnx_rdma_dev_lock)) { mtx_lock(&qlnx_rdma_dev_lock); @@ -288,7 +286,6 @@ qlnx_rdma_deregister_if(qlnx_rdma_if_t *rdma_if) mtx_unlock(&qlnx_rdma_dev_lock); } - printf("%s: exit rdma_if = %p\n", __func__, rdma_if); return (ret); } From nobody Sun Sep 29 04:01:57 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 4XGVrk2xBrz5YGjm; Sun, 29 Sep 2024 04:01:58 +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 4XGVrj6pmjz4cDj; Sun, 29 Sep 2024 04:01:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582518; 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=bcxMpNpp50wXVmTwf12bGahCaK21tj++NnZevYzZ+wY=; b=cFEaUQ8jDhCYCuDbiEtRkMx+LuWg2b18JRiWhgIjlqbFtR+qmddmz/ixO3v5pSHdrTZv7Z G7W+b+f2tZE+41M0GrJGrINOj3/o8CJ03yGZ3x2ZoIlrtWLg2vH1yLu8m7OiP8+IsGsVS0 qQv4hAjxI1EQeXZwn2AimBlYrb3b4AtlLiX1EIZBgaTxVQDYf08WPGyBDkNBVWBEq4yuLJ zVKoJHYvSIGSvfW60wQ4BW5+k95rNtEbbb1SZAhveHRZkp/jyh90cHxoFvh8sAcYTZSJwt osso/5/2i1BSTb+m5b1ErXfBqg8qaaABZhXpW352JlE2HO6X/lUamnWea6cSoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727582518; 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=bcxMpNpp50wXVmTwf12bGahCaK21tj++NnZevYzZ+wY=; b=kBhpt76s7LPw0iYc1/wqfDiexWH63TYe1uYoVXDOoPUubdPBhNmPDyBUf6PBe6DwD1406A FyrhNLr0JRUFIQIFhMGfZCIcunxZ2d0pzO9oxXiuaP57PnDBMSxkja0YD9qhTPjYmohJc6 7QiUeFqPhYDAu10MsmYRkhIsZfUkMzq/uA6u+940eLfPWrD8gryr8FyH+kziDdS2ftdzpu eiPo+/Y7FhaHQz2fGjjaWC1T7hVLG/RnS9AV3jkRHyx4n0NTBl5KjvQRx5FsSSlTml+j19 gPubxpsxNoltmJacnSMhOePsp2EbauTlmPVwdGNHaM6bBzjJkIs49TEuOwIg/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727582518; a=rsa-sha256; cv=none; b=Bpdtg/YDdGP44mwBwdoA/pCVexy7+ZV8xV/kT+aIjzeDAPwi71hRTNs6iQ0jUOJYjZRV4m dayzaNWYdAIkch89BQyI/ncHbXFMSLG2NdMgfEs6jESJq6bfiEk976HwTkEldg3seJtEO5 EzluV7ceIPmBdyn15Ynb5vSB179WXLoREH1zPlhqY+0n4N6UoVhHMDmufE+HIxKgzksSQM 6oSqvaxdtPasqhPkiue5zUELwEJ8a03fgoWeA5mrnaNilX+C0r05q9rfbBsdIpo6ci2sT5 AVt/KV6CTdXQ49Wa9X6gKUWSJnyFj1uRCw15MfnXe1KX9OvUlAnTUQD50DqOxA== 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 4XGVrj6QhtztWF; Sun, 29 Sep 2024 04:01:57 +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 48T41vn6080486; Sun, 29 Sep 2024 04:01:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T41voB080483; Sun, 29 Sep 2024 04:01:57 GMT (envelope-from git) Date: Sun, 29 Sep 2024 04:01:57 GMT Message-Id: <202409290401.48T41voB080483@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: a648b36e63ca - stable/13 - qlnxe: Fix multiple locking issues 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/13 X-Git-Reftype: branch X-Git-Commit: a648b36e63ca8c91e32a3383463b7dd50054c58b Auto-Submitted: auto-generated The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a648b36e63ca8c91e32a3383463b7dd50054c58b commit a648b36e63ca8c91e32a3383463b7dd50054c58b Author: Keith Reynolds AuthorDate: 2024-05-28 06:41:05 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 04:01:08 +0000 qlnxe: Fix multiple locking issues Multiple issues are reported with WITNESS and code inspection of the locking and lock initialization. PR: 278084 (cherry picked from commit 1c45a62a2f667b45ec10a92ad58ff5a34e68b569) --- sys/dev/qlnx/qlnxe/bcm_osal.h | 8 +++---- sys/dev/qlnx/qlnxe/ecore.h | 1 + sys/dev/qlnx/qlnxe/ecore_mcp.c | 48 +++++++++++++++++++++--------------------- sys/dev/qlnx/qlnxe/ecore_mcp.h | 6 +++--- sys/dev/qlnx/qlnxe/qlnx_def.h | 2 +- sys/dev/qlnx/qlnxe/qlnx_os.c | 9 ++++---- sys/dev/qlnx/qlnxe/qlnx_os.h | 4 ++-- 7 files changed, 40 insertions(+), 38 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/bcm_osal.h b/sys/dev/qlnx/qlnxe/bcm_osal.h index 33b78f11ede3..dd5419d40c3a 100644 --- a/sys/dev/qlnx/qlnxe/bcm_osal.h +++ b/sys/dev/qlnx/qlnxe/bcm_osal.h @@ -81,7 +81,7 @@ extern void qlnx_dma_free_coherent(void *ecore_dev, void *v_addr, bus_addr_t phys, uint32_t size); extern void qlnx_link_update(void *p_hwfn); -extern void qlnx_barrier(void *p_hwfn); +extern void qlnx_barrier(void *p_dev); extern void *qlnx_zalloc(uint32_t size); @@ -223,14 +223,14 @@ typedef struct osal_list_t #define OSAL_SPIN_LOCK_ALLOC(p_hwfn, mutex) #define OSAL_SPIN_LOCK_DEALLOC(mutex) mtx_destroy(mutex) #define OSAL_SPIN_LOCK_INIT(lock) {\ - mtx_init(lock, __func__, MTX_NETWORK_LOCK, MTX_SPIN); \ + mtx_init(lock, __func__, "OSAL spin lock", MTX_SPIN); \ } #define OSAL_SPIN_UNLOCK(lock) {\ - mtx_unlock(lock); \ + mtx_unlock_spin(lock); \ } #define OSAL_SPIN_LOCK(lock) {\ - mtx_lock(lock); \ + mtx_lock_spin(lock); \ } #define OSAL_MUTEX_ALLOC(p_hwfn, mutex) diff --git a/sys/dev/qlnx/qlnxe/ecore.h b/sys/dev/qlnx/qlnxe/ecore.h index 5db691b94420..0eaa4c632e05 100644 --- a/sys/dev/qlnx/qlnxe/ecore.h +++ b/sys/dev/qlnx/qlnxe/ecore.h @@ -789,6 +789,7 @@ struct ecore_dev { u8 dp_level; char name[NAME_SIZE]; void *dp_ctx; + void *ha; enum ecore_dev_type type; /* Translate type/revision combo into the proper conditions */ diff --git a/sys/dev/qlnx/qlnxe/ecore_mcp.c b/sys/dev/qlnx/qlnxe/ecore_mcp.c index d94c7382edc5..ab14b1eb5186 100644 --- a/sys/dev/qlnx/qlnxe/ecore_mcp.c +++ b/sys/dev/qlnx/qlnxe/ecore_mcp.c @@ -191,17 +191,17 @@ enum _ecore_status_t ecore_mcp_free(struct ecore_hwfn *p_hwfn) OSAL_FREE(p_hwfn->p_dev, p_hwfn->mcp_info->mfw_mb_cur); OSAL_FREE(p_hwfn->p_dev, p_hwfn->mcp_info->mfw_mb_shadow); - OSAL_SPIN_LOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->cmd_lock); OSAL_LIST_FOR_EACH_ENTRY_SAFE(p_cmd_elem, p_tmp, &p_hwfn->mcp_info->cmd_list, list, struct ecore_mcp_cmd_elem) { ecore_mcp_cmd_del_elem(p_hwfn, p_cmd_elem); } - OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock); #ifdef CONFIG_ECORE_LOCK_ALLOC - OSAL_SPIN_LOCK_DEALLOC(&p_hwfn->mcp_info->cmd_lock); - OSAL_SPIN_LOCK_DEALLOC(&p_hwfn->mcp_info->link_lock); + OSAL_MUTEX_DEALLOC(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_DEALLOC(&p_hwfn->mcp_info->link_lock); #endif } @@ -308,18 +308,18 @@ enum _ecore_status_t ecore_mcp_cmd_init(struct ecore_hwfn *p_hwfn, /* Initialize the MFW spinlocks */ #ifdef CONFIG_ECORE_LOCK_ALLOC - if (OSAL_SPIN_LOCK_ALLOC(p_hwfn, &p_info->cmd_lock)) { + if (OSAL_MUTEX_LOCK_ALLOC(p_hwfn, &p_info->cmd_lock)) { OSAL_FREE(p_hwfn->p_dev, p_hwfn->mcp_info); return ECORE_NOMEM; } - if (OSAL_SPIN_LOCK_ALLOC(p_hwfn, &p_info->link_lock)) { - OSAL_SPIN_LOCK_DEALLOC(&p_info->cmd_lock); + if (OSAL_MUTEX_ALLOC(p_hwfn, &p_info->link_lock)) { + OSAL_MUTEX_DEALLOC(&p_info->cmd_lock); OSAL_FREE(p_hwfn->p_dev, p_hwfn->mcp_info); return ECORE_NOMEM; } #endif - OSAL_SPIN_LOCK_INIT(&p_info->cmd_lock); - OSAL_SPIN_LOCK_INIT(&p_info->link_lock); + OSAL_MUTEX_INIT(&p_info->cmd_lock); + OSAL_MUTEX_INIT(&p_info->link_lock); OSAL_LIST_INIT(&p_info->cmd_list); @@ -381,7 +381,7 @@ enum _ecore_status_t ecore_mcp_reset(struct ecore_hwfn *p_hwfn, } /* Ensure that only a single thread is accessing the mailbox */ - OSAL_SPIN_LOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->cmd_lock); org_mcp_reset_seq = ecore_rd(p_hwfn, p_ptt, MISCS_REG_GENERIC_POR_0); @@ -407,7 +407,7 @@ enum _ecore_status_t ecore_mcp_reset(struct ecore_hwfn *p_hwfn, rc = ECORE_AGAIN; } - OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock); return rc; } @@ -551,7 +551,7 @@ _ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, * The spinlock stays locked until the command is sent. */ - OSAL_SPIN_LOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->cmd_lock); if (!ecore_mcp_has_pending_cmd(p_hwfn)) break; @@ -562,7 +562,7 @@ _ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, else if (rc != ECORE_AGAIN) goto err; - OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock); if (ECORE_MB_FLAGS_IS_SET(p_mb_params, CAN_SLEEP)) { OSAL_MSLEEP(msecs); } else { @@ -588,7 +588,7 @@ _ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, } __ecore_mcp_cmd_and_union(p_hwfn, p_ptt, p_mb_params, seq_num); - OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock); /* Wait for the MFW response */ do { @@ -602,7 +602,7 @@ _ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, } else { OSAL_UDELAY(usecs); } - OSAL_SPIN_LOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->cmd_lock); if (p_cmd_elem->b_is_completed) break; @@ -613,7 +613,7 @@ _ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, else if (rc != ECORE_AGAIN) goto err; - OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock); OSAL_MFW_CMD_PREEMPT(p_hwfn); } while (++cnt < max_retries); @@ -623,9 +623,9 @@ _ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, p_mb_params->cmd, p_mb_params->param); ecore_mcp_print_cpu_info(p_hwfn, p_ptt); - OSAL_SPIN_LOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->cmd_lock); ecore_mcp_cmd_del_elem(p_hwfn, p_cmd_elem); - OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock); if (!ECORE_MB_FLAGS_IS_SET(p_mb_params, AVOID_BLOCK)) ecore_mcp_cmd_set_blocking(p_hwfn, true); @@ -634,7 +634,7 @@ _ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, } ecore_mcp_cmd_del_elem(p_hwfn, p_cmd_elem); - OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock); DP_VERBOSE(p_hwfn, ECORE_MSG_SP, "MFW mailbox: response 0x%08x param 0x%08x [after %d.%03d ms]\n", @@ -647,7 +647,7 @@ _ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, return ECORE_SUCCESS; err: - OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->cmd_lock); + OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock); return rc; } @@ -1439,7 +1439,7 @@ static void ecore_mcp_handle_link_change(struct ecore_hwfn *p_hwfn, u32 status = 0; /* Prevent SW/attentions from doing this at the same time */ - OSAL_SPIN_LOCK(&p_hwfn->mcp_info->link_lock); + OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->link_lock); p_link = &p_hwfn->mcp_info->link_output; OSAL_MEMSET(p_link, 0, sizeof(*p_link)); @@ -1585,7 +1585,7 @@ static void ecore_mcp_handle_link_change(struct ecore_hwfn *p_hwfn, OSAL_LINK_UPDATE(p_hwfn, p_ptt); out: - OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->link_lock); + OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->link_lock); } enum _ecore_status_t ecore_mcp_set_link(struct ecore_hwfn *p_hwfn, @@ -1774,7 +1774,7 @@ ecore_mcp_update_bw(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt) struct public_func shmem_info; u32 resp = 0, param = 0; - OSAL_SPIN_LOCK(&p_hwfn->mcp_info->link_lock); + OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->link_lock); ecore_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info, MCP_PF_ID(p_hwfn)); @@ -1787,7 +1787,7 @@ ecore_mcp_update_bw(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt) ecore_configure_pf_max_bandwidth(p_hwfn->p_dev, p_info->bandwidth_max); - OSAL_SPIN_UNLOCK(&p_hwfn->mcp_info->link_lock); + OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->link_lock); /* Acknowledge the MFW */ ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_BW_UPDATE_ACK, 0, &resp, diff --git a/sys/dev/qlnx/qlnxe/ecore_mcp.h b/sys/dev/qlnx/qlnxe/ecore_mcp.h index c94583cdfba3..edb1f9083467 100644 --- a/sys/dev/qlnx/qlnxe/ecore_mcp.h +++ b/sys/dev/qlnx/qlnxe/ecore_mcp.h @@ -51,10 +51,10 @@ struct ecore_mcp_info { /* List for mailbox commands which were sent and wait for a response */ osal_list_t cmd_list; - /* Spinlock used for protecting the access to the mailbox commands list + /* Lock used for protecting the access to the mailbox commands list * and the sending of the commands. */ - osal_spinlock_t cmd_lock; + osal_mutex_t cmd_lock; /* Flag to indicate whether sending a MFW mailbox command is blocked */ bool b_block_cmd; @@ -62,7 +62,7 @@ struct ecore_mcp_info { /* Spinlock used for syncing SW link-changes and link-changes * originating from attention context. */ - osal_spinlock_t link_lock; + osal_mutex_t link_lock; /* Address of the MCP public area */ u32 public_base; diff --git a/sys/dev/qlnx/qlnxe/qlnx_def.h b/sys/dev/qlnx/qlnxe/qlnx_def.h index c63efd19d794..276804c08ab5 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_def.h +++ b/sys/dev/qlnx/qlnxe/qlnx_def.h @@ -391,7 +391,7 @@ struct qlnx_host { int msix_count; - struct mtx hw_lock; + struct sx hw_lock; /* debug */ diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index d098694ba19a..8e97321e15dd 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -785,7 +785,7 @@ qlnx_pci_attach(device_t dev) ha->pci_dev = dev; - mtx_init(&ha->hw_lock, "qlnx_hw_lock", MTX_NETWORK_LOCK, MTX_DEF); + sx_init(&ha->hw_lock, "qlnx_hw_lock"); ha->flags.lock_init = 1; @@ -1232,6 +1232,7 @@ qlnx_init_hw(qlnx_host_t *ha) int rval = 0; struct ecore_hw_prepare_params params; + ha->cdev.ha = ha; ecore_init_struct(&ha->cdev); /* ha->dp_module = ECORE_MSG_PROBE | @@ -1376,7 +1377,7 @@ qlnx_release(qlnx_host_t *ha) pci_release_msi(dev); if (ha->flags.lock_init) { - mtx_destroy(&ha->hw_lock); + sx_destroy(&ha->hw_lock); } if (ha->pci_reg) @@ -5488,11 +5489,11 @@ qlnx_zalloc(uint32_t size) } void -qlnx_barrier(void *p_hwfn) +qlnx_barrier(void *p_dev) { qlnx_host_t *ha; - ha = (qlnx_host_t *)((struct ecore_hwfn *)p_hwfn)->p_dev; + ha = ((struct ecore_dev *) p_dev)->ha; bus_barrier(ha->pci_reg, 0, 0, BUS_SPACE_BARRIER_WRITE); } diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.h b/sys/dev/qlnx/qlnxe/qlnx_os.h index f5711d9e0295..71ccb256ea0c 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.h +++ b/sys/dev/qlnx/qlnxe/qlnx_os.h @@ -140,8 +140,8 @@ MALLOC_DECLARE(M_QLNXBUF); /* * Locks */ -#define QLNX_LOCK(ha) mtx_lock(&ha->hw_lock) -#define QLNX_UNLOCK(ha) mtx_unlock(&ha->hw_lock) +#define QLNX_LOCK(ha) sx_xlock(&ha->hw_lock) +#define QLNX_UNLOCK(ha) sx_xunlock(&ha->hw_lock) /* * structure encapsulating a DMA buffer From nobody Sun Sep 29 04:01:58 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 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: 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/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; From nobody Sun Sep 29 04:18:49 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 4XGWDB0162z5YHhL; Sun, 29 Sep 2024 04:18:50 +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 4XGWD96Gszz4fV0; Sun, 29 Sep 2024 04:18:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727583529; 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=Ezzd0BwcdiI3an3lX4izR9jV2lSef9JH0YKLlWCAFSs=; b=FRStN65o1FcqkhEiTWzuI+CE9x0Wvk5sAySULQjo2zhSlhbDdHWNCJb+z0Gb1PivrtTtJb YBi4VTtTRCxESUI+iYGsNysO9wlgkaFrJfoi+0Ku26DhHROb9zr42DH2B61I0e8hJiqea2 YYG+W9CnAZiZzny+yVEI9At5ImGWpjO2g9+5SvQ0UmMBEPYoOKiWCYZ3oQfILPYDpqwlWj Eksk+lyrqgKg+xiy3989J0Gjauuiegng/TOr3dfpGXc4qlDd7hyIK0NzoWoQQ+RhVwsllu Ng/JhW8kRFtMYOcNfDn+ZWGrnhnP+sO3J1xyZHDRgAx1a7OJvQM9syHt2y7w2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727583529; 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=Ezzd0BwcdiI3an3lX4izR9jV2lSef9JH0YKLlWCAFSs=; b=uKaWXb9ZaXoLl+Upj3WV8NI7IFP9wHRV2C0TO0OBo7RLQd5UDHxENAPr7m+f6gPNr9UfNI R9ri+U2Jd6pyFmrsXvtD1wSlEDZ2H3+5kdjQ9Y0/ztWJVysC+HwS/eLkn+M4Tt8MJ5wWpt 5xXaMDP9DTvqna1/AyHnYKyMUBx/7Qe5Zr4dQPBmJO5Lig8oInkePObvOxGWeYgtPr9AVv D5Yndh4mZcTazXLHEac8Mic+M/OtrgemEqAcikzBRnygr74c2S5aPHbW94+qFxpJyxMC5O sf0SZYmJyIvpXreEHeVvebMezoZf1RL6tFnvplH4dHAzoCuXBra25nebuoNZZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727583529; a=rsa-sha256; cv=none; b=NMrAcQIicQcQLVCsyYmFEzqEGL37avSUBaI6M31zkcpeCR6VcOKJE77cVXkzWDE3F51ztA 5lHL4uppWy1IZMU6cwnBpUevn1cMn0eubvy+0QiDEey42ir/rpMnUEgxgiArC1Ble2gTtk gscf4LqnmMqHMzbXuwKSq4gZb4AkoESHbZveHnbb+RhoBs63GiM+nxQZPTkoEMA69hJBML RinGCphpAx1IGASd2gUyI2BqN4kjz+D0A1ON6147W+kKljCyKmY7htii0Y9HvkBaBJmt1o UN9a8HvKiJxUhQ3JSmrmuD6l2KyH1H+MobJ4O/b+FQZSe4cDuyzMbuwaEkMQIw== 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 4XGWD95t9JztNB; Sun, 29 Sep 2024 04:18:49 +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 48T4InLA097752; Sun, 29 Sep 2024 04:18:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T4InjK097749; Sun, 29 Sep 2024 04:18:49 GMT (envelope-from git) Date: Sun, 29 Sep 2024 04:18:49 GMT Message-Id: <202409290418.48T4InjK097749@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: 1e3b1870ad2a - main - ixgbe: Switch if_sriov read/write back to ixgbe_mbx APIs 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: 1e3b1870ad2a426de6e3f5445211b698f20f7f1f Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1e3b1870ad2a426de6e3f5445211b698f20f7f1f commit 1e3b1870ad2a426de6e3f5445211b698f20f7f1f Author: Kevin Bowling AuthorDate: 2024-09-29 04:15:53 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 04:17:21 +0000 ixgbe: Switch if_sriov read/write back to ixgbe_mbx APIs These are more succinct than jumping through the function pointers directly and add some additional error handling. MFC after: 1 week --- sys/dev/ixgbe/if_sriov.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/ixgbe/if_sriov.c b/sys/dev/ixgbe/if_sriov.c index 6a2dad4bca42..0916ae1ac7cc 100644 --- a/sys/dev/ixgbe/if_sriov.c +++ b/sys/dev/ixgbe/if_sriov.c @@ -100,7 +100,7 @@ ixgbe_send_vf_msg(struct ixgbe_hw *hw, struct ixgbe_vf *vf, u32 msg) if (vf->flags & IXGBE_VF_CTS) msg |= IXGBE_VT_MSGTYPE_CTS; - hw->mbx.ops[vf->pool].write(hw, &msg, 1, vf->pool); + ixgbe_write_mbx(hw, &msg, 1, vf->pool); } static inline void @@ -595,8 +595,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf) hw = &sc->hw; - error = hw->mbx.ops[vf->pool].read(hw, msg, IXGBE_VFMAILBOX_SIZE, - vf->pool); + error = ixgbe_read_mbx(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool); if (error != 0) return; From nobody Sun Sep 29 04:58:16 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 4XGX5h57h0z5X65R; Sun, 29 Sep 2024 04:58:16 +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 4XGX5h4bTkz4hjM; Sun, 29 Sep 2024 04:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727585896; 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=BfjuxQwnWfVnSAz9G3veODR0Y0f6sYo8LJhYqefaKwA=; b=kYdRck4cNhC/tdnDNSLhWcGZRO4ulzw8vseQMgXYkAZ7riV/nRk3bA+KsMx33JB9qNS/yz pSUhgq6cPvCYRnsiU2bApu74i0GQk07av1NClRAXb5mtKG401J6VaJLZauet3rE62EVjCz K1Oj/N0FBq7betmRVkz/SkM3MrrAI62j5/jAn+jtZsMiESEc12XMxovjxDv3CJSYXXAKi/ LxszY9P6HlfMSKlA2DRttvtyvGgjrBJsiIVixPJmIKCyNfe4Lex6B8DRbZefXpiEZayTgK iO4z8ryVeCFBj7pU0eENrUl22+1ipd266stKNpx2DxsAoyqL0CvSqOfouRN07Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727585896; 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=BfjuxQwnWfVnSAz9G3veODR0Y0f6sYo8LJhYqefaKwA=; b=RcEriVMefaT/sEwK/63TOAvZTjqrbQc3Bkx0qoEpVgJGawGaQAfnSMm98H8UMHdi5D0Ko4 Brv7OkouqB6A9E/mk0BMAV4r55oX/7I8P65wX9kSzv9V928wXwadLG7oYtCncfccAs6Uo6 BZaHydeLoyEpdDrchJ7mcslaKiN9AbisUKRunxoCLoLbtvVFVuc/XrLlkuFC0FtsLK1zGh oV0xWMkXNNiFTXqLg41S8dw0uNWY74cVZqRs2WSBEGunyOH4VEPxHM6q0tV9rsai0PVhyj B6qkPDi9tQhLLP4Fz2OAOD33mFRVf5TB3JM+3V5UjOXYvmlUAzDBLY0CMkMnfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727585896; a=rsa-sha256; cv=none; b=qCxp76hDC1x9gcKvCvpV8eVFFV5RrOLnVvb0suE4XAd/u44/itDjstBGYsfa2LXpS5QaPi O27OnhC+asjw/cqhPl2mXMuTv0rcp4tcD+J+BGDSO+t0TNeKW2YDlADpIvV//OIqKCawfU /lqL1yvsjQI2x4LxuGPVDm9CclsU42T58+m+73coCrwUxZk27ijCfYqHlD3wCEIC0BEIfc NK4PzSvAul5fMu3KjePdqpBwTQZA4qFpL1af34X9Yn9SWnAv6vLpOjxSPSAOoj8zl+R0eH FME1BdpuTgtTD1DhhK1cY2TzMc21RUYkLd7GcJvOKscX3a3iqM3AiUPJj84hzA== 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 4XGX5h4BqZzvXf; Sun, 29 Sep 2024 04:58:16 +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 48T4wGjx064637; Sun, 29 Sep 2024 04:58:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T4wG7F064634; Sun, 29 Sep 2024 04:58:16 GMT (envelope-from git) Date: Sun, 29 Sep 2024 04:58:16 GMT Message-Id: <202409290458.48T4wG7F064634@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: a40ecb6f7405 - main - igc: Remove non-existent legacy absolute and packet timers 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: a40ecb6f740530fb7e6a95e702113aa3fe24d975 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a40ecb6f740530fb7e6a95e702113aa3fe24d975 commit a40ecb6f740530fb7e6a95e702113aa3fe24d975 Author: Kevin Bowling AuthorDate: 2024-09-29 04:32:49 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 04:57:37 +0000 igc: Remove non-existent legacy absolute and packet timers igc, derived from igb, does not use these registers. All interrupt timing is governed by EITR or LLI and driven by write-back. MFC after: 1 week Sponsored by: BBOX.io --- sys/dev/igc/if_igc.c | 109 ------------------------------------------------- sys/dev/igc/if_igc.h | 59 -------------------------- sys/dev/igc/igc_regs.h | 5 --- 3 files changed, 173 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index bfa33c82f7ba..c78edab5e38a 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -121,9 +121,6 @@ static int igc_sysctl_debug_info(SYSCTL_HANDLER_ARGS); static int igc_get_rs(SYSCTL_HANDLER_ARGS); static void igc_print_debug_info(struct igc_adapter *); static int igc_is_valid_ether_addr(u8 *); -static int igc_sysctl_int_delay(SYSCTL_HANDLER_ARGS); -static void igc_add_int_delay_sysctl(struct igc_adapter *, const char *, - const char *, struct igc_int_delay_info *, int, int); /* Management and WOL Support */ static void igc_get_hw_control(struct igc_adapter *); static void igc_release_hw_control(struct igc_adapter *); @@ -211,12 +208,6 @@ static driver_t igc_if_driver = { * Tunable default values. *********************************************************************/ -#define IGC_TICKS_TO_USECS(ticks) ((1024 * (ticks) + 500) / 1000) -#define IGC_USECS_TO_TICKS(usecs) ((1000 * (usecs) + 512) / 1024) - -#define MAX_INTS_PER_SEC 8000 -#define DEFAULT_ITR (1000000000/(MAX_INTS_PER_SEC * 256)) - /* Allow common code without TSO */ #ifndef CSUM_TSO #define CSUM_TSO 0 @@ -229,22 +220,6 @@ static int igc_disable_crc_stripping = 0; SYSCTL_INT(_hw_igc, OID_AUTO, disable_crc_stripping, CTLFLAG_RDTUN, &igc_disable_crc_stripping, 0, "Disable CRC Stripping"); -static int igc_tx_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_TIDV_VAL); -static int igc_rx_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_RDTR_VAL); -SYSCTL_INT(_hw_igc, OID_AUTO, tx_int_delay, CTLFLAG_RDTUN, &igc_tx_int_delay_dflt, - 0, "Default transmit interrupt delay in usecs"); -SYSCTL_INT(_hw_igc, OID_AUTO, rx_int_delay, CTLFLAG_RDTUN, &igc_rx_int_delay_dflt, - 0, "Default receive interrupt delay in usecs"); - -static int igc_tx_abs_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_TADV_VAL); -static int igc_rx_abs_int_delay_dflt = IGC_TICKS_TO_USECS(IGC_RADV_VAL); -SYSCTL_INT(_hw_igc, OID_AUTO, tx_abs_int_delay, CTLFLAG_RDTUN, - &igc_tx_abs_int_delay_dflt, 0, - "Default transmit interrupt delay limit in usecs"); -SYSCTL_INT(_hw_igc, OID_AUTO, rx_abs_int_delay, CTLFLAG_RDTUN, - &igc_rx_abs_int_delay_dflt, 0, - "Default receive interrupt delay limit in usecs"); - static int igc_smart_pwr_down = false; SYSCTL_INT(_hw_igc, OID_AUTO, smart_pwr_down, CTLFLAG_RDTUN, &igc_smart_pwr_down, 0, "Set to true to leave smart power down enabled on newer adapters"); @@ -536,29 +511,6 @@ igc_if_attach_pre(if_ctx_t ctx) igc_setup_msix(ctx); igc_get_bus_info(hw); - /* Set up some sysctls for the tunable interrupt delays */ - igc_add_int_delay_sysctl(adapter, "rx_int_delay", - "receive interrupt delay in usecs", &adapter->rx_int_delay, - IGC_REGISTER(hw, IGC_RDTR), igc_rx_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "tx_int_delay", - "transmit interrupt delay in usecs", &adapter->tx_int_delay, - IGC_REGISTER(hw, IGC_TIDV), igc_tx_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "rx_abs_int_delay", - "receive interrupt delay limit in usecs", - &adapter->rx_abs_int_delay, - IGC_REGISTER(hw, IGC_RADV), - igc_rx_abs_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "tx_abs_int_delay", - "transmit interrupt delay limit in usecs", - &adapter->tx_abs_int_delay, - IGC_REGISTER(hw, IGC_TADV), - igc_tx_abs_int_delay_dflt); - igc_add_int_delay_sysctl(adapter, "itr", - "interrupt delay limit in usecs/4", - &adapter->tx_itr, - IGC_REGISTER(hw, IGC_ITR), - DEFAULT_ITR); - hw->mac.autoneg = DO_AUTO_NEG; hw->phy.autoneg_wait_to_complete = false; hw->phy.autoneg_advertised = AUTONEG_ADV_DEFAULT; @@ -2015,12 +1967,6 @@ igc_initialize_receive_unit(if_ctx_t ctx) if (!igc_disable_crc_stripping) rctl |= IGC_RCTL_SECRC; - /* - * Set the interrupt throttling rate. Value is calculated - * as DEFAULT_ITR = 1/(MAX_INTS_PER_SEC * 256ns) - */ - IGC_WRITE_REG(hw, IGC_ITR, DEFAULT_ITR); - rxcsum = IGC_READ_REG(hw, IGC_RXCSUM); if (if_getcapenable(ifp) & IFCAP_RXCSUM) { rxcsum |= IGC_RXCSUM_CRCOFL; @@ -2717,61 +2663,6 @@ igc_print_nvm_info(struct igc_adapter *adapter) printf("\n"); } -static int -igc_sysctl_int_delay(SYSCTL_HANDLER_ARGS) -{ - struct igc_int_delay_info *info; - struct igc_adapter *adapter; - u32 regval; - int error, usecs, ticks; - - info = (struct igc_int_delay_info *) arg1; - usecs = info->value; - error = sysctl_handle_int(oidp, &usecs, 0, req); - if (error != 0 || req->newptr == NULL) - return (error); - if (usecs < 0 || usecs > IGC_TICKS_TO_USECS(65535)) - return (EINVAL); - info->value = usecs; - ticks = IGC_USECS_TO_TICKS(usecs); - if (info->offset == IGC_ITR) /* units are 256ns here */ - ticks *= 4; - - adapter = info->adapter; - - regval = IGC_READ_OFFSET(&adapter->hw, info->offset); - regval = (regval & ~0xffff) | (ticks & 0xffff); - /* Handle a few special cases. */ - switch (info->offset) { - case IGC_RDTR: - break; - case IGC_TIDV: - if (ticks == 0) { - adapter->txd_cmd &= ~IGC_TXD_CMD_IDE; - /* Don't write 0 into the TIDV register. */ - regval++; - } else - adapter->txd_cmd |= IGC_TXD_CMD_IDE; - break; - } - IGC_WRITE_OFFSET(&adapter->hw, info->offset, regval); - return (0); -} - -static void -igc_add_int_delay_sysctl(struct igc_adapter *adapter, const char *name, - const char *description, struct igc_int_delay_info *info, - int offset, int value) -{ - info->adapter = adapter; - info->offset = offset; - info->value = value; - SYSCTL_ADD_PROC(device_get_sysctl_ctx(adapter->dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(adapter->dev)), - OID_AUTO, name, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, - info, 0, igc_sysctl_int_delay, "I", description); -} - /* * Set flow control using sysctl: * Flow control values: diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index 0c22ce9f76f4..92865b5b9eb1 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -131,65 +131,6 @@ #define IGC_DEFAULT_MULTI_RXD 4096 #define IGC_MAX_RXD 4096 -/* - * IGC_TIDV_VAL - Transmit Interrupt Delay Value - * Valid Range: 0-65535 (0=off) - * Default Value: 64 - * This value delays the generation of transmit interrupts in units of - * 1.024 microseconds. Transmit interrupt reduction can improve CPU - * efficiency if properly tuned for specific network traffic. If the - * system is reporting dropped transmits, this value may be set too high - * causing the driver to run out of available transmit descriptors. - */ -#define IGC_TIDV_VAL 64 - -/* - * IGC_TADV_VAL - Transmit Absolute Interrupt Delay Value - * Valid Range: 0-65535 (0=off) - * Default Value: 64 - * This value, in units of 1.024 microseconds, limits the delay in which a - * transmit interrupt is generated. Useful only if IGC_TIDV is non-zero, - * this value ensures that an interrupt is generated after the initial - * packet is sent on the wire within the set amount of time. Proper tuning, - * along with IGC_TIDV_VAL, may improve traffic throughput in specific - * network conditions. - */ -#define IGC_TADV_VAL 64 - -/* - * IGC_RDTR_VAL - Receive Interrupt Delay Timer (Packet Timer) - * Valid Range: 0-65535 (0=off) - * Default Value: 0 - * This value delays the generation of receive interrupts in units of 1.024 - * microseconds. Receive interrupt reduction can improve CPU efficiency if - * properly tuned for specific network traffic. Increasing this value adds - * extra latency to frame reception and can end up decreasing the throughput - * of TCP traffic. If the system is reporting dropped receives, this value - * may be set too high, causing the driver to run out of available receive - * descriptors. - * - * CAUTION: When setting IGC_RDTR to a value other than 0, adapters - * may hang (stop transmitting) under certain network conditions. - * If this occurs a WATCHDOG message is logged in the system - * event log. In addition, the controller is automatically reset, - * restoring the network connection. To eliminate the potential - * for the hang ensure that IGC_RDTR is set to 0. - */ -#define IGC_RDTR_VAL 0 - -/* - * Receive Interrupt Absolute Delay Timer - * Valid Range: 0-65535 (0=off) - * Default Value: 64 - * This value, in units of 1.024 microseconds, limits the delay in which a - * receive interrupt is generated. Useful only if IGC_RDTR is non-zero, - * this value ensures that an interrupt is generated after the initial - * packet is received within the set amount of time. Proper tuning, - * along with IGC_RDTR, may improve traffic throughput in specific network - * conditions. - */ -#define IGC_RADV_VAL 64 - /* * This parameter controls whether or not autonegotation is enabled. * 0 - Disable autonegotiation diff --git a/sys/dev/igc/igc_regs.h b/sys/dev/igc/igc_regs.h index f4ded07ce6ab..26614dc33df6 100644 --- a/sys/dev/igc/igc_regs.h +++ b/sys/dev/igc/igc_regs.h @@ -27,7 +27,6 @@ #define IGC_CONNSW 0x00034 /* Copper/Fiber switch control - RW */ #define IGC_VET 0x00038 /* VLAN Ether Type - RW */ #define IGC_ICR 0x01500 /* Intr Cause Read - RC/W1C */ -#define IGC_ITR 0x000C4 /* Interrupt Throttling Rate - RW */ #define IGC_ICS 0x01504 /* Intr Cause Set - WO */ #define IGC_IMS 0x01508 /* Intr Mask Set/Read - RW */ #define IGC_IMC 0x0150C /* Intr Mask Clear - WO */ @@ -78,8 +77,6 @@ #define IGC_FCRTV 0x02460 /* Flow Control Refresh Timer Value - RW */ /* Split and Replication Rx Control - RW */ #define IGC_RXPBS 0x02404 /* Rx Packet Buffer Size - RW */ -#define IGC_RDTR 0x02820 /* Rx Delay Timer - RW */ -#define IGC_RADV 0x0282C /* Rx Interrupt Absolute Delay Timer - RW */ /* Shadow Ram Write Register - RW */ #define IGC_SRWR 0x12018 #define IGC_EEC_REG 0x12010 @@ -148,8 +145,6 @@ #define IGC_FFVT_REG(_i) (0x09800 + ((_i) * 8)) #define IGC_FFLT_REG(_i) (0x05F00 + ((_i) * 8)) #define IGC_TXPBS 0x03404 /* Tx Packet Buffer Size - RW */ -#define IGC_TIDV 0x03820 /* Tx Interrupt Delay Value - RW */ -#define IGC_TADV 0x0382C /* Tx Interrupt Absolute Delay Val - RW */ /* Statistics Register Descriptions */ #define IGC_CRCERRS 0x04000 /* CRC Error Count - R/clr */ #define IGC_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ From nobody Sun Sep 29 08:33:19 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 4XGcsq4GTqz5XL5M; Sun, 29 Sep 2024 08:33:19 +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 4XGcsq2ffmz41JK; Sun, 29 Sep 2024 08:33:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727598799; 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=7ITNTCGG+NrOEpa3eunZueiwHgps8Se7FNeTNI++JPE=; b=m3x8vddVIpcjAVsJ5Keb3EATii6yggBt6dxAy18oK9m1ZK86zVgBQV71q+Zqr9CQnpIBfT x2CX/vtkJmbDHh8LGsTjY8UqWtRYPS4Bk1CfSTkqfhxfMfggFf3kNBtF8h0x7ODWxCUqup PtfRNVOwJ7VU6X5a4Ir/euixK9P29EnbHW25k4EAiXej9TfDhLqJ6Vm9W3y5rrBIKJgMnR IULJcMCcSnouTbVzcc54HgPYRKtmR8pS5NLcR/beFHYOiVVaI0mcA1T7TG1CauEeNDqxF+ WO2aqco1/f29TrLk2VaplfV16YXq1UKo/ObkpQg1Lcygdmn6B0cKUwVbKYUkGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727598799; 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=7ITNTCGG+NrOEpa3eunZueiwHgps8Se7FNeTNI++JPE=; b=cY2ENgZzAK0hentC98CeyHkOaxCA8gS5/IEWXBenKVp0okuCrEGLTvXsTGiadW3njBFFix QR45Xp3yZuDREmaGOZpd992+i5zs1r6S5sFAH6k4XDgRR2PZUIH+gUoayGv7n0hUDypr7i T/PZTtxj+0RRKD3F/vPxJhF8LIfkit/sdUyblKb1zxACb75Ca4cU4nf3lAbUVHlIQvXQ43 iknAmlzlfnpNLRLVa6P7rNcfHkI4ScbEMrLkLLm1EPWADd9izn4roo8GxGiHgkPgyJP3n6 rlmr75B+c830zmUH/tkoC+rzGF7Ix59u71ihi5gmggEWnnpkkTBIeIk3jdzecg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727598799; a=rsa-sha256; cv=none; b=HaLp6MKgTQVFWnhd2N4xr8jLLgtKxHy/Zp1UnUdmEgrf81zCLo7eAAOVKpMAxM3+q3rW/8 3cuDXx2rB+Rty0lUZfkZaVIrr1koiz02Cq8LWyInUXpglsY/vMVvQd212pXFcLquCYfEkb sW+B4Y1ZBxJb9R4YvqZtWrc70QyBC/+oBob7VaRweMRYrtb8qgvC6m3VNeMBiRFUV9CKKi mNwi6V2lQTnjv9iE9ESGL4ShpwkMVjBHktKzfNh7Pq1J89rT1r1nP806yau4ZBkSkH3r+U 4lk2YlieqKKVVHpz6VVHmiiKddxKgvdhFRJ0lcZOHW1Gw0zQ5WD85gcERWm75Q== 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 4XGcsq2GmPz12Pr; Sun, 29 Sep 2024 08:33:19 +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 48T8XJbX036476; Sun, 29 Sep 2024 08:33:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48T8XJpU036473; Sun, 29 Sep 2024 08:33:19 GMT (envelope-from git) Date: Sun, 29 Sep 2024 08:33:19 GMT Message-Id: <202409290833.48T8XJpU036473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Popov Subject: git: 1df198cf9302 - main - usr.sbin/jail/jail.8: Make a reference more accurate 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: arrowd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1df198cf93024e75abd7e4723171c4c54abb6973 Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/src/commit/?id=1df198cf93024e75abd7e4723171c4c54abb6973 commit 1df198cf93024e75abd7e4723171c4c54abb6973 Author: Gleb Popov AuthorDate: 2024-09-28 12:53:17 +0000 Commit: Gleb Popov CommitDate: 2024-09-29 08:33:14 +0000 usr.sbin/jail/jail.8: Make a reference more accurate The zfs-jail(8) link is also used in the other place within this man Approved By: imp Differential Revision: https://reviews.freebsd.org/D46832 --- usr.sbin/jail/jail.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/jail/jail.8 b/usr.sbin/jail/jail.8 index 881d07b1b626..89e669adc47f 100644 --- a/usr.sbin/jail/jail.8 +++ b/usr.sbin/jail/jail.8 @@ -750,7 +750,7 @@ and only when .Va enforce_statfs is set to a value lower than 2. See -.Xr zfs 8 +.Xr zfs-jail 8 for information on how to configure the ZFS filesystem to operate from within a jail. .It Va allow.vmm From nobody Sun Sep 29 10:06:09 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 4XGfwy1cWVz5XRml; Sun, 29 Sep 2024 10:06:10 +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 4XGfwy13vRz4G2H; Sun, 29 Sep 2024 10:06:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727604370; 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=dlauLow5WNM/Ha5TW6U33eG6crw7owsmnyNLN87Oo0M=; b=XzdPPYIPqw30Iz6cgTEWyXHoH59dENxJ354s41+sogBR2b2JTak6BhsciKsYxa/0YLTlBg K0G/999ZBsfzxK8wggFTKAa6f6FnLiGpatM1kq8SIdcux3aTYnjmbBgIHmIVABFpbIL3l7 jtoFRj0FtCu/grvRpCFSmCObjzQeagPx6sG4hdriYw1AQnLQjC0Dha9RxprMwRqligGPFa wqd7Jt6qTegkHoQSTBr6Ku/vMp5XMWLZLk0YsyolZnSlHlYxJAsEyuajFv/ouNk0E3abVm KFkLCj9b1NzYbIoeOxhPxc5EyuMpDeWHGpktQZ/+YxhyxO7aacRa3JLsHrqo1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727604370; 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=dlauLow5WNM/Ha5TW6U33eG6crw7owsmnyNLN87Oo0M=; b=dice+Pj89MQ8bpqvmZCLagFC+8byd+rN2r7SOF5mIBVfgIQ7Q7I2Ba3yyBvptW10T0usQw bxLSG2Ux5h3U6S65oiopI1HToc+q3bEcvN3SWN3L1yJThK6A3diVKkIoi5i/nyS/LeWbPz FC7VI7SGDlS3pImB/qisC15oGb17k3ZMznTNlGYFDzye8VuswTU9gOSSBBNPR7woiIqSs0 Le8kQW2eYt0N4BjxJjUdkzcZ9dq/isYN6wl8x1ui8753wLOn3Cyv/YJCHNqGJcUBpZ8o44 FAll3a7TIhYhxZVvGEA1j83mil5sd71TNcmXgSr7J5QXocBVddIBCLnQLnOjyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727604370; a=rsa-sha256; cv=none; b=NieytRODDKMNCQygE3GOAtIYAOEqSTZ0xeLVl7R7lL8PsEPDGnhckbiNxLCWKP5ulFY/xF +PvyaJUxCOSkhhhH9+TZZtB+L5mzj5UwZVqPA+2NROX4+HI14WEMktbYvbX7vNxwLLJA5Y HsCjxpj9xkvavOEDZ1S9KtAjgsF01lQEKWhTYV0GENKYT0/qyO1qyTWI+VK1B5O7Oez3iG Wn+53JtspJChmfZAssjpw4i9hipS1cHCNXUBQVNFQZXWd4/FSiYQf3ewaO6hIPRISX35YD vYrXEBqdfaCoX4iGQEAofUQR5c7Ad80H2kJ55fMNR7Ktry4e5H2fb6AnFVd/dg== 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 4XGfwy0g2Tz14NH; Sun, 29 Sep 2024 10:06:10 +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 48TA69Yw090981; Sun, 29 Sep 2024 10:06:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TA69VZ090978; Sun, 29 Sep 2024 10:06:09 GMT (envelope-from git) Date: Sun, 29 Sep 2024 10:06:09 GMT Message-Id: <202409291006.48TA69VZ090978@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: 33ed9bdca307 - main - igc: Add NVM/firmware prints and sysctl 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: 33ed9bdca307bedb3d66a50ed7d4d7b4bf4acf39 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=33ed9bdca307bedb3d66a50ed7d4d7b4bf4acf39 commit 33ed9bdca307bedb3d66a50ed7d4d7b4bf4acf39 Author: Kevin Bowling AuthorDate: 2024-09-29 09:23:38 +0000 Commit: Kevin Bowling CommitDate: 2024-09-29 10:06:03 +0000 igc: Add NVM/firmware prints and sysctl This chipset suffered an (un)usual number of bugs and iterations. Let's add our NVM/firmware code from e1000 and the similar igc_nvm function from DPDK to keep track of issues. MFC after: 1 week Sponsored by: BBOX.io --- sys/dev/igc/if_igc.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/igc/if_igc.h | 2 + sys/dev/igc/igc_defines.h | 28 +++++++++++-- sys/dev/igc/igc_nvm.c | 81 ++++++++++++++++++++++++++++++++++++ sys/dev/igc/igc_nvm.h | 18 ++++++++ 5 files changed, 229 insertions(+), 4 deletions(-) diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c index c78edab5e38a..006fecdab7b0 100644 --- a/sys/dev/igc/if_igc.c +++ b/sys/dev/igc/if_igc.c @@ -115,6 +115,10 @@ static void igc_update_stats_counters(struct igc_adapter *); static void igc_add_hw_stats(struct igc_adapter *adapter); static int igc_if_set_promisc(if_ctx_t ctx, int flags); static void igc_setup_vlan_hw_support(if_ctx_t ctx); +static void igc_fw_version(struct igc_adapter *); +static void igc_sbuf_fw_version(struct igc_fw_version *, struct sbuf *); +static void igc_print_fw_version(struct igc_adapter *); +static int igc_sysctl_print_fw_version(SYSCTL_HANDLER_ARGS); static int igc_sysctl_nvm_info(SYSCTL_HANDLER_ARGS); static void igc_print_nvm_info(struct igc_adapter *); static int igc_sysctl_debug_info(SYSCTL_HANDLER_ARGS); @@ -440,6 +444,12 @@ igc_if_attach_pre(if_ctx_t ctx) OID_AUTO, "nvm", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, adapter, 0, igc_sysctl_nvm_info, "I", "NVM Information"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "fw_version", CTLTYPE_STRING | CTLFLAG_RD, + adapter, 0, igc_sysctl_print_fw_version, "A", + "Prints FW/NVM Versions"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "debug", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, @@ -586,6 +596,11 @@ igc_if_attach_pre(if_ctx_t ctx) goto err_late; } + /* Save the EEPROM/NVM versions */ + igc_fw_version(adapter); + + igc_print_fw_version(adapter); + /* * Get Wake-on-Lan and Management info for later use */ @@ -2612,6 +2627,95 @@ igc_add_hw_stats(struct igc_adapter *adapter) "Rx Desc Min Thresh Count"); } +static void +igc_fw_version(struct igc_adapter *sc) +{ + struct igc_hw *hw = &sc->hw; + struct igc_fw_version *fw_ver = &sc->fw_ver; + + *fw_ver = (struct igc_fw_version){0}; + + igc_get_fw_version(hw, fw_ver); +} + +static void +igc_sbuf_fw_version(struct igc_fw_version *fw_ver, struct sbuf *buf) +{ + const char *space = ""; + + if (fw_ver->eep_major || fw_ver->eep_minor || fw_ver->eep_build) { + sbuf_printf(buf, "EEPROM V%d.%d-%d", fw_ver->eep_major, + fw_ver->eep_minor, fw_ver->eep_build); + space = " "; + } + + if (fw_ver->invm_major || fw_ver->invm_minor || fw_ver->invm_img_type) { + sbuf_printf(buf, "%sNVM V%d.%d imgtype%d", + space, fw_ver->invm_major, fw_ver->invm_minor, + fw_ver->invm_img_type); + space = " "; + } + + if (fw_ver->or_valid) { + sbuf_printf(buf, "%sOption ROM V%d-b%d-p%d", + space, fw_ver->or_major, fw_ver->or_build, + fw_ver->or_patch); + space = " "; + } + + if (fw_ver->etrack_id) + sbuf_printf(buf, "%seTrack 0x%08x", space, fw_ver->etrack_id); +} + +static void +igc_print_fw_version(struct igc_adapter *sc ) +{ + device_t dev = sc->dev; + struct sbuf *buf; + int error = 0; + + buf = sbuf_new_auto(); + if (!buf) { + device_printf(dev, "Could not allocate sbuf for output.\n"); + return; + } + + igc_sbuf_fw_version(&sc->fw_ver, buf); + + error = sbuf_finish(buf); + if (error) + device_printf(dev, "Error finishing sbuf: %d\n", error); + else if (sbuf_len(buf)) + device_printf(dev, "%s\n", sbuf_data(buf)); + + sbuf_delete(buf); +} + +static int +igc_sysctl_print_fw_version(SYSCTL_HANDLER_ARGS) +{ + struct igc_adapter *sc = (struct igc_adapter *)arg1; + device_t dev = sc->dev; + struct sbuf *buf; + int error = 0; + + buf = sbuf_new_for_sysctl(NULL, NULL, 128, req); + if (!buf) { + device_printf(dev, "Could not allocate sbuf for output.\n"); + return (ENOMEM); + } + + igc_sbuf_fw_version(&sc->fw_ver, buf); + + error = sbuf_finish(buf); + if (error) + device_printf(dev, "Error finishing sbuf: %d\n", error); + + sbuf_delete(buf); + + return (0); +} + /********************************************************************** * * This routine provides a way to dump out the adapter eeprom, diff --git a/sys/dev/igc/if_igc.h b/sys/dev/igc/if_igc.h index 92865b5b9eb1..727699baee5f 100644 --- a/sys/dev/igc/if_igc.h +++ b/sys/dev/igc/if_igc.h @@ -332,6 +332,8 @@ struct igc_adapter { u64 que_mask; + struct igc_fw_version fw_ver; + struct igc_int_delay_info tx_int_delay; struct igc_int_delay_info tx_abs_int_delay; struct igc_int_delay_info rx_int_delay; diff --git a/sys/dev/igc/igc_defines.h b/sys/dev/igc/igc_defines.h index 1701918c3a9c..e9ebd23c41c3 100644 --- a/sys/dev/igc/igc_defines.h +++ b/sys/dev/igc/igc_defines.h @@ -967,11 +967,31 @@ #define IGC_FLASH_UPDATES 2000 /* NVM Word Offsets */ -#define NVM_COMPAT 0x0003 -#define NVM_ID_LED_SETTINGS 0x0004 -#define NVM_FUTURE_INIT_WORD1 0x0019 -#define NVM_COMPAT_VALID_CSUM 0x0001 +#define NVM_COMPAT 0x0003 +#define NVM_ID_LED_SETTINGS 0x0004 +#define NVM_VERSION 0x0005 +#define NVM_FUTURE_INIT_WORD1 0x0019 +#define NVM_COMPAT_VALID_CSUM 0x0001 #define NVM_FUTURE_INIT_WORD1_VALID_CSUM 0x0040 +#define NVM_ETRACK_WORD 0x0042 +#define NVM_ETRACK_HIWORD 0x0043 +#define NVM_COMB_VER_OFF 0x0083 +#define NVM_COMB_VER_PTR 0x003d + +/* NVM version defines */ +#define NVM_MAJOR_MASK 0xF000 +#define NVM_MINOR_MASK 0x0FF0 +#define NVM_IMAGE_ID_MASK 0x000F +#define NVM_COMB_VER_MASK 0x00FF +#define NVM_MAJOR_SHIFT 12 +#define NVM_MINOR_SHIFT 4 +#define NVM_COMB_VER_SHFT 8 +#define NVM_VER_INVALID 0xFFFF +#define NVM_ETRACK_SHIFT 16 +#define NVM_ETRACK_VALID 0x8000 +#define NVM_NEW_DEC_MASK 0x0F00 +#define NVM_HEX_CONV 16 +#define NVM_HEX_TENS 10 #define NVM_INIT_CONTROL2_REG 0x000F #define NVM_INIT_CONTROL3_PORT_B 0x0014 diff --git a/sys/dev/igc/igc_nvm.c b/sys/dev/igc/igc_nvm.c index d86e04ffa0dc..b476a5fdbeac 100644 --- a/sys/dev/igc/igc_nvm.c +++ b/sys/dev/igc/igc_nvm.c @@ -716,4 +716,85 @@ static void igc_reload_nvm_generic(struct igc_hw *hw) IGC_WRITE_FLUSH(hw); } +/** + * igc_get_fw_version - Get firmware version information + * @hw: pointer to the HW structure + * @fw_vers: pointer to output version structure + * + * unsupported/not present features return 0 in version structure + **/ +void igc_get_fw_version(struct igc_hw *hw, struct igc_fw_version *fw_vers) +{ + u16 eeprom_verh, eeprom_verl, etrack_test, fw_version; + u8 q, hval, rem, result; + u16 comb_verh, comb_verl, comb_offset; + + memset(fw_vers, 0, sizeof(struct igc_fw_version)); + /* + * basic eeprom version numbers, bits used vary by part and by tool + * used to create the nvm images. Check which data format we have. + */ + switch (hw->mac.type) { + case igc_i225: + hw->nvm.ops.read(hw, NVM_ETRACK_HIWORD, 1, &etrack_test); + /* find combo image version */ + hw->nvm.ops.read(hw, NVM_COMB_VER_PTR, 1, &comb_offset); + if (comb_offset && comb_offset != NVM_VER_INVALID) { + hw->nvm.ops.read(hw, NVM_COMB_VER_OFF + comb_offset + 1, + 1, &comb_verh); + hw->nvm.ops.read(hw, NVM_COMB_VER_OFF + comb_offset, + 1, &comb_verl); + + /* get Option Rom version if it exists and is valid */ + if (comb_verh && comb_verl && + comb_verh != NVM_VER_INVALID && + comb_verl != NVM_VER_INVALID) { + fw_vers->or_valid = true; + fw_vers->or_major = comb_verl >> + NVM_COMB_VER_SHFT; + fw_vers->or_build = (comb_verl << + NVM_COMB_VER_SHFT) | + (comb_verh >> + NVM_COMB_VER_SHFT); + fw_vers->or_patch = comb_verh & + NVM_COMB_VER_MASK; + } + } + break; + default: + hw->nvm.ops.read(hw, NVM_ETRACK_HIWORD, 1, &etrack_test); + return; + } + hw->nvm.ops.read(hw, NVM_VERSION, 1, &fw_version); + fw_vers->eep_major = (fw_version & NVM_MAJOR_MASK) + >> NVM_MAJOR_SHIFT; + + /* check for old style version format in newer images*/ + if ((fw_version & NVM_NEW_DEC_MASK) == 0x0) { + eeprom_verl = (fw_version & NVM_COMB_VER_MASK); + } else { + eeprom_verl = (fw_version & NVM_MINOR_MASK) + >> NVM_MINOR_SHIFT; + } + /* Convert minor value to hex before assigning to output struct + * Val to be converted will not be higher than 99, per tool output + */ + q = eeprom_verl / NVM_HEX_CONV; + hval = q * NVM_HEX_TENS; + rem = eeprom_verl % NVM_HEX_CONV; + result = hval + rem; + fw_vers->eep_minor = result; + + if ((etrack_test & NVM_MAJOR_MASK) == NVM_ETRACK_VALID) { + hw->nvm.ops.read(hw, NVM_ETRACK_WORD, 1, &eeprom_verl); + hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verh); + fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT) + | eeprom_verl; + } else if ((etrack_test & NVM_ETRACK_VALID) == 0) { + hw->nvm.ops.read(hw, NVM_ETRACK_WORD, 1, &eeprom_verh); + hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verl); + fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT) | + eeprom_verl; + } +} diff --git a/sys/dev/igc/igc_nvm.h b/sys/dev/igc/igc_nvm.h index eae0db4b484b..b4b602af6595 100644 --- a/sys/dev/igc/igc_nvm.h +++ b/sys/dev/igc/igc_nvm.h @@ -7,6 +7,22 @@ #ifndef _IGC_NVM_H_ #define _IGC_NVM_H_ +struct igc_fw_version { + u32 etrack_id; + u16 eep_major; + u16 eep_minor; + u16 eep_build; + + u8 invm_major; + u8 invm_minor; + u8 invm_img_type; + + bool or_valid; + u16 or_major; + u16 or_build; + u16 or_patch; +}; + void igc_init_nvm_ops_generic(struct igc_hw *hw); s32 igc_null_read_nvm(struct igc_hw *hw, u16 a, u16 b, u16 *c); void igc_null_nvm_generic(struct igc_hw *hw); @@ -26,5 +42,7 @@ s32 igc_write_nvm_spi(struct igc_hw *hw, u16 offset, u16 words, u16 *data); s32 igc_update_nvm_checksum_generic(struct igc_hw *hw); void igc_release_nvm_generic(struct igc_hw *hw); +void igc_get_fw_version(struct igc_hw *hw, + struct igc_fw_version *fw_vers); #endif From nobody Sun Sep 29 15:25:12 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 4XGp142KXwz5XpJn; Sun, 29 Sep 2024 15:25:12 +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 4XGp141kS7z4kcG; Sun, 29 Sep 2024 15:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623512; 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=Lwr3LL1FodNBjkflKzWPYpr+O1blrZSyXQia6PBo7J4=; b=SlSRLpMnJWsYWRAu9/MLEU/DX7MZdzItLq+vFJhLUiaiBBS50xljrf3PozVCeAIRRQ1Jf+ NnVFyTdBVGvqwC4EsyZfgWI0Abfh037KWfM1nagvtTTgC3n7F7X9QJp8tc3I5i4GfXFs00 Iyq+gPrD42RTTednCKYTZiFmxBJcTRWnLGRZYIizOjeP09eGu6eRrSFHVzUoApKkmosHb7 EbK1UKDPk2AxNfk3Ar+Hde41Jb7HBulDus9g8RIdpI480tYDDXZ8BeInr9uilsGzXHE39V B10nbUYKoYscxc6HvpgSg3h6vF/4DEmV78EDHNqM0oSga8O2eCesVVX+j4m4VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623512; 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=Lwr3LL1FodNBjkflKzWPYpr+O1blrZSyXQia6PBo7J4=; b=XNAdViMryxM9vq4Ad8uqGvACVCQQJyq5079RfUri/dY/28thY52UYFOD2dVq0urnZxXWkz SWU6zNOHb3kqZI7GY3nfL57+tZFmMPkiXGPP6YrogK5PpO0/icsaptnidRwENa22HEW9ov bRg+HyBayv66Yb4jJR6CrUeTqQaunpmV6Vu8vTPhd3gtkLLdAEmtweUEE777ljoADLmM5K jd4EbIwnGnoP8QDdeI+rcpIF3psav6I3ZFIVjLnBTBup6meytWL1wrvhdX9VE/7ztyQ1RV VZCAefWEk6I6t2b6Oz6lBYoT7QGkCe0U2bCdtGOBWT6Ud2aV8objm6UobmFy6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727623512; a=rsa-sha256; cv=none; b=YTVMiD/iW3FQFJ45K3YVKzjkEjU8I66tqnl4kApiQNRhdI5dqe5jSuulvm0qLAZn9nj04w J2pG/knmzuxL/vbgg7ERZoCQlh6jGjxV5KqWXp2oeBqHe/F+XxH4nM+NEURJ/zfjiDTWEE XKqIc55PHLsVk+gwVmYOVZFNaR6HCVlirvHuYosv3Ni19d02vDvir3O6vNklCN0Byt57t4 ZpKntHwAIZNik4QAykwzMwO+theany+lJaxypmIjKbqPd6bOF8z7gm0HV1O5u+aTwZxDgb qY4tZnh7QbmSXZz8r7t58lJxVoIVGIU9Hy27Hxm7FVZJwGxeCfbw1+tdBIvUXA== 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 4XGp1417BqzF9p; Sun, 29 Sep 2024 15:25:12 +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 48TFPCFY030280; Sun, 29 Sep 2024 15:25:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TFPCEu030276; Sun, 29 Sep 2024 15:25:12 GMT (envelope-from git) Date: Sun, 29 Sep 2024 15:25:12 GMT Message-Id: <202409291525.48TFPCEu030276@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 0e9cdcc5141e - stable/14 - random: Avoid magic numbers 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0e9cdcc5141e82ac3d9fa8331c3a4ed19933afa9 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0e9cdcc5141e82ac3d9fa8331c3a4ed19933afa9 commit 0e9cdcc5141e82ac3d9fa8331c3a4ed19933afa9 Author: Colin Percival AuthorDate: 2024-09-18 05:12:04 +0000 Commit: Colin Percival CommitDate: 2024-09-29 15:24:52 +0000 random: Avoid magic numbers Move RANDOM_FORTUNA_{NPOOLS,DEFPOOLSIZE} from fortuna.c to fortuna.h and use RANDOM_FORTUNA_DEFPOOLSIZE in random_harvestq.c rather than having a magic (albeit explained in a comment) number. The NPOOLS value will be used in a later commit. Reviewed by: cem MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46693 (cherry picked from commit 32fce09268ddd97efb4412529ba57293554c5985) --- sys/dev/random/fortuna.c | 2 -- sys/dev/random/fortuna.h | 4 ++++ sys/dev/random/random_harvestq.c | 9 +++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sys/dev/random/fortuna.c b/sys/dev/random/fortuna.c index 11b2dcde1db8..ec27acc63b29 100644 --- a/sys/dev/random/fortuna.c +++ b/sys/dev/random/fortuna.c @@ -72,8 +72,6 @@ #include /* Defined in FS&K */ -#define RANDOM_FORTUNA_NPOOLS 32 /* The number of accumulation pools */ -#define RANDOM_FORTUNA_DEFPOOLSIZE 64 /* The default pool size/length for a (re)seed */ #define RANDOM_FORTUNA_MAX_READ (1 << 20) /* Max bytes from AES before rekeying */ #define RANDOM_FORTUNA_BLOCKS_PER_KEY (1 << 16) /* Max blocks from AES before rekeying */ CTASSERT(RANDOM_FORTUNA_BLOCKS_PER_KEY * RANDOM_BLOCKSIZE == diff --git a/sys/dev/random/fortuna.h b/sys/dev/random/fortuna.h index cb4683514989..7378edb9238c 100644 --- a/sys/dev/random/fortuna.h +++ b/sys/dev/random/fortuna.h @@ -27,6 +27,10 @@ #ifndef SYS_DEV_RANDOM_FORTUNA_H_INCLUDED #define SYS_DEV_RANDOM_FORTUNA_H_INCLUDED +/* Defined in FS&K */ +#define RANDOM_FORTUNA_NPOOLS 32 /* The number of accumulation pools */ +#define RANDOM_FORTUNA_DEFPOOLSIZE 64 /* The default pool size/length for a (re)seed */ + #ifdef _KERNEL typedef struct mtx mtx_t; #define RANDOM_RESEED_INIT_LOCK(x) mtx_init(&fortuna_state.fs_mtx, "reseed mutex", NULL, MTX_DEF) diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c index 09b81950281b..cb01f7b77195 100644 --- a/sys/dev/random/random_harvestq.c +++ b/sys/dev/random/random_harvestq.c @@ -55,6 +55,7 @@ #include #include +#include #include #include #include @@ -260,8 +261,8 @@ random_sources_feed(void) * stuck for a few seconds with random_kthread gradually collecting a * small chunk of entropy every 1 / RANDOM_KTHREAD_HZ seconds. * - * The value 64 below is RANDOM_FORTUNA_DEFPOOLSIZE, i.e. chosen to - * fill Fortuna's pools in the default configuration. With another + * We collect RANDOM_FORTUNA_DEFPOOLSIZE bytes per pool, i.e. enough + * to fill Fortuna's pools in the default configuration. With another * PRNG or smaller pools for Fortuna, we might collect more entropy * than needed to fill the pools, but this is harmless; alternatively, * a different PRNG, larger pools, or fast entropy sources which are @@ -271,8 +272,8 @@ random_sources_feed(void) * try again for a large amount of entropy. */ if (!p_random_alg_context->ra_seeded()) - npools = howmany(p_random_alg_context->ra_poolcount * 64, - sizeof(entropy)); + npools = howmany(p_random_alg_context->ra_poolcount * + RANDOM_FORTUNA_DEFPOOLSIZE, sizeof(entropy)); /* * Step over all of live entropy sources, and feed their output From nobody Sun Sep 29 15:25:13 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 4XGp152sPSz5XnrW; Sun, 29 Sep 2024 15:25:13 +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 4XGp152R1wz4kWj; Sun, 29 Sep 2024 15:25:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623513; 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=VxJ40hmI8AOJwtr2NQYyfHRHv/Osg9l0n/5YS8DVJ3Q=; b=Y4kVhMz9MYGcRLHSLL9USpyLRWleI1rr99Hx289R1WlPKTRu8eEaskSVE9Rl/JFIx1hwwB /5SrtmR8XRksk1eP+KlWZqRa1AgMGHPwW6mjaiPhh/kmG5keQFtGtG3VTQCyNyZ6VU+87Z d92vH80Pfnlp0fHVG5abZY0+78v2GfyXGY2H42SVHWJ+L8spHuT/UWxnEIdByL9b56+Yhp 5Bn1d7RIEgMER3FHIS8SR4ud6V+UzaimlqIW4CcBeOzTVOoyg0hCvtSka6y4zZz2Ls4nSF p2lGzgkGaZffxnV3ysUpvWH4Fa01SVixVTyfpKziNRf2mMkoTudI/teQNfrNMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623513; 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=VxJ40hmI8AOJwtr2NQYyfHRHv/Osg9l0n/5YS8DVJ3Q=; b=f53Clvr5Z5SmwE9BBzkjDydcJ3ahQQKlJ8UN7CDdoFz19KueVRi+g8h4YW7A5X6leogE+P DNndpeiq31bRSDiAURSOqADX0Aq1DtXHIMf6IPcvhOyElbRNuu39+qRzfSAzGFUrWpaTT3 n242GGf963Q4pIB/DuOQe4WFQ63bihLB7vTxMn07uiK+j++cZ+TAS26IZbr3S759SR7T77 jHbzW69dT09QGP68nmBBdL8KX4wfR4UfVaA/e0pVJTcrvIRt+VestyoDs6cVVqwOmcBLLZ 5vkGwFOn47ORA26v5IM03fHXDebiOGPt5nre+L30V444EPdVCJeviojCpNIguw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727623513; a=rsa-sha256; cv=none; b=XBXKyxMUsKoQAbwYpNilt36X5DBNAx6rht1DERs2lc/OmnT2d7vplaBZZoIlIkxuJHx++z Fdpl4IWq69jA2wb32QohBrHK77ZRtS2VgFoyxuibY1GU7cMiETN7c6Zs4oUcDP3dmbt0uW O4uvbrL3/ErGtOTolp7NQb5DpWbcd+xVjOqFtjJc27xZMBsQXnU1QgdSBUikR3qrJN/Txa dHRZeDm8V9ZpG5NAuQniAk7VMDoOSOE735YbU0H8svXgvhydc3TONdeY4PD+aESYErJbYf Dqf5np3iM3dCN4lk04UHmWGL43Wm30+oqTB+WjVBMlLKN7PIDYQlyRKX8M3lJQ== 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 4XGp1522vdzFDB; Sun, 29 Sep 2024 15:25:13 +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 48TFPDk9030331; Sun, 29 Sep 2024 15:25:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TFPDG4030328; Sun, 29 Sep 2024 15:25:13 GMT (envelope-from git) Date: Sun, 29 Sep 2024 15:25:13 GMT Message-Id: <202409291525.48TFPDG4030328@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: a9f473632607 - stable/14 - loader: Add TSLOG to interpreter built-ins 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a9f47363260761a4f90609dc54d115715c907db9 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a9f47363260761a4f90609dc54d115715c907db9 commit a9f47363260761a4f90609dc54d115715c907db9 Author: Colin Percival AuthorDate: 2024-09-18 11:01:41 +0000 Commit: Colin Percival CommitDate: 2024-09-29 15:24:52 +0000 loader: Add TSLOG to interpreter built-ins Wrap each call to a built-in command with TSENTER/TSEXIT to make it easier to see where time is going in the loader. MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46630 (cherry picked from commit 58ec2d0d4a3c3bcf741d9694dc7696c7b4e753b9) --- stand/common/interp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stand/common/interp.c b/stand/common/interp.c index c6ac01ea099b..ead7eb136879 100644 --- a/stand/common/interp.c +++ b/stand/common/interp.c @@ -189,7 +189,9 @@ interp_builtin_cmd(int argc, char *argv[]) cmd = interp_lookup_cmd(argv[0]); if (cmd != NULL && cmd->c_fn) { + TSENTER2(argv[0]); result = cmd->c_fn(argc, argv); + TSEXIT(); } else { command_errmsg = "unknown command"; } From nobody Sun Sep 29 15:25:14 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 4XGp1660j2z5XpCh; Sun, 29 Sep 2024 15:25:14 +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 4XGp163zYnz4krZ; Sun, 29 Sep 2024 15:25:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623514; 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=Vqt0Rdzjznk3+98s9qYbtttqrgCCSr3Qg9UCrUoZLQk=; b=qks9Nka7Az3ZCRNDfRH+0ul9p1+uOTzZsL16+IN8NS7ZP3RQWxW1E/er+QpJgcW26dHl4f cjq6OD3d3kQmZ5WJwI82bYWUZbymRCbyJ/T4b8m2j98D9qEgsk4ey8f0JWAIgG5PnG7Epg sDYXpaAlH0HzKNP1nYOSs8nFLUlqpF6AemH0AVHCHbxOKMEUQMEN3ooXSabXeooHHjqNBL wypUsnLrQsLPh9Zcf75/zaWOCi/nfufn2CdlYEN+ayRC8csEsY9DQ7C4Ranc3gC2cV2W0p hjMawFNSKLB4pAkZUcC2n7TVnfd+6KlG6ZkEGq0k4ORDXASN/wUqD/MuFAYh3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623514; 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=Vqt0Rdzjznk3+98s9qYbtttqrgCCSr3Qg9UCrUoZLQk=; b=NvwWZlqm1GpB3Dq6LG+4s6wRoWZsddMlg2XT0GADz++z7n1yel6XObs0qFm8xvy8itJm8X 8qKi7Dn7E4BBnTLdv26lDCY0XHRHX/gheL66SkYii8UPzLU9YKWAtn3oQSWOEf2NQsBHd1 7UBybyPnkV7N6nKGPUxJ7nG14Or9Z1JWs+RwWwoAfMSq1Q2lzx7yW0LJ6N3TfD8b6mUnB1 JAP3DKGFQ+UAIS4Pl/9F6jZTh1o/46KwB9se6GcY672FYsGfO/0IlFfitVx7vgFN6f3mKd IMcFBmmjQiBmi47kLw3X607AzmuW0JpB0I+sn7qscP8yZiWZAmaKxDnxUDWn5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727623514; a=rsa-sha256; cv=none; b=WnFGDZTNL9fERBY74aWVsBI75daqpsydjLb5PkPrUX2g9dVU+ItNujlhA2b6eMt6zYKr0x DSWyaIla441XscEA7X7W4NKaVbRQcsd/8BDwIwSrSWn9NlJRri/N2mcO3N0dfLDyBwGuwZ sJu9Jf6+l3QDtG8ZmmTe+uSQHgml7V2VNyc4ltdhfCqHTigzcCs3o/1gdtZnx8bbnfJC/e /VeBNI34s4nvY1bLf/PM2q2go5Lfs2NmjeAkyUslWm1muyvhRYYwIEN2OEV5dlJv4YymwQ Kb6GFUw51fGrDokVFGQ2BeoWgV1rnXN+m7xYNM8bxs6bKUzGDLZmopaOtk7gTQ== 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 4XGp1633drzDc5; Sun, 29 Sep 2024 15:25:14 +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 48TFPEku030376; Sun, 29 Sep 2024 15:25:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TFPEwu030373; Sun, 29 Sep 2024 15:25:14 GMT (envelope-from git) Date: Sun, 29 Sep 2024 15:25:14 GMT Message-Id: <202409291525.48TFPEwu030373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 0d348c621f4e - stable/14 - loader: Instrument EFI GetRNG with TSLOG 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0d348c621f4e79278073b5ad4c9ca90a0e999f02 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0d348c621f4e79278073b5ad4c9ca90a0e999f02 commit 0d348c621f4e79278073b5ad4c9ca90a0e999f02 Author: Colin Percival AuthorDate: 2024-09-18 11:01:55 +0000 Commit: Colin Percival CommitDate: 2024-09-29 15:24:52 +0000 loader: Instrument EFI GetRNG with TSLOG On some systems, the EFI GetRNG is slow. Make it show up in flamecharts. MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46631 (cherry picked from commit b58fe4eb29fbd3236df0f7fdfad4393d2536dbb5) --- stand/efi/loader/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index e4d62f2e940c..27fdb3bfefc9 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -1267,7 +1267,9 @@ command_seed_entropy(int argc, char *argv[]) return (CMD_ERROR); } + TSENTER2("rng->GetRNG"); status = rng->GetRNG(rng, NULL, size, (UINT8 *)buf); + TSEXIT(); if (status != EFI_SUCCESS) { free(buf); command_errmsg = "GetRNG failed"; From nobody Sun Sep 29 15:25:15 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 4XGp176KM5z5XpGg; Sun, 29 Sep 2024 15:25:15 +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 4XGp174gntz4kpm; Sun, 29 Sep 2024 15:25:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623515; 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=mKfhh/pD7zw7qz/D4Ft8CriW8j71lTfY5q02iFPYT5s=; b=k7U4AWEW1/7TW0u4exv+gTFXN9Q2pd91Hxw2kO0R00qcdnygUYxhj8Q+vKWsQ/7J0f5p3u NC7xy4pX3plC8y4axfavmBN2sJIl/5z6AbaXARm503Bln62leJ2Koc3VqsYDpKpobmhXWX vfkb02/uRzI/CqPF0OP/ZbzCOQpd7Kg0h3WbufFhxwFdj/gd0Vjm/yt4hg4Wxb0I2IDfHQ Z8Msvah9Q9VjP/C3u+9UrgpRIUlpWbLym+yJfd4m16mfQ9fw6BqXbE4mYeWSRKqcbdNUgg /kpigRBIdbkvkZolmTSr5GqZLB7UCY7Pk0DC0TP8P5TIRNRWESLETvM15vNZhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623515; 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=mKfhh/pD7zw7qz/D4Ft8CriW8j71lTfY5q02iFPYT5s=; b=FTdGApQG4nmd+px1pcUIhG7i+a+iS5TFZn6cKFrZ7qGdYKMMPMTc9srWZzUZBFCf7ZRUwc JbMgLCTR68Y3lKXEHIhg/kG9KSPutedNp/xJaBEkrrCl30aaLhQzjoO5TMmr7Jyg+c7FxX Oekx6ePPJePX+hbLxHSfW3W7yjksKZd/jQ93SeFyAeyjScnn3nPCSfNMzR8+SIddMXb0I5 fc7u0BblIhFV8xBqmlIM6HTbJ6Gt9joi/5t5iMivazZh8v3dV5qufuzTCseEElhnNJZxxo CNvEq4/Wo2WOUP1chqNdT+vCqtBHp5ky7w7B3AZMmdWHWwFgbRtTPEFcgi/Pqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727623515; a=rsa-sha256; cv=none; b=fZcPa1/b2TxXyr0WX1njCDaQXMR79XRLKL7pQ5ktrZMUDW28EOs3ui2nljcUexzoZOw30A gOURoD4SpAn1wAFEcIGNCM7UNFZSO2FAS6pQyA+X5R2oPKoEPGM/kHe/THjKDXuheadz9z iZvrFT76d6M16gJBpOm6NRVj77l4ccnQ5HoKcDELDRaAwcbiV+FEYnoQ5C7MRxM6PyXjxY 8WrM2OEeImdwFb14quYDJq39Lv0IoceYa73kysH1fiWKzrc72iXvPdNLVv0r35ih1Lsp5Q yU7Aleq8owWTWOMoIpLIwoC3zbVb6BxZf5039JEXvkcM7sI46g77HJzi8+V33g== 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 4XGp1744g6z1CxR; Sun, 29 Sep 2024 15:25:15 +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 48TFPFhT030423; Sun, 29 Sep 2024 15:25:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TFPFs9030420; Sun, 29 Sep 2024 15:25:15 GMT (envelope-from git) Date: Sun, 29 Sep 2024 15:25:15 GMT Message-Id: <202409291525.48TFPFs9030420@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 0a8ff1989681 - stable/14 - loader: Make EFI entropy size configurable 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0a8ff1989681f476b9da87a309db25aecd7881c1 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=0a8ff1989681f476b9da87a309db25aecd7881c1 commit 0a8ff1989681f476b9da87a309db25aecd7881c1 Author: Colin Percival AuthorDate: 2024-09-18 11:02:01 +0000 Commit: Colin Percival CommitDate: 2024-09-29 15:24:52 +0000 loader: Make EFI entropy size configurable Add a new loader variable entropy_efi_seed_size which defaults to 2048; if not defined (e.g. if the /boot/lua/ is updated but /boot/defaults/ isn't) the same 2048 default will be used. Reviewed by: Val Packett MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46632 (cherry picked from commit f4a69a933cd645e384b337db5ef2ccf41a1ddd5b) --- stand/defaults/loader.conf | 8 ++++++-- stand/lua/core.lua | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/stand/defaults/loader.conf b/stand/defaults/loader.conf index a5d27b96b6ba..c3de7cdfb74b 100644 --- a/stand/defaults/loader.conf +++ b/stand/defaults/loader.conf @@ -48,8 +48,12 @@ entropy_cache_type="boot_entropy_cache" # Required for the kernel to find # the boot-time entropy cache. This # must not change value even if the # _name above does change! -entropy_efi_seed="YES" # Set this to NO to disable loading - # entropy from the UEFI hardware random number generator API +entropy_efi_seed="YES" # Set this to NO to disable loading + # entropy from the UEFI hardware + # random number generator API +entropy_efi_seed_size="2048" # Set this to a different value to + # change the amount of entropy + # requested from EFI ### RAM Blacklist configuration ############################ ram_blacklist_load="NO" # Set this to YES to load a file diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 7b7560ddc820..72b19462ae5c 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -369,7 +369,8 @@ end function core.loadEntropy() if core.isUEFIBoot() then if (loader.getenv("entropy_efi_seed") or "no"):lower() == "yes" then - loader.perform("efi-seed-entropy") + local seedsize = loader.getenv("entropy_efi_seed_size") or "2048" + loader.perform("efi-seed-entropy " .. seedsize) end end end From nobody Sun Sep 29 15:25:16 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 4XGp186hj6z5XpB3; Sun, 29 Sep 2024 15:25:16 +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 4XGp185DmJz4krs; Sun, 29 Sep 2024 15:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623516; 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=x/9uA4bmZSCOaYkn/gFf7y20mENH5N5J0162FmkvpMM=; b=lZApWUoEJHpdiA6IAeIimpPmQJC53imQF1PG6D54YnU8yfZY3gIijOOulH5U1Tm/43i2g3 +sU7tttBtHGgsX63nmPt9ByzXV0lorJUraQNgCHEfmq+lso8V4T4IM5m4Bn25+IcK0KIXs SRq/kI3bjlYNLwfUmxX8Rpg/yd7JvDmB9vfn/2giD8GrKMsnGbsvGFNn2ujfBrQiTYTVji Sz6mt50BCrQTamnJqQ2IzhRKxbEx/6pRaNHNf3rhTC8iSPMvvlV4Z8gj6mjNm/onA2I4kT LeNT8sJ82c/aecKOjGyBCCAWPtChM4QWEp3DDsHGPrFXIfhzE4LU378FdocZ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623516; 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=x/9uA4bmZSCOaYkn/gFf7y20mENH5N5J0162FmkvpMM=; b=ZGvfiOvnkeJ4ZtmtoLZridA4jk5ohr0Cmrvu+Tzc8MpFpN4IpMpE7mlfF0yeAfvZnNp+Cm UIF43u93gu65uHttq4Nj/w0vNQviTAx26Kjuz3nthPvpp5+E9o1CxSAz1Prby3wOa3Rajb h0wL/0DfRbCjIVe2Zsa02PNIsSo0fnuhIkMIWAG/taQIWQYr9PdKQnOjdKIkmCeYSQv1Cr uL6STodhfep9c/0lKdbDRg5gr0AyVv5/ubc1Qjq4lyTg0vOArxdNOoXWb311cyYl8eiXFO BrYxWP2AIyRueeFIVhqdVJ4Z64iQ9Nmk3P399Y5ZNg7pNQIIxwBu982hw3EzcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727623516; a=rsa-sha256; cv=none; b=WQ1xnDKcN0ICreZd63GT1Hir6ExnvK3VI4dHOPj0R8bT69cqxqo5JH+C7HOlbUt2StAN7F VtsliJPoh71o9kN8wRQPeFdhzaSf9aHDoVoFCZolxH/O/RLBH/5tg0fzWIX079plppZWCx gtFW36fsd35HtoaHgdvZx5YiULFW0lWFzb86CRNQuor6rZ6qYAO5xrR9uXHhpjEm7ng72P t9XDUTpUhxrWWz3g8ApeBTfK7UV42bINfBMyuEM8ZFu1KPOYOi6Q/19keq+FhUGiGXwFWw n5tSVCgc1/xLkC0A8QUIUbpKicGiMy0F9BBZ3OdzchAOeVczFWZUrmEKI8VCQA== 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 4XGp184gjLzFGj; Sun, 29 Sep 2024 15:25:16 +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 48TFPGjR030462; Sun, 29 Sep 2024 15:25:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TFPGEC030459; Sun, 29 Sep 2024 15:25:16 GMT (envelope-from git) Date: Sun, 29 Sep 2024 15:25:16 GMT Message-Id: <202409291525.48TFPGEC030459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 8d2d49bdb5ce - stable/14 - pkcs5v2: Add pkcs5v2_genkey_raw function 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8d2d49bdb5ce070a5e954baa59ad6a7d0e3514cd Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=8d2d49bdb5ce070a5e954baa59ad6a7d0e3514cd commit 8d2d49bdb5ce070a5e954baa59ad6a7d0e3514cd Author: Colin Percival AuthorDate: 2024-09-18 11:02:05 +0000 Commit: Colin Percival CommitDate: 2024-09-29 15:24:52 +0000 pkcs5v2: Add pkcs5v2_genkey_raw function This is like pkcs5v2_genkey but takes a "passphrase" as a buffer and length rather than a NUL-terminated string. Reviwed by: pjd MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46633 (cherry picked from commit 8ce291a335bc751e7a89691eebfb9f9da65b82ac) --- sys/geom/eli/pkcs5v2.c | 13 +++++++++++-- sys/geom/eli/pkcs5v2.h | 3 +++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/geom/eli/pkcs5v2.c b/sys/geom/eli/pkcs5v2.c index ea3be36865b0..4ea5ea12634a 100644 --- a/sys/geom/eli/pkcs5v2.c +++ b/sys/geom/eli/pkcs5v2.c @@ -52,13 +52,22 @@ void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt, size_t saltsize, const char *passphrase, u_int iterations) { + + pkcs5v2_genkey_raw(key, keylen, salt, saltsize, passphrase, + strlen(passphrase), iterations); +} + +void +pkcs5v2_genkey_raw(uint8_t *key, unsigned keylen, const uint8_t *salt, + size_t saltsize, const uint8_t *passphrase, size_t passlen, + u_int iterations) +{ uint8_t md[SHA512_MDLEN], saltcount[saltsize + sizeof(uint32_t)]; uint8_t *counter, *keyp; - u_int i, bsize, passlen; + u_int i, bsize; uint32_t count; struct hmac_ctx startpoint, ctx; - passlen = strlen(passphrase); bzero(key, keylen); bcopy(salt, saltcount, saltsize); counter = saltcount + saltsize; diff --git a/sys/geom/eli/pkcs5v2.h b/sys/geom/eli/pkcs5v2.h index f271f17a68c1..02e3fac02fe7 100644 --- a/sys/geom/eli/pkcs5v2.h +++ b/sys/geom/eli/pkcs5v2.h @@ -30,6 +30,9 @@ #define _PKCS5V2_H_ void pkcs5v2_genkey(uint8_t *key, unsigned keylen, const uint8_t *salt, size_t saltsize, const char *passphrase, u_int iterations); +void pkcs5v2_genkey_raw(uint8_t *key, unsigned keylen, const uint8_t *salt, + size_t saltsize, const uint8_t *passphrase, size_t passlen, + u_int iterations); #ifndef _KERNEL int pkcs5v2_calculate(int usecs); #endif From nobody Sun Sep 29 15:25:17 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 4XGp1B2Btbz5XpCl; Sun, 29 Sep 2024 15:25:18 +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 4XGp1965LGz4l32; Sun, 29 Sep 2024 15:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623517; 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=mGmTRRai800NPkGxQSyqey1+zTWcrDU49EsPm9zoAOU=; b=Qsgj/6DuGt8VeBeWx+kqEzQzNqMz7thJ5w9vqQUTnYM3q/Smk/fF2YZL6sLaPa1/rCBqgp 7Pt7LLMjNvEnclDphYbqSb7pMdiE8umnbEOkbAfqLTzXgN33IQG0qICYBADT1lGNKs05Ho pZDEU+qD13c+Sf4bTGAvbJr9mGWl4x8fLieQI8LLYyGdTYhR7gBmhMpu5snw4n4pTdUgul lCZ3j9DGvFvh02NbJ6IWxNzlCGAayz8dTg7zuC1OPkTPIK42F/2AjDHUNay2/L6RjJ1LzJ FuXYdwHtsO+oLQvuzP3l2i2i6AzrGY1ecV5wvArL8OEFJRnhz3vNiXqwKR+EZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623517; 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=mGmTRRai800NPkGxQSyqey1+zTWcrDU49EsPm9zoAOU=; b=OP3Rsrfbv8P6VC/rg6QKorCyOMyQzSrFpRXqTRezprb0l2YGEWqnEmRNRla/sJDapS7Fg1 ycD3i1vyx7/7NccLyaKLXyEbVEUNsRWuciC7N+x4quX/jPdoI1w2gQUNkIucs5rga/h2zn TNPuYypiRKYmlAfOOzgO6Y9bVGsctGgxD9dJgyAHV2af3d7b2fug8dMqAT5zQ1Tn7lw1fQ K9DNHnGtvhJQl40e3BPAiPb+qeq4vMvSyz82b9lklpfm2gKeTidlbCdhB7J8QPy9QKk+xD Dp1hySUE+pw1RYAeVjZfNmtoqdMvRVuPo9Tk6y2vLLubjW3yjY5IZImEZp1D+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727623517; a=rsa-sha256; cv=none; b=WSB7Z8PuQPfd91pxblZlBoxZlHXEZXSVNlzVhcYnTsRe8Fujj4sh6Y0UTQ5WhEnKGjefIA TqABVZfjWPWInVD/6kGV3oJh8NyhqDa0OyICrNDIX0Mr/rgKc3aAGH0zoscZCR1e5A3E0V e2CsssZAFIE1DUi2aI2EI8QswlJ7vo77dDibEXiSIC710ARAIXTuILywkuKYLTv25GVGlv +jkIJi1jdem7K0GHLNGmLotzjW22J/m0rbRYbYu66IcChXapehHcrQUSa2Fs61Ng+ppXGn 3PhmBkKWQZO1T5BdzslqV+a34U0rWaM/G1SXHGfrjIm2mJpTMryqZ1i1Ea+OaA== 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 4XGp195N3qz1CxS; Sun, 29 Sep 2024 15:25:17 +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 48TFPHEr030504; Sun, 29 Sep 2024 15:25:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TFPHb7030501; Sun, 29 Sep 2024 15:25:17 GMT (envelope-from git) Date: Sun, 29 Sep 2024 15:25:17 GMT Message-Id: <202409291525.48TFPHb7030501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f216bddf84e6 - stable/14 - loader: Make pkcs5v2 unconditionally available 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f216bddf84e67b80bb0f55fcc93dde0c7a557f60 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f216bddf84e67b80bb0f55fcc93dde0c7a557f60 commit f216bddf84e67b80bb0f55fcc93dde0c7a557f60 Author: Colin Percival AuthorDate: 2024-09-18 11:02:08 +0000 Commit: Colin Percival CommitDate: 2024-09-29 15:24:52 +0000 loader: Make pkcs5v2 unconditionally available This was previously only available if GELI support was included, but I want to use it for processing entropy from EFI Reviewed by: imp MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46634 (cherry picked from commit 925f15731e3480fe80f580a2f7463cb5210a95c8) --- stand/libsa/Makefile | 4 ++++ stand/libsa/geli/Makefile.inc | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile index bc85a3dcb0de..1b37812a3226 100644 --- a/stand/libsa/Makefile +++ b/stand/libsa/Makefile @@ -164,6 +164,10 @@ CFLAGS.bzipfs.c+= -I${SRCTOP}/contrib/bzip2 -DBZ_NO_STDIO -DBZ_NO_COMPRESS .PATH: ${SYSDIR}/libkern SRCS+= explicit_bzero.c crc32_libkern.c +# Bits from GELI which are reused elsewhere +.PATH: ${SYSDIR}/geom/eli +SRCS+= g_eli_hmac.c pkcs5v2.c + # Maybe GELI .if ${MK_LOADER_GELI} == "yes" .include "${SASRC}/geli/Makefile.inc" diff --git a/stand/libsa/geli/Makefile.inc b/stand/libsa/geli/Makefile.inc index 07600d5287bd..8300359a465a 100644 --- a/stand/libsa/geli/Makefile.inc +++ b/stand/libsa/geli/Makefile.inc @@ -21,10 +21,8 @@ SRCS+= ${i} .endfor SRCS+= geliboot.c \ geliboot_crypto.c \ - g_eli_hmac.c \ g_eli_key.c \ g_eli_key_cache.c \ - pkcs5v2.c \ # aes .PATH: ${SYSDIR}/opencrypto From nobody Sun Sep 29 15:25:18 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 4XGp1C4S8nz5XpGn; Sun, 29 Sep 2024 15:25:19 +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 4XGp1C0Vztz4ksK; Sun, 29 Sep 2024 15:25:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623519; 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=O6x/izbytoxOqTnNSqq+HFWhp6yXZsxRMo/qzmDld/A=; b=smMaBKZo+1O4/oVXnqDnrKo75ffJ+L4UUBm/YDkvZu+fN8EfJ3QMAThk33uukFKYs8GiwF JOL+Y1MeWrF251p1yOmusszhFT2twHoHV3SkpiA2pQv3b5ESK1WU3cfFQcITS/EjYbun3t DChHWMTV7Igbc7AYM2G6Sl/WIqhulekVqi3dFw4L/O5bQ7WUIgyYEijr0vypprymXsrMgH or9Z/4bYJrbByp6NPWMSc7pj/x0HhMa4PRC9bO0DRYpMxaIn2s3gctqkWYA58sC8Oal5AN 2ohu6BoW7yLkS1tuQi1Gyc1FzPsD7AgfD+eCov/m7dkuad4Eb6p3TomsVtVWGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623519; 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=O6x/izbytoxOqTnNSqq+HFWhp6yXZsxRMo/qzmDld/A=; b=crnWcLKcd37O71RwCIsntvG4Ns8+IIM03ooeK1LqNkrwju3MlSvNyWoK2nDK4ZnOXwBfvv 4tBdwepoc4QXKJlH/P4yrl11U1WsDOVbJow6fIEchNpUiPlKdz5N8ej1bCffQZnQuqqzHO 3qF0pqyq/SBQDtUe6TjARy6hJc52uf0t4wEiW7XsyaHtbf1Sfh+JKVe7XcXaSvkULlvj3M zS76i2nt9+j0WxSAyN2dqtkQJ1O+tKwtjcJrioj0sYESqbFELAZ83ZXJLKKyShlOMY0PsZ uXEvt1A2HTKIxM0Z/IXJzYL0eOYcv/gQGlvU8ICi7JGcmmt224FYHNegxZddgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727623519; a=rsa-sha256; cv=none; b=uBTN8KyCSYP10IDkvYPQZYDuOJQF04n6XFdOEdSXHMOYBD2ko9PdTzYJQdWIwLjdneudzP zi5vTstb3kt1AX464ofrscEQ0f7uSJyKA5y92ahfcx28oWd+4f90jvip2tTYm3elzy7RLs xKcpZq8dFUzkHGpM9FIXsAGM/yFsNrXgJSn9aXyEIJp50AaegGwFFf+N8nFdnW0xVjJTnd SL/UrYrN6nUgdWN1MUPmOBQllqivlohxTFDgxgKEQZW7E3EJO84znBavm3c4cAhfFPl0Rz oFmBbB60/tSjzA24ICGPWLcojzFAIIqfre3sbBD98LDcQJnO5jF4ffLsh4DtWg== 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 4XGp1B6k3zzFGk; Sun, 29 Sep 2024 15:25:18 +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 48TFPIl1030561; Sun, 29 Sep 2024 15:25:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TFPI2c030558; Sun, 29 Sep 2024 15:25:18 GMT (envelope-from git) Date: Sun, 29 Sep 2024 15:25:18 GMT Message-Id: <202409291525.48TFPI2c030558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: f470543a65b1 - stable/14 - loader: Expand EFI entropy if < 2048 bytes 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f470543a65b14cbf2fec4e69b924d66068e182f4 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=f470543a65b14cbf2fec4e69b924d66068e182f4 commit f470543a65b14cbf2fec4e69b924d66068e182f4 Author: Colin Percival AuthorDate: 2024-09-18 11:02:12 +0000 Commit: Colin Percival CommitDate: 2024-09-29 15:24:52 +0000 loader: Expand EFI entropy if < 2048 bytes The EFI RNG on some platforms takes a long time if we request 2048 bytes of entropy, so we would like to request less; but our kernel Fortuna RNG needs to be fed 2048 bytes in order to consider itself "fully seeded". If we have between 64 bytes (the size of a single Fortuna pool and enough to guarantee cryptographic security) and 2048 bytes (what Fortuna wants) then the boot process will hang waiting for more entropy despite in fact having enough to operate securely. Since 64 bytes of entropy is plenty to be cryptographically secure (an attack of cost ~ 2^128 is infeasible, which implies a mere 16 bytes of entropy), use PBKDF2 (aka pkcs5v2_genkey_raw) to spread the entropy across 2048 bytes. This is secure since PBKDF2 has the property that every subset of output bytes has within O(1) of the maximum possible amount of entropy. Reviewed by: pjd MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46635 (cherry picked from commit c8ebbd28aa91705aea3a67b06018ea6aef5aa6e4) --- stand/efi/loader/main.c | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 27fdb3bfefc9..324150f7c8c7 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -56,6 +56,9 @@ #include #include +#include +#include + #include "efizfs.h" #include "framebuffer.h" @@ -1249,11 +1252,27 @@ command_seed_entropy(int argc, char *argv[]) { EFI_STATUS status; EFI_RNG_PROTOCOL *rng; - unsigned int size = 2048; + unsigned int size_efi = RANDOM_FORTUNA_DEFPOOLSIZE * RANDOM_FORTUNA_NPOOLS; + unsigned int size = RANDOM_FORTUNA_DEFPOOLSIZE * RANDOM_FORTUNA_NPOOLS; + void *buf_efi; void *buf; if (argc > 1) { - size = strtol(argv[1], NULL, 0); + size_efi = strtol(argv[1], NULL, 0); + + /* Don't *compress* the entropy we get from EFI. */ + if (size_efi > size) + size = size_efi; + + /* + * If the amount of entropy we get from EFI is less than the + * size of a single Fortuna pool -- i.e. not enough to ensure + * that Fortuna is safely seeded -- don't expand it since we + * don't want to trick Fortuna into thinking that it has been + * safely seeded when it has not. + */ + if (size_efi < RANDOM_FORTUNA_DEFPOOLSIZE) + size = size_efi; } status = BS->LocateProtocol(&rng_guid, NULL, (VOID **)&rng); @@ -1267,20 +1286,34 @@ command_seed_entropy(int argc, char *argv[]) return (CMD_ERROR); } + if ((buf_efi = malloc(size_efi)) == NULL) { + free(buf); + command_errmsg = "out of memory"; + return (CMD_ERROR); + } + TSENTER2("rng->GetRNG"); - status = rng->GetRNG(rng, NULL, size, (UINT8 *)buf); + status = rng->GetRNG(rng, NULL, size_efi, (UINT8 *)buf_efi); TSEXIT(); if (status != EFI_SUCCESS) { + free(buf_efi); free(buf); command_errmsg = "GetRNG failed"; return (CMD_ERROR); } + if (size_efi < size) + pkcs5v2_genkey_raw(buf, size, "", 0, buf_efi, size_efi, 1); + else + memcpy(buf, buf_efi, size); if (file_addbuf("efi_rng_seed", "boot_entropy_platform", size, buf) != 0) { + free(buf_efi); free(buf); return (CMD_ERROR); } + explicit_bzero(buf_efi, size_efi); + free(buf_efi); free(buf); return (CMD_OK); } From nobody Sun Sep 29 15:25:19 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 4XGp1D4Dzjz5XpPQ; Sun, 29 Sep 2024 15:25:20 +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 4XGp1D0xNFz4kvS; Sun, 29 Sep 2024 15:25:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623520; 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=VD3EVe5gdPFt0z44VP0vU+Hqbb/moGkpQcf/Hdd8Ebc=; b=m7c0cUjAslHV1Fxbu/C44knjawvnY2OX22+teBdjJtJNC7WTLKyMUf1M6vc0QZhtCax2NJ iDWF2J2ugPMt9fsNbN+xV4ErCZVoC0caNSJaYVpLuNGt1LhSiA0L5DvkUD2hzWEQHIb1G8 hhCLZ9+fznq4MvnwCr5CUNkcPfE07ZMqmR98xCCnjEoRA4Q6jKOrI3kGnZZeVzfsrfRnCY sq3TAmkW51IIBXRgYmWG9Atoex/TczEMOWv48RQh+/SZURmENEv9mbp5qobZgCphYoz1jQ vQKxFpcPzOxQUnHUhIbYO+fT1vqOeFzMDgI/ktz4DAF9XNLkfAY6tg0b3/zqug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623520; 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=VD3EVe5gdPFt0z44VP0vU+Hqbb/moGkpQcf/Hdd8Ebc=; b=Q0GEO+biQ58t069FCfYxnvDlaJmN+kDvYLGOId9loV/tMM81LXtRim1gAJ/lzADGFsO/0W gDHBzIbBOTj/X38SMWZ5akgE2OmNJHK3FJJ+k4md25sojuWgWpJfoROXlXuWGBTMHPlH1g JR0qs1hQnFJl1HSp4zyqa9N5ZchfO9L7SVrRd2vS7Fa6ppGMCBE7jNfYa6csAENMSF1u7x k41Ogt9AV8s0yWpVmiuQ7VjGc41uzqvXihDRHhc6OayngnXTRWpF3fer3Avr7y+2KHjKZz NYTAnCa8OFfdYy97kYfJ+QlRaiyAbXcZcz65IIIuQUYIe4VCbyLF4/fMxdc1bg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727623520; a=rsa-sha256; cv=none; b=o7ryuMJQ3LQdLNERcZw/Aneh9NeRJSIbJYs3a7x7ljQowh7Yex9Lqeuo3yQnA2P+D9XbZY wnc5490t6zUKY2g0Y9OSF54Bn4HSVPtA2aob9JW/YblR4zsVWWX8Q6t90NqJhuFVF6Yv0a toJNmFq1BxDH4qB0wCbzkO+od5zvmalzCX2Ef0MHs53ElN6ddOELAwgI5zw+Yl+4HxMgaP zdD4bOfwMz0kHWOcze+a8+XX92vkcPwr+EuUAoJs3aQncWfdBNDZN4/iJqFFCYBb//b0em DkJimJ5bOaGLtjGDvZnzeaUW6GClzBkRCr/rGM9z+EYp+ro6ZEhzdYnm+1VrHA== 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 4XGp1D0Pm0z1Cvf; Sun, 29 Sep 2024 15:25:20 +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 48TFPJLf030603; Sun, 29 Sep 2024 15:25:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TFPJFP030600; Sun, 29 Sep 2024 15:25:19 GMT (envelope-from git) Date: Sun, 29 Sep 2024 15:25:19 GMT Message-Id: <202409291525.48TFPJFP030600@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 82ade8ed7e70 - stable/14 - EC2: Set entropy_efi_seed_size to 64 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 82ade8ed7e70ad99aa5a35b6947de06a2efe3257 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=82ade8ed7e70ad99aa5a35b6947de06a2efe3257 commit 82ade8ed7e70ad99aa5a35b6947de06a2efe3257 Author: Colin Percival AuthorDate: 2024-09-18 11:02:15 +0000 Commit: Colin Percival CommitDate: 2024-09-29 15:24:52 +0000 EC2: Set entropy_efi_seed_size to 64 This dramatically improves boot speeds on Graviton 2 instances. MFC after: 1 week Sponsored by: Amazon Differential Revision: https://reviews.freebsd.org/D46636 (cherry picked from commit 714a6d436819d446e01d1e4741fbe1089a23fe57) --- release/tools/ec2.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index 2cca5fa713af..522aaa400520 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -38,6 +38,10 @@ ec2_common() { echo 'autoboot_delay="-1"' >> ${DESTDIR}/boot/loader.conf echo 'beastie_disable="YES"' >> ${DESTDIR}/boot/loader.conf + # The EFI RNG on Graviton 2 is particularly slow if we ask for the + # default 2048 bytes of entropy; ask for 64 bytes instead. + echo 'entropy_efi_seed_size="64"' >> ${DESTDIR}/boot/loader.conf + # Tell gptboot not to wait 3 seconds for a keypress which will # never arrive. printf -- "-n\n" > ${DESTDIR}/boot.config From nobody Sun Sep 29 15:25:21 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 4XGp1F3p0Fz5Xp7c; Sun, 29 Sep 2024 15:25:21 +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 4XGp1F1wjvz4ksf; Sun, 29 Sep 2024 15:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623521; 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=2B0kMQ2MXmEG97w5+T25hUTpCBDH/RdfuOa8VLPKm/4=; b=wONyybwC5+yMwjZlxrHf4LjyctyAhbU8OLPKtKmAh/bW/QKVQOQq3M/pYO+PTf6ssgyE3p It7ZsojcDqt8S2IL5duWwNrjeVAGDMf8yGC220w4AG+x155f2Z8525hoA2OAYIRx2izkFk /k/F5W2cao7NtbqeryEd2G2+reYehdiYfU1zTj/NxEVoV3y3VhpfiWD96BS+nszjTwibUB oZMBJVKF7CUUsTVhjJ8LlgBAKB1RCmuhDY5V4wpun7oKgN6vjxhaMztE0qYyd9asMEGCmP FWubp19SOQhFOQksIlEODcSpnb5lz8jHciEUrrex+GkPsjABqdeJtPE4Xi/Vxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727623521; 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=2B0kMQ2MXmEG97w5+T25hUTpCBDH/RdfuOa8VLPKm/4=; b=qs+yaxzw3s41bosS0rWrpd+DK0mV9Px0ilCEcSAa81lfz2iIlsDtloFqVXtOeu0Kbkmqwu ax8LZSi+WMbdbi8U/EJW4hVXHK6Kdy9qk2sQ09lUWOi1VQfx2iaRLDUfsV7+CQcR/sv47M DpfJTq2HViAMq8jLoxPVIJGun3k8ESdBRLe9pI1WWi3h/BzS/YKZZ5f7BqOCUOHkynqBiW FTf++Dt8LKEbBo/uJVmOwXu8bOjQqymmyQJm1jFFZAtFFi9cfiaMjc8BHdTYwY0YQuRyYE w589sVuyoq6d/5bgJJBtYX9oNx9AAiK3yI86olW0OWBvp8yUfsU5wP/nrVntTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727623521; a=rsa-sha256; cv=none; b=PP340z9EH2YC6owoqTSz/z26omA8qbzg4QvsgokK8PkTpqAJKIFIJlMKvD51O3ODVYT9N3 mkahVNWh9QG7F0WFS3TJrSsM9wK3XLueMhfP7Omj9hWPS8HY1uYD+F65c1cA7M0AAn/ntm ZlyMtHALN6o0gZfPsOl5E9YSnSP+eZ+goPoYPV478S2SrPUUA07k5vPYxmPiQNW9DLUtnH fXk4b4ZRVMBRqVL+QKClqozXLbfATCE6KQeOPdIcoufDoQJvVDt4E3ZrcL/jjOBDjHZdVS 632QXQ/XFK986luKXSPxfE8uf/bZIbGKkQEg4rSZEjoC7Jek7sWlwjZSmQiwWA== 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 4XGp1F1XydzFDC; Sun, 29 Sep 2024 15:25:21 +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 48TFPL2N030651; Sun, 29 Sep 2024 15:25:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TFPLtE030648; Sun, 29 Sep 2024 15:25:21 GMT (envelope-from git) Date: Sun, 29 Sep 2024 15:25:21 GMT Message-Id: <202409291525.48TFPLtE030648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: a651978fc40c - stable/14 - loader: Load platform entropy even without menu 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a651978fc40c97b8b9538d64bf0adaedccbb2727 Auto-Submitted: auto-generated The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a651978fc40c97b8b9538d64bf0adaedccbb2727 commit a651978fc40c97b8b9538d64bf0adaedccbb2727 Author: Colin Percival AuthorDate: 2024-09-18 11:02:20 +0000 Commit: Colin Percival CommitDate: 2024-09-29 15:24:53 +0000 loader: Load platform entropy even without menu In 5c73b3e0a3db calls to core.loadEntropy were added to core.boot and core.autoboot; but neither of those is invoked if we disable the "beastie" menu. Add a core.loadEntropy call to the no-menu path. Reviewed by: imp MFC after: 1 week Sponsored by: Amazon Fixes: 5c73b3e0a3db ("Add support for getting early entropy from UEFI") Differential Revision: https://reviews.freebsd.org/D46637 (cherry picked from commit 74a28cf6e7f66c7c12fd25ee8231eeedf756bf08) --- stand/lua/loader.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stand/lua/loader.lua b/stand/lua/loader.lua index 454cd7e6332f..0874239db587 100644 --- a/stand/lua/loader.lua +++ b/stand/lua/loader.lua @@ -54,4 +54,6 @@ if not core.isMenuSkipped() then else -- Load kernel/modules before we go config.loadelf() + -- Load platform entropy if possible + core.loadEntropy() end From nobody Sun Sep 29 16:47:27 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 4XGqqz3GT6z5Xthp; Sun, 29 Sep 2024 16:47:27 +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 4XGqqz2hysz45CC; Sun, 29 Sep 2024 16:47:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727628447; 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=AEohoBIw6PTjzZTa78k7uhSciB4JlHWrYOheSWociUY=; b=sjjQZ2imJB4ukFd5qeMC3NNHggR0RJZ9JgkjheoDVwuGqMmknJ5yQzCBVWy0Xm4FiNG8Pd BiILo9niKwUBYUKBW16GpLOmxUaRtO8s9N9q5CxaFoOZwXVNTKvaDd2PnZ44yEXT3JHgjp u3qoS3OiUIUT45E7XI3nKh6DdE7NBIvodzJ5Xr+AHcTeoYnqSPQvomOPWEjgH4AZxbBN2k bvZwExvNX0CMD8WEGHuCoGNAA/cJfxOntZY9CqcXy1uvFQuWv4WxvGAPW3HEnmF848pQvB aEDLl+CWqoZG4NEjrlD8PsFcUWm2Moc3Bq4ZRlmTrxcoaRnOdt5JW5LKoDeKgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727628447; 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=AEohoBIw6PTjzZTa78k7uhSciB4JlHWrYOheSWociUY=; b=SKcw1soWmKd2NeoEngKGMnx+UjbjZ+ux7nGSq3+Jhj2deeP9u43+m92zGt2mbcI/d1Ce5b 52xROTIGK3BQqVxpnRc0ecdhTeq9ODFO10Zklai51s+Jp+9nFcD3o9eeQ6tnMA50/BqQiK TIl4DPrD332YKXqeCktqp4Sd6NkjOZyV3eTX4/ycfRleTiSqYNndbhO4wfmU34ZMG+OrCB YDR/ShobArowKteiRqegg4cBUldCm882bmTyTifMh1MHTtt80HqBQNEqfmHW+c7HK/k3Qw LTvw2YMMJuyMLFPFZ2XN7qpXLw/V2qGZSM/JXb3CLKWZWIqklOazoEeJPBglDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727628447; a=rsa-sha256; cv=none; b=NpP+Z5zhLAORPkkl7wwfRACYiMVyvXkjeNHurZE6dXus1TM3DP0rl8J8bLrdXQRl2MIPHW QfK8rbWgRGOFpn617CqnN6v0M/0F2M+2adUnU5AIzNI2QRR9qbb6K52aLc1Q5KQX3vTOMj EZ9jh1XqGJWL0CK20wRsSzB1AbdkvuqmE9iFyfAXCXsCLkaBtl9Tf0+Jdpl04WKcNQh3in EqTHJ4gPIvnwa53BP2dhSpnIHem+NBMRhUbuH3/nMCsTdG+QgPq2AtvjoW8vWq9UuQmlDu oLHhDUrr8xIhsjJkT0cqlu82JAzar03Nkugn4m8v/qs2NF3gJVZJMI7L2OoiRg== 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 4XGqqz20WCzHHg; Sun, 29 Sep 2024 16:47:27 +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 48TGlRGI065754; Sun, 29 Sep 2024 16:47:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TGlR4Z065751; Sun, 29 Sep 2024 16:47:27 GMT (envelope-from git) Date: Sun, 29 Sep 2024 16:47:27 GMT Message-Id: <202409291647.48TGlR4Z065751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: 52b35140528c - main - swap_pager: examine swblks with pctrie iterators 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52b35140528c3ada05cccbd9246d80d9148b9f38 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=52b35140528c3ada05cccbd9246d80d9148b9f38 commit 52b35140528c3ada05cccbd9246d80d9148b9f38 Author: Doug Moore AuthorDate: 2024-09-29 16:38:53 +0000 Commit: Doug Moore CommitDate: 2024-09-29 16:38:53 +0000 swap_pager: examine swblks with pctrie iterators Replace calls to pctrie lookup and remove functions, which always begin with a search from the pctrie root, with the use of pctrie iterators to traverse and remove items from the pctrie of swapblks without duplicating searches. Take care to reset iterators after reacquiring an object lock, since with the lock released they could be invalidated. Reviewed by: alc, markj, kib Tested by: pho (previous versions) Differential Revision: https://reviews.freebsd.org/D46620 --- sys/vm/swap_pager.c | 275 ++++++++++++++++++++++++++++------------------------ 1 file changed, 148 insertions(+), 127 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index fbf2967aaf17..3a8c7e0f5777 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -529,6 +529,13 @@ swblk_trie_free(struct pctrie *ptree, void *node) uma_zfree(swpctrie_zone, node); } +static int +swblk_start(struct swblk *sb, vm_pindex_t pindex) +{ + return (sb == NULL || sb->p >= pindex ? + 0 : pindex % SWAP_META_PAGES); +} + PCTRIE_DEFINE(SWAP, swblk, p, swblk_trie_alloc, swblk_trie_free); static struct swblk * @@ -538,50 +545,56 @@ swblk_lookup(vm_object_t object, vm_pindex_t pindex) rounddown(pindex, SWAP_META_PAGES))); } -static struct swblk * -swblk_start(vm_object_t object, vm_pindex_t pindex) +static void +swblk_lookup_remove(vm_object_t object, struct swblk *sb) { - return (SWAP_PCTRIE_LOOKUP_GE(&object->un_pager.swp.swp_blks, - rounddown(pindex, SWAP_META_PAGES))); + SWAP_PCTRIE_REMOVE(&object->un_pager.swp.swp_blks, sb->p); } -static struct swblk * -swblk_next(vm_object_t object, struct swblk *sb) +static int +swblk_lookup_insert(vm_object_t object, struct swblk *sb) { - return (swblk_start(object, sb->p + SWAP_META_PAGES)); + return (SWAP_PCTRIE_INSERT(&object->un_pager.swp.swp_blks, sb)); } -static struct swblk * -swblk_start_limit(vm_object_t object, vm_pindex_t pindex, vm_pindex_t limit) +static bool +swblk_is_empty(vm_object_t object) { - struct swblk *sb = swblk_start(object, pindex); - if (sb != NULL && sb->p < limit) - return (sb); - return (NULL); + return (pctrie_is_empty(&object->un_pager.swp.swp_blks)); } static struct swblk * -swblk_next_limit(vm_object_t object, struct swblk *sb, vm_pindex_t limit) +swblk_iter(struct pctrie_iter *blks, vm_object_t object, + vm_pindex_t pindex) { - return (swblk_start_limit(object, sb->p + SWAP_META_PAGES, limit)); + VM_OBJECT_ASSERT_LOCKED(object); + MPASS((object->flags & OBJ_SWAP) != 0); + pctrie_iter_init(blks, &object->un_pager.swp.swp_blks); + return (SWAP_PCTRIE_ITER_LOOKUP_GE(blks, + rounddown(pindex, SWAP_META_PAGES))); } -static void -swblk_lookup_remove(vm_object_t object, struct swblk *sb) +static struct swblk * +swblk_iter_limit(struct pctrie_iter *blks, vm_object_t object, + vm_pindex_t pindex, vm_pindex_t limit) { - SWAP_PCTRIE_REMOVE(&object->un_pager.swp.swp_blks, sb->p); + VM_OBJECT_ASSERT_LOCKED(object); + MPASS((object->flags & OBJ_SWAP) != 0); + pctrie_iter_limit_init(blks, &object->un_pager.swp.swp_blks, limit); + return (SWAP_PCTRIE_ITER_LOOKUP_GE(blks, + rounddown(pindex, SWAP_META_PAGES))); } -static int -swblk_lookup_insert(vm_object_t object, struct swblk *sb) +static struct swblk * +swblk_iter_next(struct pctrie_iter *blks) { - return (SWAP_PCTRIE_INSERT(&object->un_pager.swp.swp_blks, sb)); + return (SWAP_PCTRIE_ITER_JUMP_GE(blks, SWAP_META_PAGES)); } -static bool -swblk_is_empty(vm_object_t object) +static void +swblk_iter_remove(struct pctrie_iter *blks) { - return (pctrie_is_empty(&object->un_pager.swp.swp_blks)); + SWAP_PCTRIE_ITER_REMOVE(blks); } /* @@ -1827,6 +1840,7 @@ swp_pager_force_dirty(struct page_range *range, vm_page_t m, daddr_t *blk) u_long swap_pager_swapped_pages(vm_object_t object) { + struct pctrie_iter blks; struct swblk *sb; u_long res; int i; @@ -1837,8 +1851,8 @@ swap_pager_swapped_pages(vm_object_t object) return (0); res = 0; - for (sb = swblk_start(object, 0); sb != NULL; - sb = swblk_next(object, sb)) { + for (sb = swblk_iter(&blks, object, 0); sb != NULL; + sb = swblk_iter_next(&blks)) { for (i = 0; i < SWAP_META_PAGES; i++) { if (sb->d[i] != SWAPBLK_NONE) res++; @@ -1856,25 +1870,24 @@ swap_pager_swapped_pages(vm_object_t object) static void swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) { - struct pctrie_iter pages; + struct pctrie_iter blks, pages; struct page_range range; struct swblk *sb; vm_page_t m; - vm_pindex_t pi; - daddr_t blk; int i, rahead, rv; bool sb_empty; VM_OBJECT_ASSERT_WLOCKED(object); KASSERT((object->flags & OBJ_SWAP) != 0, ("%s: Object not swappable", __func__)); + KASSERT((sp->sw_flags & SW_CLOSING) != 0, + ("%s: Device not blocking further allocations", __func__)); - pi = 0; - i = 0; vm_page_iter_init(&pages, object); swp_pager_init_freerange(&range); - for (;;) { - if (i == 0 && (object->flags & OBJ_DEAD) != 0) { + sb = swblk_iter(&blks, object, 0); + while (sb != NULL) { + if ((object->flags & OBJ_DEAD) != 0) { /* * Make sure that pending writes finish before * returning. @@ -1883,78 +1896,83 @@ swap_pager_swapoff_object(struct swdevt *sp, vm_object_t object) swp_pager_meta_free_all(object); break; } + sb_empty = true; + for (i = 0; i < SWAP_META_PAGES; i++) { + /* Skip an invalid block. */ + if (sb->d[i] == SWAPBLK_NONE) + continue; + /* Skip a block not of this device. */ + if (!swp_pager_isondev(sb->d[i], sp)) { + sb_empty = false; + continue; + } - if (i == SWAP_META_PAGES) { - pi = sb->p + SWAP_META_PAGES; - if (sb_empty) { - swblk_lookup_remove(object, sb); - uma_zfree(swblk_zone, sb); + /* + * Look for a page corresponding to this block. If the + * found page has pending operations, sleep and restart + * the scan. + */ + m = vm_page_iter_lookup(&pages, blks.index + i); + if (m != NULL && (m->oflags & VPO_SWAPINPROG) != 0) { + m->oflags |= VPO_SWAPSLEEP; + VM_OBJECT_SLEEP(object, &object->handle, PSWP, + "swpoff", 0); + break; } - i = 0; - } - if (i == 0) { - sb = swblk_start(object, pi); - if (sb == NULL) + /* + * If the found page is valid, mark it dirty and free + * the swap block. + */ + if (m != NULL && vm_page_all_valid(m)) { + swp_pager_force_dirty(&range, m, &sb->d[i]); + continue; + } + /* Is there a page we can acquire or allocate? */ + if (m != NULL) { + if (!vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL)) + break; + } else if ((m = vm_page_alloc(object, blks.index + i, + VM_ALLOC_NORMAL | VM_ALLOC_WAITFAIL)) == NULL) break; - sb_empty = true; - } - /* Skip an invalid block. */ - blk = sb->d[i]; - if (blk == SWAPBLK_NONE || !swp_pager_isondev(blk, sp)) { - if (blk != SWAPBLK_NONE) - sb_empty = false; - i++; - continue; + /* Get the page from swap, and restart the scan. */ + vm_object_pip_add(object, 1); + rahead = SWAP_META_PAGES; + rv = swap_pager_getpages_locked(object, &m, 1, + NULL, &rahead); + if (rv != VM_PAGER_OK) + panic("%s: read from swap failed: %d", + __func__, rv); + VM_OBJECT_WLOCK(object); + vm_object_pip_wakeupn(object, 1); + KASSERT(vm_page_all_valid(m), + ("%s: Page %p not all valid", __func__, m)); + vm_page_xunbusy(m); + break; } - - /* - * Look for a page corresponding to this block, If the found - * page has pending operations, sleep and restart the scan. - */ - m = vm_page_iter_lookup(&pages, sb->p + i); - if (m != NULL && (m->oflags & VPO_SWAPINPROG) != 0) { - m->oflags |= VPO_SWAPSLEEP; - VM_OBJECT_SLEEP(object, &object->handle, PSWP, "swpoff", - 0); - i = 0; /* Restart scan after object lock dropped. */ + if (i < SWAP_META_PAGES) { + /* + * With the object lock released and regained, the + * swapblk could have been freed, so reset the pages + * iterator and search again for the first swblk at or + * after blks.index. + */ + pctrie_iter_reset(&pages); + sb = swblk_iter(&blks, object, blks.index); continue; } + if (sb_empty) { + swblk_iter_remove(&blks); + uma_zfree(swblk_zone, sb); + } /* - * If the found page is valid, mark it dirty and free the swap - * block. + * It is safe to advance to the next block. No allocations + * before blk.index have happened, even with the lock released, + * because allocations on this device are blocked. */ - if (m != NULL && vm_page_all_valid(m)) { - swp_pager_force_dirty(&range, m, &sb->d[i]); - i++; - continue; - } - - /* Is there a page we can acquire or allocate? */ - if (m == NULL) { - m = vm_page_alloc(object, sb->p + i, - VM_ALLOC_NORMAL | VM_ALLOC_WAITFAIL); - } else if (!vm_page_busy_acquire(m, VM_ALLOC_WAITFAIL)) - m = NULL; - - /* If no page available, repeat this iteration. */ - if (m == NULL) - continue; - - /* Get the page from swap, mark it dirty, restart the scan. */ - vm_object_pip_add(object, 1); - rahead = SWAP_META_PAGES; - rv = swap_pager_getpages_locked(object, &m, 1, NULL, &rahead); - if (rv != VM_PAGER_OK) - panic("%s: read from swap failed: %d", __func__, rv); - VM_OBJECT_WLOCK(object); - vm_object_pip_wakeupn(object, 1); - KASSERT(vm_page_all_valid(m), - ("%s: Page %p not all valid", __func__, m)); - vm_page_xunbusy(m); - i = 0; /* Restart scan after object lock dropped. */ + sb = swblk_iter_next(&blks); } swp_pager_freeswapspace(&range); } @@ -2195,10 +2213,11 @@ static void swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, vm_pindex_t pindex, vm_pindex_t count) { + struct pctrie_iter blks; struct page_range range; struct swblk *sb; daddr_t blk, d[SWAP_META_PAGES]; - vm_pindex_t offset, last; + vm_pindex_t last; int d_mask, i, limit, start; _Static_assert(8 * sizeof(d_mask) >= SWAP_META_PAGES, "d_mask not big enough"); @@ -2211,20 +2230,16 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, swp_pager_init_freerange(&range); d_mask = 0; - offset = pindex; last = pindex + count; - sb = swblk_start_limit(srcobject, pindex, last); - start = (sb != NULL && sb->p < pindex) ? pindex - sb->p : 0; - for (; sb != NULL; - sb = swblk_start_limit(srcobject, pindex, last), start = 0) { - pindex = sb->p; - MPASS(d_mask == 0); - limit = MIN(last - pindex, SWAP_META_PAGES); + for (sb = swblk_iter_limit(&blks, srcobject, pindex, last), + start = swblk_start(sb, pindex); + sb != NULL; sb = swblk_iter_next(&blks), start = 0) { + limit = MIN(last - blks.index, SWAP_META_PAGES); for (i = start; i < limit; i++) { if (sb->d[i] == SWAPBLK_NONE) continue; blk = swp_pager_meta_build(dstobject, - pindex + i - offset, sb->d[i], true); + blks.index + i - pindex, sb->d[i], true); if (blk == sb->d[i]) { /* * Failed memory allocation stopped transfer; @@ -2241,7 +2256,7 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, } if (swp_pager_swblk_empty(sb, 0, start) && swp_pager_swblk_empty(sb, limit, SWAP_META_PAGES)) { - swblk_lookup_remove(srcobject, sb); + swblk_iter_remove(&blks); uma_zfree(swblk_zone, sb); } if (d_mask != 0) { @@ -2250,12 +2265,17 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, do { i = ffs(d_mask) - 1; swp_pager_meta_build(dstobject, - pindex + i - offset, d[i], false); + blks.index + i - pindex, d[i], false); d_mask &= ~(1 << i); } while (d_mask != 0); VM_OBJECT_WLOCK(srcobject); + + /* + * While the lock was not held, the iterator path could + * have become stale, so discard it. + */ + pctrie_iter_reset(&blks); } - pindex += SWAP_META_PAGES; } swp_pager_freeswapspace(&range); } @@ -2271,7 +2291,7 @@ static void swp_pager_meta_free(vm_object_t object, vm_pindex_t pindex, vm_pindex_t count, vm_size_t *freed) { - struct pctrie_iter pages; + struct pctrie_iter blks, pages; struct page_range range; struct swblk *sb; vm_page_t m; @@ -2288,26 +2308,24 @@ swp_pager_meta_free(vm_object_t object, vm_pindex_t pindex, vm_pindex_t count, swp_pager_init_freerange(&range); vm_page_iter_init(&pages, object); last = pindex + count; - sb = swblk_start_limit(object, pindex, last); - start = (sb != NULL && sb->p < pindex) ? pindex - sb->p : 0; - for (; sb != NULL; - sb = swblk_start_limit(object, pindex, last), start = 0) { - limit = MIN(last - sb->p, SWAP_META_PAGES); + for (sb = swblk_iter_limit(&blks, object, pindex, last), + start = swblk_start(sb, pindex); + sb != NULL; sb = swblk_iter_next(&blks), start = 0) { + limit = MIN(last - blks.index, SWAP_META_PAGES); for (i = start; i < limit; i++) { if (sb->d[i] == SWAPBLK_NONE) continue; swp_pager_update_freerange(&range, sb->d[i]); if (freed != NULL) { - m = vm_page_iter_lookup(&pages, sb->p + i); + m = vm_page_iter_lookup(&pages, blks.index + i); if (m == NULL || vm_page_none_valid(m)) fc++; } sb->d[i] = SWAPBLK_NONE; } - pindex = sb->p + SWAP_META_PAGES; if (swp_pager_swblk_empty(sb, 0, start) && swp_pager_swblk_empty(sb, limit, SWAP_META_PAGES)) { - swblk_lookup_remove(object, sb); + swblk_iter_remove(&blks); uma_zfree(swblk_zone, sb); } } @@ -2387,22 +2405,23 @@ swp_pager_meta_lookup(vm_object_t object, vm_pindex_t pindex) vm_pindex_t swap_pager_find_least(vm_object_t object, vm_pindex_t pindex) { + struct pctrie_iter blks; struct swblk *sb; int i; - if ((sb = swblk_start(object, pindex)) == NULL) + if ((sb = swblk_iter(&blks, object, pindex)) == NULL) return (OBJ_MAX_SIZE); - if (sb->p < pindex) { + if (blks.index < pindex) { for (i = pindex % SWAP_META_PAGES; i < SWAP_META_PAGES; i++) { if (sb->d[i] != SWAPBLK_NONE) - return (sb->p + i); + return (blks.index + i); } - if ((sb = swblk_next(object, sb)) == NULL) + if ((sb = swblk_iter_next(&blks)) == NULL) return (OBJ_MAX_SIZE); } for (i = 0; i < SWAP_META_PAGES; i++) { if (sb->d[i] != SWAPBLK_NONE) - return (sb->p + i); + return (blks.index + i); } /* @@ -2840,13 +2859,14 @@ SYSCTL_NODE(_vm, OID_AUTO, swap_info, CTLFLAG_RD | CTLFLAG_MPSAFE, long vmspace_swap_count(struct vmspace *vmspace) { + struct pctrie_iter blks; vm_map_t map; vm_map_entry_t cur; vm_object_t object; struct swblk *sb; vm_pindex_t e, pi; long count; - int i; + int i, limit, start; map = &vmspace->vm_map; count = 0; @@ -2862,11 +2882,12 @@ vmspace_swap_count(struct vmspace *vmspace) goto unlock; pi = OFF_TO_IDX(cur->offset); e = pi + OFF_TO_IDX(cur->end - cur->start); - for (sb = swblk_start_limit(object, pi, e); - sb != NULL; sb = swblk_next_limit(object, sb, e)) { - for (i = 0; i < SWAP_META_PAGES; i++) { - if (sb->p + i < e && - sb->d[i] != SWAPBLK_NONE) + for (sb = swblk_iter_limit(&blks, object, pi, e), + start = swblk_start(sb, pi); + sb != NULL; sb = swblk_iter_next(&blks), start = 0) { + limit = MIN(e - blks.index, SWAP_META_PAGES); + for (i = start; i < limit; i++) { + if (sb->d[i] != SWAPBLK_NONE) count++; } } From nobody Sun Sep 29 19:25:40 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 4XGvLX73Vlz5X5X1; Sun, 29 Sep 2024 19:25:40 +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 4XGvLX6V1Jz4Kpp; Sun, 29 Sep 2024 19:25:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727637940; 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=12aeIUt7+EtU6AGnXzgwIgK1mFzWK4ayzB1NYWTUqts=; b=c/vOfErfIICnNcp7AVPfBq2zuyPvw+slYZP/ozN9EqJyM/lG4I9zNSzOIhr4wBKxh9JUOt 06I5TSrBT2hGGta1mVFooadNNXuxockzwhhyhQZ7/r3k9/PiiclFxWz62b78zL5zgSs6ra LhIfzJ3sC+Lj0TCOf3rR6o+aTPiwH5/sHnHJ/A43TO/hpqVRc1bQuvcQLlixfNQ4Ufq2bP eTrWidg/hv1Qp20wIuwTEkl3gp5pdsbOqt2t03rWQWf9x/IvcxvN3Wu1fSPyL3phyPpJAM JEXUFw+BXYmG5VIO6/aXtR4nBGyNT7NeQpOLvoqnNdSuXJT2CwUGyEtI2tsfiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727637940; 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=12aeIUt7+EtU6AGnXzgwIgK1mFzWK4ayzB1NYWTUqts=; b=g1VOOQ1QSF/jGTKTo/OidjAjVSwSBKvMiUqu4zH9vCWArAaS1RJkGffucmGtGoTa/x/sc7 9bNs4DYz9clpDqjdubQ/GH8q9JDNKewoqPViOAQ9C2WENWo1N8GS6aouQdo5QkKNMdND5Q nd2W33hjHQ51I5DzuV9cpEvUYZ1IjH6Tmw+9y1q0+rND2t3KUvu4Hocn45gL/1uFvuTnh3 q05KMFI/C4cIMZYqy68tj/oRKZ2lXu+h1gbxhxZ3zi/PWJJvfBGtihpkfDX0Xyk7xAMcS3 ApWEI66TgVkse0pgsE1T+IaiXfEQhZoU3RfD8BkvpR/OedMWHsfXxDfACFM7uA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727637940; a=rsa-sha256; cv=none; b=IrrYyiUKHwYmZpa/lDKXaRSVzj24ortY5Joei5M5Cs9jruSyoWQ6oha4G85/OOOruLwXB4 ln8XfVLqcd4SF4S/lmGdg+Qety4Mz6ywvo7J1ijwIAWtgtY0/G6MIvQyacQcjSSC5yYb/x lrXRePAtT4Vx7nCaLP+T83D06AJKlHFvWoRcKaTs/7rTGVUYdrAysZ3RWifBBeWH3KnR8f /gVU317HWxSB0Ba5F7nNjDeXLcJmMhTwhGbGucA//wEFE4MpCuTkC3ScqEhwD7YsqggaYN fM5vO0TKayCrtwArhFTTWrVfs4enJoG9qYjLTkw1NEwhbR93RcsGRVQIzMddXQ== 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 4XGvLX5z08zLmb; Sun, 29 Sep 2024 19:25:40 +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 48TJPeI1037852; Sun, 29 Sep 2024 19:25:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TJPe5m037849; Sun, 29 Sep 2024 19:25:40 GMT (envelope-from git) Date: Sun, 29 Sep 2024 19:25:40 GMT Message-Id: <202409291925.48TJPe5m037849@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: b26edf615c91 - stable/13 - libpfctl: ensure we return useful error codes 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b26edf615c91768fe88bee98d70b55c8bf68fef1 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b26edf615c91768fe88bee98d70b55c8bf68fef1 commit b26edf615c91768fe88bee98d70b55c8bf68fef1 Author: Kristof Provost AuthorDate: 2024-09-20 09:36:22 +0000 Commit: Kristof Provost CommitDate: 2024-09-29 18:29:44 +0000 libpfctl: ensure we return useful error codes Return errno rather than -1 on error. This allows pfctl to report much more useful errors. Reported by: Alexander Leidinger MFC after: 1 week (cherry picked from commit 93e96359c980ccf318fe089b30b863f7c910b622) --- lib/libpfctl/libpfctl.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index f5ddbba79bfd..ddad467c3644 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1035,8 +1035,12 @@ pfctl_clear_rules(int dev, const char *anchorname) ret = ioctl(dev, DIOCXBEGIN, &trans); if (ret != 0) - return (ret); - return ioctl(dev, DIOCXCOMMIT, &trans); + return (errno); + ret = ioctl(dev, DIOCXCOMMIT, &trans); + if (ret != 0) + return (errno); + + return (0); } int @@ -1070,8 +1074,12 @@ pfctl_clear_nat(int dev, const char *anchorname) ret = ioctl(dev, DIOCXBEGIN, &trans); if (ret != 0) - return (ret); - return ioctl(dev, DIOCXCOMMIT, &trans); + return (errno); + ret = ioctl(dev, DIOCXCOMMIT, &trans); + if (ret != 0) + return (errno); + + return (0); } static int @@ -1117,7 +1125,10 @@ pfctl_set_syncookies(int dev, const struct pfctl_syncookies *s) ret = ioctl(dev, DIOCSETSYNCOOKIES, &nv); free(nv.data); - return (ret); + if (ret != 0) + return (errno); + + return (0); } int @@ -1225,7 +1236,7 @@ pfctl_table_set_addrs(int dev, struct pfr_table *tbl, struct pfr_addr io.pfrio_size = size; io.pfrio_size2 = (size2 != NULL) ? *size2 : 0; if (ioctl(dev, DIOCRSETADDRS, &io)) - return (-1); + return (errno); if (nadd != NULL) *nadd = io.pfrio_nadd; if (ndel != NULL) @@ -1253,7 +1264,7 @@ int pfctl_table_get_addrs(int dev, struct pfr_table *tbl, struct pfr_addr *addr, io.pfrio_esize = sizeof(*addr); io.pfrio_size = *size; if (ioctl(dev, DIOCRGETADDRS, &io)) - return (-1); + return (errno); *size = io.pfrio_size; return (0); } From nobody Sun Sep 29 19:25:41 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 4XGvLY4R99z5X5kY; Sun, 29 Sep 2024 19:25: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XGvLY3rrGz4LB6; Sun, 29 Sep 2024 19:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727637941; 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=dbC+Xs9Z8V46ygccKzZX3Q0+hJ7VkaS7uTqxCfE2ECY=; b=xnpD5Qg4d4qmxxjmgnOObI91UpSTIr8BnCu/HBAqbcIjkqUNcTzgQ3GKxO5Y2kEC8A7sKw A9b5dJ2aSXcSOvTZLOqeiFqyit6iY3QHPFopPYiInkSB3eiaK6cjfmzgFkuj7fKU2WFXQw gjX/FlxXdh/QOyApNZgqYN7XS4y3Q+sQtwi+d1P3nIqim+hKHSc1ZHJZO9atjlv9p50/zn gW4Q+KORobRdYodKWmpQf8ew9Hy9o0GfKPq3gzFo9kgDu6f5zA4B6GpqCJN/5UyKtZKon0 FHyB9V3awWkdQ/fk2trIUnsqaHweukvXDNuZexvpZQcXGYZFODDlzp5ritGF9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727637941; 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=dbC+Xs9Z8V46ygccKzZX3Q0+hJ7VkaS7uTqxCfE2ECY=; b=iSCu4DK8IrCPBp1Ek+j8as77Euz9+PORKvOlxFAqqHUXE5+Gh7gWStcXRLD0675S5zhfDB FOrKtr9lFEJQuFx+g8eYqAORUi222KzHDPDu1d6kRFV0I7Nm9QA914cI0lXO3wccBaj3A5 LDN39a3lmYqH+FJA+0FE+lhmZOQQ1o8qYUIknsHqazGAWKXc5gmKseN6zXqoPBSZwTTnTx NgxD/P8+I1/joZw51cjgrL21ZlRTPPGFjyUN3XbTP3/Vx0+U3r8Lt4XBIyRneE/T7CZZQM i8HZgPzBfbKEmzh5N9upam0g9DLTWMRWNeeCKGYETXmjAN2vfBDTLKpNGX5sEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727637941; a=rsa-sha256; cv=none; b=Qw5s3dJFFyP5Mv6naa3NdZv0sEbxJf/YjN/Xsb/0I8ypx55TpGE0XBN96FcCh/GCXMdrUx B2sND+U2tHsNFueKpWybBCPbd9dUd4G6IpVBnBUT78hPbDSPqKA9Uu6sHMIr1JqiVVVobu lzVv1TmniGE4TPZxsaXATAjrdIlwJ1viEdXtiMUZkPkjVlTZEyEkdYO2Wfwh+OlgFFsLVU Vi515w+N/1A84sueLBMAHAPyhVGv7YzEVJiFRGuC/3y6BRZoWnOGlwg5DtNZZhX/HnJr0U Ugy7YO9qsg+QjiT71deABNWfeFdQW0yETrxMnSPVuSgJHpU2ptgwFdzdvJXepA== 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 4XGvLY3SFSzMHD; Sun, 29 Sep 2024 19:25: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 48TJPfBp037956; Sun, 29 Sep 2024 19:25:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TJPfWG037953; Sun, 29 Sep 2024 19:25:41 GMT (envelope-from git) Date: Sun, 29 Sep 2024 19:25:41 GMT Message-Id: <202409291925.48TJPfWG037953@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: e3a9f4123f76 - stable/14 - libpfctl: ensure we return useful error codes 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e3a9f4123f76205d0b85715f3f60aa1d9dc02887 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e3a9f4123f76205d0b85715f3f60aa1d9dc02887 commit e3a9f4123f76205d0b85715f3f60aa1d9dc02887 Author: Kristof Provost AuthorDate: 2024-09-20 09:36:22 +0000 Commit: Kristof Provost CommitDate: 2024-09-29 18:29:50 +0000 libpfctl: ensure we return useful error codes Return errno rather than -1 on error. This allows pfctl to report much more useful errors. Reported by: Alexander Leidinger MFC after: 1 week (cherry picked from commit 93e96359c980ccf318fe089b30b863f7c910b622) --- lib/libpfctl/libpfctl.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 7dc375717acc..d2e23ea2496e 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -1337,8 +1337,12 @@ pfctl_clear_rules(int dev, const char *anchorname) ret = ioctl(dev, DIOCXBEGIN, &trans); if (ret != 0) - return (ret); - return ioctl(dev, DIOCXCOMMIT, &trans); + return (errno); + ret = ioctl(dev, DIOCXCOMMIT, &trans); + if (ret != 0) + return (errno); + + return (0); } int @@ -1372,9 +1376,14 @@ pfctl_clear_nat(int dev, const char *anchorname) ret = ioctl(dev, DIOCXBEGIN, &trans); if (ret != 0) - return (ret); - return ioctl(dev, DIOCXCOMMIT, &trans); + return (errno); + ret = ioctl(dev, DIOCXCOMMIT, &trans); + if (ret != 0) + return (errno); + + return (0); } + int pfctl_clear_eth_rules(int dev, const char *anchorname) { @@ -1396,8 +1405,12 @@ pfctl_clear_eth_rules(int dev, const char *anchorname) ret = ioctl(dev, DIOCXBEGIN, &trans); if (ret != 0) - return (ret); - return ioctl(dev, DIOCXCOMMIT, &trans); + return (errno); + ret = ioctl(dev, DIOCXCOMMIT, &trans); + if (ret != 0) + return (errno); + + return (0); } static int @@ -1451,7 +1464,10 @@ pfctl_set_syncookies(int dev, const struct pfctl_syncookies *s) ret = ioctl(dev, DIOCSETSYNCOOKIES, &nv); free(nv.data); - return (ret); + if (ret != 0) + return (errno); + + return (0); } int @@ -1559,7 +1575,7 @@ pfctl_table_set_addrs(int dev, struct pfr_table *tbl, struct pfr_addr io.pfrio_size = size; io.pfrio_size2 = (size2 != NULL) ? *size2 : 0; if (ioctl(dev, DIOCRSETADDRS, &io)) - return (-1); + return (errno); if (nadd != NULL) *nadd = io.pfrio_nadd; if (ndel != NULL) @@ -1587,7 +1603,7 @@ int pfctl_table_get_addrs(int dev, struct pfr_table *tbl, struct pfr_addr *addr, io.pfrio_esize = sizeof(*addr); io.pfrio_size = *size; if (ioctl(dev, DIOCRGETADDRS, &io)) - return (-1); + return (errno); *size = io.pfrio_size; return (0); } From nobody Sun Sep 29 20:14:08 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 4XGwQS72JKz5X8hB; Sun, 29 Sep 2024 20:14:08 +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 4XGwQS6TX0z4Pvg; Sun, 29 Sep 2024 20:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727640848; 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=5UWlxzDQwK/91B4wbSvDKH1V9NmCUiL5YOEmDnVQdBA=; b=eaW/ZBV5LbYPgAIJUjT2xxWpgGMbUKN5R49idoz5FrBVq/Ru1BnhDbg1rNJAhehkv26BBF dpNFrzT7SK9NQ32NS6XygQtqgU0subTczA2rfDWJ+kUvYcUXDgxhPvgKaCOQdc/N5KGmJD VLiuNmvJ4Y8IAWBfaQi2gnfIIUXpCBviNVcFynNJQ0MhbA+zfDi/SiW3up0CviRJsG5CHE uY/oaRnhm6F3b0KCkXV6JG7LGHPIQTorfixR+1kTy8A1oDYUwJCq7rp8mMSuGU5L+lRZRC jXxjLkqrYj4FmTMQgG2VvqyP98vLT8x5p/9m+UCsVq9DkCTnPlQJdn5tfyZUbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727640848; 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=5UWlxzDQwK/91B4wbSvDKH1V9NmCUiL5YOEmDnVQdBA=; b=Df1MHUZS/sBZB5qoi2UaPhP7u7lZdo6NfZ06LGo3cPFBXc6a4oZRusLW4Y7n2CH1axS6D5 XxPyGDIiPd85pLNNuz2IRGlgUBx+ceyTwZAx6WDBAiOyl9g38iy9p3DWKNhIbc2uwqfyba jrV/8um0rq8KTEzdPnVjT+0gNZ7oPwIPP+xbmNLjr37JDQbKudCJ94WYFqUy/Cd7npD3bV QNOcVKDrJvL6CcZ246334r9buGySPpwxwhzUB8n49yBNHP4ZgE2TJHpCvoI29lSZ5MaD0S 4pCoQm72tlCnI3umL+G7AHTwdhka/seyFJkqVfWMiro9iLixxcsXcVAyKoHM5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727640848; a=rsa-sha256; cv=none; b=Z0zaCA0tOVNDqMqg/1q14V09LMb1MrnpD6/nBRdt0Pw7XwFomOZnsf5JmYGQtKHr0swU1c QjaPN4cxeMX0uy3Km/eG+N1i4iRd1VqVK664izgdctYtRnIlmWb+CsXFNn3/4aMHnu+KJJ q7rTLT3TBwx4209Moo4aUTt11q+qkT8xRds/cl5jac7f5wsGjl/sB50Yf3lBxKawGfRFRx 4wyb8LYnXpjJGelVueVEu5fggSpV7cptbuviPH2Im7NH8tYhL65dCE7H+2pOKnURWHgK4b FPEi1XMQCXwBhlSQm/NXSHDcPPr23xLlvj+9AdUv8pzrivgPtAVU+TBvgbNtdg== 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 4XGwQS64hMzNVw; Sun, 29 Sep 2024 20:14:08 +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 48TKE8ve021783; Sun, 29 Sep 2024 20:14:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TKE8Pf021780; Sun, 29 Sep 2024 20:14:08 GMT (envelope-from git) Date: Sun, 29 Sep 2024 20:14:08 GMT Message-Id: <202409292014.48TKE8Pf021780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: f321956d9806 - main - nfsd.c: Synchronize error handling 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f321956d9806bf0c171b9097a25b294c1498c9de Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f321956d9806bf0c171b9097a25b294c1498c9de commit f321956d9806bf0c171b9097a25b294c1498c9de Author: Joyu Liao AuthorDate: 2024-09-29 20:11:54 +0000 Commit: Rick Macklem CommitDate: 2024-09-29 20:11:54 +0000 nfsd.c: Synchronize error handling Synchronize the error handling in nfsd. If you check other error handlings in those same condition blocks, it uses nfsd_exit instead, which will call killchildren() and call the rpcbind service to do the service un-mapping. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46442 --- usr.sbin/nfsd/nfsd.c | 72 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c index b6c60ce72834..f1f04af192da 100644 --- a/usr.sbin/nfsd/nfsd.c +++ b/usr.sbin/nfsd/nfsd.c @@ -550,18 +550,24 @@ main(int argc, char **argv) nfsd_exit(1); } nconf_udp = getnetconfigent("udp"); - if (nconf_udp == NULL) - err(1, "getnetconfigent udp failed"); + if (nconf_udp == NULL) { + syslog(LOG_ERR, "getnetconfigent udp failed"); + nfsd_exit(1); + } nb_udp.buf = ai_udp->ai_addr; nb_udp.len = nb_udp.maxlen = ai_udp->ai_addrlen; if (nfs_minvers == NFS_VER2) if (!rpcb_set(NFS_PROGRAM, 2, nconf_udp, - &nb_udp)) - err(1, "rpcb_set udp failed"); + &nb_udp)) { + syslog(LOG_ERR, "rpcb_set udp failed"); + nfsd_exit(1); + } if (nfs_minvers <= NFS_VER3) if (!rpcb_set(NFS_PROGRAM, 3, nconf_udp, - &nb_udp)) - err(1, "rpcb_set udp failed"); + &nb_udp)) { + syslog(LOG_ERR, "rpcb_set udp failed"); + nfsd_exit(1); + } freeaddrinfo(ai_udp); } } @@ -624,20 +630,26 @@ main(int argc, char **argv) nfsd_exit(1); } nconf_udp6 = getnetconfigent("udp6"); - if (nconf_udp6 == NULL) - err(1, "getnetconfigent udp6 failed"); + if (nconf_udp6 == NULL) { + syslog(LOG_ERR, "getnetconfigent udp6 failed"); + nfsd_exit(1); + } nb_udp6.buf = ai_udp6->ai_addr; nb_udp6.len = nb_udp6.maxlen = ai_udp6->ai_addrlen; if (nfs_minvers == NFS_VER2) if (!rpcb_set(NFS_PROGRAM, 2, nconf_udp6, - &nb_udp6)) - err(1, + &nb_udp6)) { + syslog(LOG_ERR, "rpcb_set udp6 failed"); + nfsd_exit(1); + } if (nfs_minvers <= NFS_VER3) if (!rpcb_set(NFS_PROGRAM, 3, nconf_udp6, - &nb_udp6)) - err(1, + &nb_udp6)) { + syslog(LOG_ERR, "rpcb_set udp6 failed"); + nfsd_exit(1); + } freeaddrinfo(ai_udp6); } } @@ -696,18 +708,24 @@ main(int argc, char **argv) nfsd_exit(1); } nconf_tcp = getnetconfigent("tcp"); - if (nconf_tcp == NULL) - err(1, "getnetconfigent tcp failed"); + if (nconf_tcp == NULL) { + syslog(LOG_ERR, "getnetconfigent tcp failed"); + nfsd_exit(1); + } nb_tcp.buf = ai_tcp->ai_addr; nb_tcp.len = nb_tcp.maxlen = ai_tcp->ai_addrlen; if (nfs_minvers == NFS_VER2) if (!rpcb_set(NFS_PROGRAM, 2, nconf_tcp, - &nb_tcp)) - err(1, "rpcb_set tcp failed"); + &nb_tcp)) { + syslog(LOG_ERR, "rpcb_set tcp failed"); + nfsd_exit(1); + } if (nfs_minvers <= NFS_VER3) if (!rpcb_set(NFS_PROGRAM, 3, nconf_tcp, - &nb_tcp)) - err(1, "rpcb_set tcp failed"); + &nb_tcp)) { + syslog(LOG_ERR, "rpcb_set tcp failed"); + nfsd_exit(1); + } freeaddrinfo(ai_tcp); } } @@ -774,18 +792,24 @@ main(int argc, char **argv) nfsd_exit(1); } nconf_tcp6 = getnetconfigent("tcp6"); - if (nconf_tcp6 == NULL) - err(1, "getnetconfigent tcp6 failed"); + if (nconf_tcp6 == NULL) { + syslog(LOG_ERR, "getnetconfigent tcp6 failed"); + nfsd_exit(1); + } nb_tcp6.buf = ai_tcp6->ai_addr; nb_tcp6.len = nb_tcp6.maxlen = ai_tcp6->ai_addrlen; if (nfs_minvers == NFS_VER2) if (!rpcb_set(NFS_PROGRAM, 2, nconf_tcp6, - &nb_tcp6)) - err(1, "rpcb_set tcp6 failed"); + &nb_tcp6)) { + syslog(LOG_ERR, "rpcb_set tcp6 failed"); + nfsd_exit(1); + } if (nfs_minvers <= NFS_VER3) if (!rpcb_set(NFS_PROGRAM, 3, nconf_tcp6, - &nb_tcp6)) - err(1, "rpcb_set tcp6 failed"); + &nb_tcp6)) { + syslog(LOG_ERR, "rpcb_set tcp6 failed"); + nfsd_exit(1); + } freeaddrinfo(ai_tcp6); } } From nobody Sun Sep 29 22:37:26 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 4XGzbq11Y2z5XK6s; Sun, 29 Sep 2024 22:37:27 +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 4XGzbp74wyz4gWX; Sun, 29 Sep 2024 22:37:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727649447; 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=efmfeMs0krmne+JSXirEoI+y7jZ544ay+iTlf+h0A54=; b=WWSXG0dFtQnM/j0OEoXemwGdDBDh13XABtVLRoONppfFMS+0jBNbsy2Em7mFp2P02twLp4 yV3eePhibpG83Mv3zwflI1M2054Ci8hI7Xv2rWPXUnxuWdHepLMvBkLXdKwn/NipQDVr7H Q7CO2HhAF78cMYclruP3HalxDzsXLMCKm2kSYtUkk6qyARueLcfgbC1RU6vTvlJP00ngJU B5h1OxOZW0grpL53U8ZCOCx8LSr26L2SXbHtK1WXpKFSd65LiRb5W+yPJ6jXGfLRwTWtRb pxUvg+IBOerJHc6dupIzTn1ks+tkRid1BDgJ8948HSJves4p4ASGxTG44cSNQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727649447; 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=efmfeMs0krmne+JSXirEoI+y7jZ544ay+iTlf+h0A54=; b=X1Ab6P/kCOHOVVrHdSM+oEQWwdjznN9GR4/OlPlfi82AAenHZZmRXuM9BZu7MgytM8h7ji UzWYfZdLXfdwnApPx2h50uzREVUt9MVeEH6tZZ8NhoC+KWKHGrcK+g+nNAJPtSr/bh8EHS II0KOk9Qo4IPJnnHbN2JlQiBN5mFNLTMaiVpapCi2QT5R6pmMNge5bewbatj9nm7njkCGw 1aG05NKzC5ay/+dICqduSauom6zdFcqbKfnCiVkd+b28OuD68iZG5x4vTiVaAPj54YkxrT YOgMgVuOiQRcCJ+6K7P3G/YauhvmjOC+6vh37HPz90TWA3wD0k2OTogbAz1PRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727649447; a=rsa-sha256; cv=none; b=HFBMx5YsufjRV1rslyrYV+pv9fLVugt3arpELLjSWlboq4kR0QsCT3DLf1P0++OTjzs90R nD8bXXJ6YVvD8My2KwsLnR/FVXETrQSDVe6KJnMHYvu3y2bVMjx3w0eOdElKKXLrHoaPXg w8DxrLN8m9K/aooKNzspkWV+rWKIg4noy8ty3ehMKqexs48w3NwFhqzujktafDR7WFBu5I iT6y7k9XdoqGwCTbezb4LAV+TY3q070fRuBS4ve26Sjh9Eh0QEavc1UEIoSTxfWtoiRD1U WqMgpIiE/SZAjWW/vUpB6QMsdtS0wpt3+/HCu+8d7mjTzZ7y0bSJLisk3bcDXw== 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 4XGzbp6gpXzRsD; Sun, 29 Sep 2024 22:37:26 +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 48TMbQ9b059112; Sun, 29 Sep 2024 22:37:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48TMbQ2x059109; Sun, 29 Sep 2024 22:37:26 GMT (envelope-from git) Date: Sun, 29 Sep 2024 22:37:26 GMT Message-Id: <202409292237.48TMbQ2x059109@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 99d3ce80ba07 - stable/14 - linuxulator: ignore AT_NO_AUTOMOUNT for all stat variants 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 99d3ce80ba07e751226a7ff07afc51ad2d79ccce Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=99d3ce80ba07e751226a7ff07afc51ad2d79ccce commit 99d3ce80ba07e751226a7ff07afc51ad2d79ccce Author: Ed Maste AuthorDate: 2024-09-19 21:11:19 +0000 Commit: Ed Maste CommitDate: 2024-09-29 22:37:02 +0000 linuxulator: ignore AT_NO_AUTOMOUNT for all stat variants Commit ff39d74aa99a ignored AT_NO_AUTOMOUNT for statx(), but did not change fstat64() or newfstatat(), which also take an equivalent flags argument. Add a linux_to_bsd_stat_flags() helper and use it in all three places. PR: 281526 Reviewed by: trasz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46711 (cherry picked from commit 3cf834d069d1dcdbe464ea74624930eaf916715d) --- sys/compat/linux/linux_stats.c | 65 +++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/sys/compat/linux/linux_stats.c b/sys/compat/linux/linux_stats.c index 6c032cc569f8..03783d466211 100644 --- a/sys/compat/linux/linux_stats.c +++ b/sys/compat/linux/linux_stats.c @@ -485,6 +485,31 @@ linux_ustat(struct thread *td, struct linux_ustat_args *args) } #endif +/* + * Convert Linux stat flags to BSD flags. Return value indicates successful + * conversion (no unknown flags). + */ +static bool +linux_to_bsd_stat_flags(int linux_flags, int *out_flags) +{ + int flags, unsupported; + + unsupported = linux_flags & ~(LINUX_AT_SYMLINK_NOFOLLOW | + LINUX_AT_EMPTY_PATH | LINUX_AT_NO_AUTOMOUNT); + if (unsupported != 0) { + *out_flags = unsupported; + return (false); + } + + flags = 0; + if (linux_flags & LINUX_AT_SYMLINK_NOFOLLOW) + flags |= AT_SYMLINK_NOFOLLOW; + if (linux_flags & LINUX_AT_EMPTY_PATH) + flags |= AT_EMPTY_PATH; + *out_flags = flags; + return (true); +} + #if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) static int @@ -561,21 +586,16 @@ linux_fstat64(struct thread *td, struct linux_fstat64_args *args) int linux_fstatat64(struct thread *td, struct linux_fstatat64_args *args) { - int error, dfd, flag, unsupported; + int error, dfd, flags; struct stat buf; - unsupported = args->flag & ~(LINUX_AT_SYMLINK_NOFOLLOW | LINUX_AT_EMPTY_PATH); - if (unsupported != 0) { - linux_msg(td, "fstatat64 unsupported flag 0x%x", unsupported); + if (!linux_to_bsd_stat_flags(args->flag, &flags)) { + linux_msg(td, "fstatat64 unsupported flags 0x%x", flags); return (EINVAL); } - flag = (args->flag & LINUX_AT_SYMLINK_NOFOLLOW) ? - AT_SYMLINK_NOFOLLOW : 0; - flag |= (args->flag & LINUX_AT_EMPTY_PATH) ? - AT_EMPTY_PATH : 0; dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; - error = linux_kern_statat(td, flag, dfd, args->pathname, + error = linux_kern_statat(td, flags, dfd, args->pathname, UIO_USERSPACE, &buf); if (error == 0) error = stat64_copyout(&buf, args->statbuf); @@ -588,22 +608,16 @@ linux_fstatat64(struct thread *td, struct linux_fstatat64_args *args) int linux_newfstatat(struct thread *td, struct linux_newfstatat_args *args) { - int error, dfd, flag, unsupported; + int error, dfd, flags; struct stat buf; - unsupported = args->flag & ~(LINUX_AT_SYMLINK_NOFOLLOW | LINUX_AT_EMPTY_PATH); - if (unsupported != 0) { - linux_msg(td, "fstatat unsupported flag 0x%x", unsupported); + if (!linux_to_bsd_stat_flags(args->flag, &flags)) { + linux_msg(td, "fstatat unsupported flags 0x%x", flags); return (EINVAL); } - flag = (args->flag & LINUX_AT_SYMLINK_NOFOLLOW) ? - AT_SYMLINK_NOFOLLOW : 0; - flag |= (args->flag & LINUX_AT_EMPTY_PATH) ? - AT_EMPTY_PATH : 0; - dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; - error = linux_kern_statat(td, flag, dfd, args->pathname, + error = linux_kern_statat(td, flags, dfd, args->pathname, UIO_USERSPACE, &buf); if (error == 0) error = newstat_copyout(&buf, args->statbuf); @@ -688,21 +702,14 @@ statx_copyout(struct stat *buf, void *ubuf) int linux_statx(struct thread *td, struct linux_statx_args *args) { - int error, dirfd, flags, unsupported; + int error, dirfd, flags; struct stat buf; - unsupported = args->flags & ~(LINUX_AT_SYMLINK_NOFOLLOW | - LINUX_AT_EMPTY_PATH | LINUX_AT_NO_AUTOMOUNT); - if (unsupported != 0) { - linux_msg(td, "statx unsupported flags 0x%x", unsupported); + if (!linux_to_bsd_stat_flags(args->flags, &flags)) { + linux_msg(td, "statx unsupported flags 0x%x", flags); return (EINVAL); } - flags = (args->flags & LINUX_AT_SYMLINK_NOFOLLOW) ? - AT_SYMLINK_NOFOLLOW : 0; - flags |= (args->flags & LINUX_AT_EMPTY_PATH) ? - AT_EMPTY_PATH : 0; - dirfd = (args->dirfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dirfd; error = linux_kern_statat(td, flags, dirfd, args->pathname, UIO_USERSPACE, &buf);