On (Wed) 26 Sep 2012 [09:48:12], Sjur BRENDELAND wrote:
> > > This merge reduces code size by unifying the approach for
> > > sending scatter-lists and regular buffers. Any type of
> > > write operation (splice, write, put_chars) will now allocate
> > > a port_buffer and send_buf() and free_buf()
On (Tue) 25 Sep 2012 [15:47:15], sjur.brandel...@stericsson.com wrote:
> From: Sjur Brændeland
>
> This merge reduces code size by unifying the approach for
> sending scatter-lists and regular buffers. Any type of
> write operation (splice, write, put_chars) will now allocate
> a port_buffer and
On (Tue) 25 Sep 2012 [15:47:15], sjur.brandel...@stericsson.com wrote:
From: Sjur Brændeland sjur.brandel...@stericsson.com
This merge reduces code size by unifying the approach for
sending scatter-lists and regular buffers. Any type of
write operation (splice, write, put_chars) will now
On (Wed) 26 Sep 2012 [09:48:12], Sjur BRENDELAND wrote:
This merge reduces code size by unifying the approach for
sending scatter-lists and regular buffers. Any type of
write operation (splice, write, put_chars) will now allocate
a port_buffer and send_buf() and free_buf() can always
Sjur BRENDELAND writes:
>> This allocates one redundant sg entry when nrbuf > 0,
>> but I think it is OK. (just a comment)
>
> I did this on purpose for the sake of simplicity, but I can
> change this to something like:
>alloc_size = sizeof(*buf) + sizeof(buf->sg) * max(nrbufs - 1, 1);
(2012/09/26 16:48), Sjur BRENDELAND wrote:
>>> -static struct port_buffer *alloc_buf(size_t buf_size)
>>> +static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
>>> +int nrbufs)
>>> {
>>> struct port_buffer *buf;
>>> + size_t alloc_size;
> > This merge reduces code size by unifying the approach for
> > sending scatter-lists and regular buffers. Any type of
> > write operation (splice, write, put_chars) will now allocate
> > a port_buffer and send_buf() and free_buf() can always be used.
>
> Thanks!
> This looks much nicer and
This merge reduces code size by unifying the approach for
sending scatter-lists and regular buffers. Any type of
write operation (splice, write, put_chars) will now allocate
a port_buffer and send_buf() and free_buf() can always be used.
Thanks!
This looks much nicer and simpler. I
(2012/09/26 16:48), Sjur BRENDELAND wrote:
-static struct port_buffer *alloc_buf(size_t buf_size)
+static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
+int nrbufs)
{
struct port_buffer *buf;
+ size_t alloc_size;
- buf =
Sjur BRENDELAND sjur.brandel...@stericsson.com writes:
This allocates one redundant sg entry when nrbuf 0,
but I think it is OK. (just a comment)
I did this on purpose for the sake of simplicity, but I can
change this to something like:
alloc_size = sizeof(*buf) + sizeof(buf-sg) *
(2012/09/25 22:47), sjur.brandel...@stericsson.com wrote:
> From: Sjur Brændeland
>
> This merge reduces code size by unifying the approach for
> sending scatter-lists and regular buffers. Any type of
> write operation (splice, write, put_chars) will now allocate
> a port_buffer and send_buf()
(2012/09/25 22:47), sjur.brandel...@stericsson.com wrote:
From: Sjur Brændeland sjur.brandel...@stericsson.com
This merge reduces code size by unifying the approach for
sending scatter-lists and regular buffers. Any type of
write operation (splice, write, put_chars) will now allocate
a
12 matches
Mail list logo