mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
feat: add parsing for ip-ignorelist
Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
This commit is contained in:
parent
ee83bb197b
commit
5e23100df9
2 changed files with 10 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include <villas/fpga/core.hpp>
|
||||
#include <villas/kernel/vfio_container.hpp>
|
||||
|
@ -36,6 +37,7 @@ public:
|
|||
MemoryManager::AddressSpaceId addrSpaceIdHostToDevice;
|
||||
|
||||
std::list<std::shared_ptr<ip::Core>> ips;
|
||||
std::list<std::string> ignored_ip_names;
|
||||
|
||||
virtual ~Card();
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ PCIeCardFactory::make(json_t *json_card, std::string card_name,
|
|||
int do_reset = 0;
|
||||
int affinity = 0;
|
||||
int polling = 0;
|
||||
json_t *ignored_ips_array = nullptr;
|
||||
|
||||
json_error_t err;
|
||||
int ret = json_unpack_ex(
|
||||
|
@ -63,6 +64,13 @@ PCIeCardFactory::make(json_t *json_card, std::string card_name,
|
|||
card->doReset = do_reset != 0;
|
||||
card->polling = (polling != 0);
|
||||
|
||||
// Parse ignored ip names to list
|
||||
size_t index;
|
||||
json_t *value;
|
||||
json_array_foreach(ignored_ips_array, index, value) {
|
||||
card->ignored_ip_names.push_back(json_string_value(value));
|
||||
}
|
||||
|
||||
kernel::devices::PciDevice filter = defaultFilter;
|
||||
|
||||
if (pci_id)
|
||||
|
|
Loading…
Add table
Reference in a new issue