Do not sum the checksum. Instead use the intermediary values in order to
correctly compute the final checksum. This is not a bug in the case where both the sender and the receiver execute EXACTLY the same checksum computations but is definitively a problem if not (such as the buffered case). This commit was SVN r10367.
Этот коммит содержится в:
родитель
0c709e3f53
Коммит
7608261c8a
@ -23,12 +23,12 @@
|
||||
|
||||
#define MEMCPY_CSUM( DST, SRC, BLENGTH, CONVERTOR ) \
|
||||
do { \
|
||||
(CONVERTOR)->checksum += OPAL_CSUM_BCOPY_PARTIAL( (SRC), (DST), (BLENGTH), (BLENGTH), &(CONVERTOR)->csum_ui1, &(CONVERTOR)->csum_ui2 ); \
|
||||
(CONVERTOR)->checksum = OPAL_CSUM_BCOPY_PARTIAL( (SRC), (DST), (BLENGTH), (BLENGTH), &(CONVERTOR)->csum_ui1, &(CONVERTOR)->csum_ui2 ); \
|
||||
} while (0)
|
||||
|
||||
#define COMPUTE_CSUM( SRC, BLENGTH, CONVERTOR ) \
|
||||
do { \
|
||||
(CONVERTOR)->checksum += OPAL_CSUM_PARTIAL( (SRC), (BLENGTH), &(CONVERTOR)->csum_ui1, &(CONVERTOR)->csum_ui2 ); \
|
||||
(CONVERTOR)->checksum = OPAL_CSUM_PARTIAL( (SRC), (BLENGTH), &(CONVERTOR)->csum_ui1, &(CONVERTOR)->csum_ui2 ); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user