History log of /dflybsd-src/sys/kern/sys_socket.c (Results 1 – 25 of 37)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# cc8e70bd 08-Oct-2024 Sergey Zigachev <s.zi@outlook.com>

kern - Make lseek(2) generic

* Extend fileops with fo_seek function allowing pluggable lseek(2)
implementations. Part of preparation for linux DMA-BUF compat API.

* Move current vnode lseek imple

kern - Make lseek(2) generic

* Extend fileops with fo_seek function allowing pluggable lseek(2)
implementations. Part of preparation for linux DMA-BUF compat API.

* Move current vnode lseek implementation into vnode and devfs fileops.
Code is exactly the same in both, note about duplication added.

* Set remaining fileops to badfo_seek.

Mentored-By: dillon

show more ...


Revision tags: v6.4.0, v6.4.0rc1, v6.5.0, v6.2.2, v6.2.1, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1
# c6e47da6 21-Nov-2018 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Refactor inum stat data for sockets

* Assign a dummy inode number to all sockets. We previously were
only assigning a dummy inode number to unix domain sockets. Use
the new pcpu facil

kernel - Refactor inum stat data for sockets

* Assign a dummy inode number to all sockets. We previously were
only assigning a dummy inode number to unix domain sockets. Use
the new pcpu facility and store the inum in the socket structure.

* Rip out the old inode number assigner for unix domain sockets, it
was using an atomic_fetchadd_long() on a global variable, introducing
unnecessary SMP stalls. And it was specific to unix domain sockets.
The new facility is generic to all sockets and uses a pcpu data
structure.

show more ...


Revision tags: v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc
# bff82488 20-Mar-2018 Aaron LI <aly@aaronly.me>

<net/if.h>: Do not include <net/if_var.h> for _KERNEL

* Clean up an ancient leftover: do not include <net/if_var.h> from <net/if.h>
for kernel stuffs.

* Adjust various files to include the necess

<net/if.h>: Do not include <net/if_var.h> for _KERNEL

* Clean up an ancient leftover: do not include <net/if_var.h> from <net/if.h>
for kernel stuffs.

* Adjust various files to include the necessary <net/if_var.h> header.

NOTE:
I have also tested removing the inclusion of <net/if.h> from <net/if_var.h>,
therefore add <net/if.h> inclusion for those files that need it but only
included <net/if_var.h>. For some files, the header inclusion orderings are
also adjusted.

show more ...


Revision tags: v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc, v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc
# 61814ab4 28-Oct-2015 Sepherosa Ziehau <sephe@dragonflybsd.org>

socket: Shortcircuit FIONBIO in soo_ioctl().

Instead of fallback to so_pru_control().


Revision tags: v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5, v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.4.3
# fdb46d70 16-Aug-2013 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix bug in SO_NOSIGPIPE when socket fp called from kernel thread

* SO_NOSIGPIPE assumed that soo_write() was being called from a user
process. It can also be called from a kernel thread.

kernel - Fix bug in SO_NOSIGPIPE when socket fp called from kernel thread

* SO_NOSIGPIPE assumed that soo_write() was being called from a user
process. It can also be called from a kernel thread.

* Fixes hammer2 kdmsg thread crashes.

show more ...


# dc71b7ab 31-May-2013 Justin C. Sherrill <justin@shiningsilence.com>

Correct BSD License clause numbering from 1-2-4 to 1-2-3.

Apparently everyone's doing it:
http://svnweb.freebsd.org/base?view=revision&revision=251069

Submitted-by: "Eitan Adler" <lists at eitanadl

Correct BSD License clause numbering from 1-2-4 to 1-2-3.

Apparently everyone's doing it:
http://svnweb.freebsd.org/base?view=revision&revision=251069

Submitted-by: "Eitan Adler" <lists at eitanadler.com>

show more ...


Revision tags: v3.4.2
# 2702099d 06-May-2013 Justin C. Sherrill <justin@shiningsilence.com>

Remove advertising clause from all that isn't contrib or userland bin.

By: Eitan Adler <lists@eitanadler.com>


Revision tags: v3.4.1, v3.4.0, v3.4.0rc, v3.5.0, v3.2.2
# 89233cfd 01-Nov-2012 John Marino <draco@marino.st>

Implement SO_NOSIGPIPE

The SO_NOSIGPIPE socket option allows a user process to mark a socket so
that the socket does not generate SIGPIPE, only EPIPE, when a write is
attempted after socket shutdown

Implement SO_NOSIGPIPE

The SO_NOSIGPIPE socket option allows a user process to mark a socket so
that the socket does not generate SIGPIPE, only EPIPE, when a write is
attempted after socket shutdown.

Regression test added: tools/regression/sockets/sigpipe

show more ...


Revision tags: v3.2.1, v3.2.0, v3.3.0
# 54bb4ff8 26-Sep-2012 Matthew Dillon <dillon@apollo.backplane.com>

Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2


# 97216d27 26-Sep-2012 Samuel J. Greear <sjg@thesjg.com>

Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly


