fe6d427551
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. |
||
---|---|---|
.. | ||
altq_afmap.c | ||
altq_afmap.h | ||
altq_blue.c | ||
altq_blue.h | ||
altq_cbq.c | ||
altq_cbq.h | ||
altq_cdnr.c | ||
altq_cdnr.h | ||
altq_classq.h | ||
altq_conf.c | ||
altq_conf.h | ||
altq_fifoq.c | ||
altq_fifoq.h | ||
altq_flowvalve.h | ||
altq_hfsc.c | ||
altq_hfsc.h | ||
altq_jobs.c | ||
altq_jobs.h | ||
altq_localq.c | ||
altq_priq.c | ||
altq_priq.h | ||
altq_red.c | ||
altq_red.h | ||
altq_rio.c | ||
altq_rio.h | ||
altq_rmclass_debug.h | ||
altq_rmclass.c | ||
altq_rmclass.h | ||
altq_subr.c | ||
altq_var.h | ||
altq_wfq.c | ||
altq_wfq.h | ||
altq.h | ||
altqconf.h | ||
files.altq | ||
if_altq.h | ||
Makefile |