From nobody Fri Aug 12 18:47:19 2022 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 4M4CMr4dxRz4Ydpd; Fri, 12 Aug 2022 18:47:20 +0000 (UTC) (envelope-from jkim@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4M4CMr43Llz3bSC; Fri, 12 Aug 2022 18:47:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660330040; 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=mJpmhSJBDCWtk5qWjSkU0fX91MD2MTnfE9PyKUPds/c=; b=fNhLyAsJ4u3mpDYKSLUHl4QvThp381fXUAS7IUFu8+H6mUcI6M7eeG+VKmbel1kTX5NtQq hOBvkeiwQw+maz0+r2NMDwqTQ+1vFFpGjc6peyTXgJq69Qgjz6RXIRFXPuWtO2BK+E9Wja 4JhfjIvJgz827AsNcV+71PxyBjRbayfxIj7WJlhPwxR8GAVTQJ8fy/ejuLdKTRmP9TvK41 qazHsDwZ7fAG2bAzkkrn2e4ghm5DSOTHROeEBezB6+qswsn6JogAtXtafb7LUUPRk9pZ8X 9XBUet35Bm5RdS05px5mlfp9Zs7itdWMo2xTTaP9xlUpVezcrmlEEJ25LYYOxA== Received: from freefall.freebsd.org (unknown [IPv6:2600:4040:a6cb:8100:b848:6195:270f:2688]) (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: jkim/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4M4CMr2K9mz1PWf; Fri, 12 Aug 2022 18:47:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Content-Type: multipart/mixed; boundary="------------pSMSLCB0JX1NiyF0UkhyhND9" Message-ID: <595a056b-b94b-cf43-f75c-0ec77513983c@FreeBSD.org> Date: Fri, 12 Aug 2022 14:47:19 -0400 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: git: 886fc1e80490 - main - protosw: provide prototypes for all protocol switch methods Content-Language: en-US To: Larry Rosenman , Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202208121532.27CFWkid042790@gitrepo.freebsd.org> <5dbaa97b12b77c07577806052c0254c7@FreeBSD.org> From: Jung-uk Kim Organization: FreeBSD.org In-Reply-To: <5dbaa97b12b77c07577806052c0254c7@FreeBSD.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660330040; 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=mJpmhSJBDCWtk5qWjSkU0fX91MD2MTnfE9PyKUPds/c=; b=pGMKlYdIGTd/hAi+/nq3WznALuZ67HCHJcBAX6kKOP3fkmfiBOWNKk/zkhrXvT/byTxBKt ZWNBCbHIGu67zrqw8UzX+4euD644Ev1INlSVVOJ735mN/1YfGo/ybFlH+92YHkbfyIT+RF VWAf9ROB2mC74gvCj5JnoUZ3VD0nHIU07YY1qttgDftLVHmhqVa/GnN3UfFp+FF3/fi/0D 1x5LUGrFz8OGY2RMiARfXMhFuhhM82zGxHg5i+lh0mxEgBlrz87SdMINXr7Cg7ZVr7LARm NJpTIsiiakkEpWmFRUjlWrbGGC0BJsn+Z4+sCfj5BgG9urp8mZisxrFoRz9ZMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660330040; a=rsa-sha256; cv=none; b=vNXDcuWdJYH8hUiI5ndB+gQUNjSytrcmWxCuz1GpV8FmQtzvp3YJpTj8/8PLxRQtZ9QXp2 4cNIRjYVs5vcdfOP6lT5eioTTMNCz5G5DPuarPvXj2sgE9bvodbRYZ9laZRejQ/PnDDRJG DmB7bRzyWXqfrzswxh+p+Tf8zTfAltSbEbjeufAOOIglA6rF+ZXiZallzxsyZika9T7Gt1 DNpaxsgfPddq9KsTtiiZwNwxRDBZJLrMsl6XEP13mlwy6NcpoRVN+OdTlX1vWA5tgSQ4WK +le8jTpEoW8jUQRjvFTNqaOf/hu7An1x2sKiRExrU2OXoPUlVj8feyJ+KXgS/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N This is a multi-part message in MIME format. --------------pSMSLCB0JX1NiyF0UkhyhND9 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 22. 8. 12., Larry Rosenman wrote: > This broke the build > > In file included from sys_protosw.c:1: > /usr/obj/usr/src/amd64.amd64/tmp/usr/include/sys/protosw.h:82:43: error: > type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] > typedef int     pr_control_t(struct socket *, u_long, caddr_t, struct > ifnet *, >                                               ^ > /usr/obj/usr/src/amd64.amd64/tmp/usr/include/sys/protosw.h:82:51: error: > type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] > typedef int     pr_control_t(struct socket *, u_long, caddr_t, struct > ifnet *, >                                                       ^ > 2 errors generated. > *** Error code 1 You can work around it with the attached patch for now. Jung-uk Kim > On 08/12/2022 10:32 am, Gleb Smirnoff wrote: >> The branch main has been updated by glebius: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=886fc1e80490fb03e72e306774766cbb2c733ac6 >> >> >> commit 886fc1e80490fb03e72e306774766cbb2c733ac6 >> Author:     Gleb Smirnoff >> AuthorDate: 2022-08-12 15:30:34 +0000 >> Commit:     Gleb Smirnoff >> CommitDate: 2022-08-12 15:30:34 +0000 >> >>     protosw: provide prototypes for all protocol switch methods >> >>     Reviewed by:            melifaro >>     Differential revision:  https://reviews.freebsd.org/D36153 >> --- >>  sys/sys/protosw.h | 131 >> +++++++++++++++++++++++++++++++++--------------------- >>  1 file changed, 80 insertions(+), 51 deletions(-) >> >> diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h >> index 22e057e5691a..7c7eece83e78 100644 >> --- a/sys/sys/protosw.h >> +++ b/sys/sys/protosw.h >> @@ -60,13 +60,60 @@ struct sockopt; >>   * In retrospect, it would be a lot nicer to use an interface >>   * similar to the vnode VOP interface. >>   */ >> +struct ifnet; >> +struct stat; >> +struct ucred; >> +struct uio; >> + >>  /* USE THESE FOR YOUR PROTOTYPES ! */ >> -typedef int    pr_input_t (struct mbuf **, int*, int); >> -typedef void    pr_ctlinput_t (int, struct sockaddr *, void *); >> -typedef int    pr_ctloutput_t (struct socket *, struct sockopt *); >> -typedef    void    pr_fasttimo_t (void); >> -typedef    void    pr_slowtimo_t (void); >> -typedef    void    pr_drain_t (void); >> +typedef int    pr_input_t(struct mbuf **, int*, int); >> +typedef void    pr_ctlinput_t(int, struct sockaddr *, void *); >> +typedef int    pr_ctloutput_t(struct socket *, struct sockopt *); >> +typedef    void    pr_fasttimo_t(void); >> +typedef    void    pr_slowtimo_t(void); >> +typedef    void    pr_drain_t(void); >> +typedef void    pr_abort_t(struct socket *); >> +typedef int    pr_accept_t(struct socket *, struct sockaddr **); >> +typedef int    pr_attach_t(struct socket *, int, struct thread *); >> +typedef int    pr_bind_t(struct socket *, struct sockaddr *, struct >> thread *); >> +typedef int    pr_connect_t(struct socket *, struct sockaddr *, >> +            struct thread *); >> +typedef int    pr_connect2_t(struct socket *, struct socket *); >> +typedef int    pr_control_t(struct socket *, u_long, caddr_t, struct >> ifnet *, >> +            struct thread *); >> +typedef void    pr_detach_t(struct socket *); >> +typedef int    pr_disconnect_t(struct socket *); >> +typedef int    pr_listen_t(struct socket *, int, struct thread *); >> +typedef int    pr_peeraddr_t(struct socket *, struct sockaddr **); >> +typedef int    pr_rcvd_t(struct socket *, int); >> +typedef int    pr_rcvoob_t(struct socket *, struct mbuf *, int); >> +typedef enum { >> +    PRUS_OOB =        0x1, >> +    PRUS_EOF =        0x2, >> +    PRUS_MORETOCOME =    0x4, >> +    PRUS_NOTREADY =        0x8, >> +    PRUS_IPV6 =        0x10, >> +} pr_send_flags_t; >> +typedef int    pr_send_t(struct socket *, int, struct mbuf *, >> +            struct sockaddr *, struct mbuf *, struct thread *); >> +typedef int    pr_ready_t(struct socket *, struct mbuf *, int); >> +typedef int    pr_sense_t(struct socket *, struct stat *); >> +typedef int    pr_shutdown_t(struct socket *); >> +typedef int    pr_flush_t(struct socket *, int); >> +typedef int    pr_sockaddr_t(struct socket *, struct sockaddr **); >> +typedef int    pr_sosend_t(struct socket *, struct sockaddr *, struct >> uio *, >> +            struct mbuf *, struct mbuf *, int, struct thread *); >> +typedef int    pr_soreceive_t(struct socket *, struct sockaddr **, >> +            struct uio *, struct mbuf **, struct mbuf **, int *); >> +typedef int    pr_sopoll_t(struct socket *, int, struct ucred *, >> +            struct thread *); >> +typedef void    pr_sosetlabel_t(struct socket *); >> +typedef void    pr_close_t(struct socket *); >> +typedef int    pr_bindat_t(int, struct socket *, struct sockaddr *, >> +            struct thread *); >> +typedef int    pr_connectat_t(int, struct socket *, struct sockaddr *, >> +            struct thread *); >> +typedef int    pr_aio_queue_t(struct socket *, struct kaiocb *); >> >>  struct protosw { >>      short    pr_type;        /* socket type used for */ >> @@ -181,51 +228,33 @@ struct uio; >>   * Some fields initialized to defaults if they are NULL. >>   */ >>  struct pr_usrreqs { >> -    void    (*pru_abort)(struct socket *so); >> -    int    (*pru_accept)(struct socket *so, struct sockaddr **nam); >> -    int    (*pru_attach)(struct socket *so, int proto, struct thread >> *td); >> -    int    (*pru_bind)(struct socket *so, struct sockaddr *nam, >> -            struct thread *td); >> -    int    (*pru_connect)(struct socket *so, struct sockaddr *nam, >> -            struct thread *td); >> -    int    (*pru_connect2)(struct socket *so1, struct socket *so2); >> -    int    (*pru_control)(struct socket *so, u_long cmd, caddr_t data, >> -            struct ifnet *ifp, struct thread *td); >> -    void    (*pru_detach)(struct socket *so); >> -    int    (*pru_disconnect)(struct socket *so); >> -    int    (*pru_listen)(struct socket *so, int backlog, >> -            struct thread *td); >> -    int    (*pru_peeraddr)(struct socket *so, struct sockaddr **nam); >> -    int    (*pru_rcvd)(struct socket *so, int flags); >> -    int    (*pru_rcvoob)(struct socket *so, struct mbuf *m, int flags); >> -    int    (*pru_send)(struct socket *so, int flags, struct mbuf *m, >> -            struct sockaddr *addr, struct mbuf *control, >> -            struct thread *td); >> -#define    PRUS_OOB    0x1 >> -#define    PRUS_EOF    0x2 >> -#define    PRUS_MORETOCOME    0x4 >> -#define    PRUS_NOTREADY    0x8 >> -#define    PRUS_IPV6    0x10 >> -    int    (*pru_ready)(struct socket *so, struct mbuf *m, int count); >> -    int    (*pru_sense)(struct socket *so, struct stat *sb); >> -    int    (*pru_shutdown)(struct socket *so); >> -    int    (*pru_flush)(struct socket *so, int direction); >> -    int    (*pru_sockaddr)(struct socket *so, struct sockaddr **nam); >> -    int    (*pru_sosend)(struct socket *so, struct sockaddr *addr, >> -            struct uio *uio, struct mbuf *top, struct mbuf *control, >> -            int flags, struct thread *td); >> -    int    (*pru_soreceive)(struct socket *so, struct sockaddr **paddr, >> -            struct uio *uio, struct mbuf **mp0, struct mbuf **controlp, >> -            int *flagsp); >> -    int    (*pru_sopoll)(struct socket *so, int events, >> -            struct ucred *cred, struct thread *td); >> -    void    (*pru_sosetlabel)(struct socket *so); >> -    void    (*pru_close)(struct socket *so); >> -    int    (*pru_bindat)(int fd, struct socket *so, struct sockaddr >> *nam, >> -            struct thread *td); >> -    int    (*pru_connectat)(int fd, struct socket *so, >> -            struct sockaddr *nam, struct thread *td); >> -    int    (*pru_aio_queue)(struct socket *so, struct kaiocb *job); >> +    pr_abort_t    *pru_abort; >> +    pr_accept_t    *pru_accept; >> +    pr_attach_t    *pru_attach; >> +    pr_bind_t    *pru_bind; >> +    pr_connect_t    *pru_connect; >> +    pr_connect2_t    *pru_connect2; >> +    pr_control_t    *pru_control; >> +    pr_detach_t    *pru_detach; >> +    pr_disconnect_t    *pru_disconnect; >> +    pr_listen_t    *pru_listen; >> +    pr_peeraddr_t    *pru_peeraddr; >> +    pr_rcvd_t    *pru_rcvd; >> +    pr_rcvoob_t    *pru_rcvoob; >> +    pr_send_t    *pru_send; >> +    pr_ready_t    *pru_ready; >> +    pr_sense_t    *pru_sense; >> +    pr_shutdown_t    *pru_shutdown; >> +    pr_flush_t    *pru_flush; >> +    pr_sockaddr_t    *pru_sockaddr; >> +    pr_sosend_t    *pru_sosend; >> +    pr_soreceive_t    *pru_soreceive; >> +    pr_sopoll_t    *pru_sopoll; >> +    pr_sosetlabel_t    *pru_sosetlabel; >> +    pr_close_t    *pru_close; >> +    pr_bindat_t    *pru_bindat; >> +    pr_connectat_t    *pru_connectat; >> +    pr_aio_queue_t    *pru_aio_queue; >>  }; >> >>  /* > > > --------------pSMSLCB0JX1NiyF0UkhyhND9 Content-Type: text/x-patch; charset=UTF-8; name="badfiles.diff" Content-Disposition: attachment; filename="badfiles.diff" Content-Transfer-Encoding: base64 LS0tIHRvb2xzL2J1aWxkL3Rlc3QtaW5jbHVkZXMvYmFkZmlsZXMuaW5jCisrKyB0b29scy9i dWlsZC90ZXN0LWluY2x1ZGVzL2JhZGZpbGVzLmluYwpAQCAtOTgsNiArOTgsNyBAQCBCQURI RFJTPSBcCiAJc3lzL3Bvd2VyLmggXAogCXN5cy9wcmlvcml0eS5oIFwKIAlzeXMvcHJuZy5o IFwKKwlzeXMvcHJvdG9zdy5oIFwKIAlzeXMvcW1hdGguaCBcCiAJc3lzL3JhY2N0LmggXAog CXN5cy9yZWZjb3VudC5oIFwK --------------pSMSLCB0JX1NiyF0UkhyhND9--