diff --git a/erasure_code/gf_vect_mul_test.c b/erasure_code/gf_vect_mul_test.c index 80eee18..617365c 100644 --- a/erasure_code/gf_vect_mul_test.c +++ b/erasure_code/gf_vect_mul_test.c @@ -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); diff --git a/erasure_code/ppc64le/ec_base_vsx.c b/erasure_code/ppc64le/ec_base_vsx.c index ef36e6e..c3163a5 100644 --- a/erasure_code/ppc64le/ec_base_vsx.c +++ b/erasure_code/ppc64le/ec_base_vsx.c @@ -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; }