diff --git a/common b/common index 3e062fdc0..b8778630e 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 3e062fdc0f311d9eb4bc541b7a292def71f87cb0 +Subproject commit b8778630eae7caf7af8ceef27f201639b095ead3 diff --git a/lib/memory/mmap.cpp b/lib/memory/mmap.cpp index 42f12df57..40f89d919 100644 --- a/lib/memory/mmap.cpp +++ b/lib/memory/mmap.cpp @@ -74,7 +74,13 @@ int memory_mmap_init(int hugepages) if (getuid() == 0) { ret = kernel::setNrHugepages(hugepages); if (ret) { - logger->warn("Failed to increase number of reserved hugepages"); + logger->warn("Failed to increase number of reserved hugepages. Falling back to standard mmap() allocator."); + + if (isContainer()) { + logger->warn("Please run the container in the privileged mode:"); + logger->warn(" $ docker run --privileged ..."); + } + memory_default = &memory_mmap; } else { diff --git a/lib/node.cpp b/lib/node.cpp index e2db0df5f..d65e68f06 100644 --- a/lib/node.cpp +++ b/lib/node.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -181,7 +182,7 @@ int node_parse(struct vnode *n, json_t *json, const uuid_t sn_uuid) } else /* Generate UUID from hashed config including node name */ - uuid_generate_from_json(n->uuid, json, sn_uuid); + uuid::generateFromJson(n->uuid, json, sn_uuid); if (json_netem) { #ifdef WITH_NETEM diff --git a/lib/nodes/signal_generator.cpp b/lib/nodes/signal_generator.cpp index ef6bc4acf..5eff67207 100644 --- a/lib/nodes/signal_generator.cpp +++ b/lib/nodes/signal_generator.cpp @@ -379,7 +379,7 @@ int signal_generator_read(struct vnode *n, struct sample * const smps[], unsigne break; case signal_generator::SignalType::RANDOM: - s->last[i] += box_muller(0, s->stddev[i]); + s->last[i] += boxMuller(0, s->stddev[i]); t->data[i].f = s->last[i]; break; diff --git a/lib/path.cpp b/lib/path.cpp index 42e944454..eef01e2fd 100644 --- a/lib/path.cpp +++ b/lib/path.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -50,7 +51,6 @@ using namespace villas; using namespace villas::node; -using namespace villas::utils; /** Main thread function per path: * read samples from source -> write samples to destinations @@ -441,7 +441,7 @@ int path_parse(struct vpath *p, json_t *json, NodeList &nodes, const uuid_t sn_u } else /* Generate UUID from hashed config */ - uuid_generate_from_json(p->uuid, json, sn_uuid); + uuid::generateFromJson(p->uuid, json, sn_uuid); /* Input node(s) */ ret = mapping_list_parse(&p->mappings, json_in); diff --git a/lib/super_node.cpp b/lib/super_node.cpp index c055aac47..cf1d956e7 100644 --- a/lib/super_node.cpp +++ b/lib/super_node.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -46,7 +46,6 @@ using namespace villas; using namespace villas::node; -using namespace villas::utils; typedef char uuid_string_t[37]; @@ -78,7 +77,7 @@ SuperNode::SuperNode() : throw SystemError("Failed to determine hostname"); /* Default UUID is derived from hostname */ - uuid_generate_from_str(uuid, hname); + uuid::generateFromString(uuid, hname); #ifdef WITH_NETEM kernel::nl::init(); /* Fill link cache */ diff --git a/src/villas-relay.cpp b/src/villas-relay.cpp index 9f80fe1c8..41b352595 100644 --- a/src/villas-relay.cpp +++ b/src/villas-relay.cpp @@ -36,13 +36,13 @@ #include #include #include -#include +#include #include "villas-relay.hpp" typedef char uuid_string_t[37]; -using namespace villas::utils; +using namespace villas; namespace villas { namespace node { @@ -61,7 +61,7 @@ RelaySession::RelaySession(Relay *r, Identifier sid) : created = time(nullptr); - uuid_generate_from_str(uuid, identifier, r->uuid); + uuid::generateFromString(uuid, identifier, r->uuid); } RelaySession::~RelaySession() @@ -236,7 +236,7 @@ Relay::Relay(int argc, char *argv[]) : hostname = hname; /* Default UUID is derived from hostname */ - uuid_generate_from_str(uuid, hname); + uuid::generateFromString(uuid, hname); ret = memory_init(0); if (ret)