On 24 March 2016 at 20:53, Mark Kettenis <mark.kette...@xs4all.nl> wrote: > Diff below makes aesni crypto "mpsafe". It adds a CRYPTOCAP_F_MPSAFE > flag that makes the crypto framework dispatch to an mpsafe taskq if it > is set. In order to make the aesni_process() function that does the > actual crypto work mpsafe, it moves the code over to a per-session > working buffer. This obviously increases the cost of setting up a > session a bit. Directly invoked crypto operations remain locked. My > main laptop seem to do ipsec fine with this, but I'm not sure if there > is an actual performance gain. So it would probably be good if > somebody could benchmark this. > > Comments? > >
It should be fairly simple to use SRP for the session list so that you don't have to take the mutex in the aesni_process. Other than that I think this should go in once tests are made and people a happy with the results. Another question I have is why are you using an IPL_HIGH mutex?