From 1fecb66fb3348f209471dbcf4e91bf5cbdfee8bf Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Mon, 5 Dec 2022 09:31:37 +0100 Subject: [PATCH] bump common subrepo and use shared pointers for vfio::Container Signed-off-by: Niklas Eiling --- fpga/common | 2 +- fpga/include/villas/fpga/card.hpp | 4 ++-- fpga/lib/card.cpp | 2 +- fpga/lib/fpgaHelper.cpp | 2 +- fpga/tests/unit/fpga.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fpga/common b/fpga/common index 8dcf83bf0..1912f2106 160000 --- a/fpga/common +++ b/fpga/common @@ -1 +1 @@ -Subproject commit 8dcf83bf0fbc258bb54db2434df796255119213f +Subproject commit 1912f2106453cea3a20358942ad7f360b2129bc3 diff --git a/fpga/include/villas/fpga/card.hpp b/fpga/include/villas/fpga/card.hpp index 4b0148d30..d9574a7f8 100644 --- a/fpga/include/villas/fpga/card.hpp +++ b/fpga/include/villas/fpga/card.hpp @@ -111,7 +111,7 @@ public: // TODO: make this private std::shared_ptr pdev; // PCI device handle // The VFIO container that this card is part of - kernel::vfio::Container* vfioContainer; + std::shared_ptr vfioContainer; // The VFIO device that represents this card std::shared_ptr vfioDevice; @@ -137,7 +137,7 @@ class PCIeCardFactory : public plugin::Plugin { public: static Card::List - make(json_t *json, std::shared_ptr pci, kernel::vfio::Container* vc); + make(json_t *json, std::shared_ptr pci, std::shared_ptr vc); static PCIeCard* create() diff --git a/fpga/lib/card.cpp b/fpga/lib/card.cpp index 1d566c3cb..39766629a 100644 --- a/fpga/lib/card.cpp +++ b/fpga/lib/card.cpp @@ -42,7 +42,7 @@ static PCIeCardFactory villas::fpga::PCIeCardFactory; static const kernel::pci::Device defaultFilter((kernel::pci::Id(FPGA_PCI_VID_XILINX, FPGA_PCI_PID_VFPGA))); PCIeCard::List -PCIeCardFactory::make(json_t *json, std::shared_ptr pci, kernel::vfio::Container* vc) +PCIeCardFactory::make(json_t *json, std::shared_ptr pci, std::shared_ptr vc) { PCIeCard::List cards; auto logger = getStaticLogger(); diff --git a/fpga/lib/fpgaHelper.cpp b/fpga/lib/fpgaHelper.cpp index 0e5a80646..d255bcc71 100644 --- a/fpga/lib/fpgaHelper.cpp +++ b/fpga/lib/fpgaHelper.cpp @@ -73,7 +73,7 @@ fpga::setupFpgaCard(const std::string &configFile, const std::string &fpgaName) { pciDevices = std::make_shared(); - auto vfioContainer = kernel::vfio::Container::getInstance(); + auto vfioContainer = std::make_shared(); // Parse FPGA configuration FILE* f = fopen(configFile.c_str(), "r"); diff --git a/fpga/tests/unit/fpga.cpp b/fpga/tests/unit/fpga.cpp index 6263a8577..c0fcd54b4 100644 --- a/fpga/tests/unit/fpga.cpp +++ b/fpga/tests/unit/fpga.cpp @@ -56,7 +56,7 @@ static void init() pciDevices = std::make_shared(); - auto vfioContainer = kernel::vfio::Container::getInstance(); + auto vfioContainer = std::make_shared(); // Parse FPGA configuration char *fn = getenv("TEST_CONFIG");