Implement G23 Extended Cauchy construction for AES RAID mode

This commit is contained in:
Andrea Mazzoleni 2026-08-21 19:40:48 +02:00
parent b5d7474c3b
commit 1b5c926936
22 changed files with 10924 additions and 6047 deletions

View file

@ -151,6 +151,13 @@ int main(void)
/* LCOV_EXCL_STOP */
}
printf("Test Cauchy AES P/Q recovery within and across G23 cosets...\n");
if (raid_test_rec2_g23(TEST_SIZE) != 0) {
/* LCOV_EXCL_START */
goto bail;
/* LCOV_EXCL_STOP */
}
printf("OK\n");
return 0;

View file

@ -8,7 +8,7 @@
* nonsingular (invertible) for both operating modes:
*
* RAID: GF polynomial 0x11d, primitive generator g=2
* AES: GF polynomial 0x11b, primitive generator g=3
* AES: GF polynomial 0x11b, G23 Extended Cauchy construction
*/
#include "internal.h"

View file

@ -8,7 +8,7 @@
* nonsingular (invertible) for both operating modes:
*
* RAID: GF polynomial 0x11d, primitive generator g=2
* AES: GF polynomial 0x11b, primitive generator g=3
* AES: GF polynomial 0x11b, G23 Extended Cauchy construction
*/
#include "internal.h"

View file

@ -232,12 +232,7 @@ void speed_gen(int nd, void **v, int size, int delta, int period, const char *ms
printf("%8s", raid_gen_tag(RAID_ALGO_CAUCHY_PAR2));
fflush(stdout);
SPEED_START {
raid_gen2_int8(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
fflush(stdout);
printf("%8s", "");
if (mode == RAID_MODE_CAUCHY_AES) {
SPEED_START {
@ -742,15 +737,17 @@ void speed_gen(int nd, void **v, int size, int delta, int period, const char *ms
#endif
}
if (raid_cpu_has_ssse3()) {
if (mode == RAID_MODE_CAUCHY_RAID) {
if (mode == RAID_MODE_CAUCHY_AES) {
SPEED_START {
raid_gen5_ssse3_aes(nd, size, v);
} SPEED_STOP
} else {
SPEED_START {
raid_gen5_ssse3_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
}
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#ifdef CONFIG_X86_64
if (mode == RAID_MODE_CAUCHY_AES) {
@ -881,15 +878,17 @@ void speed_gen(int nd, void **v, int size, int delta, int period, const char *ms
#endif
}
if (raid_cpu_has_ssse3()) {
if (mode == RAID_MODE_CAUCHY_RAID) {
if (mode == RAID_MODE_CAUCHY_AES) {
SPEED_START {
raid_gen6_ssse3_aes(nd, size, v);
} SPEED_STOP
} else {
SPEED_START {
raid_gen6_ssse3_raid(nd, size, v);
} SPEED_STOP
printf("%8" PRIu64, ds / dt);
} else {
printf("%8s", "");
}
printf("%8" PRIu64, ds / dt);
fflush(stdout);
#ifdef CONFIG_X86_64
if (mode == RAID_MODE_CAUCHY_AES) {