[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #8882] Vector improvements
From: |
Joel Cunningham |
Subject: |
[lwip-devel] [patch #8882] Vector improvements |
Date: |
Thu, 21 Jan 2016 21:51:34 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0 |
URL:
<http://savannah.nongnu.org/patch/?8882>
Summary: Vector improvements
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: jcunningham
Submitted on: Thu 21 Jan 2016 09:51:32 PM GMT
Category: sockets/netconn
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: jcunningham
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
Continuing my work with sendmsg(), I've got a couple more improvements:
1) Move struct iovec to def.h - This patch moves the LwIP provided definition
of struct iovec to def.h from sockets.h. This was done so that netconn code
can reference the type without having the socket layer enabled
This also switches to using a compiler guard of #if LWIP_IOVEC_PRIVATE because
#if !defined() on a structure doesn't actually work. This also allows a port
to include <sys/uio.h> instead for struct iovec
2) Optimize sendmsg UDP pbuf chain creation - This patch optimizes the sendmsg
UDP pbuf chain creation by not allocating/freeing a netbuf per IO vector.
This adds a new API (netbuf_ref_vectors()) which takes an array of struct
iovecs and creates a chain of PBUF_REFs in the provided netbuf. The logic is a
combination of netbuf_ref() and netbuf_chain()
3) Vectorize netconn_write for TCP - This patch adds support to the netconn
write APIs to take an input of vectors instead of a single data pointer. This
allows vectors sent on a TCP connection via sendmsg to be treated atomically.
The set of vectors is segmented into as much data as can fit into the send
buffer and then the TCP output function is called
Previously, each vector was passed to netconn_write_partly and tcp_write
segmented it into its own packet, which was then it was sent via tcp_output
(if not Nagleing)
This patch adds vector support to lwip_netconn_do_writemore() which is the
meat of the TCP write functionality from netconn/sockets layer. A new netconn
API netconn_write_vectors_partly() takes a set of vectors as input and hooks
up to do_writemore()
The patches have the follow dependency order:
0001-Move-struct-iovec-to-def.h.patch
0001-Optimzie-sendmsg-UDP-pbuf-chain-creation.patch
0001-Vectorize-netconn_write-for-TCP.patch
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 21 Jan 2016 09:51:32 PM GMT Name:
0001-Move-struct-iovec-to-def.h.patch Size: 2kB By: jcunningham
<http://savannah.nongnu.org/patch/download.php?file_id=36123>
-------------------------------------------------------
Date: Thu 21 Jan 2016 09:51:32 PM GMT Name:
0001-Vectorize-netconn_write-for-TCP.patch Size: 12kB By: jcunningham
<http://savannah.nongnu.org/patch/download.php?file_id=36124>
-------------------------------------------------------
Date: Thu 21 Jan 2016 09:51:32 PM GMT Name:
0001-Optimzie-sendmsg-UDP-pbuf-chain-creation.patch Size: 4kB By:
jcunningham
<http://savannah.nongnu.org/patch/download.php?file_id=36125>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?8882>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [patch #8882] Vector improvements,
Joel Cunningham <=