diff options
author | Laurent Vivier <lvivier@redhat.com> | 2025-01-20 14:15:22 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2025-01-20 19:51:24 +0100 |
commit | c96a88d550fcda3f1972aee395fcfda19905d0a4 (patch) | |
tree | a17c093067c7584ed129d172519acecf60f1867c | |
parent | 412ed4f09ff2e07545acdc5fe87a55a34aab4f92 (diff) | |
download | passt-c96a88d550fcda3f1972aee395fcfda19905d0a4.tar passt-c96a88d550fcda3f1972aee395fcfda19905d0a4.tar.gz passt-c96a88d550fcda3f1972aee395fcfda19905d0a4.tar.bz2 passt-c96a88d550fcda3f1972aee395fcfda19905d0a4.tar.lz passt-c96a88d550fcda3f1972aee395fcfda19905d0a4.tar.xz passt-c96a88d550fcda3f1972aee395fcfda19905d0a4.tar.zst passt-c96a88d550fcda3f1972aee395fcfda19905d0a4.zip |
vhost_user: remove ASSERT() on iovec number
Replace ASSERT() on the number of iovec in the element and on
the first entry length by a debug() message.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
[sbrivio: Fix typo in failure message]
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | vu_common.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vu_common.c b/vu_common.c index 87a0d94..aa5ca7b 100644 --- a/vu_common.c +++ b/vu_common.c @@ -195,8 +195,12 @@ static void vu_handle_tx(struct vu_dev *vdev, int index, hdrlen); } else { /* vnet header can be in a separate iovec */ - ASSERT(elem[count].out_num == 2); - ASSERT(elem[count].out_sg[0].iov_len == (size_t)hdrlen); + if (elem[count].out_num != 2) + debug("virtio-net transmit queue contains more than one buffer ([%d]: %u)", + count, elem[count].out_num); + if (elem[count].out_sg[0].iov_len != (size_t)hdrlen) + debug("virtio-net transmit queue entry not aligned on hdrlen ([%d]: %d != %zu)", + count, hdrlen, elem[count].out_sg[0].iov_len); tap_add_packet(vdev->context, elem[count].out_sg[1].iov_len, (char *)elem[count].out_sg[1].iov_base); |