summaryrefslogtreecommitdiffstats
path: root/src/vnet/dev
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2023-11-29 12:32:54 +0000
committerDamjan Marion <damarion@cisco.com>2023-11-29 12:35:06 +0000
commit32c00ce79a9618ae1123fdd1a83084a90cc9ae97 (patch)
tree883c7eff8eaf29ace09489e1b22a85e0b5587e9e /src/vnet/dev
parente32580caa86ee7153e775c5c36f721f1fd2067ff (diff)
pci: fix MSI-X vector length check
Type: fix Fixes: 38c6191 Change-Id: I7760947986dc56236f2494fb1c8c238321489ef6 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/dev')
-rw-r--r--src/vnet/dev/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/dev/pci.c b/src/vnet/dev/pci.c
index d35c5f9824f..3cc0cba5003 100644
--- a/src/vnet/dev/pci.c
+++ b/src/vnet/dev/pci.c
@@ -284,7 +284,7 @@ vnet_dev_pci_msix_handler (vlib_main_t *vm, vlib_pci_dev_handle_t h, u16 line)
vnet_dev_t *dev = (vnet_dev_t *) vlib_pci_get_private_data (vm, h);
vnet_dev_bus_pci_device_data_t *pdd = vnet_dev_get_bus_pci_device_data (dev);
- if (line < vec_len (pdd->msix_handlers) && pdd->msix_handlers[line])
+ if (line < pdd->n_msix_int && pdd->msix_handlers[line])
pdd->msix_handlers[line](vm, dev, line);
}