Bug 1320

Summary: Use writev in EmuNetDevice (possible performance improvement idea)
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: generalAssignee: ns-bugs <ns-bugs>
Status: NEW ---    
Severity: enhancement    
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: Linux   

Description Gustavo J. A. M. Carneiro 2011-12-22 09:45:11 EST
I just had crazy idea that could improve the EmuNetDevice performance a bit.  Not sure if it us feasible, but wanted to note the idea somewhere before I forget.

Currently, to transmit a packet, EmuNetDevice does packet->CopyData, to copy data to another buffer, and then calls sendto().  Would it possible to implement a Copy-less serialization mechanism that used struct iovec and writev() instead?  We would need a new Packet method that returned an array of iovec, which points to its own internal data buffers, instead of copying the data elsewhere.  As a result, less data would need to be copied, for the transmission case.