)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5ca72da9dd524af9b1f7800e80ac98c099430e81","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"0f3ac981_a59b7b5a","updated":"2025-04-07 18:02:44.000000000","message":"I appreciate wanting a better fallback implementation, but kernel is noticeably worse than a lot of the libraries available -- I\u0027m seeing numbers like:\n```\nisal: 41527.8MB/s\nkern: 518.1MB/s\nanycrc: 2535.9MB/s\nawscrt: 48771.0MB/s\n```","commit_id":"ac4eb63d8a6f6b6131db4bcf58c550726cc4d82a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d5ceeb26f445143ae58a660c6bf0b56e401f447d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"6fd5b6be_496151cd","updated":"2025-04-03 04:44:45.000000000","message":"So we\u0027ve got two different interfaces in the checksum module -- one like `crc(data: bytes, value: int \u003d 0) -\u003e int` and another like\n```\nclass Hasher:\n    def update(data: bytes):\n        ...\n    def digest() -\u003e bytes:\n        ...\n    def hexdigest() -\u003e str:\n        ...\n```\nthat mimics what\u0027s available in `hashlib`. I feel like if we\u0027re going to have a kernel implementation for CRC64NVME, it\u0027s going to need to be exclusive to the latter interface.\n\nNote that this would probably mean we\u0027d need to abandon the `copy` method that was included for completeness\u0027s sake.","commit_id":"ac4eb63d8a6f6b6131db4bcf58c550726cc4d82a"}],"swift/common/utils/checksum.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"5979465f5db817f994903c2e4a35545d727bbf96","unresolved":true,"context_lines":[{"line_number":171,"context_line":"            But also clears the socket, so this can only be called once"},{"line_number":172,"context_line":"            \"\"\""},{"line_number":173,"context_line":"            return struct.unpack("},{"line_number":174,"context_line":"                \"Q\", self.sock.recv(8, socket.MSG_PEEK))[0]"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def crc64nvme_kern(data, value\u003d0):"},{"line_number":177,"context_line":"        # this can only take the single input of data :("}],"source_content_type":"text/x-python","patch_set":2,"id":"f3efefea_e0033240","line":174,"range":{"start_line":174,"start_character":39,"end_line":174,"end_character":54},"updated":"2025-04-02 22:22:15.000000000","message":"I was hoping using the PEEK which in normal sockets allow us to look at the data but not pull it, in an AF_ALG socket would mean it\u0027ll give us the digest but not clear the socket buffer... but alas it doesn\u0027t work 😞","commit_id":"ac4eb63d8a6f6b6131db4bcf58c550726cc4d82a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d5ceeb26f445143ae58a660c6bf0b56e401f447d","unresolved":true,"context_lines":[{"line_number":173,"context_line":"            return struct.unpack("},{"line_number":174,"context_line":"                \"Q\", self.sock.recv(8, socket.MSG_PEEK))[0]"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def crc64nvme_kern(data, value\u003d0):"},{"line_number":177,"context_line":"        # this can only take the single input of data :("},{"line_number":178,"context_line":"        crc64 \u003d Crc64nvme_kern()"},{"line_number":179,"context_line":"        crc64(data)"}],"source_content_type":"text/x-python","patch_set":2,"id":"c08876d0_cbb2ad0a","line":176,"range":{"start_line":176,"start_character":29,"end_line":176,"end_character":36},"updated":"2025-04-03 04:44:45.000000000","message":"Surely we want to raise some kind of error if `value !\u003d 0`...","commit_id":"ac4eb63d8a6f6b6131db4bcf58c550726cc4d82a"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d5ceeb26f445143ae58a660c6bf0b56e401f447d","unresolved":true,"context_lines":[{"line_number":289,"context_line":""},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"def crc64nvme(data\u003dNone, initial_value\u003d0):"},{"line_number":292,"context_line":"    return CRCHasher(\u0027crc64nvme\u0027,"},{"line_number":293,"context_line":"                     _select_crc64nvme_impl(),"},{"line_number":294,"context_line":"                     data\u003ddata,"},{"line_number":295,"context_line":"                     initial_value\u003dinitial_value,"}],"source_content_type":"text/x-python","patch_set":2,"id":"b62e75ff_c8f9bf00","line":292,"range":{"start_line":292,"start_character":11,"end_line":292,"end_character":20},"updated":"2025-04-03 04:44:45.000000000","message":"I think *this* is where we\u0027d want to drop in a kernel implementation. Something like\n```\nimp \u003d _select_crc64nvme_impl()\nif imp is crc64nvme_ref:\n    return KernelCRC64NVME(...)\nreturn CRCHasher(\u0027crc64nvme\u0027, imp, ...)\n```","commit_id":"ac4eb63d8a6f6b6131db4bcf58c550726cc4d82a"}]}
