2006-08-08 03:56:58

by Mayank BATRA

[permalink] [raw]
Subject: [Bluez-devel] Host Controller to Host Flow Control

Hi,

I wanted to know whether Host Controller to Host Flow Control has been implemented in the BlueZ stack?
I am interested in giving it a shot in case it is not already there or someone is not working on it.

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2006-08-23 20:14:07

by Ulisses Furquim

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Steven,

On 8/23/06, Steven Singer <[email protected]> wrote:
> Sending back the command gives a commitment to the chip that you will
> be able to take another maximum size block of data. Sending the command
> before this is true will lead to a disaster.

Yes, you're right. The problem seems to be knowing when this
commitment can be given if we don't have a preallocated static buffer
or some dynamic allocation strategy implemented.

[ snip ]

> These are all advanced techniques. For the moment, it's probably
> easiest just to send tokens as soon as they become available. Worry
> about optimising it once it's working properly.

Thanks for pointing all that out. :-) We're trying to make it work but
we really have to know when we can be sure a flow control token became
avaialble.

> Don't forget that when a disconnection occurs, all outstanding
> flow control tokens for that handle are returned implicitly.

Right, I won't forget, thanks.

Best regards,

-- Ulisses

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-23 18:44:59

by Steven Singer

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Ulisses Furquim wrote:
> I'm also still not sure when we should send the host number of
> completed packets command. The specification says this command must be
> sent after the buffers are freed on the host but I don't know if we
> have to be strict about this. :-)

Sending back the command gives a commitment to the chip that you will
be able to take another maximum size block of data. Sending the command
before this is true will lead to a disaster.

So, if you have only a finite amount of memory to hold data coming from
the chip, you need to have at least enough space in that memory to hold
the maximum amount of data the chip could send you at that point.

You need to worry about this most on resource limited systems. In
which case, you almost certainly want to preallocate the memory for
the receive so that you can guarantee that it will be available when
the packet arrives.

If you preallocate a static buffer then as soon as the data is passed
out of the buffer the space being held in that buffer by that message
can be freed. This is the earliest the command could be issued. This
works nicely with ring buffers and is the scenario the spec is thinking
of.

It's then a system problem to make sure that you can't take messages
out of that buffer and queue them for their recipients so fast that you
deplete the memory of the entire system. In this case you can put in
some flow control mechanism internally in your system and take messages
out of the static buffer only when flow control allows.

With a dynamic allocation strategy, you should really be sending back
the command once you've allocated enough memory to receive the next
packet from the chip. Again, this could involve a flow control interlock
with the rest of the system.

One strategy for flow control is for the final consumer of the message
to inform you that the message has been processed and at that point you
could allocate memory to hold a new from chip message and send the
command. Alternatively, you could put flow control between each layer of
the stack so that the stop indication gradually flows back from a
stalled layer until the host stops issuing flow control tokens to the
controller.

Implementing host controller to host flow control without also
implementing some flow control mechanism through the layers of your
stack (if necessary, all the way to the application) just pushes
any memory exhaustion issues to other points in the system.

On a big system (with multiple megabytes of memory free) this may not
be a significant issue. On a small embedded system where you need to
track to the kilobyte level, it can be.

Apart from avoiding a crash, the other issue of interest is bandwidth.
You want to make sure that the link from the controller never stalls.
To do this, you must make sure that the controller never runs out of
flow control tokens, that is, you want to return them in advance of
the controller running out. How much in advance depends on the
reaction time of the controller. I would have thought that provided
you're returning tokens, let's say, at least 5 ms and at least 2 tokens
before the controller will run out then it shouldn't stall. However,
if you can afford it, a much larger safety margin would be nicer.

It can be more efficient on bandwidth limited host transports (UART) to
return multiple tokens in a single command. This suggests that you
shouldn't queue up lots of commands each to free up one token. Ideally
you'd note that you needed to send a token, but not actually fill in the
command payload until the host transport was free to send the command. If
the transport were immediately free then you'd send just a single token
but if the transport were busy (say, sending a large data packet to the
controller) then you might be able to send multiple tokens in a single
command once the transport freed up.

One thing you may want to watch is whether the controller can track all
the tokens you give it. If it can't then it may be able to use just a
subset. I which case, if you're waiting for the number of outstanding
tokens to hit a watermark, you may find that flow control stops long
before that point because the controller has run out of resources to
track outstanding packets.

