usrreq switches and put into separate functions
xxx_{peer,sock}addr(struct socket *, struct mbuf *).
- KASSERT(solocked(so)) always in new functions even if request
is not implemented
- KASSERT(pcb != NULL) and KASSERT(nam) if the request is
implemented and not for tcp.
* for tcp roll #ifdef KPROF and #ifdef DEBUG code from tcp_usrreq() into
easier to cut & paste functions tcp_debug_capture() and
tcp_debug_trace()
- functions provided by rmind
- remaining use of PRU_{PEER,SOCK}ADDR #define to be removed in a
future commit.
* rename netbt functions to permit consistency of pru function names
(as has been done with other requests already split out).
- l2cap_{peer,sock}addr() -> l2cap_{peer,sock}_addr_pcb()
- rfcomm_{peer,sock}addr() -> rfcomm_{peer,sock}_addr_pcb()
- sco_{peer,sock}addr() -> sco_{peer,sock}_addr_pcb()
* split/refactor do_sys_getsockname(lwp, fd, which, nam) into
two functions do_sys_get{peer,sock}name(fd, nam).
- move PRU_PEERADDR handling into do_sys_getpeername() from
do_sys_getsockname()
- have svr4_stream directly call do_sys_get{sock,peer}name()
respectively instead of providing `which' & fix a DPRINTF string
that incorrectly wrote "getpeername" when it meant "getsockname"
- fix sys_getpeername() and sys_getsockname() to call
do_sys_get{sock,peer}name() without `which' and `lwp' & adjust
comments
- bump kernel version for removal of lwp & which parameters from
do_sys_getsockname()
note: future cleanup to remove struct mbuf * abuse in
xxx_{peer,sock}name()
still to come, not done in this commit since it is easier to do post
split.
patch reviewed by rmind
welcome to 6.99.47
were not filling in struct stat.
decision made after further discussion with rmind and investigation of
how other operating systems behave. soo_stat() is doing just enough to
be able to call what gets returned valid and thus justifys a return of
success.
additional review will be done to determine of the pr_stat functions
that were already returning EOPNOTSUPP can be considered successful with
what soo_stat() is doing.
not fill in struct stat instead of returning success.
* in pr_stat remove all checks for non-NULL so->so_pcb except where the
pcb is actually used (i.e. cases where we don't return EOPNOTSUPP).
proposed on tech-net@
separate sockin_stat(struct socket *, struct stat *) function.
* change behavior of function to just return success (like pretty much
every other implementation) instead of panic()ing due to lack of
implementation.
abuse of pointer to struct mbuf type.
param2 changed to u_long type and uses parameter name 'cmd' (ioctl command)
param3 changed to void * type and uses parameter name 'data'
param4 changed to struct ifnet * and uses parameter name 'ifp'
param5 has been removed (formerly struct lwp *) and uses of 'l' have been
replaced with curlwp from curproc(9).
callers have had (now unnecessary) casts to struct mbuf * removed, called
code has had (now unnecessary) casts to u_long, void * and struct ifnet *
respectively removed.
reviewed by rmind@
into separate xxx_ioctl() functions.
* place KASSERT(req != PRU_CONTROL) inside xxx_userreq() as it is now
inappropriate for req = PRU_CONTROL in xxx_userreq().
* replace calls to pr_generic() with req = PRU_CONTROL with pr_ioctl().
* remove & fixup references to PRU_CONTROL xxx_userreq() function comments.
* fix various comments references for xxx_userreq() that mentioned
PRU_CONTROL as xxx_userreq() no longer handles the request.
a further change will follow to fix parameter and naming inconsistencies
retained from original code.
Reviewed by rmind@
to access both NetBSD kernel facilities and facilities provided by the
environment.
Where the environment's headers can be #included without namespace
conflict (which can be done - with care - for some Xen mini-os
headers), it is convenient to simply allow the rump kernel code to
call directly into the environment.
This also requires not mangling the symbol names.
So provide a variable RUMP_SYM_NORENAME which can be set by a component
namefile to a series of symbols or symbol prefixes (in makefile-quoted
awk regexp syntax). For example, in the rumpuser-xen xenbus driver:
RUMP_SYM_NORENAME=xenbus_|HYPERVISOR_|wake$$|block$$|schedule$$|force_evtchn
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
(proposed on rumpkernel-users; very minor modification by myself)
nodes that will be available immediately when mountroot is done
and file systems are available.
The intended use is for example for firmware images to be available when
config_mountroot() hooks run.
- Replace ipintrq and ip6intrq with the pktqueue mechanism.
- Eliminate kernel-lock from ipintr() and ip6intr().
- Some preparation work to push softnet_lock out of ipintr().
Discussed on tech-net.
subr_devsw from VFS -- not that I/O buffers are _VFS_ entities -- and
eliminates the last weak alias from librump, which means things now
fully work on glibc (w/o LD_DYNAMIC_WEAK) and musl.
The whole code path is suspect anyway, since nothing prevents the device
from escaping after the lookup, suggesting that the whole error path
should be handled by the caller, but oh well.
- vcache_get() retrieves a referenced and initialised vnode / fs node pair.
- vcache_remove() removes a vnode / fs node pair from the cache.
On cache miss vcache_get() calls new vfs operation vfs_loadvnode() to
initialise a vnode / fs node pair. This call is guaranteed exclusive,
no other thread will try to load this vnode / fs node pair.
Convert ufs/ext2fs, ufs/ffs and ufs/mfs to use this interface.
Remove now unused ufs/ufs_ihash
Discussed on tech-kern.
Welcome to 6.99.41
Do not query system call handlers by using the rumpuser_dl_globalsym()
hypercall -- it will not work in environments which are not in control
of their own symbols (e.g. rumpuser-xen). Instead, provide
rump_syscall_boot_establish(), which component constructors can use
to establish their non-modular syscalls.
reason to get installed. Make the component private to the test using
it and obsolete the installed one.
IOW, rename sys/rump/dev/lib/libscsitest -> tests/dev/scsipi/libscsitest
__attribute__((constructor)) to determine which rump kernel components
and kernel modules are linked into the rump kernel. If not defined
(default), use the regular approach with link sets.
This option is aimed to fix problems with toolchains where using link
sets is not possible because the linker does not generate the requisite
__start/__stop symbols for the link set sections (e.g. GNU gold, OS X, ...).
the separate rumpkern_time component. Keeping time-related routines
elsewhere lead to some illogical behavior if you didn't think of linking
in rumpkern_time (hands up everyone who checks the return value of
nanosleep()).
Add warnings if rumpkern_time is linked or used. I'll remove it in a
month or two instead of now since it was part of a buildrump.sh snapshot
and it's nicer if trying to use it gives a warning instead of an error
in the next snapshot.
"everything should be as modular as possible, but no more modular than that"
designated initializers.
I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
staggering impact on performance. When running sendto() in a loop,
the improvement is 200k more calls per second with an inlined __thread
curlwp as opposed to the default. In other words, it shaves off hundreds
of CPU cycles per call (~20%). Even just eliminating the x86_curlwp()
call in favor of an inline gives an improvement of 60k calls per second.
rump kernel" clauses from bsd.own.mk to Makefile.rump. Also,
add a rump_nativeabi_p() call to determine if rump kernel is
compiled with native ABI support.
with RUMP_NPF_TESTING_=no. This in turn makes it possible to use npf
in a rump kernel for real packet filtering instead of just testing.
no change to default
There are two major changes:
1) All thread context policy is pushed down to the hypercalls.
This is meant to help performance-mongering implementations be
able to control packet scheduling better (e.g. pin down packet
reception to certain physical cores).
2) Generalize linkstr, meaning that the interface can now take an
arbitrary string which is passed to the create() hypercall. This can
be used to map backend device characteristics to the rump kernel
interface instance.
kern.rawpartition sysctl support to rump kernel.
Moved the sysctl support that is shared between rump and normal
kernels to init_sysctl_base.c as rump cannot use init_sysctl.c
in order to avoid code duplication. Agreed with pooka@.
I'm also quite sure nobody ever really wanted to use it.
Change the "raise" sigmodel to include the rump kernel PID in the call
to rumpuser_kill(). The purpose is to provide some hint for non-POSIX
platforms which don't sport signals and multiplex many clients in a
single address space.
While this is technically an ABI change, see above. Also, since
rumpuser_kill() was not documented, I'll just claim I'm fixing a bug in
the implementation (and will be sure to document the interface correctly
very soon).
Add arch/generic and move non-x86 files from rumpkern/ there. Also,
move files from arch/i386 to arch/x86, and make both i386 and x86_64
use those.
This clarifies the situation with what is MD vs. MI code.
renames:
rumpcpu_generic,kobj_stubs,pmap_stubs => arch/generic/rump_generic_$x
arch/i386/* => arch/x86/rump_x86_$x
(for those who forget, x86 requires MD code because rump kernels
use the same ABI as kernel modules)
This makes ni real difference for rump, but avoods
KASSERTs in common code when we try to assert
"ipl not higher as...".
Suggested by riastradh, OK: pooka.
instead.
Include linux_socketcall.h to bring missing socket syscall
arguments/prototypes on arches that have socketcall(2).
Finally, cleanup rump linux syscall wrapper, to remove linux syscall
argument/prototype local copy.
__HAVE_MINIMAL_EMUL, we simply look up the values from p->p_emul->e_errno.
For ports which cannot afford to keep an extra pointer per emul structure
around, we hope there is __HAVE_SYSCALL_INTERN support and thread the
errno values through p_emuldata. Notably, we cannot alter the syscall
method like most ports do with syscall_intern, since they do it via
p_mdproc, so MI code is not possible there.