From nobody Thu May 8 14:29:39 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZtZK03DJjz5v90X; Thu, 08 May 2025 14:29: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 4ZtZK02QSmz3HYw; Thu, 08 May 2025 14:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xb9ZaNIrc9die7XNa9BusCYuQnMTK9j75KNFbR6gnsc=; b=FyxeZCX6GrvSGRchE5dHt7YPNTZyna57NpnWlWmuSOopvLBip5wUiRKX/mZP6riw4gD8Ps qN2WwLuq6ZAgAR8bS87kklmlyUcKEVhqV2Zmdi4mCITNHrvAdNcUlsKc0wDccwINSRUTOc oZt0zph6n9ckHDmWgnXHCBIEupb4w7drwTx9pNi6IDsqjhaS36K2yNDGRsreeK5BPd3cfh /lGTkM5vPzLHyln5V5nkosFG9/lGgLlXgNdkTrLfDfEVbGaXMtsiPjptC8Aw+v24UmDnVg a/KwMNLmKwOBlF1DGcyoXR6945AjGCWwoQKfQ/C77/9DiURVFIqCakR3DOkUdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746714580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xb9ZaNIrc9die7XNa9BusCYuQnMTK9j75KNFbR6gnsc=; b=FkGLxcz4ttJ7e0bhoIhXdoskqdGFGGRoxq3tXKeKvqKhMVyMsgPiZ/iR+KkEQVjYCN3QUB ASsVHUymXvqCyTEWBnpscnrzdzuWGEOi8u21zNlF/kSmyBNRw8wHFH5CyFFXjnxOmUdsW6 G139VpBI1CiUQc1eARZhJ/OnYYS220Fnt7+BLDX7GYNuaMVeuxwUg661MkQiRWYRsU/W+N MUO0NmUlkhpvj5FZpaq0S6YPjvAhNJYjQRJp2+NHIYzmHgGkYgm/epDmgdS7V7yKsOGftj EMwHPwkPT8pnSjS7A3cEqxeaDyYZ0KJXxV9H8FlGIo+gDWeQB5owWuSN8JBHNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746714580; a=rsa-sha256; cv=none; b=Ln+aDGHPard3vve/QpWc1Z8CnTkGbNs24cBG98+Q9fJ2PuUZv2pcSztmwaYoK0fU4PXLri bHObuV9MUk1OI+QRR3b03GRJxpjsYH17UFP/X5AAMAK8VeDI5YatahNbw7uPFue8JJStZ5 q65YgWN/wlm8I+dWVD7R3Csk26JveoylFwzbT1WVhV8QCjgcrdlJsO2xkjLu5AByxtOjmQ VXhxtrcHEAWbTOGh+Bng+G1ZndToTC/uQmz5PyYCFPuIu8+I5kbher2CKDWLKTW2ICutey 2XSx/aHh4CU9n/t3Juee/pGF6O2DAUrsB3VGm354RIxZ2vpwlnhU+efWJII/Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZtZK01S1rz3p0; Thu, 08 May 2025 14:29: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 548ETd34086520; Thu, 8 May 2025 14:29:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 548ETdj2086517; Thu, 8 May 2025 14:29:39 GMT (envelope-from git) Date: Thu, 8 May 2025 14:29:39 GMT Message-Id: <202505081429.548ETdj2086517@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: a0da2f73b6ef - main - Remove remaining mentions of pr_usrreq. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: a0da2f73b6ef12db95d5391d380b0b04507b4778 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a0da2f73b6ef12db95d5391d380b0b04507b4778 commit a0da2f73b6ef12db95d5391d380b0b04507b4778 Author: Dag-Erling Smørgrav AuthorDate: 2025-05-08 14:28:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-05-08 14:29:15 +0000 Remove remaining mentions of pr_usrreq. When struct pr_usrreq was folded into struct protosw and the function pointers it contained were renamed from pru_* to pr_* in 2022, a number of references to the old names in comments and error messages were missed. Chase them down and fix them. Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: kevans, glebius Differential Revision: https://reviews.freebsd.org/D50190 --- sys/dev/hyperv/hvsock/hv_sock.c | 2 +- sys/kern/kern_sendfile.c | 4 ++-- sys/kern/uipc_socket.c | 26 +++++++++++----------- sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c | 4 ++-- sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c | 2 +- sys/netgraph/bluetooth/socket/ng_btsocket_sco.c | 4 ++-- sys/netinet/tcp_usrreq.c | 6 ++--- sys/netinet/tcp_var.h | 9 -------- sys/netinet/toecore.c | 2 +- sys/netinet/toecore.h | 2 +- 10 files changed, 26 insertions(+), 35 deletions(-) diff --git a/sys/dev/hyperv/hvsock/hv_sock.c b/sys/dev/hyperv/hvsock/hv_sock.c index 8072765f2d5b..5a69eaa2b47b 100644 --- a/sys/dev/hyperv/hvsock/hv_sock.c +++ b/sys/dev/hyperv/hvsock/hv_sock.c @@ -1461,7 +1461,7 @@ hvsock_open_conn_passive(struct vmbus_channel *chan, struct socket *so, } /* - * Create a new socket. This will call pru_attach to complete + * Create a new socket. This will call pr_attach() to complete * the socket initialization and put the new socket onto * listening socket's sol_incomp list, waiting to be promoted * to sol_comp list. diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index cfacfe40b832..25c1f357dfd4 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -83,7 +83,7 @@ static MALLOC_DEFINE(M_SENDFILE, "sendfile", "sendfile dynamic memory"); * Every I/O completion calls sendfile_iodone(), which decrements the 'nios', * and the syscall also calls sendfile_iodone() after allocating all mbufs, * linking them and sending to socket. Whoever reaches zero 'nios' is - * responsible to * call pru_ready on the socket, to notify it of readyness + * responsible to call pr_ready() on the socket, to notify it of readyness * of the data. */ struct sf_io { @@ -353,7 +353,7 @@ sendfile_iodone(void *arg, vm_page_t *pa, int count, int error) * Either I/O operation failed, or we failed to allocate * buffers, or we bailed out on first busy page, or we * succeeded filling the request without any I/Os. Anyway, - * pru_send hadn't been executed - nothing had been sent + * pr_send() hadn't been executed - nothing had been sent * to the socket yet. */ MPASS((curthread->td_pflags & TDP_KTHREAD) == 0); diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 03a2c532f053..d478b09ca71c 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -41,18 +41,18 @@ * sodealloc() tears down socket layer state for a socket, called only by * sofree() and sonewconn(). Socket layer private. * - * pru_attach() associates protocol layer state with an allocated socket; + * pr_attach() associates protocol layer state with an allocated socket; * called only once, may fail, aborting socket allocation. This is called * from socreate() and sonewconn(). Socket layer private. * - * pru_detach() disassociates protocol layer state from an attached socket, - * and will be called exactly once for sockets in which pru_attach() has - * been successfully called. If pru_attach() returned an error, - * pru_detach() will not be called. Socket layer private. + * pr_detach() disassociates protocol layer state from an attached socket, + * and will be called exactly once for sockets in which pr_attach() has + * been successfully called. If pr_attach() returned an error, + * pr_detach() will not be called. Socket layer private. * - * pru_abort() and pru_close() notify the protocol layer that the last + * pr_abort() and pr_close() notify the protocol layer that the last * consumer of a socket is starting to tear down the socket, and that the - * protocol should terminate the connection. Historically, pru_abort() also + * protocol should terminate the connection. Historically, pr_abort() also * detached protocol state from the socket state, but this is no longer the * case. * @@ -969,7 +969,7 @@ socreate(int dom, struct socket **aso, int type, int proto, } /* * Auto-sizing of socket buffers is managed by the protocols and - * the appropriate flags must be set in the pru_attach function. + * the appropriate flags must be set in the pr_attach() method. */ CURVNET_SET(so->so_vnet); error = prp->pr_attach(so, proto, td); @@ -1338,9 +1338,9 @@ sopeeloff(struct socket *head) __func__, head->so_pcb); return (NULL); } - if ((*so->so_proto->pr_attach)(so, 0, NULL)) { + if (so->so_proto->pr_attach(so, 0, NULL)) { sodealloc(so); - log(LOG_DEBUG, "%s: pcb %p: pru_attach() failed\n", + log(LOG_DEBUG, "%s: pcb %p: pr_attach() failed\n", __func__, head->so_pcb); return (NULL); } @@ -3826,7 +3826,7 @@ sosetopt(struct socket *so, struct sockopt *sopt) CURVNET_SET(so->so_vnet); error = 0; if (sopt->sopt_level != SOL_SOCKET) { - error = (*so->so_proto->pr_ctloutput)(so, sopt); + error = so->so_proto->pr_ctloutput(so, sopt); } else { switch (sopt->sopt_name) { case SO_ACCEPTFILTER: @@ -4037,7 +4037,7 @@ sosetopt(struct socket *so, struct sockopt *sopt) break; } if (error == 0) - (void)(*so->so_proto->pr_ctloutput)(so, sopt); + (void)so->so_proto->pr_ctloutput(so, sopt); } bad: CURVNET_RESTORE(); @@ -4087,7 +4087,7 @@ sogetopt(struct socket *so, struct sockopt *sopt) CURVNET_SET(so->so_vnet); error = 0; if (sopt->sopt_level != SOL_SOCKET) { - error = (*so->so_proto->pr_ctloutput)(so, sopt); + error = so->so_proto->pr_ctloutput(so, sopt); CURVNET_RESTORE(); return (error); } else { diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c index 9fc26f53e9c6..1f0c5f1b4751 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c @@ -1984,7 +1984,7 @@ ng_btsocket_l2cap_attach(struct socket *so, int proto, struct thread *td) if (so->so_type != SOCK_SEQPACKET) return (ESOCKTNOSUPPORT); -#if 0 /* XXX sonewconn() calls "pru_attach" with proto == 0 */ +#if 0 /* XXX sonewconn() calls pr_attach() with proto == 0 */ if (proto != 0) if (proto != BLUETOOTH_PROTO_L2CAP) return (EPROTONOSUPPORT); @@ -2055,7 +2055,7 @@ ng_btsocket_l2cap_attach(struct socket *so, int proto, struct thread *td) * In the second case we hold ng_btsocket_l2cap_sockets_mtx already. * So we now need to distinguish between these cases. From reading * /sys/kern/uipc_socket.c we can find out that sonewconn() calls - * pru_attach with proto == 0 and td == NULL. For now use this fact + * pr_attach() with proto == 0 and td == NULL. For now use this fact * to figure out if we were called from socket() or from sonewconn(). */ diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c index 4780227a66f1..6c0a6fda1fb1 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c @@ -384,7 +384,7 @@ ng_btsocket_rfcomm_attach(struct socket *so, int proto, struct thread *td) if (so->so_type != SOCK_STREAM) return (ESOCKTNOSUPPORT); -#if 0 /* XXX sonewconn() calls "pru_attach" with proto == 0 */ +#if 0 /* XXX sonewconn() calls pr_attach() with proto == 0 */ if (proto != 0) if (proto != BLUETOOTH_PROTO_RFCOMM) return (EPROTONOSUPPORT); diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c index 115dd6d87ec4..400ec05c87eb 100644 --- a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c +++ b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c @@ -1192,7 +1192,7 @@ ng_btsocket_sco_attach(struct socket *so, int proto, struct thread *td) if (so->so_type != SOCK_SEQPACKET) return (ESOCKTNOSUPPORT); -#if 0 /* XXX sonewconn() calls "pru_attach" with proto == 0 */ +#if 0 /* XXX sonewconn() calls pr_attach() with proto == 0 */ if (proto != 0) if (proto != BLUETOOTH_PROTO_SCO) return (EPROTONOSUPPORT); @@ -1247,7 +1247,7 @@ ng_btsocket_sco_attach(struct socket *so, int proto, struct thread *td) * In the second case we hold ng_btsocket_sco_sockets_mtx already. * So we now need to distinguish between these cases. From reading * /sys/kern/uipc_socket2.c we can find out that sonewconn() calls - * pru_attach with proto == 0 and td == NULL. For now use this fact + * pr_attach() with proto == 0 and td == NULL. For now use this fact * to figure out if we were called from socket() or from sonewconn(). */ diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index c64d25f0fa87..61ca29dc0ad2 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -146,7 +146,7 @@ tcp_bblog_pru(struct tcpcb *tp, uint32_t pru, int error) } /* - * TCP attaches to socket via pru_attach(), reserving space, + * TCP attaches to socket via pr_attach(), reserving space, * and an internet control block. */ static int @@ -907,8 +907,8 @@ out: /* * Do a send by putting data in output queue and updating urgent * marker if URG set. Possibly send more data. Unlike the other - * pru_*() routines, the mbuf chains are our responsibility. We - * must either enqueue them or free them. The other pru_* routines + * pr_*() routines, the mbuf chains are our responsibility. We + * must either enqueue them or free them. The other pr_*() routines * generally are caller-frees. */ static int diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 5be024ededc7..ddc701581f90 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -528,15 +528,6 @@ typedef enum { /* Minimum map entries limit value, if set */ #define TCP_MIN_MAP_ENTRIES_LIMIT 128 -/* - * TODO: We yet need to brave plowing in - * to tcp_input() and the pru_usrreq() block. - * Right now these go to the old standards which - * are somewhat ok, but in the long term may - * need to be changed. If we do tackle tcp_input() - * then we need to get rid of the tcp_do_segment() - * function below. - */ /* Flags for tcp functions */ #define TCP_FUNC_BEING_REMOVED 0x01 /* Can no longer be referenced */ #define TCP_FUNC_OUTPUT_CANDROP 0x02 /* tfb_tcp_output may ask tcp_drop */ diff --git a/sys/netinet/toecore.c b/sys/netinet/toecore.c index 76aadad9a3b9..4203029ff7c3 100644 --- a/sys/netinet/toecore.c +++ b/sys/netinet/toecore.c @@ -525,7 +525,7 @@ toe_connect_failed(struct toedev *tod, struct inpcb *inp, int err) /* * Temporary failure during offload, take this PCB back. * Detach from the TOE driver and do the rest of what - * TCP's pru_connect would have done if the connection + * TCP's pr_connect() would have done if the connection * wasn't offloaded. */ diff --git a/sys/netinet/toecore.h b/sys/netinet/toecore.h index 612c2fe1caf5..843b261ec162 100644 --- a/sys/netinet/toecore.h +++ b/sys/netinet/toecore.h @@ -66,7 +66,7 @@ struct toedev { void (*tod_input)(struct toedev *, struct tcpcb *, struct mbuf *); /* - * This is called by the kernel during pru_rcvd for an offloaded TCP + * This is called by the kernel during pr_rcvd() for an offloaded TCP * connection and provides an opportunity for the TOE driver to manage * its rx window and credits. */