Skip to contentSkip to conversation

Enhancements to allow l2cap channel to use either AMP or BR/EDR

DISCUSSION [email protected] 6 participants 13 messages Aug 2, 2010 – Aug 3, 2010 1 message not in the archive Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi, David,

Quoted 1 line
Quoted 1 line

AMP vs BR/EDR preference for L2CAP channel can be configured as command

line argument using new option "-J". Possible values:

Quoted 6 lines
Quoted 4 lines
                 "require_br_edr",
                 "prefer_amp",
                 "prefer_br_edr"

If no preference indicated, the default is set to require BR/EDR.

I think an explicit channel move command and a channel move complete

event are what many applications/profiles will need to be able to use an AMP effectively.

A future AMP policy setting of "manual" could certainly give each application the freedom to move an l2cap channel at will, after applying its own decision making process. However, with that freedom comes the responsibility of processing the AMP related events and initiating the AMP commands to make the decision. For example, the application needs to know if AMP controllers are available both locally and remotely, which in turn requires initiating the AMP discovery process and looking over the available local HCI devices; a loss of the physical link event means the application must move the link back to BR/EDR, etc. All of the additional machinery to accomplish that could indeed be exposed for use by applications. I think such an approach, if really needed, would not conflict with these proposed policies that hide all of that within the kernel.

To illustrate how these policies simplify applications, consider OBEX. An OBEX server application would choose "prefer_br_edr", thus leaving the remote OBEX client to decide and initiate the channel move to an AMP, and thus granting advance permission to the kernel for the move to take place. The OBEX client could examine the size of an upcoming transfer and choose "prefer_amp", thereby instructing the kernel to initiate the move to an AMP if all local and remote conditions allow it. Thus, the OBEX client and server applications make simplistic decisions to set up AMP, and can focus on moving data over the l2cap channel, leaving the management of what medium the data flows over up to the kernel, who keeps it transparent. In this way, work to make an existing profile "AMP aware" is also minimal.

In the discussion with Marcel regarding our AMP proposal in March ("RFC:
QuIC's AMP + eL2CAP Technical Plans"), where we had listed these AMP control policies, he seemed to indicate that these policies would automatically trigger AMP discovery within the kernel, which it will. As he said, "Less options are less confusing for users" (apologies in advance if I misinterpreted his answer).

Best regards,
Tim Monahan-Mitchell

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
maintainer
#1 lore raw

Hi Tim,

please fix your mail client to NOT break threading.

Quoted 37 lines
Quoted 1 line
Quoted 1 line

AMP vs BR/EDR preference for L2CAP channel can be configured as command

line argument using new option "-J". Possible values:

Quoted 6 lines
Quoted 4 lines
                 "require_br_edr",
                 "prefer_amp",
                 "prefer_br_edr"

If no preference indicated, the default is set to require BR/EDR.

I think an explicit channel move command and a channel move complete

event are what many applications/profiles will need to be able to use an AMP effectively.

A future AMP policy setting of "manual" could certainly give each application the freedom to move an l2cap channel at will, after applying its own decision making process. However, with that freedom comes the responsibility of processing the AMP related events and initiating the AMP commands to make the decision. For example, the application needs to know if AMP controllers are available both locally and remotely, which in turn requires initiating the AMP discovery process and looking over the available local HCI devices; a loss of the physical link event means the application must move the link back to BR/EDR, etc. All of the additional machinery to accomplish that could indeed be exposed for use by applications. I think such an approach, if really needed, would not conflict with these proposed policies that hide all of that within the kernel.

To illustrate how these policies simplify applications, consider OBEX. An OBEX server application would choose "prefer_br_edr", thus leaving the remote OBEX client to decide and initiate the channel move to an AMP, and thus granting advance permission to the kernel for the move to take place. The OBEX client could examine the size of an upcoming transfer and choose "prefer_amp", thereby instructing the kernel to initiate the move to an AMP if all local and remote conditions allow it. Thus, the OBEX client and server applications make simplistic decisions to set up AMP, and can focus on moving data over the l2cap channel, leaving the management of what medium the data flows over up to the kernel, who keeps it transparent. In this way, work to make an existing profile "AMP aware" is also minimal.

Quoted 6 lines

In the discussion with Marcel regarding our AMP proposal in March ("RFC:
QuIC's AMP + eL2CAP Technical Plans"), where we had listed these AMP control policies, he seemed to indicate that these policies would automatically trigger AMP discovery within the kernel, which it will. As he said, "Less options are less confusing for users" (apologies in advance if I misinterpreted his answer).

my current approach here is still that we wanna do this automatically in the background for the profiles. I think at most the profiles should just provide a threshold for either a) staying on BR/EDR or b) moving over to AMP.

