From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 0/3] RFC: prioritizing data over HCI
Date: Wed, 3 Aug 2011 16:11:31 +0300 [thread overview]
Message-ID: <1312377094-11285-1-git-send-email-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This set of patches uses the priority of the socket, set via SO_PRIORITY,
to prioritized data over HCI. Current priority range is from 0-7, where
0-6 priority can be set without any exatra capability which is according
to SO_PRIORITY documentation (socket(7)):
SO_PRIORITY
Set the protocol-defined priority for all packets to be sent
on this socket. Linux uses this value to order the networking
queues: packets with a higher priority may be processed first
depending on the selected device queueing discipline....
Setting a priority outside the range 0 to 6 requires the
CAP_NET_ADMIN capability.
This also enables in the future the use of guaranteed channels as it is
necessary to prioritized them over best effort (default) channels,
Bluetooth V4.0 spec (page 1497):
7.9 PRIORITIZING DATA OVER HCI
In order for guaranteed channels to meet their guarantees, L2CAP
should prioritize traffic over the HCI transport in devices that
support HCI. Packets for Guaranteed channels should receive higher
priority than packets for Best Effort channels.
Note: to be able to use guaranteed channels we need to negotiate QoS
parameters both in L2CAP and HCI, this is outside of the scope of this
patches since it probably requires new socket options to L2CAP sockets.
The main use case for this is A2DP, many people complained that when they
are using their HID devices (mouses) together with headset the mouse has
higher priority, which btw is not true since currently there is no
priority and connections receives the same quote.
With this changes it may reduce the problem since PulseAudio already sets
A2DP socket as low latency (priority 6), which means audio packets will be
processed before the HID packets, but this only affects tx and there still
exist the problem of some HID not letting us being master.
Ive been testing this using A2DP and HID connected simultaneusly without a
problem, though connecting/paging still makes audio skips, and also tried
OBEX transfers together to see if audio skips, indeed it does when HID is
active but it works better than having no priority (skips less frequent)
and in case of using priority 7 the audio doesn't skip anymore but it
eventually stall the OBEX transfer (this is maybe because OpenOBEX loop
while trying to write to socket and don't wait for POLLOUT).
Luiz Augusto von Dentz (3):
Bluetooth: prioritizing data over HCI
Bluetooth: set skbuffer priority based on L2CAP socket priority
Bluetooth: make use sk_priority to priritize RFCOMM packets
include/net/bluetooth/hci_core.h | 6 ++-
include/net/bluetooth/l2cap.h | 3 +-
net/bluetooth/hci_conn.c | 8 ++-
net/bluetooth/hci_core.c | 141 +++++++++++++++++++++++++++----------
net/bluetooth/l2cap_core.c | 47 +++++++++----
net/bluetooth/l2cap_sock.c | 2 +-
net/bluetooth/rfcomm/core.c | 51 +++++++++----
net/bluetooth/rfcomm/sock.c | 8 ++
8 files changed, 194 insertions(+), 72 deletions(-)
--
1.7.6
next reply other threads:[~2011-08-03 13:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-03 13:11 Luiz Augusto von Dentz [this message]
2011-08-03 13:11 ` [RFC 1/3] Bluetooth: prioritizing data over HCI Luiz Augusto von Dentz
2011-08-03 16:25 ` Peter Hurley
2011-08-03 17:49 ` Luiz Augusto von Dentz
2011-08-03 20:44 ` Gustavo Padovan
2011-08-03 20:53 ` Peter Hurley
2011-08-04 9:04 ` Luiz Augusto von Dentz
2011-08-03 13:11 ` [RFC 2/3] Bluetooth: set skbuffer priority based on L2CAP socket priority Luiz Augusto von Dentz
2011-08-03 13:11 ` [RFC 3/3] Bluetooth: make use sk_priority to priritize RFCOMM packets Luiz Augusto von Dentz
2011-08-03 21:14 ` [PATCH 0/3] RFC: prioritizing data over HCI Peter Hurley
2011-08-04 8:20 ` Luiz Augusto von Dentz
2011-08-04 12:55 ` Peter Hurley
2011-08-04 17:37 ` Mat Martineau
2011-08-04 23:09 ` Peter Hurley
2011-08-05 19:12 ` Gustavo Padovan
2011-08-08 23:29 ` Mat Martineau
2011-08-09 4:32 ` Gustavo Padovan
2011-08-10 17:38 ` Mat Martineau
2011-08-10 18:16 ` Luiz Augusto von Dentz
2011-08-10 22:15 ` Mat Martineau
2011-08-10 19:43 ` Peter Hurley
2011-08-11 0:18 ` Marcel Holtmann
2011-08-05 6:09 ` Luiz Augusto von Dentz
2011-08-05 19:14 ` Gustavo Padovan
2011-08-05 22:49 ` Luiz Augusto von Dentz
2011-08-06 18:53 ` Gustavo Padovan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1312377094-11285-1-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).