public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] Report a bug against "l2cap_conf_output()" in "net/bluetooth/l2cap.c"
@ 2007-04-30  7:02 GAO LIANG-TAO-W20048
  2007-05-04  6:55 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: GAO LIANG-TAO-W20048 @ 2007-04-30  7:02 UTC (permalink / raw)
  To: bluez-devel
  Cc: Singer Catherine-CSINGER1, Jin Hong-Lei-W19971,
	Saeed Faisal-EFS015


[-- Attachment #1.1: Type: text/plain, Size: 1276 bytes --]

 

Hi,

 

I want to report a bug against "l2cap_conf_output()" in BlueZ kernel
code "net/bluetooth/l2cap.c":

    if (pi->conf_mtu < pi->omtu) {

       l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu);

       result = L2CAP_CONF_UNACCEPT;

    } else {

       pi->omtu = pi->conf_mtu;

    }

I think it's wrong to enlarge the outgoing MTU value (by calling
"pi->omtu = pi->conf_mtu") when device B gets the MTU in device A's
configuration request. In fact, Page 1006/1200 of Bluetooth SPEC v1.2 or
Page 1038/1230 of Bluetooth SPEC v2.0 EDR both require a minimum of the
"If the remote device sends a positive configuration response it shall
include the actual MTU to be used on this channel for traffic flowing
into the local device. This is the minimum of the MTU in the
configuration request and the outgoing MTU capability of the device
sending the configuration response." Here I consider the original
"pi->omtu" as the "outgoing MTU capability".

 

I suggest to remove the "else" clause, and to apply l2cap_add_conf_opt()
to both cases:

    l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu);

    if (pi->conf_mtu < pi->omtu) {

       result = L2CAP_CONF_UNACCEPT;

    }

 

Regards,

Gao Liangtao

 


[-- Attachment #1.2: Type: text/html, Size: 7074 bytes --]

[-- Attachment #2: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] Report a bug against "l2cap_conf_output()" in "net/bluetooth/l2cap.c"
  2007-04-30  7:02 [Bluez-devel] Report a bug against "l2cap_conf_output()" in "net/bluetooth/l2cap.c" GAO LIANG-TAO-W20048
@ 2007-05-04  6:55 ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2007-05-04  6:55 UTC (permalink / raw)
  To: BlueZ development
  Cc: Singer Catherine-CSINGER1, Jin Hong-Lei-W19971,
	Saeed Faisal-EFS015

SGksCgo+IAo+IEkgd2FudCB0byByZXBvcnQgYSBidWcgYWdhaW5zdCDigJxsMmNhcF9jb25mX291
dHB1dCgp4oCdIGluIEJsdWVaIGtlcm5lbAo+IGNvZGUg4oCcbmV0L2JsdWV0b290aC9sMmNhcC5j
4oCdOgo+IAo+ICAgICBpZiAocGktPmNvbmZfbXR1IDwgcGktPm9tdHUpIHsKPiAKPiAgICAgICAg
bDJjYXBfYWRkX2NvbmZfb3B0KHB0ciwgTDJDQVBfQ09ORl9NVFUsIDIsIHBpLT5vbXR1KTsKPiAK
PiAgICAgICAgcmVzdWx0ID0gTDJDQVBfQ09ORl9VTkFDQ0VQVDsKPiAKPiAgICAgfSBlbHNlIHsK
PiAKPiAgICAgICAgcGktPm9tdHUgPSBwaS0+Y29uZl9tdHU7Cj4gCj4gICAgIH0KPiAKPiBJIHRo
aW5rIGl04oCZcyB3cm9uZyB0byBlbmxhcmdlIHRoZSBvdXRnb2luZyBNVFUgdmFsdWUgKGJ5IGNh
bGxpbmcKPiDigJxwaS0+b210dSA9IHBpLT5jb25mX210deKAnSkgd2hlbiBkZXZpY2UgQiBnZXRz
IHRoZSBNVFUgaW4gZGV2aWNlIEHigJlzCj4gY29uZmlndXJhd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0tLQpUaGlzIFNGLm5ldCBlbWFpbCBpcyBzcG9uc29yZWQgYnkgREIyIEV4cHJl
c3MKRG93bmxvYWQgREIyIEV4cHJlc3MgQyAtIHRoZSBGUkVFIHZlcnNpb24gb2YgREIyIGV4cHJl
c3MgYW5kIHRha2UKY29udHJvbCBvZiB5b3VyIFhNTC4gTm8gbGltaXRzLiBKdXN0IGRhdGEuIENs
aWNrIHRvIGdldCBpdCBub3cuCmh0dHA6Ly9zb3VyY2Vmb3JnZS5uZXQvcG93ZXJiYXIvZGIyLwpf
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpCbHVlei1kZXZl
bCBtYWlsaW5nIGxpc3QKQmx1ZXotZGV2ZWxAbGlzdHMuc291cmNlZm9yZ2UubmV0Cmh0dHBzOi8v
bGlzdHMuc291cmNlZm9yZ2UubmV0L2xpc3RzL2xpc3RpbmZvL2JsdWV6LWRldmVsCg==

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

* Re: [Bluez-devel] Report a bug against "l2cap_conf_output()" in"net/bluetooth/l2cap.c"
       [not found] <AF7E222731C6614DAB496712B5768F2401EB332C@ct11exm65.ds.mot.com>
@ 2007-05-15 10:54 ` GAO LIANG-TAO-W20048
  2007-05-16  1:40 ` GAO LIANG-TAO-W20048
  1 sibling, 0 replies; 4+ messages in thread
From: GAO LIANG-TAO-W20048 @ 2007-05-15 10:54 UTC (permalink / raw)
  To: bluez-devel

Hi Marcel,

Sorry for getting back late.

I think you omitted the local outgoing MTU. The original code will
enlarge the outgoing MTU value, but the Bluetooth SPEC expects a minimum
of the MTU in the config request and the local outgoing MTU.

For example, if Device B starts an L2CAP service with incoming MTU 512,
and an L2CAP client on Device A claiming an outgoing MTU 53 tries to
connect to the service; the service on B sends configuration request to
the BlueZ stack on A with MTU 512, then A shall sends back a positive
response to B with the MTU 53 (not 512 as BlueZ actually does). In fact
this example is from a JSR82 MTU test case.

Here's the whole paragraph in page 1038 (of the total 1230) in Bluetooth
SPEC Core_v2.0_EDR.pdf:
"If the remote device sends a positive configuration response it shall
include the actual MTU to be used on this channel for traffic flowing
into the local device. This is the minimum of the MTU in the
configuration request and the outgoing MTU capability of the device
sending the configuration response. The new agreed value (the default
value in a future re-configuration) is the value specified in the
request."

My understanding is that the MTU can be increased in no cases. Please
let me know your consideration of this paragraph.

Thanks
Gao Liangtao


-----Original Message-----
From: Marcel Holtmann [mailto:marcel@holtmann.org] 
Sent: Friday, May 04, 2007 1:56 AM
To: BlueZ development
Cc: Singer Catherine-CSINGER1; Jin Hong-Lei-W19971; Saeed Faisal-EFS015
Subject: Re: [Bluez-devel] Report a bug against "l2cap_conf_output()"
in"net/bluetooth/l2cap.c"

Hi,

> 
> I want to report a bug against "l2cap_conf_output()" in BlueZ kernel 
> code "net/bluetooth/l2cap.c":
> 
>     if (pi->conf_mtu < pi->omtu) {
> 
>        l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu);
> 
>        result = L2CAP_CONF_UNACCEPT;
> 
>     } else {
> 
>        pi->omtu = pi->conf_mtu;
> 
>     }
> 
> I think it's wrong to enlarge the outgoing MTU value (by calling 
> "pi->omtu = pi->conf_mtu") when device B gets the MTU in device A's 
> configuration request. In fact, Page 1006/1200 of Bluetooth SPEC v1.2 
> or Page 1038/1230 of Bluetooth SPEC v2.0 EDR both require a minimum of

> the  "If the remote device sends a positive configuration response it 
> shall include the actual MTU to be used on this channel for traffic 
> flowing into the local device. This is the minimum of the MTU in the 
> configuration request and the outgoing MTU capability of the device 
> sending the configuration response." Here I consider the original 
> "pi->omtu" as the "outgoing MTU capability".

I need more details from you, because I don't see the issue here. The
MTUs (output + input) for L2CAP are negotiated in both directions.

Regards

Marcel



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* RE: [Bluez-devel] Report a bug against "l2cap_conf_output()" in"net/bluetooth/l2cap.c"
       [not found] <AF7E222731C6614DAB496712B5768F2401EB332C@ct11exm65.ds.mot.com>
  2007-05-15 10:54 ` [Bluez-devel] Report a bug against "l2cap_conf_output()" in"net/bluetooth/l2cap.c" GAO LIANG-TAO-W20048
@ 2007-05-16  1:40 ` GAO LIANG-TAO-W20048
  1 sibling, 0 replies; 4+ messages in thread
From: GAO LIANG-TAO-W20048 @ 2007-05-16  1:40 UTC (permalink / raw)
  Cc: bluez-devel, marcel


Hi Marcel,

Are you simply ignoring my "bug" report? Dislike my email?

It's not an easy talk with you. I'm afraid my membership will be wrongly
disabled again after this email.

Regards,
Gao

-----Original Message-----
From: GAO LIANG-TAO-W20048=20
Sent: Tuesday, May 15, 2007 6:55 PM
To: bluez-devel@lists.sourceforge.net
Subject: RE: [Bluez-devel] Report a bug against "l2cap_conf_output()"
in"net/bluetooth/l2cap.c"

Hi Marcel,

Sorry for getting back late.

I think you omitted the local outgoing MTU. The original code will
enlarge the outgoing MTU value, but the Bluetooth SPEC expects a minimum
of the MTU in the config request and the local outgoing MTU.

For example, if Device B starts an L2CAP service with incoming MTU 512,
and an L2CAP client on Device A claiming an outgoing MTU 53 tries to
connect to the service; the service on B sends configuration request to
the BlueZ stack on A with MTU 512, then A shall sends back a positive
response to B with the MTU 53 (not 512 as BlueZ actually does). In fact
this example is from a JSR82 MTU test case.

Here's the whole paragraph in page 1038 (of the total 1230) in Bluetooth
SPEC Core_v2.0_EDR.pdf:
"If the remote device sends a positive configuration response it shall
include the actual MTU to be used on this channel for traffic flowing
into the local device. This is the minimum of the MTU in the
configuration request and the outgoing MTU capability of the device
sending the configuration response. The new agreed value (the default
value in a future re-configuration) is the value specified in the
request."

My understanding is that the MTU can be increased in no cases. Please
let me know your consideration of this paragraph.

Thanks
Gao Liangtao


-----Original Message-----
From: Marcel Holtmann [mailto:marcel@holtmann.org]=20
Sent: Friday, May 04, 2007 1:56 AM
To: BlueZ development
Cc: Singer Catherine-CSINGER1; Jin Hong-Lei-W19971; Saeed Faisal-EFS015
Subject: Re: [Bluez-devel] Report a bug against "l2cap_conf_output()"
in"net/bluetooth/l2cap.c"

Hi,

>=20
> I want to report a bug against "l2cap_conf_output()" in BlueZ kernel=20
> code "net/bluetooth/l2cap.c":
>=20
>     if (pi->conf_mtu < pi->omtu) {
>=20
>        l2cap_add_conf_opt(ptr, L2CAP_CONF_MTU, 2, pi->omtu);
>=20
>        result =3D L2CAP_CONF_UNACCEPT;
>=20
>     } else {
>=20
>        pi->omtu =3D pi->conf_mtu;
>=20
>     }
>=20
> I think it's wrong to enlarge the outgoing MTU value (by calling=20
> "pi->omtu =3D pi->conf_mtu") when device B gets the MTU in device A's=20
> configuration request. In fact, Page 1006/1200 of Bluetooth SPEC v1.2=20
> or Page 1038/1230 of Bluetooth SPEC v2.0 EDR both require a minimum of

> the  "If the remote device sends a positive configuration response it=20
> shall include the actual MTU to be used on this channel for traffic=20
> flowing into the local device. This is the minimum of the MTU in the=20
> configuration request and the outgoing MTU capability of the device=20
> sending the configuration response." Here I consider the original=20
> "pi->omtu" as the "outgoing MTU capability".

I need more details from you, because I don't see the issue here. The
MTUs (output + input) for L2CAP are negotiated in both directions.

Regards

Marcel

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

end of thread, other threads:[~2007-05-16  1:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-30  7:02 [Bluez-devel] Report a bug against "l2cap_conf_output()" in "net/bluetooth/l2cap.c" GAO LIANG-TAO-W20048
2007-05-04  6:55 ` Marcel Holtmann
     [not found] <AF7E222731C6614DAB496712B5768F2401EB332C@ct11exm65.ds.mot.com>
2007-05-15 10:54 ` [Bluez-devel] Report a bug against "l2cap_conf_output()" in"net/bluetooth/l2cap.c" GAO LIANG-TAO-W20048
2007-05-16  1:40 ` GAO LIANG-TAO-W20048

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox