Bug 1320 - Use writev in EmuNetDevice (possible performance improvement idea)
Use writev in EmuNetDevice (possible performance improvement idea)
Status: NEW
Product: ns-3
Classification: Unclassified
Component: general
All Linux
: P5 enhancement
Assigned To: ns-bugs
Depends on:
  Show dependency treegraph
Reported: 2011-12-22 09:45 EST by Gustavo J. A. M. Carneiro
Modified: 2011-12-22 09:45 EST (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
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.