summaryrefslogtreecommitdiffstats
path: root/src/svm/svm_common.h
AgeCommit message (Collapse)AuthorFilesLines
2019-01-02Fixes for buliding for 32bit targets:David Johnson1-1/+11
* u32/u64/uword mismatches * pointer-to-int fixes * printf formatting issues * issues with incorrect "ULL" and related suffixes * structure alignment and padding issues Change-Id: I70b989007758755fe8211c074f651150680f60b4 Signed-off-by: David Johnson <davijoh3@cisco.com>
2018-02-02vlmemory/svm: fix client detach from svm regionFlorin Coras1-0/+2
Clients cannot know at svm region detach time if the shm backing files have been recreated (e.g., if vpp restarts) and therefore should not try to unlink them. Otherwise, terminating clients attached to previous instantiations of a re-allocated region end up making the new instance un-mappable by removing its backing file. Change-Id: Idcd0cab776e63fd75b821bc9f0fac58217b9ccbe Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-01-10svm: calc base address on AArch64 based on autodetected VA space sizeDamjan Marion1-7/+1
Change-Id: I7487eb74b8deebff849d662b55a6708566ccd9ef Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-11-10Map SVM regions at a sane offset on arm64Brian Brooks1-1/+7
Mapping shared virtual memory at 0x30000000, which appears to be derived from x86-32, turns out to be too close to the heap on arm64 systems. The symptoms of memory corruption were random and included crashes in the Python runtime and what appeared to be corruption of malloc's internal mutex. Thanks to Gabriel Ganne for pointing out that disabling ASLR seemed to mitigate the situation. This patch maps SVM regions at an offset from the arm64 kernel constant TASK_UNMAPPED_BASE and also assumes a 48-bit VA (for Ubuntu). Change-Id: I642e5fe83344ab9b5c66c93e0cf1575c17251f3b Signed-off-by: Brian Brooks <brian.brooks@arm.com>
2017-10-03Repair vlib API socket serverDave Barach1-0/+2
- Teach vpp_api_test to send/receive API messages over sockets - Add memfd-based shared memory - Add api messages to create memfd-based shared memory segments - vpp_api_test supports both socket and shared memory segment connections - vpp_api_test pivot from socket to shared memory API messaging - add socket client support to libvlibclient.so - dead client reaper sends ping messages, container-friendly - dead client reaper falls back to kill (<pid>, 0) live checking if e.g. a python app goes silent for tens of seconds - handle ping messages in python client support code - teach show api ring about pairwise shared-memory segments - fix ip probing of already resolved destinations (VPP-998) We'll need this work to implement proper host-stack client isolation Change-Id: Ic23b65f75c854d0393d9a2e9d6b122a9551be769 Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Signed-off-by: Florin Coras <fcoras@cisco.com>
2017-09-06Set uid/gid on ssvm segment file.Dave Wallace1-0/+2
Change-Id: I482bb9654f4dfe240bace5c2b61056cfd04cf018 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
2017-08-18API: More gracefully fail when opening shared memory segment fails.Ole Troan1-1/+1
API clients would fail with an ASSERT (and core dump) whenever the API shared memory segment could not be opened. This returns an error value to the client's connect instead. Change-Id: Id122a3a090b24b139c382ae09f341bde61fd2540 Signed-off-by: Ole Troan <ot@cisco.com>
2017-07-01Refactor API message handling codeKlement Sekera1-0/+133
This is preparation for new C API. Moving common stuff to separate headers reduces dependency issues. Change-Id: Ie7adb23398de72448e5eba6c1c1da4e1bc678725 Signed-off-by: Klement Sekera <ksekera@cisco.com>