* [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement
@ 2012-02-07 14:43 Szymon Janc
2012-02-07 14:43 ` [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames Szymon Janc
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Szymon Janc @ 2012-02-07 14:43 UTC (permalink / raw)
To: linux-bluetooth
Cc: Luiz Augusto von Dentz, Ulisses Furquim, kanak.gupta, Szymon Janc
Make l2cap_ertm_send return number of pending I-Frames transmitted
instead of all (pending + retransmitted) I-Frames transmitted.
As only pending I-Frames are considered as acknowledgement, this could
lead to situation when no ACK was sent in __l2cap_send_ack (if only
already transmitted I-Frames were retransmitted).
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
---
net/bluetooth/l2cap_core.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 09cd860..5bb298d 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1448,8 +1448,10 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq);
- if (bt_cb(skb)->retries == 1)
+ if (bt_cb(skb)->retries == 1) {
chan->unacked_frames++;
+ nsent++;
+ }
chan->frames_sent++;
@@ -1457,8 +1459,6 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
chan->tx_send_head = NULL;
else
chan->tx_send_head = skb_queue_next(&chan->tx_q, skb);
-
- nsent++;
}
return nsent;
--
on behalf of ST-Ericsson
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames
2012-02-07 14:43 [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement Szymon Janc
@ 2012-02-07 14:43 ` Szymon Janc
2012-02-07 15:26 ` Ulisses Furquim
2012-02-09 13:45 ` Marcel Holtmann
2012-02-07 15:47 ` [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement Luiz Augusto von Dentz
` (3 subsequent siblings)
4 siblings, 2 replies; 9+ messages in thread
From: Szymon Janc @ 2012-02-07 14:43 UTC (permalink / raw)
To: linux-bluetooth
Cc: Luiz Augusto von Dentz, Ulisses Furquim, kanak.gupta, Szymon Janc
Pending I-Frame(s) are considered as acknowledgement. To void double
acking (via I-Frame and later via RR) clear ack timer when sending
first pending I-Frame.
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
---
net/bluetooth/l2cap_core.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 5bb298d..8dece4e 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1450,7 +1450,9 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
if (bt_cb(skb)->retries == 1) {
chan->unacked_frames++;
- nsent++;
+
+ if (!nsent++)
+ __clear_ack_timer(chan);
}
chan->frames_sent++;
--
on behalf of ST-Ericsson
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames
2012-02-07 14:43 ` [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames Szymon Janc
@ 2012-02-07 15:26 ` Ulisses Furquim
2012-02-07 15:50 ` Luiz Augusto von Dentz
2012-02-09 13:45 ` Marcel Holtmann
1 sibling, 1 reply; 9+ messages in thread
From: Ulisses Furquim @ 2012-02-07 15:26 UTC (permalink / raw)
To: Szymon Janc; +Cc: linux-bluetooth, Luiz Augusto von Dentz, kanak.gupta
Hi Szymon,
On Tue, Feb 7, 2012 at 12:43 PM, Szymon Janc <szymon.janc@tieto.com> wrote:
> Pending I-Frame(s) are considered as acknowledgement. To void double
> acking (via I-Frame and later via RR) clear ack timer when sending
> first pending I-Frame.
>
> Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
> ---
> net/bluetooth/l2cap_core.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index 5bb298d..8dece4e 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -1450,7 +1450,9 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
>
> if (bt_cb(skb)->retries == 1) {
> chan->unacked_frames++;
> - nsent++;
> +
> + if (!nsent++)
> + __clear_ack_timer(chan);
> }
>
> chan->frames_sent++;
If Luiz confirms the patches solve the problem I'm ok with them for now. Thanks.
Best regards,
--
Ulisses Furquim
ProFUSION embedded systems
http://profusion.mobi
Mobile: +55 19 9250 0942
Skype: ulissesffs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement
2012-02-07 14:43 [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement Szymon Janc
2012-02-07 14:43 ` [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames Szymon Janc
@ 2012-02-07 15:47 ` Luiz Augusto von Dentz
2012-02-08 16:40 ` Gustavo Padovan
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Luiz Augusto von Dentz @ 2012-02-07 15:47 UTC (permalink / raw)
To: Szymon Janc; +Cc: linux-bluetooth, Ulisses Furquim, kanak.gupta
Hi Szymon,
On Tue, Feb 7, 2012 at 4:43 PM, Szymon Janc <szymon.janc@tieto.com> wrote:
> Make l2cap_ertm_send return number of pending I-Frames transmitted
> instead of all (pending + retransmitted) I-Frames transmitted.
>
> As only pending I-Frames are considered as acknowledgement, this could
> lead to situation when no ACK was sent in __l2cap_send_ack (if only
> already transmitted I-Frames were retransmitted).
>
> Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
> ---
> net/bluetooth/l2cap_core.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index 09cd860..5bb298d 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -1448,8 +1448,10 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
>
> chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq);
>
> - if (bt_cb(skb)->retries == 1)
> + if (bt_cb(skb)->retries == 1) {
> chan->unacked_frames++;
> + nsent++;
> + }
>
> chan->frames_sent++;
>
> @@ -1457,8 +1459,6 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
> chan->tx_send_head = NULL;
> else
> chan->tx_send_head = skb_queue_next(&chan->tx_q, skb);
> -
> - nsent++;
> }
>
> return nsent;
> --
> on behalf of ST-Ericsson
>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames
2012-02-07 15:26 ` Ulisses Furquim
@ 2012-02-07 15:50 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 9+ messages in thread
From: Luiz Augusto von Dentz @ 2012-02-07 15:50 UTC (permalink / raw)
To: Ulisses Furquim; +Cc: Szymon Janc, linux-bluetooth, kanak.gupta
Hi Szymon,
On Tue, Feb 7, 2012 at 5:26 PM, Ulisses Furquim <ulisses@profusion.mobi> wrote:
> Hi Szymon,
>
> On Tue, Feb 7, 2012 at 12:43 PM, Szymon Janc <szymon.janc@tieto.com> wrote:
>> Pending I-Frame(s) are considered as acknowledgement. To void double
>> acking (via I-Frame and later via RR) clear ack timer when sending
>> first pending I-Frame.
>>
>> Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
>> ---
>> net/bluetooth/l2cap_core.c | 4 +++-
>> 1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
>> index 5bb298d..8dece4e 100644
>> --- a/net/bluetooth/l2cap_core.c
>> +++ b/net/bluetooth/l2cap_core.c
>> @@ -1450,7 +1450,9 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
>>
>> if (bt_cb(skb)->retries == 1) {
>> chan->unacked_frames++;
>> - nsent++;
>> +
>> + if (!nsent++)
>> + __clear_ack_timer(chan);
>> }
>>
>> chan->frames_sent++;
>
> If Luiz confirms the patches solve the problem I'm ok with them for now. Thanks.
>
> Best regards,
>
> --
> Ulisses Furquim
> ProFUSION embedded systems
> http://profusion.mobi
> Mobile: +55 19 9250 0942
> Skype: ulissesffs
Tested with test-server and test-client, both GET and PUT works.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement
2012-02-07 14:43 [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement Szymon Janc
2012-02-07 14:43 ` [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames Szymon Janc
2012-02-07 15:47 ` [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement Luiz Augusto von Dentz
@ 2012-02-08 16:40 ` Gustavo Padovan
2012-02-09 13:44 ` Marcel Holtmann
2012-02-09 15:28 ` Johan Hedberg
4 siblings, 0 replies; 9+ messages in thread
From: Gustavo Padovan @ 2012-02-08 16:40 UTC (permalink / raw)
To: Szymon Janc
Cc: linux-bluetooth, Luiz Augusto von Dentz, Ulisses Furquim,
kanak.gupta
Hi Szymon,
* Szymon Janc <szymon.janc@tieto.com> [2012-02-07 15:43:01 +0100]:
> Make l2cap_ertm_send return number of pending I-Frames transmitted
> instead of all (pending + retransmitted) I-Frames transmitted.
>
> As only pending I-Frames are considered as acknowledgement, this could
> lead to situation when no ACK was sent in __l2cap_send_ack (if only
> already transmitted I-Frames were retransmitted).
>
> Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
> ---
> net/bluetooth/l2cap_core.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
> index 09cd860..5bb298d 100644
> --- a/net/bluetooth/l2cap_core.c
> +++ b/net/bluetooth/l2cap_core.c
> @@ -1448,8 +1448,10 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
>
> chan->next_tx_seq = __next_seq(chan, chan->next_tx_seq);
>
> - if (bt_cb(skb)->retries == 1)
> + if (bt_cb(skb)->retries == 1) {
> chan->unacked_frames++;
> + nsent++;
> + }
>
> chan->frames_sent++;
>
> @@ -1457,8 +1459,6 @@ static int l2cap_ertm_send(struct l2cap_chan *chan)
> chan->tx_send_head = NULL;
> else
> chan->tx_send_head = skb_queue_next(&chan->tx_q, skb);
> -
> - nsent++;
> }
>
> return nsent;
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement
2012-02-07 14:43 [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement Szymon Janc
` (2 preceding siblings ...)
2012-02-08 16:40 ` Gustavo Padovan
@ 2012-02-09 13:44 ` Marcel Holtmann
2012-02-09 15:28 ` Johan Hedberg
4 siblings, 0 replies; 9+ messages in thread
From: Marcel Holtmann @ 2012-02-09 13:44 UTC (permalink / raw)
To: Szymon Janc
Cc: linux-bluetooth, Luiz Augusto von Dentz, Ulisses Furquim,
kanak.gupta
Hi Szymon,
> Make l2cap_ertm_send return number of pending I-Frames transmitted
> instead of all (pending + retransmitted) I-Frames transmitted.
>
> As only pending I-Frames are considered as acknowledgement, this could
> lead to situation when no ACK was sent in __l2cap_send_ack (if only
> already transmitted I-Frames were retransmitted).
>
> Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
> ---
> net/bluetooth/l2cap_core.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames
2012-02-07 14:43 ` [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames Szymon Janc
2012-02-07 15:26 ` Ulisses Furquim
@ 2012-02-09 13:45 ` Marcel Holtmann
1 sibling, 0 replies; 9+ messages in thread
From: Marcel Holtmann @ 2012-02-09 13:45 UTC (permalink / raw)
To: Szymon Janc
Cc: linux-bluetooth, Luiz Augusto von Dentz, Ulisses Furquim,
kanak.gupta
Hi Szymon,
> Pending I-Frame(s) are considered as acknowledgement. To void double
> acking (via I-Frame and later via RR) clear ack timer when sending
> first pending I-Frame.
>
> Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
> ---
> net/bluetooth/l2cap_core.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Regards
Marcel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement
2012-02-07 14:43 [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement Szymon Janc
` (3 preceding siblings ...)
2012-02-09 13:44 ` Marcel Holtmann
@ 2012-02-09 15:28 ` Johan Hedberg
4 siblings, 0 replies; 9+ messages in thread
From: Johan Hedberg @ 2012-02-09 15:28 UTC (permalink / raw)
To: Szymon Janc
Cc: linux-bluetooth, Luiz Augusto von Dentz, Ulisses Furquim,
kanak.gupta
Hi Szymon,
On Tue, Feb 07, 2012, Szymon Janc wrote:
> Make l2cap_ertm_send return number of pending I-Frames transmitted
> instead of all (pending + retransmitted) I-Frames transmitted.
>
> As only pending I-Frames are considered as acknowledgement, this could
> lead to situation when no ACK was sent in __l2cap_send_ack (if only
> already transmitted I-Frames were retransmitted).
>
> Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
> ---
> net/bluetooth/l2cap_core.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
Both patches have been applied to my bluetooth-next tree. Thanks.
Johan
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-02-09 15:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07 14:43 [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement Szymon Janc
2012-02-07 14:43 ` [PATCH 2/2] Bluetooth: Fix double acking I-Frames when sending pending I-Frames Szymon Janc
2012-02-07 15:26 ` Ulisses Furquim
2012-02-07 15:50 ` Luiz Augusto von Dentz
2012-02-09 13:45 ` Marcel Holtmann
2012-02-07 15:47 ` [PATCH 1/2] Bluetooth: Fix possible missing I-Frame acknowledgement Luiz Augusto von Dentz
2012-02-08 16:40 ` Gustavo Padovan
2012-02-09 13:44 ` Marcel Holtmann
2012-02-09 15:28 ` Johan Hedberg
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).