Home
last modified time | relevance | path

Searched full:mtu (Results 1 – 25 of 226) sorted by relevance

12345678910

/Zephyr-latest/samples/bluetooth/mtu_update/
DREADME.rst2 :name: MTU Update
5 Configure and exchange MTU between two devices.
10 Question: What do I have to do to update my ATT MTU?
12 | Answer: To get an ATT MTU of x octets, do the following:
25 Answer: Yes. [#mtu_exchange]_ The Bluetooth specification mandates a symmetric MTU for ATT.
30 This sample demonstrates the exchange of MTU between two devices to allow a
32 Updating the MTU can be useful to send bigger packets and so have a better
36 update their MTU. The MTU is not a negotiated value, the client and the server
37 will exchange their MTUs and choose the minimum of the two. Thus the two MTU can
38 be set to a different value, but the MTU of the server must be greater or equal
[all …]
/Zephyr-latest/subsys/net/ip/
Dpmtu.h25 /** MTU for this destination address */
26 uint16_t mtu; member
48 /** Get MTU value for the given destination address
52 * @return MTU value (> 0) if found, <0 otherwise
68 * @param mtu New MTU value
70 * @return >0 previous MTU, <0 if error
73 int net_pmtu_update_mtu(const struct sockaddr *dst, uint16_t mtu);
75 static inline int net_pmtu_update_mtu(const struct sockaddr *dst, uint16_t mtu) in net_pmtu_update_mtu() argument
78 ARG_UNUSED(mtu); in net_pmtu_update_mtu()
87 * @param mtu New MTU value
[all …]
Dpmtu.c107 static void update_pmtu_entry(struct net_pmtu_entry *entry, uint16_t mtu) in update_pmtu_entry() argument
111 if (entry->mtu != mtu) { in update_pmtu_entry()
113 entry->mtu = mtu; in update_pmtu_entry()
125 info.mtu = mtu; in update_pmtu_entry()
138 info.mtu = mtu; in update_pmtu_entry()
168 return entry->mtu; in net_pmtu_get_mtu()
224 int net_pmtu_update_mtu(const struct sockaddr *dst, uint16_t mtu) in net_pmtu_update_mtu() argument
236 old_mtu = entry->mtu; in net_pmtu_update_mtu()
239 update_pmtu_entry(entry, mtu); in net_pmtu_update_mtu()
244 int net_pmtu_update_entry(struct net_pmtu_entry *entry, uint16_t mtu) in net_pmtu_update_entry() argument
[all …]
/Zephyr-latest/tests/net/pmtu/src/
Dmain.c58 /* This is a helper function to get the MTU value for the given destination.
255 zassert_equal(ret, 0, "PMTU IPv4 MTU update failed (%d)", ret); in ZTEST()
273 zassert_equal(ret, 0, "PMTU IPv6 MTU update failed (%d)", ret); in ZTEST()
286 uint16_t mtu; in ZTEST() local
293 zassert_equal(ret, 1300, "PMTU IPv4 MTU update failed (%d)", ret); in ZTEST()
295 zassert_equal(entry->mtu, 1300, "PMTU IPv4 MTU is not correct (%d)", in ZTEST()
296 entry->mtu); in ZTEST()
302 zassert_equal(ret, 0, "PMTU IPv4 MTU update failed (%d)", ret); in ZTEST()
303 mtu = net_pmtu_get_mtu((struct sockaddr *)&dest_ipv4); in ZTEST()
304 zassert_equal(mtu, 1400, "PMTU IPv4 MTU is not correct (%d)", mtu); in ZTEST()
[all …]
/Zephyr-latest/include/zephyr/bluetooth/
Dl2cap.h36 /** Maximum Transmission Unit (MTU) for an outgoing L2CAP PDU. */
39 /** Maximum Transmission Unit (MTU) for an incoming L2CAP PDU. */
45 * @param mtu Needed L2CAP PDU MTU.
47 * @return Needed buffer size to match the requested L2CAP PDU MTU.
49 #define BT_L2CAP_BUF_SIZE(mtu) BT_BUF_ACL_SIZE(BT_L2CAP_HDR_SIZE + (mtu)) argument
59 * The MTU for outgoing L2CAP SDUs with segmentation is defined by the
69 * The MTU for incoming L2CAP SDUs with segmentation is defined by the
81 * @param mtu Required BT_L2CAP_*_SDU.
83 * @return Needed buffer size to match the requested L2CAP SDU MTU.
85 #define BT_L2CAP_SDU_BUF_SIZE(mtu) BT_L2CAP_BUF_SIZE(BT_L2CAP_SDU_HDR_SIZE + (mtu)) argument
[all …]
/Zephyr-latest/tests/bsim/bluetooth/host/att/mtu_update/
Dprj_peripheral.conf3 CONFIG_BT_DEVICE_NAME="MTU Update Test"
9 # L2CAP SDU/PDU TX MTU
Dprj_central.conf3 CONFIG_BT_DEVICE_NAME="MTU Update Test"
11 # L2CAP SDU/PDU TX MTU
/Zephyr-latest/samples/bluetooth/mtu_update/peripheral/
Dprj.conf3 CONFIG_BT_DEVICE_NAME="Zephyr Peripheral MTU Update Sample"
13 # L2CAP SDU/PDU TX MTU
/Zephyr-latest/samples/bluetooth/mtu_update/central/
Dprj.conf3 CONFIG_BT_DEVICE_NAME="Zephyr Central MTU Update Sample"
15 # L2CAP SDU/PDU TX MTU
/Zephyr-latest/doc/connectivity/bluetooth/shell/host/
Dgatt.rst23 Another option available through the GATT command is initiating the MTU exchange. To do it, use the
24 :code:`gatt exchange-mtu` command. To update the shell maximum MTU, you need to update Kconfig
/Zephyr-latest/samples/net/sockets/echo_server/src/
Dtunnel.c87 int mtu; in init_tunnel() local
113 mtu = NET_ETH_MTU - sizeof(struct net_ipv6_hdr); in init_tunnel()
124 mtu = NET_ETH_MTU - sizeof(struct net_ipv4_hdr); in init_tunnel()
154 params.mtu = mtu; in init_tunnel()
159 LOG_ERR("Cannot set interface %d MTU to %d (%d)", in init_tunnel()
160 net_if_get_by_iface(ud.tunnel), params.mtu, ret); in init_tunnel()
/Zephyr-latest/modules/openthread/platform/
Dble.c49 #define PLAT_BLE_MSG_DATA_MAX CONFIG_BT_L2CAP_TX_MTU /* must match the maximum MTU size used */
214 uint16_t mtu; in on_cccd_changed() local
227 error = otPlatBleGattMtuGet(ble_openthread_instance, &mtu); in on_cccd_changed()
229 LOG_WRN("Error retrieving mtu: %s", otThreadErrorToString(error)); in on_cccd_changed()
232 LOG_INF("CCCD update (mtu=%" PRIu16 ")!", mtu); in on_cccd_changed()
316 uint16_t mtu; in connected() local
330 error = otPlatBleGattMtuGet(ble_openthread_instance, &mtu); in connected()
332 LOG_WRN("Error retrieving mtu: %s", otThreadErrorToString(error)); in connected()
335 LOG_INF("Connection established (mtu=%" PRIu16 ")!", mtu); in connected()
366 uint16_t mtu; in le_param_updated() local
[all …]
/Zephyr-latest/subsys/bluetooth/host/
Dl2cap.c537 req->mtu = sys_cpu_to_le16(ch->rx.mtu); in l2cap_le_conn_req()
577 req->mtu = sys_cpu_to_le16(ch->rx.mtu); in l2cap_ecred_conn_req()
581 req_mtu = ch->tx.mtu; in l2cap_ecred_conn_req()
588 __ASSERT(ch->tx.mtu == req_mtu, in l2cap_ecred_conn_req()
589 "The MTU shall be the same for channels in the same request."); in l2cap_ecred_conn_req()
1221 /* Use existing MTU if defined */ in l2cap_chan_rx_init()
1222 if (!chan->rx.mtu) { in l2cap_chan_rx_init()
1223 /* If application has not provide the incoming L2CAP SDU MTU use in l2cap_chan_rx_init()
1224 * an MTU that does not require segmentation. in l2cap_chan_rx_init()
1226 chan->rx.mtu = BT_L2CAP_SDU_RX_MTU; in l2cap_chan_rx_init()
[all …]
DKconfig.l2cap29 int "Maximum supported L2CAP MTU for L2CAP TX buffers"
45 Maximum L2CAP MTU for L2CAP TX buffers.
76 Enable API for explicit reconfiguration of an L2CAP channel's MTU and
Datt_internal.h16 /* Local ATT Rx MTU
18 * This is the local 'Client Rx MTU'/'Server Rx MTU'. Core v5.3 Vol 3 Part F
21 * The local ATT Server Rx MTU is limited to BT_L2CAP_TX_MTU because the GATT
23 * MTU as a promise about the read size. This requires the server to negotiate
45 uint16_t mtu; member
50 uint16_t mtu; member
351 void bt_gatt_req_set_mtu(struct bt_att_req *req, uint16_t mtu);
/Zephyr-latest/subsys/bluetooth/host/classic/
Drfcomm_internal.h28 uint16_t mtu; member
72 uint16_t mtu; member
133 #define BT_RFCOMM_CHECK_MTU(mtu) (!!((mtu) >= BT_RFCOMM_SIG_MIN_MTU && \ argument
134 (mtu) <= BT_RFCOMM_SIG_MAX_MTU))
140 #define BT_RFCOMM_BUF_SIZE(mtu) (BT_BUF_RESERVE + \ argument
142 sizeof(struct bt_rfcomm_hdr) + 1 + (mtu) + \
/Zephyr-latest/include/zephyr/net/
Dvirtual.h77 int mtu; member
305 pm, data, config, prio, api, mtu) \ argument
308 NET_L2_GET_CTX_TYPE(VIRTUAL_L2), mtu)
312 config, prio, api, mtu) \ argument
316 NET_L2_GET_CTX_TYPE(VIRTUAL_L2), mtu)
337 * @param mtu Maximum transfer unit in bytes for this network interface.
341 config, prio, api, mtu) \ argument
344 api, mtu)
365 * @param mtu Maximum transfer unit in bytes for this network interface.
370 config, prio, api, mtu) \ argument
[all …]
/Zephyr-latest/samples/bluetooth/mtu_update/peripheral/src/
Dperipheral_mtu_update.c42 printk("MTU Test Update: notifications %s\n", notif_enabled ? "enabled" : "disabled"); in ccc_cfg_changed()
52 printk("Updated MTU: TX: %d RX: %d bytes\n", tx, rx); in mtu_updated()
100 /* Only send the notification if the UATT MTU supports the required length */ in run_peripheral_sample()
104 printk("Skipping notification since UATT MTU is not sufficient." in run_peripheral_sample()
/Zephyr-latest/tests/bluetooth/tester/src/
Dbtp_l2cap.c125 ev.mtu_remote = sys_cpu_to_le16(chan->le.tx.mtu); in connected_cb()
127 ev.mtu_local = sys_cpu_to_le16(chan->le.rx.mtu); in connected_cb()
190 ev.mtu_remote = sys_cpu_to_le16(chan->le.tx.mtu); in reconfigured_cb()
192 ev.mtu_local = sys_cpu_to_le16(chan->le.rx.mtu); in reconfigured_cb()
244 uint16_t mtu = sys_le16_to_cpu(cp->mtu); in connect() local
250 if (cp->num == 0 || cp->num > CHANNELS || mtu > DATA_MTU_INITIAL) { in connect()
265 chan->le.rx.mtu = mtu; in connect()
337 uint16_t mtu; in reconfigure() local
352 mtu = sys_le16_to_cpu(cp->mtu); in reconfigure()
353 if (mtu > DATA_MTU) { in reconfigure()
[all …]
/Zephyr-latest/tests/bluetooth/tester/src/btp/
Dbtp_l2cap.h27 uint16_t mtu; member
61 uint16_t mtu; member
74 uint16_t mtu; member
/Zephyr-latest/tests/bsim/bluetooth/host/att/mtu_update/src/
Dmain_central.c54 PASS("MTU Update test passed\n"); in test_central_main()
56 FAIL("MTU Update test failed\n"); in test_central_main()
76 .test_descr = "Central GATT MTU Update",
/Zephyr-latest/tests/net/lib/lwm2m/interop/
Dprj.conf78 # MTU - IPv6 header - UDP header - DTLS header
97 # Assume that IPv6 minimum MTU is accepted
98 # MTU - IPv6 header - UDP header - DTLS header - CoAP header room
/Zephyr-latest/subsys/bluetooth/
DKconfig.iso103 int "Maximum supported MTU for Isochronous TX buffers"
107 Maximum MTU for Isochronous channels TX buffers.
122 int "Maximum supported MTU for Isochronous RX buffers"
126 Maximum MTU for Isochronous channels RX buffers.
/Zephyr-latest/subsys/net/l2/virtual/
Dvirtual_mgmt.c55 config.mtu = params->mtu; in virtual_interface_set_config()
124 params->mtu = config.mtu; in virtual_interface_get_config()
/Zephyr-latest/subsys/bluetooth/services/ots/
DKconfig95 int "Size of TX MTU for Object Transfer Channel"
100 int "Size of RX MTU for Object Transfer Channel"
101 # RX MTU will be truncated to account for the L2CAP PDU and SDU header.

12345678910