The branch main has been updated by glebius:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=9d7fb768543bbd1ddcd6a6d7bc2477838c59368f

commit 9d7fb768543bbd1ddcd6a6d7bc2477838c59368f
Author:     Gleb Smirnoff <gleb...@freebsd.org>
AuthorDate: 2025-02-01 20:06:21 +0000
Commit:     Gleb Smirnoff <gleb...@freebsd.org>
CommitDate: 2025-02-03 06:38:18 +0000

    sockets: garbage collect SB_NOINTR
    
    Not used.  All socket buffer sleeps are interruptible.
---
 sys/kern/uipc_debug.c    | 4 ----
 sys/kern/uipc_sockbuf.c  | 3 +--
 sys/netsmb/smb_trantcp.c | 6 ------
 sys/sys/sockbuf.h        | 2 +-
 4 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/sys/kern/uipc_debug.c b/sys/kern/uipc_debug.c
index 83cb7f6dc00a..bbd6c078fd06 100644
--- a/sys/kern/uipc_debug.c
+++ b/sys/kern/uipc_debug.c
@@ -328,10 +328,6 @@ db_print_sbflags(short sb_flags)
                db_printf("%sSB_UPCALL", comma ? ", " : "");
                comma = 1;
        }
-       if (sb_flags & SB_NOINTR) {
-               db_printf("%sSB_NOINTR", comma ? ", " : "");
-               comma = 1;
-       }
        if (sb_flags & SB_AIO) {
                db_printf("%sSB_AIO", comma ? ", " : "");
                comma = 1;
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index 95c7241d5f13..e8d410b00c15 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -456,8 +456,7 @@ sbwait(struct socket *so, sb_which which)
        sb = sobuf(so, which);
        sb->sb_flags |= SB_WAIT;
        return (msleep_sbt(&sb->sb_acc, soeventmtx(so, which),
-           (sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, "sbwait",
-           sb->sb_timeo, 0, 0));
+           PSOCK | PCATCH, "sbwait", sb->sb_timeo, 0, 0));
 }
 
 /*
diff --git a/sys/netsmb/smb_trantcp.c b/sys/netsmb/smb_trantcp.c
index f19eea45f265..fbbf987367d8 100644
--- a/sys/netsmb/smb_trantcp.c
+++ b/sys/netsmb/smb_trantcp.c
@@ -161,12 +161,6 @@ nb_connect_in(struct nbpcb *nbp, struct sockaddr_in *to, 
struct thread *td)
                goto bad;
        nb_setsockopt_int(so, SOL_SOCKET, SO_KEEPALIVE, 1);
        nb_setsockopt_int(so, IPPROTO_TCP, TCP_NODELAY, 1);
-       SOCKBUF_LOCK(&so->so_rcv);
-       so->so_rcv.sb_flags &= ~SB_NOINTR;
-       SOCKBUF_UNLOCK(&so->so_rcv);
-       SOCKBUF_LOCK(&so->so_snd);
-       so->so_snd.sb_flags &= ~SB_NOINTR;
-       SOCKBUF_UNLOCK(&so->so_snd);
        error = soconnect(so, (struct sockaddr*)to, td);
        if (error)
                goto bad;
diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h
index fd503d021282..73dd7afa371f 100644
--- a/sys/sys/sockbuf.h
+++ b/sys/sys/sockbuf.h
@@ -40,7 +40,7 @@
 #define        SB_SEL          0x08            /* someone is selecting */
 #define        SB_ASYNC        0x10            /* ASYNC I/O, need signals */
 #define        SB_UPCALL       0x20            /* someone wants an upcall */
-#define        SB_NOINTR       0x40            /* operations not interruptible 
*/
+/* was SB_NOINTR       0x40            */
 #define        SB_AIO          0x80            /* AIO operations queued */
 #define        SB_KNOTE        0x100           /* kernel note attached */
 #define        SB_NOCOALESCE   0x200           /* don't coalesce new data into 
existing mbufs */

Reply via email to