HomeFreeBSD

MFC 331248: Set the proper vnet in IPsec callback functions.

Description

MFC 331248: Set the proper vnet in IPsec callback functions.

When using hardware crypto engines, the callback functions used to handle
an IPsec packet after it has been encrypted or decrypted can be invoked
asynchronously from a worker thread that is not associated with a vnet.
Extend 'struct xform_data' to include a vnet pointer and save the current
vnet in this new member when queueing crypto requests in IPsec. In the
IPsec callback routines, use the new member to set the current vnet while
processing the modified packet.

This fixes a panic when using hardware offload such as ccr(4) with IPsec
after VIMAGE was enabled in GENERIC.

Sponsored by: Chelsio Communications

Details

Provenance
jhbAuthored on
Parents
rS331692: Fix for regression issue in USB keyboard driver after r304735.
Branches
Unknown
Tags
Unknown