linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Allow unsegmented SDU retries on sock_queue_rcv_skb failure.
@ 2011-04-28 11:39 Ruiyi Zhang
  2011-05-05 16:30 ` Gustavo F. Padovan
  2011-05-06  4:44 ` [PATCH v2] " Ruiyi Zhang
  0 siblings, 2 replies; 6+ messages in thread
From: Ruiyi Zhang @ 2011-04-28 11:39 UTC (permalink / raw)
  To: padovan; +Cc: linux-bluetooth, Ruiyi Zhang

 In L2CAP_SDU_UNSEGMENTED case, if sock_queue_rcv_skb returns error,
 l2cap_ertm_reassembly_sdu should not return 0 so as to insert the
 skb into BUSY_QUEUE for later retries.


Signed-off-by: Ruiyi Zhang <Ruiyi.zhang@atheros.com>
---
 net/bluetooth/l2cap_core.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index ca27f3a..3b2f140 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2784,8 +2784,7 @@ static int l2cap_ertm_reassembly_sdu(struct sock *sk, struct sk_buff *skb, u16 c
 			goto drop;
 
 		err = sock_queue_rcv_skb(sk, skb);
-		if (!err)
-			return err;
+		return err;
 
 		break;
 
-- 
1.7.1


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

* Re: [PATCH] Bluetooth: Allow unsegmented SDU retries on sock_queue_rcv_skb failure.
  2011-04-28 11:39 [PATCH] Bluetooth: Allow unsegmented SDU retries on sock_queue_rcv_skb failure Ruiyi Zhang
@ 2011-05-05 16:30 ` Gustavo F. Padovan
  2011-05-06  4:44 ` [PATCH v2] " Ruiyi Zhang
  1 sibling, 0 replies; 6+ messages in thread
From: Gustavo F. Padovan @ 2011-05-05 16:30 UTC (permalink / raw)
  To: Ruiyi Zhang; +Cc: linux-bluetooth

Hi Ruiyi,

* Ruiyi Zhang <Ruiyi.zhang@atheros.com> [2011-04-28 19:39:41 +0800]:

>  In L2CAP_SDU_UNSEGMENTED case, if sock_queue_rcv_skb returns error,
>  l2cap_ertm_reassembly_sdu should not return 0 so as to insert the
>  skb into BUSY_QUEUE for later retries.
> 
> 
> Signed-off-by: Ruiyi Zhang <Ruiyi.zhang@atheros.com>
> ---
>  net/bluetooth/l2cap_core.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index ca27f3a..3b2f140 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -2784,8 +2784,7 @@ static int l2cap_ertm_reassembly_sdu(struct sock *sk, struct sk_buff *skb, u16 c
>  			goto drop;
>  
>  		err = sock_queue_rcv_skb(sk, skb);
> -		if (!err)
> -			return err;
> +		return err;
>  
>  		break;

I prefer simply
		return sock_queue_rcv_skb();

and remove the break inclusive.

-- 
Gustavo F. Padovan
http://profusion.mobi

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

* [PATCH v2] Bluetooth: Allow unsegmented SDU retries on sock_queue_rcv_skb failure.
  2011-04-28 11:39 [PATCH] Bluetooth: Allow unsegmented SDU retries on sock_queue_rcv_skb failure Ruiyi Zhang
  2011-05-05 16:30 ` Gustavo F. Padovan
@ 2011-05-06  4:44 ` Ruiyi Zhang
  2011-05-11 17:55   ` Gustavo F. Padovan
  1 sibling, 1 reply; 6+ messages in thread
From: Ruiyi Zhang @ 2011-05-06  4:44 UTC (permalink / raw)
  To: Gustavo F. Padovan; +Cc: linux-bluetooth, Ruiyi Zhang

In L2CAP_SDU_UNSEGMENTED case, if sock_queue_rcv_skb returns error,
l2cap_ertm_reassembly_sdu should not return 0 so as to insert the
skb into BUSY_QUEUE for later retries.

Signed-off-by: Ruiyi Zhang <Ruiyi.zhang@atheros.com>
---
 net/bluetooth/l2cap_core.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 2c8dd44..623421c 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2784,11 +2784,7 @@ static int l2cap_ertm_reassembly_sdu(struct sock *sk, struct sk_buff *skb, u16 c
 		if (pi->conn_state & L2CAP_CONN_SAR_SDU)
 			goto drop;
 
-		err = sock_queue_rcv_skb(sk, skb);
-		if (!err)
-			return err;
-
-		break;
+		return sock_queue_rcv_skb(sk, skb);
 
 	case L2CAP_SDU_START:
 		if (pi->conn_state & L2CAP_CONN_SAR_SDU)
-- 
1.7.1


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

* Re: [PATCH v2] Bluetooth: Allow unsegmented SDU retries on sock_queue_rcv_skb failure.
  2011-05-06  4:44 ` [PATCH v2] " Ruiyi Zhang
@ 2011-05-11 17:55   ` Gustavo F. Padovan
  2011-05-13  5:07     ` [PATCH v3] " Ruiyi Zhang
  0 siblings, 1 reply; 6+ messages in thread
From: Gustavo F. Padovan @ 2011-05-11 17:55 UTC (permalink / raw)
  To: Ruiyi Zhang; +Cc: linux-bluetooth

Hi Ruiyi,

* Ruiyi Zhang <Ruiyi.zhang@atheros.com> [2011-05-06 12:44:11 +0800]:

> In L2CAP_SDU_UNSEGMENTED case, if sock_queue_rcv_skb returns error,
> l2cap_ertm_reassembly_sdu should not return 0 so as to insert the
> skb into BUSY_QUEUE for later retries.
> 
> Signed-off-by: Ruiyi Zhang <Ruiyi.zhang@atheros.com>
> ---
>  net/bluetooth/l2cap_core.c |    6 +-----
>  1 files changed, 1 insertions(+), 5 deletions(-)

Patch has not applied upstream. Please rebase onto bluetooth-next. Thanks.

-- 
Gustavo F. Padovan
http://profusion.mobi

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

* [PATCH v3] Bluetooth: Allow unsegmented SDU retries on sock_queue_rcv_skb failure.
  2011-05-11 17:55   ` Gustavo F. Padovan
@ 2011-05-13  5:07     ` Ruiyi Zhang
  2011-05-13 18:23       ` Gustavo F. Padovan
  0 siblings, 1 reply; 6+ messages in thread
From: Ruiyi Zhang @ 2011-05-13  5:07 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Gustavo F. Padovan, Ruiyi Zhang

In L2CAP_SDU_UNSEGMENTED case, if sock_queue_rcv_skb returns error,
l2cap_ertm_reassembly_sdu should not return 0 so as to insert the
skb into BUSY_QUEUE for later retries.

Signed-off-by: Ruiyi Zhang <Ruiyi.Zhang@Atheros.com>
---
 net/bluetooth/l2cap_core.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index a5ab4a2..a99e5d7 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2928,11 +2928,7 @@ static int l2cap_ertm_reassembly_sdu(struct l2cap_chan *chan, struct sk_buff *sk
 		if (chan->conn_state & L2CAP_CONN_SAR_SDU)
 			goto drop;
 
-		err = sock_queue_rcv_skb(chan->sk, skb);
-		if (!err)
-			return err;
-
-		break;
+		return sock_queue_rcv_skb(chan->sk, skb);
 
 	case L2CAP_SDU_START:
 		if (chan->conn_state & L2CAP_CONN_SAR_SDU)
-- 
1.7.1


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

* Re: [PATCH v3] Bluetooth: Allow unsegmented SDU retries on sock_queue_rcv_skb failure.
  2011-05-13  5:07     ` [PATCH v3] " Ruiyi Zhang
@ 2011-05-13 18:23       ` Gustavo F. Padovan
  0 siblings, 0 replies; 6+ messages in thread
From: Gustavo F. Padovan @ 2011-05-13 18:23 UTC (permalink / raw)
  To: Ruiyi Zhang; +Cc: linux-bluetooth

Hi Ruiyi,

* Ruiyi Zhang <Ruiyi.Zhang@Atheros.com> [2011-05-13 13:07:52 +0800]:

> In L2CAP_SDU_UNSEGMENTED case, if sock_queue_rcv_skb returns error,
> l2cap_ertm_reassembly_sdu should not return 0 so as to insert the
> skb into BUSY_QUEUE for later retries.
> 
> Signed-off-by: Ruiyi Zhang <Ruiyi.Zhang@Atheros.com>
> ---
>  net/bluetooth/l2cap_core.c |    6 +-----
>  1 files changed, 1 insertions(+), 5 deletions(-)

Applied, thanks.

-- 
Gustavo F. Padovan
http://profusion.mobi

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

end of thread, other threads:[~2011-05-13 18:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-28 11:39 [PATCH] Bluetooth: Allow unsegmented SDU retries on sock_queue_rcv_skb failure Ruiyi Zhang
2011-05-05 16:30 ` Gustavo F. Padovan
2011-05-06  4:44 ` [PATCH v2] " Ruiyi Zhang
2011-05-11 17:55   ` Gustavo F. Padovan
2011-05-13  5:07     ` [PATCH v3] " Ruiyi Zhang
2011-05-13 18:23       ` Gustavo F. Padovan

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).