These are all advanced techniques. For the moment, it's probably
easiest just to send tokens as soon as they become available. Worry
about optimising it once it's working properly.

Don't forget that when a disconnection occurs, all outstanding
flow control tokens for that handle are returned implicitly.

- Steven
--


To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-23 13:06:07

by Ulisses Furquim

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

On 8/23/06, Mayank BATRA <[email protected]> wrote:
> case OCF_HOST_BUFFER_SIZE:
> status = *((__u8 *) skb->data);
> - if (status) {
> + if (!status) {
> + struct hci_cp_set_host_flow_ctl cp;
> +
> + if (!(cp.host_flow_ctl = hdev->host_flow_ctl))
> + break;
> +
> + hci_send_cmd(hdev, OGF_HOST_CTL,
> + OCF_SET_HOST_FLOW_CTL, sizeof(cp),
> &cp);
> + } else {
> BT_DBG("%s OCF_BUFFER_SIZE failed %d", hdev->name,
> status);
> hci_req_complete(hdev, status);
> }
>
> If status = 0 it means that the command was success. But in the patch that
> you sent, it's the other way round. Is it a mistake?

I think it's right, take a look at the patch again (there's a !status there).

Regards,

-- Ulisses

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-23 14:28:43

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

> > how about something like the attached patch? I've used some of
> > Mayank's code and added some other parts. It's not complete and it's
> > only compile-tested yet.
>
> I think we will require the attached patch for setting the various
> parameters of hci_dev structure from hciconfig (through ioctls).

no. The kernel will find out what host flow control mode to use when
someone sends the HCI command. And hciconfig should only send this
command.

Variable buffer size are not making sense in my opinion. We know what
can handle and we should always accept the maximum. Let the chip decide
the actual used buffer size.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-23 05:48:08

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Ulisses,

> how about something like the attached patch? I've used some of
> Mayank's code and added some other parts. It's not complete and it's
> only compile-tested yet.

