aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2020-12-15 10:35:30 +0000
committerGitHub <noreply@github.com>2020-12-15 10:35:30 +0000
commit1e9ce657a5050d56d48ac702afb9116efc5691d3 (patch)
treefc81bb0a7eb607acca4681d5d027ac04ea0024c4 /lib
parent39a158b50590ca899e38d9c77a8508efcd0314ea (diff)
downloadlibvfio-user-1e9ce657a5050d56d48ac702afb9116efc5691d3.zip
libvfio-user-1e9ce657a5050d56d48ac702afb9116efc5691d3.tar.gz
libvfio-user-1e9ce657a5050d56d48ac702afb9116efc5691d3.tar.bz2
clean up the API header file (#197)
This is almost entirely re-ordering: first the basic lifecycle things, then vfu_setup_*() group, then handlers and helpers, and finally PCI handling. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/cap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/cap.c b/lib/cap.c
index 74f2d11..d58d7f1 100644
--- a/lib/cap.c
+++ b/lib/cap.c
@@ -40,6 +40,9 @@
#include "libvfio-user.h"
#include "cap.h"
+#define VFU_MAX_CAPS \
+ ((PCI_CFG_SPACE_SIZE - PCI_STD_HEADER_SIZEOF) / PCI_CAP_SIZEOF)
+
/*
* PCI capabilities are stored after the the PCI configuration space header
* (vfu_ctx->config_space), as they would in an actual PCI device. We also