From: Lan Zhu <zhu.lan.cn@gmail.com>
To: Iain Hibbert <plunky@rya-online.net>
Cc: Marcel Holtmann <marcel@holtmann.org>, linux-bluetooth@vger.kernel.org
Subject: Re: can we increase the send buffer size of rfcomm socket?
Date: Sat, 29 Aug 2009 19:19:18 +0800 [thread overview]
Message-ID: <113d36d80908290419r7a6674f8p687158be2bcb1c82@mail.gmail.com> (raw)
In-Reply-To: <1251482074.966253.827.nullmailer@galant.ukfsn.org>
Hi Lain,
2009/8/29 Iain Hibbert <plunky@rya-online.net>:
> On Fri, 28 Aug 2009, Marcel Holtmann wrote:
>
>> > Yes, it's our kernel's problem. We used another version and it worked
>> > fine. Here the change in rfcomm_sock_alloc() is only for testing. What
>> > I'm doing now is adding a case for RFCOMM_SNDBUF in the function
>> > rfcomm_sock_setsockopt_old(), as below.
>> >
>> > =A0 =A0 case RFCOMM_SNDBUF:
>> > =A0 =A0 =A0 =A0 =A0 =A0 sk->sk_sndbuf =3D opt;
>> > =A0 =A0 =A0 =A0 =A0 =A0 break;
>> >
>> > I'm thinking to add a limitation for a maximum buffer size, but don't
>> > know what maximum size is appropriate here. Do you have any idea?
>>
>> no that is bluntly wrong. Why do you think the function has _old in its
>> name. It clearly shows that we are going to deprecate it soon. If you do
>> this for RFCOMM, then it should also be done for L2CAP. So make sure you
>> use SOL_BLUETOOTH. And make it similar to what TCP is doing.
>
> Eh? Why would you need to invent a SOL_BLUETOOTH setting for this when
> there is a standard "SOL_SOCKET, SO_SNDBUF" option that covers it already=
?
>
> =A0http://www.opengroup.org/onlinepubs/000095399/functions/setsockopt.htm=
l
>
> regards,
> iain
>
>
>
>
Lain, you are right. I tried setsockopt with level SOL_SOCKET and opt
SO_SNDBUF, it worked well. So, Bluetooth socket can set all the
standard sock options, no need to add extra code for that. Thanks a
lot for your suggestion.
Marcel, also thank you for considering this issue these days.
Thanks,
Zhu Lan
prev parent reply other threads:[~2009-08-29 11:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-26 10:07 can we increase the send buffer size of rfcomm socket? Lan Zhu
2009-08-26 18:04 ` Marcel Holtmann
2009-08-27 15:33 ` Lan Zhu
2009-08-27 19:30 ` Marcel Holtmann
2009-08-28 9:34 ` Lan Zhu
2009-08-28 16:58 ` Marcel Holtmann
2009-08-28 17:54 ` Iain Hibbert
2009-08-29 11:19 ` Lan Zhu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=113d36d80908290419r7a6674f8p687158be2bcb1c82@mail.gmail.com \
--to=zhu.lan.cn@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=plunky@rya-online.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox