net: buf: Fix NET_BUF_USER_DATA_SIZE value for Bluetooth

For 32-bit architecture Bluetooth only requires 4 bytes for the user
data. There are places that store a pointer in it, so we need to make
an exception for 64-bit architecture. The code contains relevant build
asserts, so it's sufficient to set a conditional default in Kconfig
but let the range definition be simpler (unconditional).

Also simplify & fix the conditional defaults & ranges. E.g. separately
mentioning X86_64 is redundant since that option explicitly selects
the 64BIT option.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2019-11-26 20:56:45 +02:00 committed by Johan Hedberg
parent 39291fbbbe
commit 5cf540adb4

View file

@ -15,10 +15,9 @@ if NET_BUF
config NET_BUF_USER_DATA_SIZE
int "Size of user_data available in every network buffer"
default 8 if BT || (NET_TCP2 && (X86_64 || 64BIT))
default 8 if (BT || NET_TCP2) && 64BIT
default 4
range 8 65535 if BT
range 4 65535 if NET_TCP2
range 4 65535 if BT || NET_TCP2
range 0 65535
help
Amount of memory reserved in each network buffer for user data. In