aboutsummaryrefslogtreecommitdiff
path: root/include/odp/api/spec/shared_memory.h
AgeCommit message (Collapse)Author
2023-02-07api: shm: remove deprecated ODP_SHM_SW_ONLY defineMatias Elo
Remove deprecated ODP_SHM_SW_ONLY define. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2022-11-30api: shm: memory sharebility with no flagsPetri Savolainen
Define odp_shm_reserve() operation with the default options (no flags). Also, remove unnecessary promise of odp_shm_info() call handling correctly any random SHM handle value. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Harman Kalra <hkalra@marvell.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-11-30api: shm: add segment infoPetri Savolainen
Added odp_shm_segment_info() which can be used to retrieve information of each memory segment of an SHM block. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Harman Kalra <hkalra@marvell.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
2022-04-13api: shm: change type of max_blocks to uint32_tPetri Savolainen
Changed type of max_blocks capability from 'unsigned int' to uint32_t. In practice, those types have the same properties, but uint32_t is well-defined where as 'unsigned int' definition as somewhat ambiguous. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-12-08api: shm: add ODP_SHM_NO_HP flagMatias Elo
This flag can be used to prevent the ODP implementation from allocating the reserved shared memory block from huge pages. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2021-12-08api: shm: add capability for supported shared memory flagsMatias Elo
Add a bit mask capability odp_shm_capability_t.flags for ODP_SHM_* flags. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
2020-05-15api: shm: add ODP_SHM_HW_ACCESS flagPetri Savolainen
This can be used to memory allocations where both CPUs and HW accelerators access the same memory area. These HW accelerators may be programmed outside of ODP APIs, but the memory is reserved and shared normally inside/between ODP applications. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
2020-04-07api: improve doxygen module descriptionPetri Savolainen
The first line after @defgroup tag shows up in doxygen module summary page. Add missing descriptions and improve current ones. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
2019-10-30api: clean up coding style warningsPetri Savolainen
Clean checkpatch warnings on include/odp/api/spec files. Current checkpatch version warns about 'unsigned' type name usage. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Stanislaw Kardach <skardach@marvell.com>
2019-03-18api: shm: add ODP_SHM_HP flagMatias Elo
When set, this flag guarantees that the memory reserved by odp_shm_reserve() is allocated from huge pages. If enough huge page memory is not available the call will fail. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
2019-02-04api: spec: correct coding style issuesPetri Savolainen
Clean checkpatch warnings that do not affect API signatures in all api/spec header files. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-11-28api: shm: remove unused ODP_SHM_NULL defineMatias Elo
ODP_SHM_INVALID should be used instead. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2018-02-26update Linaro Copyrights to 2018 yearMaxim Uvarov
Using simple commands: find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9]), Linaro/ \1-2018, Linaro/g' {} + find . -not -path .git -type f -exec \ sed -i -E 's/ (201[0-9])(-201[0-9]), Linaro/ \1-2018, Linaro/g' {} + Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
2018-01-18include: change spec guarding define from ODP_API to ODP_API_SPECDmitry Eremin-Solenikov
Change defines guarding inclusion of ODP API spec files from ODP_API_FOO to ODP_API_SPEC_FOO, as they are placed in odp/api/spec/foo.h path. Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-12-27api: shm: name is optionalPetri Savolainen
Align shared memory name parameter specification with other APIs. Name is optional and does not need to be unique, except when it's used for lookups. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-12-27api: shm: print shm block infoPetri Savolainen
Added function to print debugging information about the specified shared memory block. Info is implementation defined but should include information about allocated memory addresses, pages, etc. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-12-27api: shm: style clean upPetri Savolainen
Clean up shm header file. Remove [in] Doxygen tags as function parameters are by default input. Move @note text to the main text block, as it's usual API specification text. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-12api: move ODP_*_NAME_LEN definitions from API to implementationMatias Elo
Enables the implementations to choose the define values. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-12api: unify ODP_*_NAME_LEN specificationsMatias Elo
Unify name length definitions to always include terminating null character. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-12api: shm: add flags to shm_reserve and function to find external memChristophe Milard
The ODP_SHM_SINGLE_VA flag is created: when set (at odp_shm_reserve()), this flag guarantees that all ODP threads sharing this memory block will see the block at the same address (regadless of ODP thread type -pthread vs process- or fork time) The flag ODP_SHM_EXPORT is added: when passed at odp_shm_reserve() time the memory block becomes visible to other ODP instances. The function odp_shm_import() is added: this function enables to reserve block of memories exported by other ODP instances (using the ODP_SHM_EXPORT flag). Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2017-01-12linux-generic: moving the visibility files one step upChristophe Milard
include/odp/api/visibility_begin.h and include/odp/api/visibility_end.h move one step up (in include/odp/) and can therefore be used on other interfaces. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-04-27api: shm: replaced config api with capability structurePetri Savolainen
Added capability structure and replaced the config API definition (odp_config_shm_blocks()) with it. Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-04-20api: make only the API visibleAnders Roxell
Internal functions should not be part of symbols that are visible outside the library. Using -fvisibility=hidden hides all internal functions from the public ABI. Suggested-by: Ricardo Salveti <ricardo.salveti@linaro.org> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-04-15Revert "api: make only the API visible"Maxim Uvarov
Patch is not ready to be included. This reverts commit f562a886695fc8eb3832f4e7a13d4bff80db529a. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-04-15api: make only the API visibleAnders Roxell
Internal functions should not be part of symbols that are visible outside the library. Using -fvisibility=hidden hides all internal functions from the public ABI. Suggested-by: Ricardo Salveti <ricardo.salveti@linaro.org> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
2016-02-11api and linux-generic: make room for new apiChristophe Milard
This is about making the current structure clearer so that other interfaces can be added to ODP: The ODP API specification (platform agnostic) is moved from include/odp/api to include/odp/api/spec. The ODP API platform definition (for linux generic) is moved from platform/linux-generic/include/odp to platform/linux-generic/include/odp/api Include statements are adjusted accordinaly. This patch has been done by a script which is given with the cover-letter of this patch series. Signed-off-by: Christophe Milard <christophe.milard@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>