git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/bnxt: fix null dereference in session cleanup
[dpdk.git]
/
lib
/
vhost
/
virtio_net.c
diff --git
a/lib/vhost/virtio_net.c
b/lib/vhost/virtio_net.c
index
886e076
..
5f432b0
100644
(file)
--- a/
lib/vhost/virtio_net.c
+++ b/
lib/vhost/virtio_net.c
@@
-1004,20
+1004,21
@@
async_mbuf_to_desc_seg(struct virtio_net *dev, struct vhost_virtqueue *vq,
struct vhost_async *async = vq->async;
uint64_t mapped_len;
uint32_t buf_offset = 0;
struct vhost_async *async = vq->async;
uint64_t mapped_len;
uint32_t buf_offset = 0;
- void *h
p
a;
+ void *h
ost_iov
a;
while (cpy_len) {
while (cpy_len) {
- h
p
a = (void *)(uintptr_t)gpa_to_first_hpa(dev,
+ h
ost_iov
a = (void *)(uintptr_t)gpa_to_first_hpa(dev,
buf_iova + buf_offset, cpy_len, &mapped_len);
buf_iova + buf_offset, cpy_len, &mapped_len);
- if (unlikely(!hpa)) {
- VHOST_LOG_DATA(ERR, "(%s) %s: failed to get hpa.\n", dev->ifname, __func__);
+ if (unlikely(!host_iova)) {
+ VHOST_LOG_DATA(ERR, "(%s) %s: failed to get host iova.\n",
+ dev->ifname, __func__);
return -1;
}
if (unlikely(async_iter_add_iovec(dev, async,
(void *)(uintptr_t)rte_pktmbuf_iova_offset(m,
mbuf_offset),
return -1;
}
if (unlikely(async_iter_add_iovec(dev, async,
(void *)(uintptr_t)rte_pktmbuf_iova_offset(m,
mbuf_offset),
- h
p
a, (size_t)mapped_len)))
+ h
ost_iov
a, (size_t)mapped_len)))
return -1;
cpy_len -= (uint32_t)mapped_len;
return -1;
cpy_len -= (uint32_t)mapped_len;