aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-09-01 18:18:48 +0200
committerMohsin Kazmi <sykazmi@cisco.com>2020-09-01 18:18:48 +0200
commit0a507d7cd5b0527af7ab971b80306a0d127ebb7c (patch)
tree3847bbfa8505b6b191794ef2e238931ff1440de7 /src
parentc79d7353626f530de8bae436883622255e4ef9b2 (diff)
virtio: fix the bar starting index
Type: fix Change-Id: Ia28161b583ea26ab820a494332a79b64add7004d Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/devices/virtio/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/devices/virtio/pci.c b/src/vnet/devices/virtio/pci.c
index 307e73bea2e..6c6edbc3836 100644
--- a/src/vnet/devices/virtio/pci.c
+++ b/src/vnet/devices/virtio/pci.c
@@ -729,7 +729,7 @@ virtio_pci_read_caps (vlib_main_t * vm, virtio_if_t * vif, void **bar)
"[%4x] cfg type: %u, bar: %u, offset: %04x, len: %u",
pos, cap.cfg_type, cap.bar, cap.offset, cap.length);
- if (cap.bar >= 1 && cap.bar <= 5)
+ if (cap.bar >= 0 && cap.bar <= 5)
{
vif->bar = bar[cap.bar];
vif->bar_id = cap.bar;