I know that the Bluetooth SIG tries to define such policies as part of the profiles (like FTP for example), but I think this makes sense. I doubt the real usage of making this manual. A profile/application should just give its preference or intent and then we try to accommodate them as best as possible.

The other problem here is also that besides whatever the profiles wants, it might happen that the WiFi policy is stronger and only allows using the WiFi device as WiFi or as AMP. And if WiFi wins, then we have to rip the AMP out of the system. At that point whatever the Bluetooth profiles wanted is pointless since the AMP controller is gone anyway.

That said, nothing stops us from allowing to make our AMP polices dynamic and allow the application to change it threshold during lifetime. For example it starts out as BR/EDR only and then during the usage of the link it decides that now AMP preferred would make sense. In that sense you would have manual switching to some level.

Regards

Marcel

#2 lore raw

SGkgTWFyY2VsLA0KDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogbGlu dXgtYmx1ZXRvb3RoLW93bmVyQHZnZXIua2VybmVsLm9yZyBbbWFpbHRvOmxpbnV4LWJsdWV0b290 aC0NCj4gb3duZXJAdmdlci5rZXJuZWwub3JnXSBPbiBCZWhhbGYgT2YgTWFyY2VsIEhvbHRtYW5u DQo+IFNlbnQ6IE1vbmRheSwgQXVndXN0IDAyLCAyMDEwIDExOjUzIEFNDQo+IFRvOiB0bW9uYWhh bkBjb2RlYXVyb3JhLm9yZw0KPiBTdWJqZWN0OiBSZTogRW5oYW5jZW1lbnRzIHRvIGFsbG93IGwy Y2FwIGNoYW5uZWwgdG8gdXNlIGVpdGhlciBBTVAgb3INCj4gQlIvRURSDQo+IA0KPiBIaSBUaW0s DQo+IA0KPiBwbGVhc2UgZml4IHlvdXIgbWFpbCBjbGllbnQgdG8gTk9UIGJyZWFrIHRocmVhZGlu Zy4NCj4gDQo+ID4gPj4gQU1QIHZzIEJSL0VEUiBwcmVmZXJlbmNlIGZvciBMMkNBUCBjaGFubmVs IGNhbiBiZSBjb25maWd1cmVkIGFzDQo+IGNvbW1hbmQNCj4gPiBsaW5lIGFyZ3VtZW50IHVzaW5n IG5ldyBvcHRpb24gIi1KIi4gUG9zc2libGUgdmFsdWVzOg0KPiA+ID4+ICAgICAgICAgICAgICAg ICAgInJlcXVpcmVfYnJfZWRyIiwNCj4gPiA+PiAgICAg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4gdGhhdCBzZW5zZSB5b3Ug d291bGQgaGF2ZSBtYW51YWwgc3dpdGNoaW5nIHRvIHNvbWUgbGV2ZWwuDQoNClRoZSBvbmx5IHVz ZSBjYXNlIEkgc2VlIGZvciBtYW51YWwgc3dpdGNoaW5nIGlzIGRlYnVnZ2luZy4NCg0KCUsrKw0K

maintainer
#3 lore raw

Hi Kevin,

Quoted 75 lines
Quoted 75 lines

please fix your mail client to NOT break threading.

Quoted 1 line
Quoted 1 line
Quoted 1 line

AMP vs BR/EDR preference for L2CAP channel can be configured as

command

Quoted 7 lines

line argument using new option "-J". Possible values:

Quoted 6 lines
Quoted 4 lines
                 "require_br_edr",
                 "prefer_amp",
                 "prefer_br_edr"

If no preference indicated, the default is set to require BR/EDR.

I think an explicit channel move command and a channel move

complete

Quoted 1 line

event are what many applications/profiles will need to be able to use

an

Quoted 4 lines

AMP effectively.

A future AMP policy setting of "manual" could certainly give each application the freedom to move an l2cap channel at will, after

applying

Quoted 2 lines

its own decision making process. However, with that freedom comes the responsibility of processing the AMP related events and initiating

the AMP

Quoted 1 line

commands to make the decision. For example, the application needs to

know

Quoted 1 line

if AMP controllers are available both locally and remotely, which in

turn

Quoted 2 lines

requires initiating the AMP discovery process and looking over the available local HCI devices; a loss of the physical link event means

the

Quoted 1 line

application must move the link back to BR/EDR, etc. All of the

additional

Quoted 3 lines

machinery to accomplish that could indeed be exposed for use by applications. I think such an approach, if really needed, would not conflict with these proposed policies that hide all of that within

the

Quoted 3 lines

kernel.

To illustrate how these policies simplify applications, consider

OBEX. An

Quoted 1 line

OBEX server application would choose "prefer_br_edr", thus leaving

the

Quoted 1 line

remote OBEX client to decide and initiate the channel move to an AMP,

and

Quoted 1 line

thus granting advance permission to the kernel for the move to take

place.

Quoted 1 line

The OBEX client could examine the size of an upcoming transfer and

choose

Quoted 1 line

"prefer_amp", thereby instructing the kernel to initiate the move to

an

Quoted 1 line

AMP if all local and remote conditions allow it. Thus, the OBEX

client and

Quoted 1 line

server applications make simplistic decisions to set up AMP, and can

focus

Quoted 2 lines

on moving data over the l2cap channel, leaving the management of what medium the data flows over up to the kernel, who keeps it

transparent. In

Quoted 1 line

this way, work to make an existing profile "AMP aware" is also

minimal.

Quoted 2 lines

In the discussion with Marcel regarding our AMP proposal in March

("RFC:

Quoted 3 lines

QuIC's AMP + eL2CAP Technical Plans"), where we had listed these AMP control policies, he seemed to indicate that these policies would automatically trigger AMP discovery within the kernel, which it will.

As

Quoted 1 line

he said, "Less options are less confusing for users" (apologies in

advance

Quoted 1 line

if I misinterpreted his answer).

my current approach here is still that we wanna do this automatically in
the background for the profiles. I think at most the profiles should just provide a threshold for either a) staying on BR/EDR or b) moving over to AMP.

Quoted 8 lines
Quoted 6 lines

I know that the Bluetooth SIG tries to define such policies as part of the profiles (like FTP for example), but I think this makes sense. I doubt the real usage of making this manual. A profile/application should
just give its preference or intent and then we try to accommodate them as best as possible.

Agree that it should be done "in background" and that a size threshold would be useful. But who evaluates that threshold? The bluez kernel components, which essentially implement a transport driver, should not be examining objects (files, phonebooks, etc) size to see if this threshold is met. Therefore, it would seem Tim's suggestion of having the profile send a 'prefer_amp' bit would be useful, right?

I would do something like "prefer_amp when over 100kb" or something. And then the kernel needs to count. Meaning the L2CAP layer could easily count this by itself.

Also just starting with setsockopt(bredr_only) and then later on just doing setsockopt(prefer_amp) the userspace application would have control over switching manually.

Since the polices are on a per socket basis, I don't see a big problem with doing it like this.

The only thing that I don't want is a ioctl(switch_now_to_amp) since that looks very wrong to me.

Quoted 10 lines
Quoted 8 lines

The other problem here is also that besides whatever the profiles wants,
it might happen that the WiFi policy is stronger and only allows using the WiFi device as WiFi or as AMP. And if WiFi wins, then we have to rip
the AMP out of the system. At that point whatever the Bluetooth profiles
wanted is pointless since the AMP controller is gone anyway.

Well, I think this is best managed by having the PAL announce its availability (and unavailability) to A2MP, using the spec's HCI events for this purpose. A2MP can then be the agent to move the channel to AMP or not, accordingly. For example, it might be that the 802.11 device is being used for an infrastructure link, and then that link goes away. The PAL would then announce its availability to the BT stack (A2MP), and A2MP would then move the channel to AMP.

Agreed. My point was just that application can only set a policy. They can't switch manually. If application would switch manually then they need to check PAL availability etc. I don't want that complexity inside the applications.

Quoted 8 lines
Quoted 6 lines

That said, nothing stops us from allowing to make our AMP polices dynamic and allow the application to change it threshold during lifetime. For example it starts out as BR/EDR only and then during the usage of the link it decides that now AMP preferred would make sense. In
that sense you would have manual switching to some level.

The only use case I see for manual switching is debugging.

That is fine. We can do that via debugfs.

Regards

Marcel

#4 lore raw

SGkgTWFyY2VsLA0KDQo+ID4NCj4gPiBBZ3JlZSB0aGF0IGl0IHNob3VsZCBiZSBkb25lICJpbiBi YWNrZ3JvdW5kIiBhbmQgdGhhdCBhIHNpemUNCj4gdGhyZXNob2xkIHdvdWxkIGJlIHVzZWZ1bC4g IEJ1dCB3aG8gZXZhbHVhdGVzIHRoYXQgdGhyZXNob2xkPyAgVGhlDQo+IGJsdWV6IGtlcm5lbCBj b21wb25lbnRzLCB3aGljaCBlc3NlbnRpYWxseSBpbXBsZW1lbnQgYSB0cmFuc3BvcnQNCj4gZHJp dmVyLCBzaG91bGQgbm90IGJlIGV4YW1pbmluZyBvYmplY3RzIChmaWxlcywgcGhvbmVib29rcywg ZXRjKSBzaXplDQo+IHRvIHNlZSBpZiB0aGlzIHRocmVzaG9sZCBpcyBtZXQuICBUaGVyZWZvcmUs IGl0IHdvdWxkIHNlZW0gVGltJ3MNCj4gc3VnZ2VzdGlvbiBvZiBoYXZpbmcgdGhlIHByb2ZpbGUg c2VuZCBhICdwcmVmZXJfYW1wJyBiaXQgd291bGQgYmUNCj4gdXNlZnVsLCByaWdodD8NCj4gDQo+ IEkgd291bGQgZG8gc29tZXRoaW5nIGxpa2UgInByZWZlcl9hbXAgd2hlbiBvdmVyIDEwMGtiIiBv ciBzb21ldGhpbmcuDQo+IEFuZA0KPiB0aGVuIHRoZSBrZXJuZWwgbmVlZHMgdG8gY291bnQuIE1l YW5pbmcgdGhlIEwyQ0FQIGx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bC4NCj4gPg0K PiA+IFRoZSBvbmx5IHVzZSBjYXNlIEkgc2VlIGZvciBtYW51YWwgc3dpdGNoaW5nIGlzIGRlYnVn Z2luZy4NCj4gDQo+IFRoYXQgaXMgZmluZS4gV2UgY2FuIGRvIHRoYXQgdmlhIGRlYnVnZnMuDQo+ IA0KPiBSZWdhcmRzDQo+IA0KPiBNYXJjZWwNCj4gDQoNCg==

#6 lore raw
In reply to a message not in the archive

Hi Marcel and Kevin,

Quoted 14 lines
Quoted 9 lines
Quoted 2 lines

Agree that it should be done "in background" and that a size

threshold would be useful. But who evaluates that threshold? The bluez kernel components, which essentially implement a transport driver, should not be examining objects (files, phonebooks, etc) size to see if this threshold is met. Therefore, it would seem Tim's suggestion of having the profile send a 'prefer_amp' bit would be useful, right?

Quoted 4 lines

I would do something like "prefer_amp when over 100kb" or something. And
then the kernel needs to count. Meaning the L2CAP layer could easily count this by itself.

Quoted 5 lines

What? Let's say the effect we want is that if the object is greater than, say, 10 megabytes, then we want to use AMP for the transfer. With your scheme, you want the kernel to count up to 10 megabytes, THEN switch over to AMP?
No, you don't, he says rhetorically. :)

If the policy was defined as "prefer_amp after n seconds" we would get the desired effect without having to do any counting in the kernel.

Quoted 52 lines
Quoted 4 lines

Also just starting with setsockopt(bredr_only) and then later on just doing setsockopt(prefer_amp) the userspace application would have control over switching manually.

How is this really different from your ioctl(switch_now_to_amp) below, which looks very wrong?

Quoted 6 lines

Since the polices are on a per socket basis, I don't see a big problem with doing it like this.

The only thing that I don't want is a ioctl(switch_now_to_amp) since that looks very wrong to me.

Agreed.

Quoted 36 lines
Quoted 4 lines
Quoted 4 lines

The other problem here is also that besides whatever the profiles wants,
it might happen that the WiFi policy is stronger and only allows

using

Quoted 1 line
Quoted 1 line

the WiFi device as WiFi or as AMP. And if WiFi wins, then we have

to

Quoted 6 lines
Quoted 4 lines

rip
the AMP out of the system. At that point whatever the Bluetooth profiles
wanted is pointless since the AMP controller is gone anyway.

Well, I think this is best managed by having the PAL announce its

availability (and unavailability) to A2MP, using the spec's HCI events for this purpose. A2MP can then be the agent to move the channel to AMP or not, accordingly. For example, it might be that the 802.11 device is being used for an infrastructure link, and then that link goes away. The PAL would then announce its availability to the BT stack (A2MP), and A2MP would then move the channel to AMP.

Agreed. My point was just that application can only set a policy. They can't switch manually. If application would switch manually then they need to check PAL availability etc. I don't want that complexity inside the applications.

Quoted 3 lines
Quoted 3 lines

That said, nothing stops us from allowing to make our AMP polices dynamic and allow the application to change it threshold during lifetime. For example it starts out as BR/EDR only and then during

the

Quoted 1 line
Quoted 1 line

usage of the link it decides that now AMP preferred would make

sense.

Quoted 4 lines
Quoted 2 lines

In
that sense you would have manual switching to some level.

The only use case I see for manual switching is debugging.

Quoted 8 lines
Quoted 6 lines

That is fine. We can do that via debugfs.

Regards

Marcel

èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…éb�ë§²æìr¸›zX§»å¹ëh¢ØbžØ^n‡r¡ö¦zË�ëh™¨è­Ú&¢ø®G«�éh®(­éšŽŠÝ¢j"�ú¶m§ÿï�êäz¹Þ–Šàþf£¢·hšˆ§~ˆmš

Regards,

Peter.

Signature · 4 lines
Peter Krystad

Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
maintainer
#10 lore raw
In reply to Kevin Hayes

Hi Kevin,

Quoted 8 lines
Quoted 8 lines
Quoted 1 line

Agree that it should be done "in background" and that a size

threshold would be useful. But who evaluates that threshold? The bluez kernel components, which essentially implement a transport driver, should not be examining objects (files, phonebooks, etc) size to see if this threshold is met. Therefore, it would seem Tim's suggestion of having the profile send a 'prefer_amp' bit would be useful, right?

Quoted 7 lines
Quoted 4 lines

I would do something like "prefer_amp when over 100kb" or something. And
then the kernel needs to count. Meaning the L2CAP layer could easily count this by itself.

What? Let's say the effect we want is that if the object is greater than, say, 10 megabytes, then we want to use AMP for the transfer. With your scheme, you want the kernel to count up to 10 megabytes, THEN switch over to AMP? No, you don't, he says rhetorically. :)

we will see what works out best. I am open for ideas. As I said before, I know what I don't want for sure. The rest is open for testing and figuring out if it works or not.

Quoted 5 lines
Quoted 3 lines

Also just starting with setsockopt(bredr_only) and then later on just doing setsockopt(prefer_amp) the userspace application would have control over switching manually.

How is this really different from your ioctl(switch_now_to_amp) below, which looks very wrong?

The difference is that you change a policy. setsockopt(prefer_amp) doesn't mean you get switched. It just says that you prefer using an AMP at this point.

Most application that expect a lot of data would always set the policy to prefer AMP and if we have the PAL availability then it will switch right away to AMP.

