erasure_code: check for size alignment on powerpc gf_vect_mul_vsx implementation

Follows the rest of the gf_vect_mul implementations for other architectures,
and checks for size alignment, stated in the documentation.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
This commit is contained in:
Pablo de Lara 2024-01-12 16:42:32 +00:00 committed by Tomasz Kantecki
parent 91e7906f3f
commit b8d5633e51
2 changed files with 5 additions and 5 deletions

View File

@ -171,7 +171,6 @@ int main(int argc, char *argv[])
#endif
}
#if !defined(ppc64le)
// Test all unsupported sizes up to TEST_SIZE
for (size = 0; size < TEST_SIZE; size++) {
if (size % align != 0 && gf_vect_mul(size, gf_const_tbl, buff1, buff2) == 0) {
@ -181,10 +180,7 @@ int main(int argc, char *argv[])
goto exit;
}
}
#else
printf
("WARNING: Test disabled on PPC due to known issue https://github.com/intel/isa-l/issues/263\n");
#endif
printf(" done: Pass\n");
fflush(0);

View File

@ -92,6 +92,10 @@ void ec_encode_data_update(int len, int k, int rows, int vec_i, unsigned char *v
int gf_vect_mul(int len, unsigned char *a, void *src, void *dest)
{
/* Size must be aligned to 32 bytes */
if ((len % 32) != 0)
return -1;
gf_vect_mul_vsx(len, a, (unsigned char *)src, (unsigned char *)dest);
return 0;
}