Hi Zdenek,

Zdenek Bouska wrote:
Hi Jiri,

in mainline changeset 1358 (Eliminate packet_t from sending direction of NIC interface.) you added frame copying to E1000 driver.
Line 2290 of e1k.c
http://trac.helenos.org/browser/mainline/uspace/drv/nic/e1k/e1k.c?rev=mainline%2C1358#L2290

Is this only temporary solution? Or is this necessary after elimination of packet_t?

In my networking stack rewrite I try to make things as simple as possible (at 
least at the beginning). I am eliminating the packet sharing mechanism - 
packets are transferred from one network task to another simply using IPC 
read/write.

The fact that the frame data is memcpied() to the DMA buffer after being 
IPC-written to e1k is necessary under the current simple definition of the 
send_frame handler. It could be eliminated if the interface was made more 
clever (i.e. allowed the driver to register DMA buffers with NIC framework and 
write data there directly). I might do this (and other similar optimization) in 
the future. But it's just that - an optimization.

I believe that for <2kB size buffers the cost of copying is relatively small 
compared to the cost of context switch. Therefore the cost should be bearable. 
When the stack is working reliably I might do some benchmarks and optimize based 
on need.

I am basically taking the opposite approach from Lukas Mejdrech - make simple 
first, optimize later.

Cheers,
Jiri

_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to