diff mbox series

[BlueZ] gatt-server: Limit the Server MTU based on the Client MTU

Message ID 20220322234956.3153209-1-luiz.dentz@gmail.com (mailing list archive)
State New, archived
Headers show
Series [BlueZ] gatt-server: Limit the Server MTU based on the Client MTU | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/checkpatch success Checkpatch PASS
tedd_an/gitlint fail [BlueZ] gatt-server: Limit the Server MTU based on the Client MTU 10: B1 Line exceeds max length (117>80): "Link: https://lore.kernel.org/linux-bluetooth/CABBYNZL-fjTd8JdmRRM5Y26d41KwDxvvuaED+j2+yPT-RBpMtw@mail.gmail.com/T/#t"
tedd_an/setupell success Setup ELL PASS
tedd_an/buildprep success Build Prep PASS
tedd_an/build success Build Configuration PASS
tedd_an/makecheck fail Make Check FAIL: ./test-driver: line 107: 30021 Aborted (core dumped) "$@" > $log_file 2>&1 make[3]: *** [Makefile:10773: test-suite.log] Error 1 make[2]: *** [Makefile:10881: check-TESTS] Error 2 make[1]: *** [Makefile:11275: check-am] Error 2 make: *** [Makefile:11277: check] Error 2
tedd_an/makecheckvalgrind fail Make Check FAIL: ./test-driver: line 107: 47441 Aborted (core dumped) "$@" > $log_file 2>&1 make[3]: *** [Makefile:10773: test-suite.log] Error 1 make[2]: *** [Makefile:10881: check-TESTS] Error 2 make[1]: *** [Makefile:11275: check-am] Error 2 make: *** [Makefile:11277: check] Error 2
tedd_an/makedistcheck fail Make Distcheck Make FAIL: ../../test-driver: line 107: 67803 Aborted (core dumped) "$@" > $log_file 2>&1 make[4]: *** [Makefile:10773: test-suite.log] Error 1 make[3]: *** [Makefile:10881: check-TESTS] Error 2 make[2]: *** [Makefile:11275: check-am] Error 2 make[1]: *** [Makefile:11277: check] Error 2 make: *** [Makefile:11198: distcheck] Error 1
tedd_an/build_extell success Build External ELL PASS
tedd_an/build_extell_make success Build Make with External ELL PASS

Commit Message

Luiz Augusto von Dentz March 22, 2022, 11:49 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

The spec is clear that the final ATT MTU is calculate using the minimum
of Client RX MTU and Server RX MTU but some peripherals seem to expect
the Server to already calculate the final MTU and not respond with its
own MTU.

Link: https://lore.kernel.org/linux-bluetooth/CABBYNZL-fjTd8JdmRRM5Y26d41KwDxvvuaED+j2+yPT-RBpMtw@mail.gmail.com/T/#t
---
 src/shared/gatt-server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com March 23, 2022, 2:56 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=625601

---Test result---

Test Summary:
CheckPatch                    PASS      1.48 seconds
GitLint                       FAIL      0.99 seconds
Prep - Setup ELL              PASS      50.55 seconds
Build - Prep                  PASS      0.74 seconds
Build - Configure             PASS      10.12 seconds
Build - Make                  PASS      1461.63 seconds
Make Check                    FAIL      12.98 seconds
Make Check w/Valgrind         FAIL      511.72 seconds
Make Distcheck                FAIL      246.21 seconds
Build w/ext ELL - Configure   PASS      10.14 seconds
Build w/ext ELL - Make        PASS      1435.79 seconds
Incremental Build with patchesPASS      0.00 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint with rule in .gitlint
Output:
[BlueZ] gatt-server: Limit the Server MTU based on the Client MTU
10: B1 Line exceeds max length (117>80): "Link: https://lore.kernel.org/linux-bluetooth/CABBYNZL-fjTd8JdmRRM5Y26d41KwDxvvuaED+j2+yPT-RBpMtw@mail.gmail.com/T/#t"


##############################
Test: Make Check - FAIL
Desc: Run 'make check'
Output:
./test-driver: line 107: 30021 Aborted                 (core dumped) "$@" > $log_file 2>&1
make[3]: *** [Makefile:10773: test-suite.log] Error 1
make[2]: *** [Makefile:10881: check-TESTS] Error 2
make[1]: *** [Makefile:11275: check-am] Error 2
make: *** [Makefile:11277: check] Error 2


##############################
Test: Make Check w/Valgrind - FAIL
Desc: Run 'make check' with Valgrind
Output:
./test-driver: line 107: 47441 Aborted                 (core dumped) "$@" > $log_file 2>&1
make[3]: *** [Makefile:10773: test-suite.log] Error 1
make[2]: *** [Makefile:10881: check-TESTS] Error 2
make[1]: *** [Makefile:11275: check-am] Error 2
make: *** [Makefile:11277: check] Error 2


##############################
Test: Make Distcheck - FAIL
Desc: Run distcheck to check the distribution
Output:
../../test-driver: line 107: 67803 Aborted                 (core dumped) "$@" > $log_file 2>&1
make[4]: *** [Makefile:10773: test-suite.log] Error 1
make[3]: *** [Makefile:10881: check-TESTS] Error 2
make[2]: *** [Makefile:11275: check-am] Error 2
make[1]: *** [Makefile:11277: check] Error 2
make: *** [Makefile:11198: distcheck] Error 1




---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/src/shared/gatt-server.c b/src/shared/gatt-server.c
index 2adb4afbf..d326782bf 100644
--- a/src/shared/gatt-server.c
+++ b/src/shared/gatt-server.c
@@ -1499,7 +1499,7 @@  static void exchange_mtu_cb(struct bt_att_chan *chan, uint8_t opcode,
 	final_mtu = MAX(MIN(client_rx_mtu, server->mtu), BT_ATT_DEFAULT_LE_MTU);
 
 	/* Respond with the server MTU */
-	put_le16(server->mtu, rsp_pdu);
+	put_le16(final_mtu, rsp_pdu);
 	bt_att_chan_send_rsp(chan, BT_ATT_OP_MTU_RSP, rsp_pdu, 2);
 
 	/* Set MTU to be the minimum */