intel / intel-ipsec-mb

Intel(R) Multi-Buffer Crypto for IPSec
BSD 3-Clause "New" or "Revised" License
288 stars 88 forks source link

Not an issue - just try to understand how the flush_job works #121

Closed riveridea closed 1 year ago

riveridea commented 1 year ago

Hi,

Usually SIMD need to get enough number of jobs to do parallel computing, but when if no enough jobs are in the SIMD lanes, how exactly the flush_job is doing? For example if the number SIMD lanes is 16 and I have 5 jobs to be flushed. Is the flush_job processing these 5 jobs one by one or can process the 5 jobs in parallel? In my understanding, the flush_job can use some padding tech to fill the rest 11 empty lanes to process the 5 real jobs in one shot. Is that right?

Thanks

mdcornu commented 1 year ago

Yes, flush_job will process all jobs in parallel by doing:

  1. find a valid lane
  2. copy required fields from valid lane to all empty lanes (e.g. in/out pointers, key pointers etc.)
  3. process all lanes in parallel until first valid job completes
  4. return completed job
tkanteck commented 1 year ago

Let me close the issue. Feel free to re-open if you have more questions around this topic