lib/vmd: Moved MAX_VMD_TARGET definition to public header

MAX_VMD_TARGET defines size of array that need to be passed
to spdk_vmd_pci_device_list()

Change-Id: Ib2a33fe50072036e6a8f1709ac4e3ee82c1bb3f1
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456480
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
Wojciech Malikowski 2019-05-31 09:15:37 -04:00 committed by Jim Harris
parent d3a0531bc1
commit f97809e3cb
2 changed files with 4 additions and 3 deletions

View File

@ -47,6 +47,9 @@ extern "C" {
#include "spdk/config.h"
#include "spdk/env.h"
/* Maximum VMD devices - up to 6 per cpu */
#define MAX_VMD_TARGET 24
/*
* Takes an input VMD D-BDF, probes it and attaches to it. The resulting vmd
* adapter is placed in a vmd container. If input BDF is NULL, then all VMD
@ -62,7 +65,7 @@ int spdk_vmd_probe(struct spdk_pci_addr *vmd_bdf);
* Returns a list of nvme devices found on the given vmd pci BDF.
*
* \param vmd_addr pci BDF of the vmd device to return end device list
* \param nvme_list buffer of up to MAX_VMD_TARGET to return spdk_pci_device array.
* \param nvme_list buffer of exactly MAX_VMD_TARGET to return spdk_pci_device array.
*
* \return Returns count of nvme device attached to input VMD.
*/

View File

@ -36,8 +36,6 @@
#define VMD_SPEC_H
#define MAX_VMD_SUPPORTED 48 /* max number of vmd controllers in a system - */
/* up to 6 per cpu */
#define MAX_VMD_TARGET 24
#define VMD_DOMAIN_START 0x201D
#define PCI_INVALID_VENDORID 0xFFFF