All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Ed Swierk <eswierk@skyportsystems.com>
Cc: Jason Wang <jasowang@redhat.com>,
	Dmitry Fleytman <dmitry@daynix.com>,
	Leonid Bloch <leonid.bloch@ravellosystems.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 0/2] e1000e: Reimplement e1000 as a variant of e1000e
Date: Thu, 9 Nov 2017 13:53:06 +0000	[thread overview]
Message-ID: <20171109135306.GF18164@redhat.com> (raw)
In-Reply-To: <1510202357-124052-1-git-send-email-eswierk@skyportsystems.com>

FWIW, it is generally recommended that new versions of patch series be
posted as a new top level thread, not in-reply-to the previous version.
That way the new posting gets attention near top of a dev's email inbox,
as opposed to hidden away as a reply to a weeks old msg at the back of
the inbox.

On Wed, Nov 08, 2017 at 08:39:15PM -0800, Ed Swierk via Qemu-devel wrote:
> From a hardware functionality and register perspective, the Intel
> 8254x Gigabit Ethernet Controller[1] is roughly a subset of the Intel
> 82574[2], making it practical to implement e1000 device emulation as
> an extension of e1000e.
> 
> That would be a step towards eliminating the existing e1000
> implementation--a bunch of semi-redundant code with its own bugs (like
> the faulty tx checksum offload I reported recently[3]).
> 
> [1] https://www.intel.com/content/dam/doc/manual/pci-pci-x-family-gbe-controllers-software-dev-manual.pdf
> [2] https://www.intel.com/content/dam/doc/datasheet/82574l-gbe-controller-datasheet.pdf
> [3] https://lists.nongnu.org/archive/html/qemu-devel/2017-10/msg03008.html
> 
> This patch series adds a new e1000-ng device but leaves the existing
> e1000 device alone. Linux 4.1 and Windows 10 e1000 guest drivers
> recognize the e1000-ng device and successfully pass traffic on a Linux
> host.
> 
> Preliminary performance measurements are encouraging: with e1000-ng,
> single-threaded TCP iperf shows about a 2x speedup in tx and rx
> throughput vs e1000, and CPU usage is slighly lower.

That is certainly attractive.

> A ton of work is needed before e1000-ng will be ready to supplant
> e1000: testing with every random guest OS, fixing bugs, figuring out
> migration and other missing functionality. There's no way I can do
> this myself.
> 
> I'd like to propose a more modest and achievable short-term goal: find
> and fix any regressions that might affect users of e1000e and e1000,
> so that the patches can be applied and folks can easily start trying
> out e1000-ng with their favorite guest OS. That means accepting (for
> now) known deficiencies in the new e1000-ng devices, which can be
> addressed by myself and (hopefully) others in follow-up patches. Does
> that sound reasonable?

My fear is that this approach of building a new e1000-ng device in
parallel with having the existing e1000 device is going to cause
long term pain, possibly never getting to a state where the e1000-ng
device can replace the e1000 device. Any time there needs to be a
"big bang" to switch from one impl to another completely different
impl always causes trouble IME. With need for migration wire format
& state compatibility, this is even more difficult. From a code review
POV it will be essentially impossible to have confidence that the new
impl can be a viable drop-in replacement for the old impl.

Is there really no way that you can change the approach to do a more
incremental conversion of the existing code base, but still end up in
the same place at the very end ?

eg just copy all the e1000.c code into the e1000e.c file to start with.
Then gradually merge functional areas over a longish series of patches
to eliminate the duplication. This would make it far more practical to
identify where any regressions come from, and will give reviewers more
confidence that we're not breaking migration compat.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  parent reply	other threads:[~2017-11-09 13:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27  2:49 [Qemu-devel] [PATCH 0/2] e1000e: Reimplement e1000 as a variant of e1000e Ed Swierk
2017-10-27  2:49 ` [Qemu-devel] [PATCH 1/2] e1000e: Infrastructure for e1000-ng Ed Swierk
2017-10-27  2:49 ` [Qemu-devel] [PATCH 2/2] e1000e: Add e1000-ng devices Ed Swierk
2017-11-09  4:39 ` [Qemu-devel] [PATCH v2 0/2] e1000e: Reimplement e1000 as a variant of e1000e Ed Swierk
2017-11-09  4:39   ` [Qemu-devel] [PATCH v2 1/2] e1000e: Infrastructure for e1000-ng Ed Swierk
2017-11-09  4:39   ` [Qemu-devel] [PATCH v2 2/2] e1000e: Add e1000-ng devices Ed Swierk
2017-11-09 13:53   ` Daniel P. Berrange [this message]
2017-11-14 23:50     ` [Qemu-devel] [PATCH v2 0/2] e1000e: Reimplement e1000 as a variant of e1000e Ed Swierk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171109135306.GF18164@redhat.com \
    --to=berrange@redhat.com \
    --cc=dmitry@daynix.com \
    --cc=eswierk@skyportsystems.com \
    --cc=jasowang@redhat.com \
    --cc=leonid.bloch@ravellosystems.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.