qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, Jason Wang <jasowang@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 3/3] q35: change default NIC to e1000e
Date: Thu, 8 Mar 2018 05:48:18 -0500 (EST)	[thread overview]
Message-ID: <368741524.5994930.1520506098881.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <599bfe48-6848-d5a4-5df6-64e0aa627aee@redhat.com>


> > -        if (!pci_bus || (nd->model && strcmp(nd->model, "ne2k_isa") == 0))
> > {
> > +        if (!strcmp(model, "ne2k_isa")) {
> 
> <bikeshedpainting>
> I'd prefer g_str_equal() these days ...
> </bikeshedpainting>

I guess I owe you a lot of bikeshedding.  Changed.

> > -    if (!strcmp(nd->model, "virtio")) {
> > +    if (nd->model && !strcmp(nd->model, "virtio")) {
> 
> Please squash that into the previous patch instead.

Pro tip: don't write patches at 5 AM after the son woke up, even if
you cannot fall asleep again.  Sorry for the mess.

Paolo

> >          g_free(nd->model);
> >          nd->model = g_strdup("virtio-net-pci");
> >      }
> > diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> > index bb49165fe0..e81654eb7f 100644
> > --- a/include/hw/i386/pc.h
> > +++ b/include/hw/i386/pc.h
> > @@ -114,6 +114,7 @@ struct PCMachineClass {
> >      /* Device configuration: */
> >      bool pci_enabled;
> >      bool kvmclock_enabled;
> > +    const char *default_nic_model;
> >  
> >      /* Compat options: */
> >  
> > @@ -248,7 +249,7 @@ void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd);
> >  void pc_cmos_init(PCMachineState *pcms,
> >                    BusState *ide0, BusState *ide1,
> >                    ISADevice *s);
> > -void pc_nic_init(ISABus *isa_bus, PCIBus *pci_bus);
> > +void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus);
> >  void pc_pci_device_init(PCIBus *pci_bus);
> >  
> >  typedef void (*cpu_set_smm_t)(int smm, void *arg);
> > 
> 
> Apart from the nits, this looks fine to me.
> 
>  Thomas
> 

  reply	other threads:[~2018-03-08 10:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 19:45 [Qemu-devel] [PATCH v2 0/3] change q35 default NIC to e1000e Paolo Bonzini
2018-03-06 19:45 ` [Qemu-devel] [PATCH 1/3] qom: introduce object_class_get_list_sorted Paolo Bonzini
2018-03-07 14:31   ` Thomas Huth
2018-03-06 19:45 ` [Qemu-devel] [PATCH 2/3] net: allow using any PCI NICs in -net or -nic Paolo Bonzini
2018-03-08  9:02   ` Thomas Huth
2018-03-08 10:44     ` Paolo Bonzini
2018-03-06 19:46 ` [Qemu-devel] [PATCH 3/3] q35: change default NIC to e1000e Paolo Bonzini
2018-03-08 10:38   ` Thomas Huth
2018-03-08 10:48     ` Paolo Bonzini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-03-08 17:28 [Qemu-devel] [PATCH v3 0/3] change q35 " Paolo Bonzini
2018-03-08 17:28 ` [Qemu-devel] [PATCH 3/3] q35: change " Paolo Bonzini
2018-03-08 18:13   ` Thomas Huth
2018-03-09  7:10   ` Jason Wang
2018-03-06 16:49 [Qemu-devel] [PATCH 0/3] change q35 " Paolo Bonzini
2018-03-06 16:49 ` [Qemu-devel] [PATCH 3/3] q35: change " Paolo Bonzini

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=368741524.5994930.1520506098881.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).