NetBSD/sys/netatalk
ozaki-r fe6d427551 Avoid storing a pointer of an interface in a mbuf
Having a pointer of an interface in a mbuf isn't safe if we remove big
kernel locks; an interface object (ifnet) can be destroyed anytime in any
packet processing and accessing such object via a pointer is racy. Instead
we have to get an object from the interface collection (ifindex2ifnet) via
an interface index (if_index) that is stored to a mbuf instead of an
pointer.

The change provides two APIs: m_{get,put}_rcvif_psref that use psref(9)
for sleep-able critical sections and m_{get,put}_rcvif that use
pserialize(9) for other critical sections. The change also adds another
API called m_get_rcvif_NOMPSAFE, that is NOT MP-safe and for transition
moratorium, i.e., it is intended to be used for places where are not
planned to be MP-ified soon.

The change adds some overhead due to psref to performance sensitive paths,
however the overhead is not serious, 2% down at worst.

Proposed on tech-kern and tech-net.
2016-06-10 13:31:43 +00:00
..
aarp.c
aarp.h
at_control.c
at_extern.h Give proper prototype to ddp_output. 2016-01-20 21:59:19 +00:00
at_print.c
at_proto.c Revert previous: ran cvs commit when I meant cvs diff. Sorry! 2016-01-21 15:41:29 +00:00
at_rmx.c
at_var.h
at.h
ddp_input.c Avoid storing a pointer of an interface in a mbuf 2016-06-10 13:31:43 +00:00
ddp_output.c Give proper prototype to ddp_output. 2016-01-20 21:59:19 +00:00
ddp_private.h
ddp_usrreq.c make connect syscall use sockaddr_big and modify pr_{send,connect} 2015-05-02 17:18:03 +00:00
ddp_var.h
ddp.h
files.netatalk Define netatalk module. 2014-12-08 07:18:45 +00:00
Makefile
phase2.h More on PR 41200: headers that declare ioctls should include sys/ioccom.h. 2015-09-06 06:00:59 +00:00