Skip to content

Conversation

omkar3141
Copy link
Contributor

@omkar3141 omkar3141 commented Aug 1, 2025

Fix Max Chunk reporting during Block_Information_Get: If friendship is established, then max possible chunk size for transfer is reported according to friend's queue size.

ChunkSize = (FndQ sz * Bytes per seg (12)) - Opcode(1) - Chunk_Num (2)-
8 byte MIC (max)
= (FndQ sz * 12) - 11

This allows all segments of Chunk_Transfer messages to fit in a friend queue. If this is not done, friend queue keeps overflowing systematically causing unstable PULL_MODE transfers.

Fix Chunk requests:
Adapt number of requested chunks according to current friend queue size. If friend queue is too small, at least 1 chunk is requested.

(cherry picked from commit 602fd0d)

Zephyr PR: 93335

@omkar3141 omkar3141 force-pushed the cherrypick_ncsdk-34138_blob_server_understands_lpn branch 2 times, most recently from 82ddeb9 to d59269c Compare August 1, 2025 09:49
@omkar3141 omkar3141 force-pushed the cherrypick_ncsdk-34138_blob_server_understands_lpn branch 3 times, most recently from 9d3c805 to 61b7128 Compare August 4, 2025 08:31
Fix Max Chunk reporting during Block_Information_Get:
If friendship is established, then max possible chunk size for transfer
is reported according to friend's queue size.

ChunkSize = (FndQ sz * Bytes per seg (12)) - Opcode(1) - Chunk_Num (2)-
            8 byte MIC (max)
	  = (FndQ sz * 12) - 11

This allows all segments of Chunk_Transfer messages to fit in a friend
queue. If this is not done, friend queue keeps overflowing
systematically causing unstable PULL_MODE transfers.

Fix Chunk requests:
Adapt number of requested chunks according to current friend queue size.
If friend queue is too small, at least 1 chunk is requested.

Signed-off-by: Omkar Kulkarni <[email protected]>
(cherry picked from commit 602fd0d)
@omkar3141 omkar3141 force-pushed the cherrypick_ncsdk-34138_blob_server_understands_lpn branch from 61b7128 to eea2dd9 Compare August 4, 2025 08:39
@alxelax alxelax added this to the ncs-3.1.0 milestone Aug 4, 2025
@rlubos rlubos merged commit 1ed3c0d into nrfconnect:main Aug 4, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants