All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] RFC: prioritizing data over HCI
@ 2011-08-03 13:11 Luiz Augusto von Dentz
  2011-08-03 13:11 ` [RFC 1/3] Bluetooth: " Luiz Augusto von Dentz
                   ` (4 more replies)
  0 siblings, 5 replies; 26+ messages in thread
From: Luiz Augusto von Dentz @ 2011-08-03 13:11 UTC (permalink / raw)
  To: linux-bluetooth

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


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2011-08-11  0:18 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-03 13:11 [PATCH 0/3] RFC: prioritizing data over HCI Luiz Augusto von Dentz
2011-08-03 13:11 ` [RFC 1/3] Bluetooth: " 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.