-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nrf noup] ci: fix suit-dfu-test entries in test-spec #2024
Open
kszromek-nordic
wants to merge
698
commits into
nrfconnect:main
Choose a base branch
from
kszromek-nordic:fix/dfu_test_spec
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[nrf noup] ci: fix suit-dfu-test entries in test-spec #2024
kszromek-nordic
wants to merge
698
commits into
nrfconnect:main
from
kszromek-nordic:fix/dfu_test_spec
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…en out of tree Nordic devices are commonly used with the nRF Connect SDK. There the SoftDevice Controller is set as the default Bluetooth Controller. To avoid confusion when reading DTS and Kconfig files, clarify this by adding a note. Signed-off-by: Rubin Gerritsen <[email protected]> (cherry picked from commit 768c45a)
…dedicated place Some vendor specific setup was done inside the open() HCI function, those should be inside setup() function instead. Signed-off-by: Yassine El Aissaoui <[email protected]> (cherry picked from commit 5c308e0)
- used to define hci info Signed-off-by: Yassine EL -AISSAOUI <[email protected]> (cherry picked from commit 39e126d)
Convert the hci_nxp.c HCI driver to use the new HCI driver API. Also move the driver binding under dts/bindings/bluetooth, like all other HCI driver bindings. Signed-off-by: Johan Hedberg <[email protected]> (cherry picked from commit fcddefd)
Added NXP_FW_LOADER for NXP platforms. Added NXP_RF_IMU for NXP platforms. Added MONOLITHIC Flags for NXP platforms. Signed-off-by: Axel Le Bourhis <[email protected]> (cherry picked from commit 6ffbcd4)
The nRF54H20 supports a Bluetooth controller. The HCI driver interface has changed upstream in zephyrproject-rtos/zephyr#72323 so now we need to add it to device tree. Signed-off-by: Rubin Gerritsen <[email protected]>
Add a mbox VEVIF nodes to be used for communicating FLPR -> APP. Signed-off-by: Jakub Zymelka <[email protected]> (cherry picked from commit c7b3651)
The BR Keys cannot be scanned by function bt_foreach_bond. Add function bt_foreach_bond_br for br. The function bt_foreach_bond_br will be called by bt_foreach_bond if the BR is enabled. Signed-off-by: Lyle Zhu <[email protected]> (cherry picked from commit 2d665c1)
…so_reset The bt_iso_chan_disconnected function will attempt to remote ISO data paths as the central. Signed-off-by: Emil Gydesen <[email protected]> (cherry picked from commit f5fd2cf)
`bt_conn_send_cb` used to allocate a TX context (K_FOREVER). Instead, we now put the context in the userdata of the buffer. This means that now this fn will never block and always succeed since the tx_queue is a FIFO (infinite size). It just puts the buf on the queue. The metadata is stored safely in there until we have acquired all the necessary resources to send it to the controller without failing: TX context and controller buffer. I.e. when `bt_conn_process_tx` is called, that's when a TX context is try-allocated and the contents of `buf->userdata` is moved into it. The buffer is now ready to be sent to the lower layer. `bt_conn_process_tx` will return -EWOULDBLOCK if it's not able to acquire a TX context, this PR modifies `bt_conn_prepare_events` to respond to this by also waiting on the TX context pool. Unfortunately, this increases the required userdata size for any buffers handed to `bt_conn_send_cb`. This will be fixed in a later commit. Signed-off-by: Aleksander Wasaznik <[email protected]> (cherry picked from commit 52dc64f)
Instead of allocating segments/fragments and copying data into them, we allocate segments as "views" (or slices) into the original buffer. The view also gives access to the headroom of the original buffer, allowing lower layers to push their headers. We choose not to allow multiple views into the same buffer as the headroom of a view would overlap with the data of the previous view. We mark a buffer as locked (or "in-view") by temporarily setting its headroom to zero. This effectively stops create_view because the requested headroom is not available. Each layer that does some kind of fragmentation and wants to use views for that needs to maintain a buffer pool (bufsize 0, count = max views) and a metadata array (size = max views) for the view mechanism to work. Maximum number of views: number of parallel buffers from the upper layer, e.g. number of L2CAP channels for L2CAP segmentation or number of ACL connections for HCI fragmentation. Reason for the change: 1. prevent deadlocks or (ATT/SMP) requests timing out 2. save time (zero-copy) 3. save memory (gets rid of frag pools) L2CAP CoC: would either allocate from the `alloc_seg` application callback, or worse _steal_ from the same pool, or allocate from the global ACL pool. Conn/HCI: would either allocate from `frag_pool` or the global ACL pool. Signed-off-by: Jonathan Rico <[email protected]> Co-authored-by: Aleksander Wasaznik <[email protected]> (cherry picked from commit 1c8cae3)
…_send_cb" This reverts commit 178b807. Signed-off-by: Rubin Gerritsen <[email protected]>
The current TX pattern in the host is to try to push a buffer through all the layers up until it is ingested by the controller. Since sending can fail at any layer, we need error-handling and separate retry logic on pretty much all layers. That logic obscures the "happy path" for people trying ot understand the code. This commit inverts the control, in a way that doesn't require changing the host or HCI driver API (yet): Layers don't send buffers synchronously, they instead put their buffer in a private queue of their own and raise a TX flag on the lower layer. Think of it as a `READY` interrupt line that has to be serviced by the lower layer. Sending is now non-blocking, rate depends on the size of buffer pools. There is a single TX processing function. This can be thought as the Interrupt Service Routine that will handle the `READY` interrupt from the layers above. That `tx_processor()` will then attempt to allocate enough resources in order to send the buffer through to the controller. This allocation logic does not block. After acquiring all the resources, the TX processor will attempt to pull data from the upper layer. The upper layer has to figure out which buffer to pass to the controller. This is a good spot to put scheduling or QoS logic in the upper layer. Notes: - user-facing API for tuning QoS will be implemented in a future patch - this scheme could (and probably will) be extended to upper layers (e.g. ATT, L2CAP CoC segmentation). - this patch removes the `pending_no_cb()` memory optimization for clarity/correctness. It might get re-implemented after a stabilization period. Hopefully with more documentation. Signed-off-by: Jonathan Rico <[email protected]> Co-authored-by: Aleksander Wasaznik <[email protected]> (cherry picked from commit 28535fe)
… TX is done" This reverts commit d74e0b5. Signed-off-by: Rubin Gerritsen <[email protected]>
This API replaces `bt_l2cap_send()` and `bt_l2cap_send_cb()`. The difference is that it takes the `struct bt_l2cap_le_chan` object directly instead of a connection + CID. We need the channel object in order to put the PDU on the TX queue. It is inefficient to do a search for every PDU when the caller knows the channel object's address and can just pass it down. Signed-off-by: Jonathan Rico <[email protected]> (cherry picked from commit 38820ef)
We don't need it thanks to the new TX architecture. Signed-off-by: Jonathan Rico <[email protected]> (cherry picked from commit 48d1cff)
We don't need the TX thread anymore. Generalizing the pull-based architecture (ie. `tx_processor`) to HCI commands makes it possible to run the whole TX path from the the system workqueue, or any workqueue really. There is an edge-case, where we call `bt_hci_cmd_send_sync()` from the syswq, stalling the system. The proposed mitigation is to attempt to drain the command queue from within `bt_hci_cmd_send_sync()`. My spidey sense tingles however, and it would be better to just remove the capability of calling this fn from the syswq. But doing this requires refactoring a bunch of synchronous procedures in the stack (e.g. stack init, connection establishment, address setting etc), dragging in more work. I will do it, but in a later patch. Signed-off-by: Jonathan Rico <[email protected]> (cherry picked from commit 28be890)
We can get rid of the view pool for SDU segments :) We have to make the code slightly more complex :'( The basic idea is always giving the original SDU buffer to `conn.c` for it to pull ACL fragments from. In order to do this, we need to add the PDU headers just-in-time. `bt_l2cap_send_pdu()` does not add them before putting the PDU on the queue anymore. They are added by `l2cap_data_pull()` right before the data leaves `l2cap.c` for `conn.c`. We also have to inform `conn.c` "out of band" of the real L2CAP PDU size so it doesn't fragment across segment boundaries. This oob is the new `length` parameter to the `.pull()` method. This is the added complexity mentioned above. Since SDU segmentation concerns only LE-L2CAP, ISO and Classic L2CAP don't need this extra logic. Signed-off-by: Jonathan Rico <[email protected]> (cherry picked from commit b6cdf10)
…variables In order to suppress compiler warnings w/o using void/ifdef. Suggested in #72854 Signed-off-by: Jonathan Rico <[email protected]> (cherry picked from commit 5a7ef42)
View buffers are now also a limited resource. Acquire them before attempting to pull data. `CONFIG_BT_CONN_FRAG_COUNT` should be tuned on a per-application basis to avoid this. A possible optimization, that was present before, is to not create a frag when the original buffer fits the controller's HCI size. I prefer deferring this optimization to a future patchset. Signed-off-by: Jonathan Rico <[email protected]> (cherry picked from commit 9b3f41d)
The same way as `bt_hci_get_adv_handle` and `bt_hci_get_conn_handle` add a function to get the handle of a periodic advertising sync. Signed-off-by: Théo Battrel <[email protected]> (cherry picked from commit 7c3a5d5)
Adds missing doc on public member. Signed-off-by: Knut Eldhuset <[email protected]> (cherry picked from commit db9308d)
…I APIs Add versioning to the new HCI API so that it shows up officially as unstable, and add a reference to the new API from the old API. Signed-off-by: Johan Hedberg <[email protected]> (cherry picked from commit 1c53726)
ISO connections that were in the TX queue were not getting serviced in time. This happens because `iso_data_pull()` returns `NULL` when that particular connection (`conn`) is done sending. But it doesn't trigger the TX processor again to process other channels in the queue. This patch fixes that by calling `bt_tx_irq_raise()`. We can't do this from `conn.c` as we don't know if the `NULL` returned is because the current channel is out of data or because it has data but it can't send it (e.g. the current buf is being "viewed" already). Fixes zephyrproject-rtos/zephyr#74321 Signed-off-by: Jonathan Rico <[email protected]> (cherry picked from commit 8af7180)
Similar to ISO connections, ACL connections are not serviced as fast as possible. Change this, and try to send as much as we have resources for. Signed-off-by: Jonathan Rico <[email protected]> (cherry picked from commit c6345c6)
This API converts a SMP error code to a string. This can be useful if application developers want to print them in the applications. BT_SMP_ERR_SUCCESS was added for completeness. Later we can also use them in the host to improve debuggability. Signed-off-by: Rubin Gerritsen <[email protected]> (cherry picked from commit b25985a)
This can be useful if application developers want to print them in the applications. Later we can also use them in the host to improve debuggability. Signed-off-by: Rubin Gerritsen <[email protected]> (cherry picked from commit 69fb606)
Use K_WORK defined. This delayed work is never used with any other timeout than K_NO_WAIT, so the "delayed" part of it is never actually needed Signed-off-by: Lingao Meng <[email protected]> (cherry picked from commit cfd79e8)
…end_sync` `cmd(buf)` depends on this since it uses `net_buf_id`, which would alias multiple pools. Signed-off-by: Aleksander Wasaznik <[email protected]> (cherry picked from commit a9c95c5)
The `rsp` params actually not used, so removed. Signed-off-by: Lingao Meng <[email protected]> (cherry picked from commit b11c43c)
…n for nRF9280 Fix compilation for nRF9280. Signed-off-by: Emanuele Di Santo <[email protected]> (cherry picked from commit b410543)
nrf-squash! [nrf noup] entropy: Add fake entropy nRF PRNG driver Extend fake entropy to nrf9280pdk. Signed-off-by: Andreas Moltumyr <[email protected]>
…HANNELS_USED Channels owned by a child core shall also be included in the mask of used channels (channels that cannot be allocated by the GPIOTE channel allocator). Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit 17c3a23)
…mask GPIOTE131 channels are reserved in the same way as the GPIOTE130 ones. Signed-off-by: Grzegorz Swiderski <[email protected]> (cherry picked from commit 5cb49dc)
Add overlays for booting PPR on the `nrf9280pdk/nrf9280/cpuapp` target. They are identical to the nRF54H ones because of similar DT structure. Signed-off-by: Grzegorz Swiderski <[email protected]> (cherry picked from commit 17a7735)
Booting VPRs requires changing the default value of CONFIG_RV_BOOT_HART. This must be reverted (back to zero) for a future nRF9230 SoC revision, which will align more closely with the RISC-V spec. Signed-off-by: Grzegorz Swiderski <[email protected]> (cherry picked from commit 57ce595)
PMIC service should be supported on Application and Radiocore, whereas DVFS service is currently unsupported. Signed-off-by: Grzegorz Swiderski <[email protected]> (cherry picked from commit 3b56ef0)
…tform VPR addresses are platform-dependent, so let's use a common symbol - CONFIG_NRF_PLATFORM_HALTIUM - to cover both nRF54H and nRF92 series. Signed-off-by: Grzegorz Swiderski <[email protected]> (cherry picked from commit 26c99a6)
Fix triggers for SUIT DFU tests. Signed-off-by: Krzysztof Szromek <[email protected]>
…INTERRUPT=n Verify NRF GPIO driver with NRFX interrupts disabled. Verify that driver handles properly 'get' and 'set' api methods. When calling interrupt enable driver should report 'function not implemented' error. Signed-off-by: Bartosz Miller <[email protected]> (cherry picked from commit bb3efaa)
jnsgsr
approved these changes
Sep 16, 2024
robertstypa
approved these changes
Sep 20, 2024
jnsgsr
approved these changes
Sep 23, 2024
rlubos
requested review from
anangl,
carlescufi,
ankuns,
de-nordic,
nordic-krch,
alwa-nordic,
aescolar and
nordicjm
as code owners
October 24, 2024 14:37
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix triggers for SUIT DFU tests.