Add GFNI affine parity generation for RAID polynomial

This commit is contained in:
Andrea Mazzoleni 2026-08-19 17:59:02 +02:00
parent 711ccba629
commit c34cfe24da
11 changed files with 805 additions and 28 deletions

View file

@ -1151,6 +1151,12 @@ void selftest(void)
exit(EXIT_FAILURE);
/* LCOV_EXCL_STOP */
}
if (raid_test_gfaffine() != 0) {
/* LCOV_EXCL_START */
log_fatal(EINTERNAL, "Failed GFNI AFFINE test\n");
exit(EXIT_FAILURE);
/* LCOV_EXCL_STOP */
}
if (raid_test_par(RAID_MODE_VANDERMONDE_RAID, 32, 256) != 0) {
/* LCOV_EXCL_START */
log_fatal(EINTERNAL, "Failed GEN Vandermonde RAID test\n");

View file

@ -306,6 +306,10 @@ void speed_gen(int nd, void** v, int size, int delta, int period, const char* ms
printf("%8" PRIu64, ds / dt);
fflush(stdout);
}
if (raid_cpu_has_avx2gfni())
printf("%8s", "");
if (raid_cpu_has_avx512gfni())
printf("%8s", "");
#endif
#endif
printf("\n");
@ -449,7 +453,11 @@ void speed_gen(int nd, void** v, int size, int delta, int period, const char* ms
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
SPEED_START {
raid_gen2_avx2gfni_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
}
fflush(stdout);
}
@ -461,7 +469,11 @@ void speed_gen(int nd, void** v, int size, int delta, int period, const char* ms
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
SPEED_START {
raid_gen2_avx512gfni_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
}
fflush(stdout);
}
@ -570,7 +582,11 @@ void speed_gen(int nd, void** v, int size, int delta, int period, const char* ms
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
SPEED_START {
raid_gen3_avx2gfni_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
}
fflush(stdout);
}
@ -582,7 +598,11 @@ void speed_gen(int nd, void** v, int size, int delta, int period, const char* ms
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
SPEED_START {
raid_gen3_avx512gfni_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
}
fflush(stdout);
}
@ -691,7 +711,11 @@ void speed_gen(int nd, void** v, int size, int delta, int period, const char* ms
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
SPEED_START {
raid_gen4_avx2gfni_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
}
fflush(stdout);
}
@ -703,7 +727,11 @@ void speed_gen(int nd, void** v, int size, int delta, int period, const char* ms
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
SPEED_START {
raid_gen4_avx512gfni_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
}
fflush(stdout);
}
@ -809,7 +837,11 @@ void speed_gen(int nd, void** v, int size, int delta, int period, const char* ms
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
SPEED_START {
raid_gen5_avx2gfni_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
}
fflush(stdout);
}
@ -821,7 +853,11 @@ void speed_gen(int nd, void** v, int size, int delta, int period, const char* ms
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
SPEED_START {
raid_gen5_avx512gfni_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
}
fflush(stdout);
}
@ -927,7 +963,11 @@ void speed_gen(int nd, void** v, int size, int delta, int period, const char* ms
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
SPEED_START {
raid_gen6_avx2gfni_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
}
fflush(stdout);
}
@ -939,7 +979,11 @@ void speed_gen(int nd, void** v, int size, int delta, int period, const char* ms
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
SPEED_START {
raid_gen6_avx512gfni_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
}
fflush(stdout);
}