mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-27 14:35:21 +00:00
We need to have a generic buffer API in order to efficiently transfer data between different subsystems. The first such case will be the Networking and Bluetooth subsystems where 6LoWPAN data will be passed back and forth. The needed API needs to provide enough flexibility for different buffer sizes as well as custom protocol-specific context data. The implementation offered in this patch follows the general design of the existing Networking and Bluetooth buffer implementations by using a backing array of buffer which is fed into a "free buffers" FIFO for management. The main difference is that the API allows specifying variable sized buffers for each created pool, as well as a minimum amount of "user data" that's allocated as part of each buffer. There's also an optional destroy callback that's e.g. useful for HCI flow control in Bluetooth (for notifying the controller of available buffers). Change-Id: I00b7007135a0ff35219f38f48658f31728fbb7ca Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
40 lines
1012 B
Plaintext
40 lines
1012 B
Plaintext
# Kconfig - net stack configuration options
|
|
|
|
#
|
|
# Copyright (c) 2015 Intel Corporation
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
menu "Networking"
|
|
|
|
source "net/bluetooth/Kconfig"
|
|
|
|
source "net/ip/Kconfig"
|
|
|
|
config NET_BUF
|
|
bool "Network buffer support"
|
|
default n
|
|
help
|
|
This option enebles support for generic network protocol
|
|
buffers.
|
|
|
|
config NET_BUF_DEBUG
|
|
bool "Network buffer debugging"
|
|
depends on NET_BUF
|
|
default n
|
|
help
|
|
Enable debug logs and checks for the generic network buffers.
|
|
|
|
endmenu
|