Re: [PATCH -v3] Bluetooth: Add MSG_MORE support to L2CAP sockets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Marcel Holtmann <marcel@xxxxxxxxxxxx> [2012-05-18 16:59:47 -0700]:

> Hi Gustavo,
> 
> > MSG_MORE enables us to save buffer space in userspace, the packet is
> > built directly in the kernel and sent only when a msg with the MSG_MORE
> > flag not set arrives. If a send() tries to add more chan->omtu bytes
> > -EMSGSIZE is returned.
> > 
> > Only MSG_MORE for Basic Mode is supported right now. chan->skb_more keeps
> > a pointer to the L2CAP packet that is being build through many calls to
> > send().
> 
> so this is really not acceptable. We need to start supporting all modes
> with MSG_MORE at the same time. Otherwise we can not merge this.

The ERTM/Streaming sending code is bit different from the Basic mode sending
so implementing a MSG_MORE code that fits in both cases is not that trivial.
I have a different proposal for this that would make the code a lot simpler,
however we will need more memory.

We could add a extra buffer to keep the data coming from userspace until a
send with the MSG_MORE is not sent arrives, at that point we pass a to sending
side that will treat the buffer according to the L2CAP mode. This is simpler
but as said has extra buffer copy. On the other side, when one is using
MSG_MORE it saves a data copy in userspace, as we don't need to build the
packet there anymore.

comments?
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux