Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/80251?usp=email )
Change subject: lib: Move IP checksum to commonlib
......................................................................
Patch Set 4:
(1 comment)
File src/commonlib/bsd/include/commonlib/bsd/ipchksum.h:
https://review.coreboot.org/c/coreboot/+/80251/comment/42f9bdf6_323a8e84 :
PS4, Line 9: uint16_t ipchksum(const void *data, size_t size);
: uint16_t ipchksum_add(size_t offset, uint16_t first, uint16_t second);
Before it was: […]
Because the checksum is defined as a 16-bit number. I don't know why the previous author (back in 2009 or whenever this was written... it was _really_ old) chose to return it as a masked unsigned long instead, but it seems awkward to me and almost all call sites seem to implicitly convert it back to u16 anyway, so I thought it made more sense to use that in the first place. (Also, the libpayload version already returned an unsigned short so I just combined the two in a way that's closer to that one.)
--
To view, visit
https://review.coreboot.org/c/coreboot/+/80251?usp=email
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ic04c714c00439a17fc04a8a6e730cc2aa19b8e68
Gerrit-Change-Number: 80251
Gerrit-PatchSet: 4
Gerrit-Owner: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Reviewer: Hung-Te Lin
hungte@chromium.org
Gerrit-Reviewer: Jakub Czapiga
czapiga@google.com
Gerrit-Reviewer: Julius Werner
jwerner@chromium.org
Gerrit-Reviewer: Jérémy Compostella
jeremy.compostella@intel.com
Gerrit-Reviewer: Yidi Lin
yidilin@google.com
Gerrit-Reviewer: Yu-Ping Wu
yupingso@google.com
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Paul Menzel
paulepanter@mailbox.org
Gerrit-Comment-Date: Mon, 05 Feb 2024 23:13:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Paul Menzel
paulepanter@mailbox.org
Gerrit-MessageType: comment