|
From: | Dmitry Fleytman |
Subject: | Re: [Qemu-devel] [RFC PATCH 0/5] Introduce Intel 82574 GbE Controller Emulation (e1000e) |
Date: | Sat, 31 Oct 2015 07:52:22 +0200 |
Hello Jason, Thanks for reviewing. See my answers inline.
That’s a good question :) This is how we started, we had a common “core” code base meant to implement all common logic (this split is still present in the patches - there are e1000e_core.c and e1000e.c files). Unfortunately at some point it turned out that there are more differences that commons. We noticed that the code becomes filled with many minor differences handling. This also made the code base more complicated and harder to follow. So at some point of time it was decided to split the code base and revert all changes done to the e1000 device (except a few fixes/improvements Leonid submitted a few days ago). Although there was common code between devices, total SLOC of e1000 and e1000e devices became smaller after the split. Amount of code that may be shared between devices will be even smaller after we complete the implementation which still misses a few features (see cover letter) that will change many things. Still after the device implementation is done, we plan to review code similarities again to see if there are possibilities for code sharing.
Yes, we have this in plans.
These abstractions were initially developed by me as a part of vmxnet3 device to be generic and re-usable. Their main advantage is support for virtio headers for virtio-enabled backends and emulation of network offloads in software for backends that do not support virtio. Of course they may be re-used by virtio, however I’m not sure if it will be really useful because virtio has feature negotiation facilities and do not require SW emulation for network task offloads. For other devices they are useful because each and every device that requires SW offloads implementation need to do exactly the same things and it doesn’t make sense to have a few implementations for this. Best Regards, Dmitry
|
[Prev in Thread] | Current Thread | [Next in Thread] |