2012-10-02 18:18:56

by Ajay

[permalink] [raw]
Subject: L2CAP Flush_Timeout Error

Hi,
Im currently working in an A2DP stuff, where i noticed an error.
Here i wanted to monitor the flushed packets due to timeout.

I used the l2test code for my testing purpose

On client side "l2test -R -S <bdadddr> "
and i set the flush timeout as 100 (opts.flush_to = 100)

But later when i print the getsockopt value of flush_to, it
was showing some default value (65532) harcoded at kernel side.

so how can i flush some packets in the sender side, without
enabling any retransmission and able to monitor the sequence number in
the receiver side.


--
Thanks & regards

AJAY KV
8892753703



2012-10-02 20:21:23

by Ajay

[permalink] [raw]
Subject: Re: L2CAP Flush_Timeout Error



> On Tue, Oct 02, 2012 at 11:48:56PM +0530, Ajay wrote:
>> Hi,
>> Im currently working in an A2DP stuff, where i noticed an error.
>> Here i wanted to monitor the flushed packets due to timeout.
>>
>> I used the l2test code for my testing purpose
>>
>> On client side "l2test -R -S <bdadddr> "
>> and i set the flush timeout as 100 (opts.flush_to = 100)
>>
>> But later when i print the getsockopt value of flush_to, it
>> was showing some default value (65532) harcoded at kernel side.
>
> Try the patch in this thread.
>
> Best regards
> Andrei Emeltchenko
>

Thanks for your patch , its working fine. Now even if i set the
flush_timeout = 5 , i couldnt able to see any packets missing at the
receiver side . Here in the sender side im giving proper sequence
number, and these same sequence is getting at the receiver side . i
doubted even though its flushing , controller is doing some
retransmission job...please help . My kernel is 2.6.39 , and im using
BASIC MODE of transmission. so shall i change it to STEAMING MODE ????

--
Thanks & regards

AJAY KV
8892753703



2012-10-02 19:46:01

by Ajay

[permalink] [raw]
Subject: Re: L2CAP Flush_Timeout Error

On Monday 08 October 2012 02:41 PM, Andrei Emeltchenko wrote:
> On Tue, Oct 02, 2012 at 11:48:56PM +0530, Ajay wrote:
>> Hi,
>> Im currently working in an A2DP stuff, where i noticed an error.
>> Here i wanted to monitor the flushed packets due to timeout.
>>
>> I used the l2test code for my testing purpose
>>
>> On client side "l2test -R -S <bdadddr> "
>> and i set the flush timeout as 100 (opts.flush_to = 100)
>>
>> But later when i print the getsockopt value of flush_to, it
>> was showing some default value (65532) harcoded at kernel side.
>
> Try the patch in this thread.
>
> Best regards
> Andrei Emeltchenko
>

Thanks for your patch , its working fine. Now even if i set the
flush_timeout = 5 , i couldnt able to see any packets missing at the
receiver side . Here in the sender side im giving proper sequence
number, and these same sequence is getting at the receiver side . i
doubted even though its flushing , controller is doing some
retransmission job...please help . My kernel is 2.6.39 , and im using
BASIC MODE of transmission. so shall i change it to STEAMING MODE ????

--
Thanks & regards

AJAY KV
8892753703

2012-10-08 09:11:46

by Andrei Emeltchenko

[permalink] [raw]
Subject: Re: L2CAP Flush_Timeout Error

On Tue, Oct 02, 2012 at 11:48:56PM +0530, Ajay wrote:
> Hi,
> Im currently working in an A2DP stuff, where i noticed an error.
> Here i wanted to monitor the flushed packets due to timeout.
>
> I used the l2test code for my testing purpose
>
> On client side "l2test -R -S <bdadddr> "
> and i set the flush timeout as 100 (opts.flush_to = 100)
>
> But later when i print the getsockopt value of flush_to, it
> was showing some default value (65532) harcoded at kernel side.

Try the patch in this thread.

Best regards
Andrei Emeltchenko


2012-10-08 09:09:16

by Andrei Emeltchenko

[permalink] [raw]
Subject: [PATCH] Bluetooth: Allow to set flush timeout

From: Andrei Emeltchenko <[email protected]>


Signed-off-by: Andrei Emeltchenko <[email protected]>
---
net/bluetooth/l2cap_sock.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 0c05d7d..70578d8 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -536,6 +536,7 @@ static int l2cap_sock_setsockopt_old(struct socket *sock, int optname, char __us
chan->fcs = opts.fcs;
chan->max_tx = opts.max_tx;
chan->tx_win = opts.txwin_size;
+ chan->flush_to = opts.flush_to;
break;

case L2CAP_LM:
--
1.7.9.5