diff mbox

[1/2] net: add e1000e model to the "simple" -net/-nic options

Message ID 20180302155110.5481-2-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paolo Bonzini March 2, 2018, 3:51 p.m. UTC
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/pci/pci.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thomas Huth March 2, 2018, 5:19 p.m. UTC | #1
On 02.03.2018 16:51, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/pci/pci.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index e006b6ac71..af3c85a46f 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -1822,6 +1822,7 @@ static const char * const pci_nic_models[] = {
>      "i82559er",
>      "rtl8139",
>      "e1000",
> +    "e1000e",
>      "pcnet",
>      "virtio",
>      "sungem",
> @@ -1835,6 +1836,7 @@ static const char * const pci_nic_names[] = {
>      "i82559er",
>      "rtl8139",
>      "e1000",
> +    "e1000e",
>      "pcnet",
>      "virtio-net-pci",
>      "sungem",

I think it would be better and more consisten to finally fix this mess
and automatically allow all devices in the category
DEVICE_CATEGORY_NETWORK that are derived from TYPE_PCI_DEVICE, instead
of manually maintaining this list here...?

 Thomas
Paolo Bonzini March 2, 2018, 5:31 p.m. UTC | #2
On 02/03/2018 18:19, Thomas Huth wrote:
> On 02.03.2018 16:51, Paolo Bonzini wrote:
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>  hw/pci/pci.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
>> index e006b6ac71..af3c85a46f 100644
>> --- a/hw/pci/pci.c
>> +++ b/hw/pci/pci.c
>> @@ -1822,6 +1822,7 @@ static const char * const pci_nic_models[] = {
>>      "i82559er",
>>      "rtl8139",
>>      "e1000",
>> +    "e1000e",
>>      "pcnet",
>>      "virtio",
>>      "sungem",
>> @@ -1835,6 +1836,7 @@ static const char * const pci_nic_names[] = {
>>      "i82559er",
>>      "rtl8139",
>>      "e1000",
>> +    "e1000e",
>>      "pcnet",
>>      "virtio-net-pci",
>>      "sungem",
> 
> I think it would be better and more consisten to finally fix this mess
> and automatically allow all devices in the category
> DEVICE_CATEGORY_NETWORK that are derived from TYPE_PCI_DEVICE, instead
> of manually maintaining this list here...?

Yeah, that would make sense too (virtio would be special cased).  Thanks!

Paolo
diff mbox

Patch

diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index e006b6ac71..af3c85a46f 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1822,6 +1822,7 @@  static const char * const pci_nic_models[] = {
     "i82559er",
     "rtl8139",
     "e1000",
+    "e1000e",
     "pcnet",
     "virtio",
     "sungem",
@@ -1835,6 +1836,7 @@  static const char * const pci_nic_names[] = {
     "i82559er",
     "rtl8139",
     "e1000",
+    "e1000e",
     "pcnet",
     "virtio-net-pci",
     "sungem",