case OCF_HOST_BUFFER_SIZE:
status =3D *((__u8 *) skb->data);
- if (status) {
+ if (!status) {
+ struct hci_cp_set_host_flow_ctl cp;
+
+ if (!(cp.host_flow_ctl =3D hdev->host_flow_ctl))
+ break;
+
+ hci_send_cmd(hdev, OGF_HOST_CTL,
+ OCF_SET_HOST_FLOW_CTL, sizeof(cp),
&cp);
+ } else {
BT_DBG("%s OCF_BUFFER_SIZE failed %d", hdev->name,
status);
hci_req_complete(hdev, status);
}

If status =3D 0 it means that the command was success. But in the patch that
you sent, it=92s the other way round. Is it a mistake?

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-23 03:54:40

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Ulisses,

> how about something like the attached patch? I've used some of
> Mayank's code and added some other parts. It's not complete and it's
> only compile-tested yet.

I'll try this today.

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-22 05:54:27

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

> > please follow the names, I just introduced for the libraray.
> > They don't
> > have to match, but I prefer if they do. The structs for
> > setting the host
> > to host controller flow control are also not needed. Only the
> > OCF value.
>
> But actually, set controller to host flow control requires a parameter to
> tell which flow control we want to set. ACL, SCO or both. So a uint8_t
> parameter is required and hence the struct.

we don't send it from the kernel, do we? And even if we do, please check
the HCI Write Scan Enable command.

> > And the number of completed packets struct is variable. Please compare
> > the number of completed packets events.
>
> But a variable sized host number of completed packets command is required if
> we are sending number of completed packets for more than one connection
> handle in the same command, which is not the case currently.

Even if we don't do it at the moment, this doesn't mean that we mess up
the kernel with wrong structs.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-22 03:52:30

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Marcel,

> please follow the names, I just introduced for the libraray.
> They don't
> have to match, but I prefer if they do. The structs for
> setting the host
> to host controller flow control are also not needed. Only the
> OCF value.

But actually, set controller to host flow control requires a parameter to
tell which flow control we want to set. ACL, SCO or both. So a uint8_t
parameter is required and hence the struct.

> And the number of completed packets struct is variable. Please compare
> the number of completed packets events.

But a variable sized host number of completed packets command is required if
we are sending number of completed packets for more than one connection
handle in the same command, which is not the case currently.

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-22 05:42:00

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Ulisses,

> And I really think we should have a hci_send_cmd_raw() or something
> like that instead of messing with hci_send_cmd(). Or maybe a new
> function that creates a skb from scratch just to send the host number
> of completed packets command? Marcel, what do you think?

no additional function for only one call. We either make hci_send_cmd()
aware of the special case or we need to queue this command by hand. I
have to check the internals of the command flow before I can actually
tell you what's the best way. Haven't looked at that for quite some time
and don't know it from memory.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-22 05:39:21

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

> > I've noticed you sent a diff against hci.h from bluez-libs and not the
> > one in the kernel, so please check that.
>
> Oops. My mistake. Here is the diff for the one in the kernel.

please follow the names, I just introduced for the libraray. They don't
have to match, but I prefer if they do. The structs for setting the host
to host controller flow control are also not needed. Only the OCF value.
And the number of completed packets struct is variable. Please compare
the number of completed packets events.

> > One other thing is that you
> > have to be careful with endianess issues (please check your patch
> > against hci_core.c).
>
> Which one do you mean in particular? 0x0008 or connection handle?

Every parameter that is uint16 needs an endian conversation.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-21 21:10:55

by Ulisses Furquim

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

On 8/21/06, Mayank BATRA <[email protected]> wrote:
> There is no wrong behaviour as such. Just that Host Number of completed
> packets is being sent as soon as we get ACL Data on any connection handle.
>
> Do you think that the attached patch is decent enough for sending Host
> Number of completed packets to the raw queue? (or is there a better way than
> this?)

I've noticed you sent a diff against hci.h from bluez-libs and not the
one in the kernel, so please check that. One other thing is that you
have to be careful with endianess issues (please check your patch
against hci_core.c).

And I really think we should have a hci_send_cmd_raw() or something
like that instead of messing with hci_send_cmd(). Or maybe a new
function that creates a skb from scratch just to send the host number
of completed packets command? Marcel, what do you think?

Regards,

-- Ulisses

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-21 14:00:11

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

> > I added the two missing decodings to hcidump now.
>
> I see the following five missing decodings in hcidump. Which ones did you
> miss out?
>
> (1)< HCI Command: Host Buffer Size (0x03|0x0033) plen 7
> 0000: 00 04 ff 08 00 08 00 .......
>
> (2) > HCI Event: Command Complete (0x0e) plen 4
> Host Buffer Size (0x03|0x0033) ncmd 1
> 0000: 00 .
>
> (3) < HCI Command: Set Host Controller To Host Flow Control (0x03|0x0031)
> plen 1
> 0000: 01 .
>
> (4) > HCI Event: Command Complete (0x0e) plen 4
> Set Host Controller To Host Flow Control (0x03|0x0031) ncmd 1
> 0000: 00 .
>
> (5) < HCI Command: Host Number of Completed Packets (0x03|0x0035) plen 5
> 0000: 01 28 00 01 00 .(...

the code in the CVS should now take care of all five.

> > You have to
> > store the setting for host_fc in hci_dev, because it can be different
> > for separate controllers.
>
> I agree. But how to provide the user with the facility to switch flow
> control on/off? Like we modify security settings through hcid.conf.

As I said, the kernel can track HCI command and their results. So you
can actually detect inside the kernel if someone switched it on. See the
page and inquiry scan for an example.

After that you can simply add an additional command to hciconfig to set
the host flow control and everything is fine.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-21 13:05:32

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Marcel,

> I added the two missing decodings to hcidump now.

I see the following five missing decodings in hcidump. Which ones did you
miss out?

(1)< HCI Command: Host Buffer Size (0x03|0x0033) plen 7
0000: 00 04 ff 08 00 08 00 .......

(2) > HCI Event: Command Complete (0x0e) plen 4
Host Buffer Size (0x03|0x0033) ncmd 1
0000: 00 .

(3) < HCI Command: Set Host Controller To Host Flow Control (0x03|0x0031)
plen 1
0000: 01 .

(4) > HCI Event: Command Complete (0x0e) plen 4
Set Host Controller To Host Flow Control (0x03|0x0031) ncmd 1
0000: 00 .

(5) < HCI Command: Host Number of Completed Packets (0x03|0x0035) plen 5
0000: 01 28 00 01 00 .(...

> Need to check that. At least you also have to check for OGF.

That's true. No other choice.

> You have to
> store the setting for host_fc in hci_dev, because it can be different
> for separate controllers.

I agree. But how to provide the user with the facility to switch flow
control on/off? Like we modify security settings through hcid.conf.

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-21 14:50:57

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

> > please use "hcidump -X -V"
>
> Here is the log with hcidump -X -V

I added the two missing decodings to hcidump now.

> > and if the HCI shows a wrong behavior with
> > any of the new commands, please fix it.
>
> There is no wrong behaviour as such. Just that Host Number of completed
> packets is being sent as soon as we get ACL Data on any connection handle.
>
> Do you think that the attached patch is decent enough for sending Host
> Number of completed packets to the raw queue? (or is there a better way than
> this?)

Need to check that. At least you also have to check for OGF. You have to
store the setting for host_fc in hci_dev, because it can be different
for separate controllers.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-21 13:34:21

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

> > you need to use the raw queue for sending this command. You can't use
> > the normal sent queue. We do the same for vendor specific commands.
>
> I am now using the raw queue for sending this command. Can you have a look
> at the attached hcidump log to see if the behaviour is what we need?

please use "hcidump -X -V" and if the HCI shows a wrong behavior with
any of the new commands, please fix it.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-21 11:51:34

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

> > Here you go. Though, it is not the latest version of files
> > that I am working
> > on.
> > It's a quick and dirty approach right now. Sending Host
> > Number of Completed
> > Packets as soon as we receive ACL Data Packet on any
> > connection handle.
> > Once this works, I'll try to send Host Number of completed
> > packets after
> > reception of 8 packets.
>
> I am still facing the same issue that since there is no event generated for
> Host Number of Completed packets command and the BlueZ stack is expecting an
> event for this command, the command finally times out. dmesg shows
> "hci_cmd_task: hci0 command tx timeout". The ACL data transfer stops after
> this. Also, when I disconnect, I see that all the remaining Host Number of
> completed packets commands that were queued earlier on, are sent finally.

you need to use the raw queue for sending this command. You can't use
the normal sent queue. We do the same for vendor specific commands.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-21 09:41:46

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Marcel,

> Here you go. Though, it is not the latest version of files
> that I am working
> on.
> It's a quick and dirty approach right now. Sending Host
> Number of Completed
> Packets as soon as we receive ACL Data Packet on any
> connection handle.
> Once this works, I'll try to send Host Number of completed
> packets after
> reception of 8 packets.


I am still facing the same issue that since there is no event generated for
Host Number of Completed packets command and the BlueZ stack is expecting an
event for this command, the command finally times out. dmesg shows
"hci_cmd_task: hci0 command tx timeout". The ACL data transfer stops after
this. Also, when I disconnect, I see that all the remaining Host Number of
completed packets commands that were queued earlier on, are sent finally.

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-18 14:04:08

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

> > it is not that complicated. We have to do this for a lot of commands
> > that you can use from userspace and the kernel has to detect its
> > execution. You might wanna do it anyway so you should have a
> > look at the
> > examples in hci_event.c inside the kernel code.
>
> I'm almost done with the implementation. I'm testing it currently, but there
> is a problem. According to the spec, for Host Number of Completed Packets
> command, no event is generated by the controller if there is no error. But,
> I think the BlueZ stack is expecting an event for this command. Can you
> suggest how can I prevent waiting for an event for this command?
>
> Dmesg shows the following:
>
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> hci_cmd_task: hci0 command tx timeout
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> hci_cmd_task: hci0 command tx timeout
> Warning: null TTY for (d8:00) in tty_fasync
> hci_cmd_task: hci0 command tx timeout
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> hci_cmd_task: hci0 command tx timeout
> Sending Host No of Completed Packets:
> hci_cmd_task: hci0 command tx timeout
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> Sending Host No of Completed Packets:
> hci_cmd_task: hci0 command tx timeout
> Sending Host No of Completed Packets:
>
>
> =======================================
>
> Note that "Sending Host No of Completed Packets:" has been added by me. Can
> you tell me the reason for "hci_cmd_task: hci0 command tx timeout"

I have to see the source code. Otherwise it would be only a wild guess.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-18 09:54:27

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Marcel,

> it is not that complicated. We have to do this for a lot of commands
> that you can use from userspace and the kernel has to detect its
> execution. You might wanna do it anyway so you should have a
> look at the
> examples in hci_event.c inside the kernel code.

I'm almost done with the implementation. I'm testing it currently, but there
is a problem. According to the spec, for Host Number of Completed Packets
command, no event is generated by the controller if there is no error. But,
I think the BlueZ stack is expecting an event for this command. Can you
suggest how can I prevent waiting for an event for this command?

Dmesg shows the following:

Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
hci_cmd_task: hci0 command tx timeout
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
hci_cmd_task: hci0 command tx timeout
Warning: null TTY for (d8:00) in tty_fasync
hci_cmd_task: hci0 command tx timeout
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
hci_cmd_task: hci0 command tx timeout
Sending Host No of Completed Packets:
hci_cmd_task: hci0 command tx timeout
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
Sending Host No of Completed Packets:
hci_cmd_task: hci0 command tx timeout
Sending Host No of Completed Packets:


=======================================

Note that "Sending Host No of Completed Packets:" has been added by me. Can
you tell me the reason for "hci_cmd_task: hci0 command tx timeout"

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-17 13:45:51

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

> > to start something we can do this. Remember that the kernel
> > then have to
> > track these commands to see if it has to use host controller to host
> > flow control or not.
> >
>
> Hmmm.... I think I understand now why you were insisting this to be done at
> the kernel side.
> Because if we set flow control from user side then it will be difficult to
> inform the kernel about this.
> I'll try both things (setting flow control and sending host no of completed
> packets) from kernel side only.

it is not that complicated. We have to do this for a lot of commands
that you can use from userspace and the kernel has to detect its
execution. You might wanna do it anyway so you should have a look at the
examples in hci_event.c inside the kernel code.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-17 11:20:47

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Marcel,

> to start something we can do this. Remember that the kernel
> then have to
> track these commands to see if it has to use host controller to host
> flow control or not.
>

Hmmm.... I think I understand now why you were insisting this to be done at
the kernel side.
Because if we set flow control from user side then it will be difficult to
inform the kernel about this.
I'll try both things (setting flow control and sending host no of completed
packets) from kernel side only.

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-17 12:59:23

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

> > > (iii) The host buffer size command and set controller to host flow
> > > controller command can be sent from configure_device() of
> > hcid/main.c
> >
> > No. This must be done in the kernel. It is not the job of hcid.
>
> I still feel that these two commands should be sent from hcid at the time of
> initialization amd the user should have option to enable/disable this flow
> control from hcid.conf

to start something we can do this. Remember that the kernel then have to
track these commands to see if it has to use host controller to host
flow control or not.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-17 04:43:14

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Marcel,

> > (iii) The host buffer size command and set controller to host flow
> > controller command can be sent from configure_device() of
> hcid/main.c
>
> No. This must be done in the kernel. It is not the job of hcid.

I still feel that these two commands should be sent from hcid at the time of
initialization amd the user should have option to enable/disable this flow
control from hcid.conf

> > But, I could not figure out from where should we send the
> Host Number of
> > completed packets command. Do you have any suggestions. I
> mean, can you give
> > me an idea where can we get to know the receipt of ACL Data
> at user level?
>
> This must be done in the kernel. It is like sniff mode
> support. Only the
> kernel knows all facts.

I agree with this.

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-14 20:26:04

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

> I propose the following changes (in addition to those suggested by Ulisses
> earlier) for implementing Controller to Host Flow Control:
>
> (i) Update hci.h to include commands like host number of completed packets
> cmd and set controller to host flow control cmd.

we need them for the kernel, bluez-libs and bluez-hcidump. Go ahead and
send in patches for it.

> (ii) Update hcid.h file to include an additional member to the enum:
> enum {
> HCID_SET_NAME,
> HCID_SET_CLASS,
> HCID_SET_VOICE,
> HCID_SET_INQMODE,
> HCID_SET_PAGETO,
> HCID_SET_DISCOVTO,
> HCID_SET_PTYPE,
> HCID_SET_LM,
> HCID_SET_LP,
> + HCID_SET_C_TO_HOST_FC,
> };
>
> And update the structure device_opts:
> struct device_opts {
> unsigned long flags;
> char *name;
> uint32_t class;
> uint16_t voice;
> uint8_t inqmode;
> uint16_t pageto;
> uint16_t pkt_type;
> uint16_t link_mode;
> uint16_t link_policy;
> uint16_t scan;
> int discovto;
> + int c_to_host_fc;
> };
>
> Of course, this means that the hcid.conf (and parser.y) will contain another
> entry to enable/disable flow control.

No additional config option at the moment. It is not needed right now.
If we really want it, we can do it later.

> > > (i) For enabling FC from HC to Host, the host first of all
> > sends Host Buffer
> > > Size Command providing the number of ACL and SCO buffers and their
> > > respective sizes.
> > > (ii) The host then issues Set Host Controller To Host Flow
> > Control Command.
>
> (iii) The host buffer size command and set controller to host flow
> controller command can be sent from configure_device() of hcid/main.c

No. This must be done in the kernel. It is not the job of hcid.

> > > (iii) Host will send a Host Number of Completed Packets
> > Command to the
> > > controller.
>
> But, I could not figure out from where should we send the Host Number of
> completed packets command. Do you have any suggestions. I mean, can you give
> me an idea where can we get to know the receipt of ACL Data at user level?

This must be done in the kernel. It is like sniff mode support. Only the
kernel knows all facts.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-14 15:24:33

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Ulisses and Marcel,

I propose the following changes (in addition to those suggested by Ulisses
earlier) for implementing Controller to Host Flow Control:

(i) Update hci.h to include commands like host number of completed packets
cmd and set controller to host flow control cmd.
(ii) Update hcid.h file to include an additional member to the enum:
enum {
HCID_SET_NAME,
HCID_SET_CLASS,
HCID_SET_VOICE,
HCID_SET_INQMODE,
HCID_SET_PAGETO,
HCID_SET_DISCOVTO,
HCID_SET_PTYPE,
HCID_SET_LM,
HCID_SET_LP,
+ HCID_SET_C_TO_HOST_FC,
};

And update the structure device_opts:
struct device_opts {
unsigned long flags;
char *name;
uint32_t class;
uint16_t voice;
uint8_t inqmode;
uint16_t pageto;
uint16_t pkt_type;
uint16_t link_mode;
uint16_t link_policy;
uint16_t scan;
int discovto;
+ int c_to_host_fc;
};

Of course, this means that the hcid.conf (and parser.y) will contain another
entry to enable/disable flow control.

> > (i) For enabling FC from HC to Host, the host first of all
> sends Host Buffer
> > Size Command providing the number of ACL and SCO buffers and their
> > respective sizes.
> > (ii) The host then issues Set Host Controller To Host Flow
> Control Command.


(iii) The host buffer size command and set controller to host flow
controller command can be sent from configure_device() of hcid/main.c


> > (iii) Host will send a Host Number of Completed Packets
> Command to the
> > controller.

But, I could not figure out from where should we send the Host Number of
completed packets command. Do you have any suggestions. I mean, can you give
me an idea where can we get to know the receipt of ACL Data at user level?

Thanks.

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-10 13:43:35

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Ulisses,

> > (iii) Host will send a Host Number of Completed Packets
> Command to the
> > controller. But my question is when??
> > After every ACL Packet received?
>
> Yeah, that is exactly what we've already discussed [1] and Marcel
> suggested to send a Host Number of Completed Packets command after
> every packtet for starters even though that is not what we really want
> (we might want to wait for 8 packets he said).

We can wait for 8 packets. But what if at the time of ACL disconnection,
less than 8 packets have been received?

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-10 13:00:36

by Ulisses Furquim

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

On 8/10/06, Mayank BATRA <[email protected]> wrote:
> Here are some of my observations, please correct me in case I am wrong.
>
> (i) For enabling FC from HC to Host, the host first of all sends Host Buffer
> Size Command providing the number of ACL and SCO buffers and their
> respective sizes.
> (ii) The host then issues Set Host Controller To Host Flow Control Command.
> (iii) Host will send a Host Number of Completed Packets Command to the
> controller. But my question is when??
> After every ACL Packet received?

Yeah, that is exactly what we've already discussed [1] and Marcel
suggested to send a Host Number of Completed Packets command after
every packtet for starters even though that is not what we really want
(we might want to wait for 8 packets he said).

Best regards,

-- Ulisses

[1] http://article.gmane.org/gmane.linux.bluez.devel/8188

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-10 08:35:38

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Ulisses,

> If you want to help us, please feel free to send in patches.

Here are some of my observations, please correct me in case I am wrong.

(i) For enabling FC from HC to Host, the host first of all sends Host Buffer
Size Command providing the number of ACL and SCO buffers and their
respective sizes.
(ii) The host then issues Set Host Controller To Host Flow Control Command.
(iii) Host will send a Host Number of Completed Packets Command to the
controller. But my question is when??
After every ACL Packet received?

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-10 04:33:19

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Marcel, Ulisses,

> feel free to work together with Mayank to get a testing version we can
> include into the -mh patch.

I am ready to help as much as possible. I was reading the spec over the
weekend to understand what HC to Host FC requires.
Ulisses, can you please provide me some starting ground?

Regards,
Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-09 21:58:24

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Ulisses,

> > I wanted to know whether Host Controller to Host Flow Control has been implemented in the BlueZ stack?
> > I am interested in giving it a shot in case it is not already there or someone is not working on it.
>
> No, it's not implemented in the BlueZ stack. I've done a preliminary
> work on this but haven't completed it yet. You can see my and Marcel
> Holtmann e-mails on the bluez-devel mailing list archive about this.
> If you want to help us, please feel free to send in patches.

feel free to work together with Mayank to get a testing version we can
include into the -mh patch.

Regards

Marcel



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-08 12:52:57

by Ulisses Furquim

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

On 8/8/06, Mayank BATRA <[email protected]> wrote:
> I wanted to know whether Host Controller to Host Flow Control has been implemented in the BlueZ stack?
> I am interested in giving it a shot in case it is not already there or someone is not working on it.

No, it's not implemented in the BlueZ stack. I've done a preliminary
work on this but haven't completed it yet. You can see my and Marcel
Holtmann e-mails on the bluez-devel mailing list archive about this.
If you want to help us, please feel free to send in patches.

Regards,

-- Ulisses

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-10-31 14:30:41

by Ulisses Furquim

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Mayank,

On 10/31/06, Mayank BATRA <[email protected]> wrote:
> I am wondering whether this code(i.e. controller to host flow control) has
> been included in one of the -mh kernel patch.
> Can you please confirm?

I don't think so. You're probably confusing it with the L2CAP
retransmission and flow control patch that is included in the latest
-mh patches.

Regards,

-- Ulisses

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-10-31 13:25:38

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Marcel, Ulisses,

I am wondering whether this code(i.e. controller to host flow control) has
been included in one of the -mh kernel patch.
Can you please confirm?

Best Regards,
Mayank


Ulisses Furquim wrote:

>
> Hi Marcel, Mayank,
>
> how about something like the attached patch? I've used some of
> Mayank's code and added some other parts. It's not complete and it's
> only compile-tested yet.
>
> I haven't done the interface to change the hci_dev->host_flow_ctl
> parameter from user space and we're sending the host number of
> completed packtes command after each packet (ACL or SCO, depending on
> the host_flow_ctl value). We're gonna need counters on both hci_dev
> and hci_conn structures to "ack" more than one packet and change
> hci_send_host_num_comp_pkts().
>
> I'm also still not sure when we should send the host number of
> completed packets command. The specification says this command must be
> sent after the buffers are freed on the host but I don't know if we
> have to be strict about this. :-)
>
> Best regards,
>
> -- Ulisses
>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-11-01 04:09:10

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Host Controller to Host Flow Control

Hi Ulisses,

> > I am wondering whether this code(i.e. controller to host
> >flow control) has
> > been included in one of the -mh kernel patch.
> > Can you please confirm?
>
> I don't think so. You're probably confusing it with the L2CAP
> retransmission and flow control patch that is included in the latest
> -mh patches.

Of course I am not confused between the two.
Just that I wanted to know whether the Host Flow control patch is inside a
-mh patch.
So I think it is not there.

Best Regards,

Mayank


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel