Now that the stack uses the new API from net_pkt for pulling, no need
to keep the legacy one around.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Now that legacy net_pkt_clone function has been removed, the new
function can be renamed accordingly.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Now that the stack uses the new API from net_pkt for copying, no need
to keep the legacy one around.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Now that legacy net_pkt_clone function has been removed, the new
function can be renamed accordingly.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
And remove the parameter "full" as there is no "ll reserve" distinction
anymore. The parameter was unused since the ll reserve concept removal.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
It is now useless and can be replaced by net_udp_get_hdr() directly, in
the 2 unit tests it was used.
Removing as well the dbg function too_short_msg()
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Let's use the new API for these 2 functions. Note that in some places,
using these functions is under-optimized (like in llmnr-responder in
dns: it gets the ip/udp headers already from the recv callback. That
will need to be taken care of later).
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
net_pkt_tcp_data was only used in tcp unit test and could be replaced by
local net_tcp_get_hdr.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This function is only used in sockets, thus making it a private function
of socket library and renaming it relevantly.
Note that sockets should be reviewed at some point to avoid using such
function: zsock_received_cb() already get the ip header and the protocol
header, so it could grab the src addr/port from there. It would be way
more optimized to do so, since net_pkt_get_src_addr is costly as it
parses all over again the ip/protocol headers.
utils unit test is updated and the test of the former
net_pkt_get_src_addr/net_pkt_get_dst_addr are removed.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The test assumes that the last to IRQ number will be free, this isn't a
valid assumption and now that we detect multiple ISRs registering for
the some IRQ line, we see failures because of this assumption on some
platforms. Exclude those platforms from this test for the time being.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit adds specific stm32 CAN driver testing.
The test covers filter handling.
Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
Nios2 platform was disabled due to compilation error. Meanwhile,
issue has been solved and tests can be re-enabled.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
The SYS_POWER_LOW_POWER_STATE_SUPPORTED and SYS_POWER_LOW_POWER_STATE
suggests one low power state but these options control multiple
low power state. This commit uses plural in the names to indicate
that.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The following symbols don't exist so remove them from prj_virtual.conf:
CONFIG_I2C_EEPROM_SLAVE_0_CONTROLLER_DEV_NAME
CONFIG_I2C_EEPROM_SLAVE_1_CONTROLLER_DEV_NAME
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
HAS_COVERAGE_SUPPORT can be set both on boards with enough RAM to
store the coverage results, or for POSIX ARCH based ones
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Since this is a test dedicated to Intel S1000 CRB,
use the I2C0 device name directly instead of a Device Tree or
Kconfig defined device name.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
Update DMA tests according to dma_cavs implementation of
single block transfers. Multiple block transfers are achieved
by reloading DMA upon every DMA completion.
Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
The code has been using non DT_ prefixed defines for DT generated
defines. Switch to use DT_ prefixed ones as we want to deprecated
the non DT_ prefixed defines.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This patch adds a JSON web token library that adds the capability
to sign JSON tokens. This was located in subsys due to the dependency
on MBEDTLS, which resides in /ext.
Signed-off-by: David Brown <david.brown@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Add support to STM LIS2DW12 3-axis accelerometer driver.
The driver support I2C and SPI bus communication and both
polling and drdy trigger mode.
Co-authored-by: Mario Tesi <mario.tesi@st.com>
Signed-off-by: Armando Visconti <armando.visconti@st.com>
The new spinlock validation features combined with spinlockification
have increased stack usage a bit in CONFIG_ASSERT builds, but this is
a good feature we want to keep. This test was bumping into limits, so
increase the size from 512 to 640 bytes.
Unfortunately, this is also a huge test that creates a LOT of those
stacks across different test cases, so that minor bump blows us past
the 64k SRAM limit on a bunch of boards. So unify all those stacks
that are only ever used in one case at a time so the memory can be
shared. Now there's one fixed stack, named "tstack", and one array
"tstacks". Much smaller.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
These functions, for good design reason, take a locking key to
atomically release along with the context swtich. But there's still a
common pattern in code to do a switch unconditionally by passing
irq_lock() directly. On SMP that's a little hurtful as it spams the
global lock. Provide an _unlocked() variant for
_Swap/_reschedule/_pend_curr for simplicity and efficiency.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Just like with _Swap(), we need two variants of these utilities which
can atomically release a lock and context switch. The naming shifts
(for byte count reasons) to _reschedule/_pend_curr, and both have an
_irqlock variant which takes the traditional locking.
Just refactoring. No logic changes.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
We want a _Swap() variant that can atomically release/restore a
spinlock state in addition to the legacy irqlock. The function as it
was is now named "_Swap_irqlock()", while _Swap() now refers to a
spinlock and takes two arguments. The former will be going away once
existing users (not that many! Swap() is an internal API, and the
long port away from legacy irqlocking is going to be happening mostly
in drivers) are ported to spinlocks.
Obviously on uniprocessor setups, these produce identical code. But
SMP requires that the correct API be used to maintain the global lock.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This test seems to be fine in the current master, but doing
development, it easily starts to overflow RAM of some boards and/or
crash due to stack checks. So, decrease the ramdisk (the biggest
eater of RAM here) from default 96K to 80K, and bump main stack
size proactively.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Implemented tests for the new join and detach features.
- The first tests multiple join operations.
- The second tests trying to join a detached thread.
- The third tests abandoning a join when the thread is detached after
creation.
Signed-off-by: Carlos Stuart <carlosstuart1970@gmail.com>
This implements the Database Hash characteristic which generates a hash
with the contents of certain attributes. The generation of hash is
usually offloaded to the systemwq using a delayed work so that when
application register multiple services only one hash needs to be
calculated.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Patch introduces flash_map subsystem to operate on flash
image instead of direct operation using flash_driver API.
Changes allows to support operation on the image in any flash
device.
flash_map was not available when this subsystem was introduced.
Signed-off-by: Findlay Feng <i@fengch.me>
Patch introduces flash_map subsystem to operate on flash
footprint instead of direct operation using flash_driver API.
Flash area ID is used in API instead of direct flash-bank-offsets.
Changes allows to support operation on the partition in any flash
device.
flash_map was not available when this subsystem was introduced.
Signed-off-by: Findlay Feng <i@fengch.me>