aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/pmalloc.c
AgeCommit message (Collapse)AuthorFilesLines
2020-04-21vppinfra: bihash improvementsDave Barach1-23/+6
Template instances can allocate BIHASH_KVP_PER_PAGE data records tangent to the bucket, to remove a dependent read / prefetch. Template instances can ask for immediate memory allocation, to avoid several branches in the lookup path. Clean up l2 fib, gpb plugin codes: use clib_bihash_get_bucket(...) Use hugepages for bihash allocation arenas Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Damjan Marion <damarion@cisco.com> Change-Id: I92fc11bc58e48d84e2d61f44580916dd1c56361c
2019-11-22vppinfra: fix coverity issue 205691 in pmallocAndrew Yourtchenko1-0/+1
set the address to MMAP_FAILED if mmap has failed, so that we do not attempt to free it in the error handling path. Change-Id: I6e6b51a365fb68086dc20aa40a676a36af59a3ba Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
2019-11-07pmalloc: always lock pagesDamjan Marion1-25/+11
Type: feature Change-Id: I5bbf37969c9c51e40a013d1fc3ab966838eeb80d Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-03-18Fix build with newer linux headersDamjan Marion1-1/+2
Change-Id: Ibfdcec60567ec357205fa137257f2d8cba44b01c Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-02-27VPP-1576: fix Coverity issuesDave Barach1-1/+1
Change-Id: I8b59b2e1c0525abf4b0492e50a7af57df4cd3ce2 Signed-off-by: Dave Barach <dave@barachs.net>
2019-02-26Fix vpp crashing when attempting to run in kubernetes PodArtem Belov1-0/+21
mmap does not fail but writing to mapped memory is causing sigbus. Change-Id: I5135f32eede67fccb4aaa07a501cd262d254ed8d Signed-off-by: Artem Belov <artem.belov@xored.com>
2019-02-21physmem: keep physmem VA in 39-bit address space on x86_64Damjan Marion1-3/+9
Some x86 CPUs have IOMMU capable dealing only with 39-bit address space This patch also adds option to specify physmem base address from startup.conf Change-Id: I9e8abd26efb60e9c4ad54c035fb1751a4a61f4dc Signed-off-by: Damjan Marion <damarion@cisco.com>
2019-01-23pmalloc: don't iterate if there is no enough free spaceDamjan Marion1-0/+3
Change-Id: I975d46a82e9f884a9cd0ac2bd5f57181695f4124 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-28cmake: display warning and continue if dpdk not presentDamjan Marion1-4/+4
Change-Id: I5cb2619444507a159c42ac8401800e90b6541a20 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-11-27pmalloc: correct format_pmalloc_map u32 index overrun bugKingwel Xie1-4/+3
Change-Id: I95ba4eab6e2154ef33a479450b997c8317db3a92 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-11-15VPP-1474: fix 2x coverity warningsDave Barach1-1/+1
Change-Id: I441beaf3d7f57886580d7cce35ef592aa0fcca5f Signed-off-by: Dave Barach <dave@barachs.net>
2018-11-10pmalloc: u32 pp->index leads to va address overrunKingwel Xie1-1/+2
when pagesize is 1G, this pm->base + (pp->index << pm->def_log2_page_sz) would very soon overrun if creating multiple mempools add a (uword) to it Change-Id: If769b99d344cc3f547418a242a7497d044071615 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
2018-11-08physmem: Add physmem map supportMohsin Kazmi1-0/+21
This patch adds support for mapping the virtual address to physical address and size of memory allocated. Change-Id: I7659a1881308e89b215c486fecd7c973076d0773 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
2018-11-07pmalloc: fix shared mappingsDamjan Marion1-2/+4
Change-Id: I6782544d5ee0a66b1a027874b23574416093ca92 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-28physmem: coverity issuesDamjan Marion1-3/+4
Change-Id: I34cc55d8292a69fb451ed0031484994f51d3537a Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-25pmalloc: don't lock 4K pages if we don't have access to pagemapDamjan Marion1-6/+26
Without pagemap access only way to do DMA to physmem is by using IOMMU. In such case VFIO will take care for preventing paging of such memory so we don't need to lock here. Change-Id: Ica9c20659fba3ea3c96202eb5f7d29c43b313fa9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-25pmalloc: support for 4K pagesDamjan Marion1-56/+180
Change-Id: Iecceffe06a92660976ebb58cd3cbec4be8931db0 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-24vppinfra: autodetect default hugepage sizeDamjan Marion1-16/+2
Change-Id: I5ff713ad0b254c74c5622e3b9425cca365b5ee97 Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-23physmem coverity issuesDamjan Marion1-2/+3
Change-Id: Ie9ff9b751190632dfc4576e5cbb1987a4142af5e Signed-off-by: Damjan Marion <damarion@cisco.com>
2018-10-23Numa-aware, growable physical memory allocator (pmalloc)Damjan Marion1-0/+562
Change-Id: Ic4c46bc733afae8bf0d8146623ed15633928de30 Signed-off-by: Damjan Marion <damarion@cisco.com>