HomeFreeBSD

Expand the software fallback for GCM to cover more cases.

Description

Expand the software fallback for GCM to cover more cases.

  • Extend ccr_gcm_soft() to handle requests with a non-empty payload. While here, switch to allocating the GMAC context instead of placing it on the stack since it is over 1KB in size.
  • Allow ccr_gcm() to return a special error value (EMSGSIZE) which triggers a fallback to ccr_gcm_soft(). Move the existing empty payload check into ccr_gcm() and change a few other cases (e.g. large AAD) to fallback to software via EMSGSIZE as well.
  • Add a new 'sw_fallback' stat to count the number of requests processed via the software fallback.

Submitted by: Harsh Jain @ Chelsio (original version)
Sponsored by: Chelsio Communications

Details

Provenance
jhbAuthored on
Parents
rS328358: Clamp DSGL entries to a length of 2KB.
Branches
Unknown
Tags
Unknown