The icmsg and icmsg_me backends has limitations in context of concurrent access to single instance. Some limitations are: * sending by more thread at the same time may cause -EBUSY * allocating TX buffer will cause errors in other threads that want to allocate before first thread sent the message, * during no-copy receive, when RX buffer is on hold receiving is totally blocked. This backend resolves those limitations by adding dynamically allocated buffers on shared memory next to ICmsg circular buffer. The data is passed using those buffers, so concurrency is not a problem. The ICmsg is used only to pass short 2-byte messages containing references to those buffers. The backend also supports multiple endpoint. The ipc/icmsg_me sample was modified to support this backend. Signed-off-by: Dominik Kilian <Dominik.Kilian@nordicsemi.no>
32 lines
1009 B
Plaintext
32 lines
1009 B
Plaintext
# Copyright (c) 2023 Nordic Semiconductor ASA
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
menuconfig IPC_SERVICE_BACKEND_ICBMSG
|
|
bool "ICMSG backend with dynamically allocated buffers"
|
|
default y
|
|
depends on MBOX
|
|
depends on DT_HAS_ZEPHYR_IPC_ICBMSG_ENABLED
|
|
select IPC_SERVICE_ICMSG
|
|
help
|
|
Choosing this backend results in multi endpoint implementation based
|
|
on dynamically allocated buffers. References to them are send over
|
|
ICMsg circular buffer.
|
|
|
|
if IPC_SERVICE_BACKEND_ICBMSG
|
|
|
|
config IPC_SERVICE_BACKEND_ICBMSG_NUM_EP
|
|
int "Endpoints count"
|
|
range 1 254
|
|
default 4
|
|
help
|
|
Number of endpoints supported by the ICBMsg IPC service
|
|
backend. The number of endpoints are applied to all the instances,
|
|
so this value should be maximum number among all the instances.
|
|
|
|
module = IPC_SERVICE_BACKEND_ICBMSG
|
|
module-str = ICMSG backend with separate buffers
|
|
module-help = Sets log level for ICMsg backend with buffers
|
|
source "subsys/logging/Kconfig.template.log_config"
|
|
|
|
endif # IPC_SERVICE_BACKEND_ICBMSG
|