From 0cdf7d25b54b26ab4078df956b0b5cdc4dc31b57 Mon Sep 17 00:00:00 2001 From: John Levon Date: Fri, 23 Apr 2021 10:18:33 +0100 Subject: reduce VFU_MAX_CAPS (#449) Our current value of VFU_MAX_CAPS leads to a vfu_ctx_t that is way too large. Reduce the value such that the vfu_ctx_t is under 8KB. Fixes #446. Signed-off-by: John Levon Reviewed-by: Swapnil Ingle --- lib/pci_caps.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pci_caps.h b/lib/pci_caps.h index cd72f56..4bef85d 100644 --- a/lib/pci_caps.h +++ b/lib/pci_caps.h @@ -36,10 +36,10 @@ #include "libvfio-user.h" /* - * This is an arbitrary value, but more than enough for max caps in extended - * config space. + * This is an arbitrary value we presume is enough: as we statically allocate + * based on this in struct vfu_ctx, we don't want it to get too big. */ -#define VFU_MAX_CAPS (1024) +#define VFU_MAX_CAPS (128) struct pci_cap; -- cgit v1.1