[libvirt PATCH v2 06/12] nodedev: driver: Introduce internal mdevctl commands enum

Jonathon Jongsma jjongsma at redhat.com
Wed Apr 14 20:28:23 UTC 2021


On Wed, 14 Apr 2021 12:41:02 +0200
Erik Skultety <eskultet at redhat.com> wrote:

> On Tue, Apr 13, 2021 at 03:39:42PM -0500, Jonathon Jongsma wrote:
> > From: Erik Skultety <eskultet at redhat.com>
> > 
> > This is not a 1:1 mapping to mdevctl because mdevctl doesn't
> > support a 'create' command. It uses 'start' for both starting a
> > defined device as well as creating a transient one. To make our
> > code more readable in that regard and not second-guess what does a
> > specific "start" instance mean, use "create" internally instead
> > only to translate it to "start" just before executing mdevctl.  
> 
> Reading ^this for the second time, I think we need to rephrase the
> second sentence, as it's difficult to read and that's something since
> I wrote it :D.
> 

heh, true.

How about something like:

This is not a 1:1 mapping to mdevctl commands because mdevctl doesn't support a
separate 'create' command. mdevctl uses 'start' for both starting a pre-defined
device as well and for creating and starting a new transient device. The
libvirt code will be more readable if we treat these as separate commands. When
we need to actually execute mdevctl, the 'create' command will be translated
into the appropriate 'mdevctl start' command.




More information about the libvir-list mailing list