From nobody Tue Sep 10 10:04:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X2znx32tQz5VK1h; Tue, 10 Sep 2024 10:04: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 4X2znx24bvz4gBQ; Tue, 10 Sep 2024 10:04:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725962677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1G7WjV8b3rwn+zw5BEClJ9wJ5juzpF8OpCgSWnbaWZc=; b=Te2E6svEiuxhBnoAvOHSVBhlpRKCRlViJfeiptsiIpnIQieFpPxKhluTSzP2tyRbF+b5O3 Jx/hGfbc77s2rTkDNs9cTws7MuuXweSSOAKnvIZV58PbQPRTXr4IM1cXvbq2Asn14zyRbw Lw5VqjfMuE5RBWSpfzqQ3hKHg0sfhD1/HdssB3eSt90RrM0nhX1OVDOUljEYuzdksTX+L9 ZGwBd7+PwME1/K3uVKACM84noGzksytVTLBD3OF6s9SvI+m3FCDA9NABRbwtvcykkDD1rO Qf1MwbBpRvxVXEGvvlFkVo957EFXxSeuRRzP5YwPTGxq8mhYuw7OEWFHmWXHBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725962677; a=rsa-sha256; cv=none; b=nmV2WCkSTCRu/A/MUXD9Hw9JdWZX7SGkLXmxZJV7Y+R1Uf6Zf2z9S9wVVSO0YLreYIg271 3IXskprVbYvSadrX4eeEe/H60XJfUHv432dLAzZZlKmUrIwZGJE30/qlqFzKzp/Va2j0GY K/HENF5VFkrZoU7qisZhP5IIJkkoquh3GD1lFLsBXAgFLfcEqWFBX4iXocKlSA1C3v4a9g hvfPUkLzP9S2EUhv6G48tLVs8gqaZ/9EkDZ2XUeCHh77bik3tUeghe4JFDBWdedM69Y+jL gWiDXRl2ObQw/ligNBZdrnImxBGhb5orNwLjszeBRrKL+HiGZRWFxJz/tllyiA== 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=1725962677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1G7WjV8b3rwn+zw5BEClJ9wJ5juzpF8OpCgSWnbaWZc=; b=KJ6qx2Z/bJ/4jmd74k5KWrDEV9jVxwPsUCJ92sEIdZhNrsV9ZNFgKDp9wWQBW/ONrj7NIk V+UewHN/vuoJ5703puv9bJIm9tWCBMJYI98ccxnfzaGB8idt0PeoDP3k5VuPbirtZ0yJhF AM9vMU1tnzpn0I4DW4WqHYL2ZzQeuFxxWIVLzdzYNnWdNxe4/PY5X6LphWBJJNFVonXzw8 U6rcamcj4jTNihVMNUw7gF+/WGgasRfB55rQheu6Ejt1fsqUBNpr5u8sOFmyMVLhvYBfFC yi4oKQtPgOK+KuXx5VHf7N/ze9OoKEua04q4Jn5xd/nyby1ft8aGEAUIaxMnsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X2znx1hBlzjw3; Tue, 10 Sep 2024 10:04: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 48AA4bwY083998; Tue, 10 Sep 2024 10:04:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48AA4bIr083995; Tue, 10 Sep 2024 10:04:37 GMT (envelope-from git) Date: Tue, 10 Sep 2024 10:04:37 GMT Message-Id: <202409101004.48AA4bIr083995@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 343bf78e4871 - main - bpf: Update a comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 343bf78e487190557889c8ba53d8080b268867f7 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=343bf78e487190557889c8ba53d8080b268867f7 commit 343bf78e487190557889c8ba53d8080b268867f7 Author: Zhenlei Huang AuthorDate: 2024-09-10 10:03:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-10 10:03:32 +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 --- 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 7983337064be..5dfa6fb30565 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -647,7 +647,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);