Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect handling of CRC #30

Open
jposwiata opened this issue Sep 22, 2023 · 2 comments
Open

Incorrect handling of CRC #30

jposwiata opened this issue Sep 22, 2023 · 2 comments
Assignees

Comments

@jposwiata
Copy link

In CRC and COPY_WITH_CRC commands it is not allowed to set initial CRC values after PAGE_FAULT with no bytes processed.
update_crc_for_continuation() and update_copy_crc_for_continuation() should include the conditon:

if (crc_record.bytes_completed() != 0) {
    crc_dsc.crc_seed() = crc_record.crc_value();
}
@abdelrahim-hentabli
Copy link
Contributor

Hey @jposwiata, crc_record.crc_value() would be initialized with the crc_seed, even in the case of crc_record.bytes_completed() == 0.

So in the case of crc_record.bytes_completed() == 0 the line crc_dsc.crc_seed() = crc_record.crc_value(); would be equivalent to crc_dsc.crc_seed() = crc_dsc.crc_seed();

@abdelrahim-hentabli abdelrahim-hentabli self-assigned this Oct 12, 2023
@jposwiata
Copy link
Author

the documentation says: if Bytes Completed is 0, the CRC Value in the completion record is undefined and software should reuse the CRC Seed or CRC Seed Address from the descriptor.

According our experiments "output" CRC is in most cases zeroed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants