public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* can we increase the send buffer size of rfcomm socket?
@ 2009-08-26 10:07 Lan Zhu
  2009-08-26 18:04 ` Marcel Holtmann
  0 siblings, 1 reply; 8+ messages in thread
From: Lan Zhu @ 2009-08-26 10:07 UTC (permalink / raw)
  To: linux-bluetooth

We tried to write a 64k data to rfcomm socket, but it will break
before sending all of the data out. The problem is in function
rfcomm_sock_sendmsg() in net/bluetooth/rfcomm/sock.c, it breaks after
calling sock_alloc_send_skb().

static int rfcomm_sock_sendmsg(...)
{
   ...
		skb = sock_alloc_send_skb(sk, size + RFCOMM_SKB_RESERVE,
				msg->msg_flags & MSG_DONTWAIT, &err);
		if (!skb)
			break;
   ...
}

Looks the send buffer is not adequate. Then I increased the send
buffer size in function rfcomm_sock_alloc(),  build kernel and try
again, this time the sendmsg can complete sending all the data.

Can we use the setsockopt() method to change the socket's send/receive
buffer size, just like the usual  tcp/ip socket?


Thanks,
Zhu Lan

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

end of thread, other threads:[~2009-08-29 11:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox