After rS336439 crypto_newsession() does uma_zalloc() with M_WAITOK flag and since, xform_init holds mutex during this call, WITNESS shows warning about possible deadlock.
This patch does several things:
- xform-related functions moved into subr_ipsec.c
- release XFORMS_LOCK() before invoking xf_init() that calls crypto_newsession()
- use ipsec_kmod_enter/exit/drain functions to protect from xform kernel module unloading during xfrom_init call
- always build ipsec_kmod_enter/exit/drain functions into kernel (when options IPSEC or IPSEC_SUPPORT is specified)
- added new field xf_cntr to struct xformsw, it is used by ipsec_kmod_* functions
- constified xf_name field