Skip to content

Commit

Permalink
Merge pull request #37 from dgarske/sym_align
Browse files Browse the repository at this point in the history
Fix for not aligned NUMA
  • Loading branch information
SparkiDev authored Oct 26, 2021
2 parents 5a8005a + 56e8ad5 commit 0e8ef14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wolfcrypt/src/port/intel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ The asynchronous crypto files are located at `wolfcrypt/src/async.c` and `wolfss
QuickAssist drivers can be downloaded from Intel here:
https://01.org/intel-quick-assist-technology/downloads

The latest driver for QAT can be found here:
https://www.intel.com/content/www/us/en/download/19734

### QAT 1.7

The latest QAT 1.7 Linux release:
https://downloadcenter.intel.com/download/30178

Note: If you have the older driver installed you may need to remove it or unload the module and reboot.

1. Setup `QAT1.7` and `wolfssl` next to each other in the same folder.
Expand Down
4 changes: 4 additions & 0 deletions wolfcrypt/src/port/intel/quickassist_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,10 @@ void* IntelQaRealloc(void *ptr, size_t size, void* heap, int type
if (newIsNuma == 0 && ptrIsNuma == 0) {
allocNew = 1;
}
/* confirm input is aligned, otherwise allocate new */
else if (((size_t)ptr % WOLF_HEADER_ALIGN) != 0) {
allocNew = 1;
}
/* if matching NUMA type and size fits, use existing */
else if (newIsNuma == ptrIsNuma && header->size >= size) {

Expand Down

0 comments on commit 0e8ef14

Please # to comment.