However with OBEX it might be that you wanna read the first package first with BR/EDR only and only after knowing the file size make a decision to prefer AMP or not.

We will see what works out best.

Regards

Marcel

maintainer
#7 lore raw
In reply to Peter Krystad

Hi Peter,

Quoted 13 lines
Quoted 13 lines
Quoted 12 lines
Quoted 1 line

Agree that it should be done "in background" and that a size

threshold would be useful. But who evaluates that threshold? The bluez kernel components, which essentially implement a transport driver, should not be examining objects (files, phonebooks, etc) size to see if this threshold is met. Therefore, it would seem Tim's suggestion of having the profile send a 'prefer_amp' bit would be useful, right?

I would do something like "prefer_amp when over 100kb" or something. And
then the kernel needs to count. Meaning the L2CAP layer could easily count this by itself.

Quoted 8 lines
Quoted 5 lines

What? Let's say the effect we want is that if the object is greater than, say, 10 megabytes, then we want to use AMP for the transfer. With your scheme, you want the kernel to count up to 10 megabytes, THEN switch over to AMP?
No, you don't, he says rhetorically. :)

If the policy was defined as "prefer_amp after n seconds" we would get the desired effect without having to do any counting in the kernel.

that would work as well. We will see what works out best by giving application the least amount of hassle :)

Regards

Marcel

#11 lore raw
In reply to Marcel Holtmann

SGkgYWdhaW4gTWFyY2VsLA0KDQo+IEhvd2V2ZXIgd2l0aCBPQkVYIGl0IG1pZ2h0IGJlIHRoYXQg eW91IHdhbm5hIHJlYWQgdGhlIGZpcnN0IHBhY2thZ2UNCj4gZmlyc3Qgd2l0aCBCUi9FRFIgb25s eSBhbmQgb25seSBhZnRlciBrbm93aW5nIHRoZSBmaWxlIHNpemUgbWFrZSBhDQo+IGRlY2lzaW9u IHRvIHByZWZlciBBTVAgb3Igbm90Lg0KDQpFeGFjdGx5LiAgRm9yIE9QUCwgUEJBUCwgQklQLCBG VFAsIHlvdSBrbm93IHRoZSBmaWxlIHNpemUgcHJldHR5IHF1aWNrbHksIG5vIGNvdW50aW5nIHJl cXVpcmVkLg0KQW5kIGlmIHlvdSBoYXZlIGEgcG9saWN5IG9mICJ1c2UgQU1QIGlmIG9iamVjdCBi aWdnZXIgdGhhbiBYIiwgdGhlbiB5b3UgZG9uJ3Qgd2FudCB0byBzcGVuZCBjeWNsZXMgdXNpbmcg QlIvRURSIGlmIHlvdSBuZWVkIHRvIHhmZXIgYW4gb2JqZWN0IGV2ZW4gb25lIHNpbmdsZSBvY3Rl dCBiaWdnZXIgdGhhbiBYLiAgQU1QIGVhcmx5LCBBTVAgb2Z0ZW4uICA6KQ0KDQo+IA0KPiBXZSB3 aWxsIHNlZSB3aGF0IHdvcmtzIG91dCBiZXN0Lg0KUG9saWN5IGlzIGEgd29uZGVyZnVsIHRoYW5n LiAgOikNCg0KCUsrKw0KDQoNCg0K

#8 lore raw
In reply to Peter Krystad

Hi Peter,

Quoted 17 lines · Peter Krystad

Hi Marcel and Kevin,

Quoted 14 lines
Quoted 13 lines
Quoted 2 lines

Agree that it should be done "in background" and that a size

threshold would be useful. But who evaluates that threshold? The bluez kernel components, which essentially implement a transport driver, should not be examining objects (files, phonebooks, etc) size to see if this threshold is met. Therefore, it would seem Tim's suggestion of having the profile send a 'prefer_amp' bit would be useful, right?

I would do something like "prefer_amp when over 100kb" or something. And
then the kernel needs to count. Meaning the L2CAP layer could easily count this by itself.

Quoted 8 lines
Quoted 5 lines

