mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
ce60b9231b
Previously LE flow credits were returned to the
sender even if the socket's receive buffer was
full. This meant that no back-pressure
was applied to the sender, thus it continued to
send data, resulting in data loss without any
error being reported. Furthermore, the amount
of credits was essentially fixed to a small
amount, leading to reduced performance.
This is fixed by computing the number of returned
LE flow credits based on the estimated available
space in the receive buffer of an L2CAP socket.
Consequently, if the receive buffer is full, no
credits are returned until the buffer is read and
thus cleared by user-space.
Since the computation of available receive buffer
space can only be performed approximately (due to
sk_buff overhead) and the receive buffer size may
be changed by user-space after flow credits have
been sent, superfluous received data is temporary
stored within l2cap_pinfo. This is necessary
because Bluetooth LE provides no retransmission
mechanism once the data has been acked by the
physical layer.
If receive buffer space estimation is not possible
at the moment, we fall back to providing credits
for one full packet as before. This is currently
the case during connection setup, when MPS is not
yet available.
Fixes:
|
||
---|---|---|
.. | ||
bnep | ||
cmtp | ||
hidp | ||
rfcomm | ||
6lowpan.c | ||
af_bluetooth.c | ||
aosp.c | ||
aosp.h | ||
coredump.c | ||
ecdh_helper.c | ||
ecdh_helper.h | ||
eir.c | ||
eir.h | ||
hci_codec.c | ||
hci_codec.h | ||
hci_conn.c | ||
hci_core.c | ||
hci_debugfs.c | ||
hci_debugfs.h | ||
hci_event.c | ||
hci_request.c | ||
hci_request.h | ||
hci_sock.c | ||
hci_sync.c | ||
hci_sysfs.c | ||
iso.c | ||
Kconfig | ||
l2cap_core.c | ||
l2cap_sock.c | ||
leds.c | ||
leds.h | ||
lib.c | ||
Makefile | ||
mgmt_config.c | ||
mgmt_config.h | ||
mgmt_util.c | ||
mgmt_util.h | ||
mgmt.c | ||
msft.c | ||
msft.h | ||
sco.c | ||
selftest.c | ||
selftest.h | ||
smp.c | ||
smp.h |