Skip to content
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

nimble/host: Truncate data in ble_eatt_tx #1868

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

piotrnarajowski
Copy link
Contributor

@piotrnarajowski piotrnarajowski commented Sep 18, 2024

Data packets sent over eatt chan weren't correctly truncated. Data packet is now adjusted to peer device's MTU for the channel.
Fixes various GATT/SR test cases that verify support for Read Long Characteristic Value Requests, Multiple Read Characteristic Value Requests etc.
#1800 related

@github-actions github-actions bot added the host label Sep 18, 2024
@piotrnarajowski
Copy link
Contributor Author

#AutoPTS run mynewt GATT/SR

@github-actions github-actions bot added the size/XS Extra small PR label Sep 18, 2024
@codecoup-tester
Copy link

Scheduled PR #1868 (comment), board: nrf52, estimated start time: 14:13:52, test case count: 68, estimated duration: 1:06:03

Test cases to be runGATT/SR/GAC/BV-01-C
GATT/SR/GAC/BI-01-C
GATT/SR/GAD/BV-01-C
GATT/SR/GAD/BV-02-C
GATT/SR/GAD/BV-03-C
GATT/SR/GAD/BV-04-C
GATT/SR/GAD/BV-05-C
GATT/SR/GAD/BV-06-C
GATT/SR/GAR/BV-01-C
GATT/SR/GAR/BI-01-C
GATT/SR/GAR/BI-02-C
GATT/SR/GAR/BI-04-C
GATT/SR/GAR/BI-05-C
GATT/SR/GAR/BV-03-C
GATT/SR/GAR/BI-06-C
GATT/SR/GAR/BI-07-C
GATT/SR/GAR/BI-08-C
GATT/SR/GAR/BI-10-C
GATT/SR/GAR/BI-11-C
GATT/SR/GAR/BV-04-C
GATT/SR/GAR/BI-12-C
GATT/SR/GAR/BI-13-C
GATT/SR/GAR/BI-14-C
GATT/SR/GAR/BI-16-C
GATT/SR/GAR/BI-17-C
GATT/SR/GAR/BV-05-C
GATT/SR/GAR/BI-18-C
GATT/SR/GAR/BI-19-C
GATT/SR/GAR/BI-21-C
GATT/SR/GAR/BI-22-C
GATT/SR/GAR/BV-06-C
GATT/SR/GAR/BV-07-C
GATT/SR/GAR/BV-08-C
GATT/SR/GAR/BV-09-C
GATT/SR/GAR/BV-11-C
GATT/SR/GAR/BI-36-C
GATT/SR/GAR/BI-38-C
GATT/SR/GAR/BI-42-C
GATT/SR/GAR/BI-44-C
GATT/SR/GAR/BI-45-C
GATT/SR/GAW/BV-01-C
GATT/SR/GAW/BV-03-C
GATT/SR/GAW/BI-02-C
GATT/SR/GAW/BI-03-C
GATT/SR/GAW/BI-05-C
GATT/SR/GAW/BI-06-C
GATT/SR/GAW/BV-05-C
GATT/SR/GAW/BI-07-C
GATT/SR/GAW/BI-08-C
GATT/SR/GAW/BI-09-C
GATT/SR/GAW/BI-12-C
GATT/SR/GAW/BI-13-C
GATT/SR/GAW/BV-06-C
GATT/SR/GAW/BV-10-C
GATT/SR/GAW/BV-11-C
GATT/SR/GAW/BV-07-C
GATT/SR/GAW/BV-08-C
GATT/SR/GAW/BV-09-C
GATT/SR/GAW/BI-32-C
GATT/SR/GAW/BI-33-C
GATT/SR/GAN/BV-01-C
GATT/SR/GAN/BV-02-C
GATT/SR/GAI/BV-01-C
GATT/SR/GAS/BV-01-C
GATT/SR/GAT/BV-01-C
GATT/SR/UNS/BI-01-C
GATT/SR/UNS/BI-02-C
GATT/SR/GPM/BV-05-C

@codecoup-tester
Copy link

AutoPTS Bot results:

Failed testsGATT GATT/SR/GAN/BV-02-C RUNNING
GATT GATT/SR/GAS/BV-01-C UNKNOWN VERDICT: Timeout. Adjust TSPX_time_guard value if user need more time.
GATT GATT/SR/GAW/BV-01-C INCONC
Successful testsGATT GATT/SR/GAC/BI-01-C PASS
GATT GATT/SR/GAC/BV-01-C PASS
GATT GATT/SR/GAD/BV-01-C PASS
GATT GATT/SR/GAD/BV-02-C PASS
GATT GATT/SR/GAD/BV-03-C PASS
GATT GATT/SR/GAD/BV-04-C PASS
GATT GATT/SR/GAD/BV-05-C PASS
GATT GATT/SR/GAD/BV-06-C PASS
GATT GATT/SR/GAI/BV-01-C PASS
GATT GATT/SR/GAN/BV-01-C PASS
GATT GATT/SR/GAR/BI-01-C PASS
GATT GATT/SR/GAR/BI-02-C PASS
GATT GATT/SR/GAR/BI-04-C PASS
GATT GATT/SR/GAR/BI-05-C PASS
GATT GATT/SR/GAR/BI-06-C PASS
GATT GATT/SR/GAR/BI-07-C PASS
GATT GATT/SR/GAR/BI-08-C PASS
GATT GATT/SR/GAR/BI-10-C PASS
GATT GATT/SR/GAR/BI-11-C PASS
GATT GATT/SR/GAR/BI-12-C PASS
GATT GATT/SR/GAR/BI-13-C PASS - ERRATA https://github.com//issues/1800
GATT GATT/SR/GAR/BI-14-C PASS
GATT GATT/SR/GAR/BI-16-C PASS
GATT GATT/SR/GAR/BI-17-C PASS
GATT GATT/SR/GAR/BI-18-C PASS
GATT GATT/SR/GAR/BI-19-C PASS
GATT GATT/SR/GAR/BI-21-C PASS
GATT GATT/SR/GAR/BI-22-C PASS
GATT GATT/SR/GAR/BI-36-C PASS
GATT GATT/SR/GAR/BI-38-C PASS
GATT GATT/SR/GAR/BI-42-C PASS
GATT GATT/SR/GAR/BI-44-C PASS
GATT GATT/SR/GAR/BI-45-C PASS - ERRATA https://github.com//issues/1800
GATT GATT/SR/GAR/BV-01-C PASS
GATT GATT/SR/GAR/BV-03-C PASS
GATT GATT/SR/GAR/BV-04-C PASS - ERRATA https://github.com//issues/1800
GATT GATT/SR/GAR/BV-05-C PASS
GATT GATT/SR/GAR/BV-06-C PASS
GATT GATT/SR/GAR/BV-07-C PASS - ERRATA https://github.com//issues/1800
GATT GATT/SR/GAR/BV-08-C PASS - ERRATA https://github.com//issues/1800
GATT GATT/SR/GAR/BV-09-C PASS
GATT GATT/SR/GAR/BV-11-C PASS
GATT GATT/SR/GAT/BV-01-C PASS
GATT GATT/SR/GAW/BI-02-C PASS
GATT GATT/SR/GAW/BI-03-C PASS
GATT GATT/SR/GAW/BI-05-C PASS
GATT GATT/SR/GAW/BI-06-C PASS
GATT GATT/SR/GAW/BI-07-C PASS
GATT GATT/SR/GAW/BI-08-C PASS
GATT GATT/SR/GAW/BI-09-C PASS
GATT GATT/SR/GAW/BI-12-C PASS
GATT GATT/SR/GAW/BI-13-C PASS
GATT GATT/SR/GAW/BI-32-C PASS
GATT GATT/SR/GAW/BI-33-C PASS - ERRATA https://github.com//issues/1800
GATT GATT/SR/GAW/BV-03-C PASS
GATT GATT/SR/GAW/BV-05-C PASS - ERRATA https://github.com//issues/1800
GATT GATT/SR/GAW/BV-06-C PASS
GATT GATT/SR/GAW/BV-07-C PASS
GATT GATT/SR/GAW/BV-08-C PASS
GATT GATT/SR/GAW/BV-09-C PASS - ERRATA https://github.com//issues/1800
GATT GATT/SR/GAW/BV-10-C PASS - ERRATA https://github.com//issues/1800
GATT GATT/SR/GAW/BV-11-C PASS
GATT GATT/SR/GPM/BV-05-C PASS
GATT GATT/SR/UNS/BI-01-C PASS
GATT GATT/SR/UNS/BI-02-C PASS

@piotrnarajowski piotrnarajowski marked this pull request as ready for review September 18, 2024 14:17
Data packets sent over eatt chan weren't correctly truncated.
Data packet is now adjusted to peer device's MTU for the channel.
Fixes various GATT/SR test cases that verify support for Read Long
Characteristic Value Requests, Multiple Read Characteristic Value
Requests etc.
@@ -476,6 +476,8 @@ ble_eatt_tx(uint16_t conn_handle, uint16_t cid, struct os_mbuf *txom)
goto error;
}

ble_att_truncate_to_mtu(eatt->chan, txom);
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is happening in GATT/SR I would expect fix to be in ble_att_svr.c before ble_att_tx()

What do you think ?

Copy link
Contributor

@sjanc sjanc left a comment

Choose a reason for hiding this comment

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

If we want to move out of ble_eatt_tx than we probably need to do a bit more refactor work to handle those is same way, ie currently we pass conn+cid which require lookups for chan, while we should be passing only chan (or maybe some common att and eatt bearer struct...)

@KKopyscinski KKopyscinski merged commit a633169 into apache:master Sep 23, 2024
18 checks passed
@piotrnarajowski piotrnarajowski deleted the issue1800 branch September 23, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
host size/XS Extra small PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants