Skip to content

[Mbed OS 5.15] Add getsockopt option to read network property #12882

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

Merged
merged 2 commits into from
Jun 8, 2020

Conversation

artokin
Copy link
Contributor

@artokin artokin commented Apr 29, 2020

Summary of changes

This is backport of the PR #12522

Add getsockopt options NSAPI_LATENCY and NSAPI_STAGGER to read
network specific timing constraints from socket.
-NS_LATENCY returns estimated latency to given address.
-NSAPI_STAGGER returns estimated initial delay that application
should wait before transmitting data to network.

Application can use the new options to avoid network congestion by
adjusting transmission delays and retry timeouts.

Add wrappers to make API usage easier:
-get_rtt_estimate_to_address
-get_stagger_estimate_to_address

Impact of changes

Application is able to adapt to networks that have low bandwidth and high latency.

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@ARMmbed/mbed-os-mesh , @TuomoHautamaki


Add getsockopt options NSAPI_LATENCY and NSAPI_STAGGER to read
network specific timing constraints from socket.
-NS_LATENCY returns estimated latency to given address.
-NSAPI_STAGGER returns estimated initial delay that application
 should wait before transmitting data to network.

Application can use the new options to avoid network congestion by
adjusting transmission delays and retry timeouts.

Add wrappers to make API usage easier:
-get_rtt_estimate_to_address
-get_stagger_estimate_to_address

This is backport of the ARMmbed#12522
@ciarmcom ciarmcom requested review from TuomoHautamaki and a team April 29, 2020 11:00
@ciarmcom
Copy link
Member

@artokin, thank you for your changes.
@TuomoHautamaki @ARMmbed/mbed-os-maintainers please review.

@artokin artokin requested a review from a team April 29, 2020 11:10
0xc0170
0xc0170 previously approved these changes May 7, 2020
@mergify mergify bot added needs: CI and removed needs: review labels May 7, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented May 8, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented May 8, 2020

Test run: FAILED

Summary: 1 of 3 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests-lts

Adjust RTT/stagger API unit tests to work in mbed-os-5.15 branch.
@mergify mergify bot dismissed 0xc0170’s stale review May 8, 2020 07:58

Pull request has been modified.

@artokin artokin requested a review from 0xc0170 May 8, 2020 07:59
@artokin
Copy link
Contributor Author

artokin commented May 8, 2020

Stagger/latency unit tests fixed, would you please re-review?

@0xc0170
Copy link
Contributor

0xc0170 commented May 19, 2020

CI started

(As we had to update the config, it might fail, will check and fix)

@0xc0170
Copy link
Contributor

0xc0170 commented May 19, 2020

Failure related to teh CI changes, will be fixed

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 3, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Jun 3, 2020

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 3
Build artifacts

@0xc0170 0xc0170 requested a review from andypowers June 4, 2020 07:49
Copy link
Collaborator

@andypowers andypowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@0xc0170 0xc0170 merged commit 2d20bb1 into ARMmbed:mbed-os-5.15 Jun 8, 2020
@mergify mergify bot removed the ready for merge label Jun 8, 2020
@artokin artokin deleted the backport_pr_12522 branch June 8, 2020 07:06
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.

7 participants