# a3ef5f2e 26-Sep-2012 Matthew Dillon <dillon@apollo.backplane.com>

kernel - usched_dfly revamp (8), add reschedule hints

* Add reschedule hints when issuing a read() on a pipe or socket, or
issuing a blocking kevent() call.

* usched_dfly will force a reschedule

kernel - usched_dfly revamp (8), add reschedule hints

* Add reschedule hints when issuing a read() on a pipe or socket, or
issuing a blocking kevent() call.

* usched_dfly will force a reschedule after the round-robin count has
passed the half-way point if it detects a scheduling hint. This is
an attempt to avoid rescheduling in the middle of some critical user
operation (e.g. postgres server holding internal locks).

* Add kern.usched_dfly.fast_resched which allows the scheduler to avoid
interrupting a less desireable process with a more desireable process
as long as the priority difference is not too great.

However, default the value to 0, because setting the value has
consequences for interactive responsiveness.

* When running pgbench we recommend leaving fast_resched disabled and
instead running the pgbench at idprio 15 to work around issues where
the postgres server process(es) get interrupted by the pgbench processes
which causes the postgres server process(es) to hit internal lock conflicts
more quickly and enter a semaphore wait more often (when both pgbench and
the postgres servers are running on the same machine).

This is really an issue with postgres server scaling. Because the pgbench's
use so much less cpu than the postgres server processes they are given a
more desireable priority and thus can interrupt the postgres server
processes. We can't really 'fix' this in the scheduler without really
messing up normal interactive responsiveness for the system.

Example:

idprio pgbench -j 80 -c 80 -T 60 -S bench

show more ...


Revision tags: v3.0.3, v3.0.2, v3.0.1, v3.1.0, v3.0.0
# 86d7f5d3 26-Nov-2011 John Marino <draco@marino.st>

Initial import of binutils 2.22 on the new vendor branch

Future versions of binutils will also reside on this branch rather
than continuing to create new binutils branches for each new version.


Revision tags: v2.12.0, v2.13.0, v2.10.1, v2.11.0, v2.10.0, v2.9.1, v2.8.2, v2.8.1, v2.8.0, v2.9.0, v2.6.3, v2.7.3, v2.6.2, v2.7.2, v2.7.1, v2.6.1, v2.7.0, v2.6.0, v2.5.1, v2.4.1, v2.5.0, v2.4.0
# 87baaf0c 26-Aug-2009 Matthew Dillon <dillon@apollo.backplane.com>

Kernel - pass sysmsg through to ioctl.

* Pass the sysmsg through to the ioctl code so ioctls can set the return
value. A single linux ioctl from the SCSI sg code uses this feature.


# 5aaa1b10 14-Jul-2009 Michael Neumann <mneumann@ntecs.de>

Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly


# 2ad080fe 14-Jul-2009 Matthew Dillon <dillon@apollo.backplane.com>

MPSAFE - Implement sysctl vfs.getattr_mpsafe, make fstat() MPSAFE

Make fstat() MPSAFE. Adjust fileops->fo_stat functions to be MPSAFE as
necessary (uipc socket stat mainly).


Revision tags: v2.3.2, v2.3.1, v2.2.1, v2.2.0, v2.3.0, v2.1.1, v2.0.1
# 6d49aa6f 22-Apr-2007 Matthew Dillon <dillon@dragonflybsd.org>

Give the sockbuf structure its own header file and supporting source file.
Move all sockbuf-specific functions from kern/uipc_socket2.c into the new
kern/uipc_sockbuf.c and move all the sockbuf-speci

Give the sockbuf structure its own header file and supporting source file.
Move all sockbuf-specific functions from kern/uipc_socket2.c into the new
kern/uipc_sockbuf.c and move all the sockbuf-specific structures from
sys/socketvar.h to sys/sockbuf.h.

Change the sockbuf structure to only contain those fields required to
properly management a chain of mbufs. Create a signalsockbuf structure
to hold the remaining fields (e.g. selinfo, mbmax, etc).

Change the so_rcv and so_snd structures in the struct socket from
a sockbuf to a signalsockbuf.

Remove the recently added sorecv_direct structure which was being used
to provide a direct mbuf path to consumers for socket I/O. Use the newly
revamped sockbuf base structure instead. This gives mbuf consumers
direct access to the sockbuf API functions for use outside of a struct
socket. This will also allow new API functions to be added to the sockbuf
interface to ease the job of parsing data out of chained mbufs.

show more ...


# b2d248cb 02-Aug-2006 Matthew Dillon <dillon@dragonflybsd.org>

Get rid of some unused fields in the fileops and adjust the declarations
to use the '.field = blah' initialization method.


# 9ba76b73 13-Jun-2006 Matthew Dillon <dillon@dragonflybsd.org>

Add kernel syscall support for explicit blocking and non-blocking I/O
regardless of the setting applied to the file pointer.

send/sendmsg/sendto/recv/recvmsg/recfrom: New MSG_ flags defined in
sys/s

Add kernel syscall support for explicit blocking and non-blocking I/O
regardless of the setting applied to the file pointer.

send/sendmsg/sendto/recv/recvmsg/recfrom: New MSG_ flags defined in
sys/socket.h may be passed to these functions to override the settings
applied to the file pointer on a per-I/O basis.

MSG_FBLOCKING - Force the operation to be blocking
MSG_FNONBLOCKING- Force the operation to be non-blocking

pread/preadv/pwrite/pwritev: These system calls have been renamed and
wrappers will be added to libc. The new system calls are prefixed with
a double underscore (like getcwd vs __getcwd) and include an additional
flags argument. The new flags are defined in sys/fcntl.h and may be
used to override settings applied to the file pointer on a per-I/O basis.

Additionally, the internal __ versions of these functions now accept an
offset of -1 to mean 'degenerate into a read/readv/write/writev' (i.e.
use the offset in the file pointer and update it on completion).

O_FBLOCKING - Force the operation to be blocking
O_FNONBLOCKING - Force the operation to be non-blocking
O_FAPPEND - Force the write operation to append (to a regular file)
O_FOFFSET - (implied of the offset != -1) - offset is valid
O_FSYNCWRITE - Force a synchronous write
O_FASYNCWRITE - Force an asynchronous write
O_FUNBUFFERED - Force an unbuffered operation (O_DIRECT)
O_FBUFFERED - Force a buffered operation (negate O_DIRECT)

If the flags do not specify an operation (e.g. neither FBLOCKING or
FNONBLOCKING are set), then the settings in the file pointer are used.

The original system calls will become wrappers in libc, without the flags
arguments. The new system calls will be made available to libc_r to allow
it to perform non-blocking I/O without having to mess with a descriptor's
file flags.

NOTE: the new __pread and __pwrite system calls are backwards compatible
with the originals due to a pad byte that libc always set to 0.
The new __preadv and __pwritev system calls are NOT backwards compatible,
but since they were added to HEAD just two months ago I have decided
to not renumber them either.

NOTE: The subrev has been bumped to 1.5.4 and installworld will refuse to
install if you are not running at least a 1.5.4 kernel.

show more ...


# 3b564f1f 26-May-2006 Matthew Dillon <dillon@dragonflybsd.org>

Add #include <sys/lock.h> where needed to support get_mplock().

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>


# d9b2033e 26-May-2006 Matthew Dillon <dillon@dragonflybsd.org>

More MP work.

* Incorporate fd_knlistsize initialization into fsetfd().

* Mark all fileops vectors as MPSAFE (but get the mplock for most of them).
Clean up a number of fileops routines, mainly *

More MP work.

* Incorporate fd_knlistsize initialization into fsetfd().

* Mark all fileops vectors as MPSAFE (but get the mplock for most of them).
Clean up a number of fileops routines, mainly *_ioctl().

* Make crget(), crhold(), and crfree() MPSAFE. crfree still needs the mplock
on the last release. Give ucred a spinlock to handle the crfree()
0 transition race.

show more ...


# 87de5057 06-May-2006 Matthew Dillon <dillon@dragonflybsd.org>

The thread/proc pointer argument in the VFS subsystem originally existed
for... well, I'm not sure *WHY* it originally existed when most of the
time the pointer couldn't be anything other then curth

The thread/proc pointer argument in the VFS subsystem originally existed
for... well, I'm not sure *WHY* it originally existed when most of the
time the pointer couldn't be anything other then curthread or curproc or
the code wouldn't work. This is particularly true of lockmgr locks.

Remove the pointer argument from all VOP_*() functions, all fileops functions,
and most ioctl functions.

show more ...


# 004d2de5 13-Jul-2005 Matthew Dillon <dillon@dragonflybsd.org>

Make shutdown() a fileops operation rather then a socket operation.
Pipes are full-duplex entities, so implement shutdown support for them.


# 455fcd7e 13-May-2004 Matthew Dillon <dillon@dragonflybsd.org>

device switch 1/many: Remove d_autoq, add d_clone (where d_autoq was).

d_autoq was used to allow the device port dispatch to mix old-style synchronous
calls with new style messaging calls within a p

device switch 1/many: Remove d_autoq, add d_clone (where d_autoq was).

d_autoq was used to allow the device port dispatch to mix old-style synchronous
calls with new style messaging calls within a particular device. It was never
used for that purpose.

d_clone will be more fully implemented as work continues. We are going to
install d_port in the dev_t (struct specinfo) structure itself and d_clone
will be needed to allow devices to 'revector' the port on a minor-number
by minor-number basis, in particular allowing minor numbers to be directly
dispatched to distinct threads. This is something we will be needing later
on.

show more ...


# 6b6e0885 04-Mar-2004 Jeffrey Hsu <hsu@dragonflybsd.org>

Introduce access methods for making protocol requests.


# f53ede20 29-Jul-2003 Matthew Dillon <dillon@dragonflybsd.org>

fileops messaging stage 1: add port and feature mask to struct fileops and
rename fo_ functions to fold.


12