What? Let's say the effect we want is that if the object is greater than, say, 10 megabytes, then we want to use AMP for the transfer. With your scheme, you want the kernel to count up to 10 megabytes, THEN switch over to AMP?
No, you don't, he says rhetorically. :)

If the policy was defined as "prefer_amp after n seconds" we would get the desired effect without having to do any counting in the kernel.

In both cases we have to take in account the total size of the file, or the estimated time of transfer, so we can avoid to move to AMP when the transfer is about to end.

Signature · 2 lines
Gustavo F. Padovan
http://padovan.org
#12 lore raw
In reply to Marcel Holtmann
Quoted 6 lines · Marcel Holtmann

That said, nothing stops us from allowing to make our AMP polices dynamic and allow the application to change it threshold during lifetime. For example it starts out as BR/EDR only and then during the usage of the link it decides that now AMP preferred would make sense. In that sense you would have manual switching to some level.

If the policy is dynamic throughout the lifetime of the connection then that's okay for best effort links.

I think applications (especially those that stream real-time data at high rates) will need to know the currently available bandwidth. This will be useful for even simple file transfer profiles -- if that file transfer is going to take 100x as long the user probably want to know about this so they can (for example) turn HS mode on the other device.

This information could be conveyed in some sort of "channel move complete" event or a more generic "available bandwidth changed" event.

Applications requiring guaranteed links will need some way of supplying extended flow specifications.

David

Signature · 6 lines
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park,  Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ                 http://www.csr.com/


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
#9 lore raw
In reply to Gustavo F. Padovan

Hi, Gustavo and Marcel,

Quoted 27 lines

Hi Peter,

Quoted 23 lines · Peter Krystad

Hi Marcel and Kevin,

Quoted 19 lines
Quoted 9 lines
Quoted 2 lines

Agree that it should be done "in background" and that a size

threshold would be useful. But who evaluates that threshold? The bluez kernel components, which essentially implement a transport driver, should not be examining objects (files, phonebooks, etc) size to see if this threshold is met. Therefore, it would seem Tim's suggestion of having the profile send a 'prefer_amp' bit would be useful, right?

Quoted 4 lines

I would do something like "prefer_amp when over 100kb" or something. And
then the kernel needs to count. Meaning the L2CAP layer could easily count this by itself.

What? Let's say the effect we want is that if the object is greater than, say, 10 megabytes, then we want to use AMP for the transfer. With your scheme, you want the kernel to count up to 10 megabytes, THEN switch over to AMP?
No, you don't, he says rhetorically. :)

Quoted 6 lines
Quoted 2 lines

If the policy was defined as "prefer_amp after n seconds" we would get the desired effect without having to do any counting in the kernel.

In both cases we have to take in account the total size of the file, or the estimated time of transfer, so we can avoid to move to AMP when the transfer is about to end.

Right! Don't want to switch to AMP just to push those last 100 bytes :)

Since the kernel does not know the total object size to be transferred, (right?), I've yet to come up with any 'threshold' ideas the kernel can make. Note that the transfer could be one huge file or many small ones.

--
Tim Monahan-Mitchell
Employee of Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

maintainer
#13 lore raw
In reply to David Vrabel

Hi David,

Quoted 9 lines
Quoted 5 lines

That said, nothing stops us from allowing to make our AMP polices dynamic and allow the application to change it threshold during lifetime. For example it starts out as BR/EDR only and then during the usage of the link it decides that now AMP preferred would make sense. In that sense you would have manual switching to some level.

If the policy is dynamic throughout the lifetime of the connection then that's okay for best effort links.

Quoted 8 lines

I think applications (especially those that stream real-time data at high rates) will need to know the currently available bandwidth. This will be useful for even simple file transfer profiles -- if that file transfer is going to take 100x as long the user probably want to know about this so they can (for example) turn HS mode on the other device.

This information could be conveyed in some sort of "channel move complete" event or a more generic "available bandwidth changed" event.

so here you have the following problem, the only interface you get from an application point of view is a L2CAP socket. So you have to work with these constraints. Potentially we can provide something additional via the OOB msg structs (like we do for timestamps), but I am really careful in adding to much into these ones.

Regards

Marcel