mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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
This commit is contained in:
parent
6ae89b2f15
commit
a0da2f73b6
10 changed files with 26 additions and 35 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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().
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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().
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue