git: 343bf78e4871 - main - bpf: Update a comment

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Tue, 10 Sep 2024 10:04:37 UTC
The branch main has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=343bf78e487190557889c8ba53d8080b268867f7

commit 343bf78e487190557889c8ba53d8080b268867f7
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-09-10 10:03:32 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
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);