Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] Bluetooth: make L2CAP sockets to inherit parent's priority
@ 2011-11-04 14:03 Luiz Augusto von Dentz
  2011-11-04 14:03 ` [PATCH 2/2] Bluetooth: make RFCOMM " Luiz Augusto von Dentz
  2011-11-04 21:06 ` [PATCH 1/2] Bluetooth: make L2CAP " Marcel Holtmann
  0 siblings, 2 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-04 14:03 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes priority set on a listen socket to be passed when accepting
new connections.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/l2cap_sock.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 664762e..5a5d2c6 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -968,6 +968,7 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)
 		struct l2cap_chan *pchan = l2cap_pi(parent)->chan;
 
 		sk->sk_type = parent->sk_type;
+		sk->sk_priority = parent->sk_priority;
 		bt_sk(sk)->defer_setup = bt_sk(parent)->defer_setup;
 
 		chan->chan_type = pchan->chan_type;
-- 
1.7.6.4


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

* [PATCH 2/2] Bluetooth: make RFCOMM sockets to inherit parent's priority
  2011-11-04 14:03 [PATCH 1/2] Bluetooth: make L2CAP sockets to inherit parent's priority Luiz Augusto von Dentz
@ 2011-11-04 14:03 ` Luiz Augusto von Dentz
  2011-11-04 21:06 ` [PATCH 1/2] Bluetooth: make L2CAP " Marcel Holtmann
  1 sibling, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-04 14:03 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This makes priority set on a listen socket to be passed when accepting
new connections.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/rfcomm/sock.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 40988e2..81d658d 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -260,6 +260,7 @@ static void rfcomm_sock_init(struct sock *sk, struct sock *parent)
 
 	if (parent) {
 		sk->sk_type = parent->sk_type;
+		sk->sk_priority = parent->sk_priority;
 		pi->dlc->defer_setup = bt_sk(parent)->defer_setup;
 
 		pi->sec_level = rfcomm_pi(parent)->sec_level;
-- 
1.7.6.4


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

* Re: [PATCH 1/2] Bluetooth: make L2CAP sockets to inherit parent's priority
  2011-11-04 14:03 [PATCH 1/2] Bluetooth: make L2CAP sockets to inherit parent's priority Luiz Augusto von Dentz
  2011-11-04 14:03 ` [PATCH 2/2] Bluetooth: make RFCOMM " Luiz Augusto von Dentz
@ 2011-11-04 21:06 ` Marcel Holtmann
  2011-11-15  9:53   ` Luiz Augusto von Dentz
  1 sibling, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2011-11-04 21:06 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This makes priority set on a listen socket to be passed when accepting
> new connections.

I am in general fine with this, but is this the expected behavior of
SO_PRIORITY from other socket types?

Regards

Marcel



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

* Re: [PATCH 1/2] Bluetooth: make L2CAP sockets to inherit parent's priority
  2011-11-04 21:06 ` [PATCH 1/2] Bluetooth: make L2CAP " Marcel Holtmann
@ 2011-11-15  9:53   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2011-11-15  9:53 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,

On Fri, Nov 4, 2011 at 11:06 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Luiz,
>
>> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>>
>> This makes priority set on a listen socket to be passed when accepting
>> new connections.
>
> I am in general fine with this, but is this the expected behavior of
> SO_PRIORITY from other socket types?

Apparently it is not inherited in other socket types, so I guess we
should not inherit. In this case I will fix l2test/rctest to use
setsockopt on accepted sockets, similar to what is done with
SO_LINGER.

-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2011-11-15  9:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-04 14:03 [PATCH 1/2] Bluetooth: make L2CAP sockets to inherit parent's priority Luiz Augusto von Dentz
2011-11-04 14:03 ` [PATCH 2/2] Bluetooth: make RFCOMM " Luiz Augusto von Dentz
2011-11-04 21:06 ` [PATCH 1/2] Bluetooth: make L2CAP " Marcel Holtmann
2011-11-15  9:53   ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox