1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

bump common subrepo and use new interface

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
Niklas Eiling 2022-12-02 11:53:40 +01:00
parent 905d28d1e4
commit 74ad0783f6
5 changed files with 12 additions and 13 deletions

@ -1 +1 @@
Subproject commit 98b9526deb23afc2d40c58e29d4d00b2408480db
Subproject commit 17d22ef5157c8d92d13bf975b1cd2e481de92e3a

View file

@ -35,7 +35,7 @@
#include <villas/memory.hpp>
#include <villas/kernel/pci.hpp>
#include <villas/kernel/vfio.hpp>
#include <villas/kernel/vfio_container.hpp>
#include <villas/fpga/config.h>
#include <villas/fpga/core.hpp>
@ -111,10 +111,10 @@ public: // TODO: make this private
std::shared_ptr<kernel::pci::Device> pdev; // PCI device handle
// The VFIO container that this card is part of
std::shared_ptr<kernel::vfio::Container> vfioContainer;
kernel::vfio::Container* vfioContainer;
// The VFIO device that represents this card
kernel::vfio::Device* vfioDevice;
std::shared_ptr<kernel::vfio::Device> vfioDevice;
// Slave address space ID to access the PCIe address space from the FPGA
MemoryManager::AddressSpaceId addrSpaceIdDeviceToHost;
@ -137,7 +137,7 @@ class PCIeCardFactory : public plugin::Plugin {
public:
static Card::List
make(json_t *json, std::shared_ptr<kernel::pci::DeviceList> pci, std::shared_ptr<kernel::vfio::Container> vc);
make(json_t *json, std::shared_ptr<kernel::pci::DeviceList> pci, kernel::vfio::Container* vc);
static PCIeCard*
create()

View file

@ -28,7 +28,7 @@
#include <villas/memory.hpp>
#include <villas/kernel/pci.hpp>
#include <villas/kernel/vfio.hpp>
#include <villas/kernel/vfio_container.hpp>
#include <villas/fpga/core.hpp>
#include <villas/fpga/card.hpp>
@ -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<kernel::pci::DeviceList> pci, std::shared_ptr<kernel::vfio::Container> vc)
PCIeCardFactory::make(json_t *json, std::shared_ptr<kernel::pci::DeviceList> pci, kernel::vfio::Container* vc)
{
PCIeCard::List cards;
auto logger = getStaticLogger();
@ -76,7 +76,7 @@ PCIeCardFactory::make(json_t *json, std::shared_ptr<kernel::pci::DeviceList> pci
// Populate generic properties
card->name = std::string(card_name);
card->vfioContainer = std::move(vc);
card->vfioContainer = vc;
card->affinity = affinity;
card->doReset = do_reset != 0;
card->polling = (polling != 0);
@ -225,11 +225,10 @@ PCIeCard::init()
logger->info("Initializing FPGA card {}", name);
// Attach PCIe card to VFIO container
kernel::vfio::Device &device = vfioContainer->attachDevice(*pdev);
this->vfioDevice = &device;
vfioDevice = vfioContainer->attachDevice(*pdev);
// Enable memory access and PCI bus mastering for DMA
if (not device.pciEnable()) {
if (not vfioDevice->pciEnable()) {
logger->error("Failed to enable PCI device");
return false;
}

View file

@ -73,7 +73,7 @@ fpga::setupFpgaCard(const std::string &configFile, const std::string &fpgaName)
{
pciDevices = std::make_shared<kernel::pci::DeviceList>();
auto vfioContainer = kernel::vfio::Container::create();
auto vfioContainer = kernel::vfio::Container::getInstance();
// Parse FPGA configuration
FILE* f = fopen(configFile.c_str(), "r");

View file

@ -56,7 +56,7 @@ static void init()
pciDevices = std::make_shared<kernel::pci::DeviceList>();
auto vfioContainer = kernel::vfio::Container::create();
auto vfioContainer = kernel::vfio::Container::getInstance();
// Parse FPGA configuration
char *fn = getenv("TEST_CONFIG");