1
0
Fork 0

Merging upstream version 1.7.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 10:16:49 +01:00
parent 41144a7301
commit 476f38f2bb
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
878 changed files with 2965 additions and 1746 deletions

View file

@ -83,12 +83,14 @@ static void test_set_tx_mic(struct test_peer *peer)
{
extern __u32 nvme_mi_crc32_update(__u32 crc, void *data, size_t len);
__u32 crc = 0xffffffff;
__le32 crc_le;
assert(peer->tx_buf_len + sizeof(crc) <= MAX_BUFSIZ);
assert(peer->tx_buf_len + sizeof(crc_le) <= MAX_BUFSIZ);
crc = nvme_mi_crc32_update(crc, peer->tx_buf, peer->tx_buf_len);
*(uint32_t *)(peer->tx_buf + peer->tx_buf_len) = cpu_to_le32(~crc);
peer->tx_buf_len += sizeof(crc);
crc_le = cpu_to_le32(~crc);
memcpy(peer->tx_buf + peer->tx_buf_len, &crc_le, sizeof(crc_le));
peer->tx_buf_len += sizeof(crc_le);
}
int __wrap_socket(int family, int type, int protocol)