Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
New upstream version 18.11-rc2
[deb_dpdk.git]
/
lib
/
librte_vhost
/
vdpa.c
diff --git
a/lib/librte_vhost/vdpa.c
b/lib/librte_vhost/vdpa.c
index
c2c5dff
..
e7d849e
100644
(file)
--- a/
lib/librte_vhost/vdpa.c
+++ b/
lib/librte_vhost/vdpa.c
@@
-63,6
+63,9
@@
rte_vdpa_register_device(struct rte_vdpa_dev_addr *addr,
break;
}
+ if (i == MAX_VHOST_DEVICE)
+ return -1;
+
sprintf(device_name, "vdpa-dev-%d", i);
dev = rte_zmalloc(device_name, sizeof(struct rte_vdpa_device),
RTE_CACHE_LINE_SIZE);