NRF52840: BLE Cordio increasing desired-att-mtu attribute

One of my team mates had created a forum topic as mentioned below a while back regarding this and wanted to get some clarification regarding this topic further.

Question 86315

However in the answer to my queries we were told we could override the “desired-att-mtu” attribute to increase the default size of 23. However in the file where the actual attribute is set to 23, there is some caveats to increasing this value.

Here is what is mentioned in the json file : mbed_lb.json

"desired-att-mtu": {
            "help": "Desired ATT_MTU, this needs to be between 23 and 517 (inclusive). The effective ATT_MTU is limited by rx-acl-buffer-size (minus 4 bytes for the header).",
            "value": 23
        },
        "rx-acl-buffer-size": {
            "help": "Size of the buffer holding the reassembled complete ACL packet. This will limit the effective ATT_MTU (to its value minus 4 bytes for the header). The size of the buffer must be small enough to be allocated from the existing cordio pool. If this value is increased you may need to adjust the memory pool.",
            "value": 70
        }

My question is if I increase the mtu size to say 260, since I have to accommodate for 4 bytes for the header and I would also have to override the “rx-acl-buffer-size” attribute as well to allow the increase in mtu size. Since I would need to increase the default value of the “rx-acl-buffer-size” attribute, the documentation calls out I may have to adjust the cordio memory pool and I have no idea how to do that, without breaking my existing application

Thanks,
Yogesh

Any thoughts regarding this topic MBED Cordio team? I usually get a response within a few days and since we can no longer questions in the MBED OS issues section, can the MBED team jump in and provide clarifications?

Thanks,
Ajay

@paulszczepanek , @vcoubard any thoughts?

Thanks,
Ajay

Read the porting guide in TARGET_CORDIO/doc to see how the memory pool is set. But first thing to note is that while increasing the mtu does of course help throughput at the cost of memory but it very quickly hits diminishing returns. You might want to go above 70 but it’s worth measuring if it makes a difference in your application. 260 looks seriously excessive. Remember that larger MTUs also mean higher chance of corruption and need for retransmission of this long packet.