Skip to contentSkip to conversation

profile: GOEP Set IMTU to 32k

PATCH In review Sathish Narasimman 3 participants 3 messages Nov 3, 2020 – Nov 4, 2020 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 profile: GOEP Set IMTU to 32k

OPP-RX Throughput is low Due to Low MTU value in case of OBEX over L2CAP. Changing the default L2CAP MTU from 672 to 32767.

---
 src/profile.c | 7 +++++++
 1 file changed, 7 insertions(+)
src/profile.c +7 -0
index 5e460b639..99a5e1a4a 100644
@@ -41,6 +41,8 @@
 #include "profile.h"
 #include "service.h"
 
+#define BTRX_MTU               32767
+
 #define DUN_DEFAULT_CHANNEL	1
 #define SPP_DEFAULT_CHANNEL	3
 #define HSP_HS_DEFAULT_CHANNEL	6
@@ -1358,6 +1360,11 @@ static uint32_t ext_start_servers(struct ext_profile *ext,
 			l2cap->adapter = btd_adapter_ref(adapter);
 			ext->servers = g_slist_append(ext->servers, l2cap);
 			DBG("%s listening on PSM %u", ext->name, psm);
+			if (g_strcmp0(ext->name, "Object Push") == 0) {
+				if (!bt_io_set(io, NULL, BT_IO_OPT_IMTU, BTRX_MTU,
+				    BT_IO_OPT_INVALID))
+					DBG("ERROR bt_io_set Unable to set MTU");
+			}
 		}
 	}
 
Signature · 1 line
2.17.1
#1 lore raw

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=376113

---Test result---

##############################
Test: CheckPatch - FAIL
Output:
profile: GOEP Set IMTU to 32k
WARNING:LONG_LINE: line over 80 characters
#29: FILE: src/profile.c:1364:
+ if (!bt_io_set(io, NULL, BT_IO_OPT_IMTU, BTRX_MTU,

WARNING:LONG_LINE_STRING: line over 80 characters
#31: FILE: src/profile.c:1366:
+ DBG("ERROR bt_io_set Unable to set MTU");

- total: 0 errors, 2 warnings, 19 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

Your patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

##############################
Test: CheckGitLint - PASS

##############################
Test: CheckBuild - PASS

##############################
Test: MakeCheck - PASS

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Sathish Narasimman

Hi Sathish,

Quoted 35 lines · Sathish Narasimman

OPP-RX Throughput is low Due to Low MTU value in case of OBEX over L2CAP. Changing the default L2CAP MTU from 672 to 32767.

---
 src/profile.c | 7 +++++++
 1 file changed, 7 insertions(+)
src/profile.c +7 -1
index 5e460b639..99a5e1a4a 100644
@@ -41,6 +41,8 @@
 #include "profile.h"
 #include "service.h"
 
+#define BTRX_MTU               32767
+
 #define DUN_DEFAULT_CHANNEL    1
 #define SPP_DEFAULT_CHANNEL    3
 #define HSP_HS_DEFAULT_CHANNEL 6
@@ -1358,6 +1360,11 @@ static uint32_t ext_start_servers(struct ext_profile *ext,
                        l2cap->adapter = btd_adapter_ref(adapter);
                        ext->servers = g_slist_append(ext->servers, l2cap);
                        DBG("%s listening on PSM %u", ext->name, psm);
+                       if (g_strcmp0(ext->name, "Object Push") == 0) {
+                               if (!bt_io_set(io, NULL, BT_IO_OPT_IMTU, BTRX_MTU,
+                                   BT_IO_OPT_INVALID))
+                                       DBG("ERROR bt_io_set Unable to set MTU");
+                       }
                }
        }
 
--
Quoted 1 line

2.17.1

Perhaps it would be better to have the MTU added to RegisterProfile options so any user of this API can set the Input MTU.

Signature · 1 line
Luiz Augusto von Dentz