[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#825931: s390-netdevice virtio interface choice misleading



Package: s390-netdevice
Version: 0.0.44
Severity: normal
Tags: d-i patch
X-Debbugs-CC: debian-s390@lists.debian.org, brueckner@linux.vnet.ibm.com

Dear Maintainer,

if an installation is attempted on a system with a PCI network interface
only, it is necessary to select virtio as network interface to continue
with the installation. This works because the virtio choice is
effectively a NOP and both PCI and virtio interfaces don't need
additional configuration. But it's also confusing.
I'd like to suggest to replace the 'virtio' choice with 'other' for a
better user experience (see attached patch).
This has of course an impact on existing preseed configurations with
s390-netdevice/choose_networktype=virtio but in the long run it might be
better to accept the migration pain than to live with a multitude of
semantically equivalent choices (kvm, pci, ...).

-- 

Mit freundlichen Grüßen/Kind Regards
   Viktor Mihajlovski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

>From f7150c9d0c57f918b7f627423846bd43f2b964bc Mon Sep 17 00:00:00 2001
From: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Date: Mon, 30 May 2016 15:33:50 +0200
Subject: [PATCH] s390-netdevice: replace "virtio" by "other"

With the advent of PCI network device in z Systems a certain shortcoming
of the s390-netdevice module shows:
1. There's no PCI choice
2. A PCI choice doesn't exactly make sense, as nothing needs to be
   done for PCI.
3. Same thing for virtio

This change replaces the "virtio" selection with "other" in order
to support all kinds of network interfaces not needing configuration
in s390 environments, e.g. because a different d-i module is
configuring the interface.

Signed-off-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
Acked-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
---
 debian/s390-netdevice.templates | 8 +++++---
 netdevice.c                     | 8 ++++----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/debian/s390-netdevice.templates b/debian/s390-netdevice.templates
index 39fc0b7..04db5bf 100644
--- a/debian/s390-netdevice.templates
+++ b/debian/s390-netdevice.templates
@@ -1,16 +1,18 @@
 Template: s390-netdevice/choose_networktype
 Type: select
-Choices-C: ctc, qeth, iucv, virtio
+Choices-C: ctc, qeth, iucv, other
 # Note to translators : Please keep your translations of the choices
 # below a 65 columns limit (which means 65 characters 
 # in single-byte languages) including the initial path
 # :sl5:
-__Choices: ctc: Channel to Channel (CTC) or ESCON connection, qeth: OSA-Express in QDIO mode / HiperSockets, iucv: Inter-User Communication Vehicle - available for VM guests only, virtio: KVM VirtIO
+__Choices: ctc: Channel to Channel (CTC) or ESCON connection, qeth: OSA-Express in QDIO mode / HiperSockets, iucv: Inter-User Communication Vehicle - available for VM guests only, other: other interface types like PCI or virtio
 # :sl5:
 _Description: Network device type:
  Please choose the type of your primary network interface that you
  will need for installing the Debian system (via NFS or HTTP). Only
- the listed devices are supported.
+ the listed devices are supported. If you chose "other", the interface
+ must not require additional configuration (i.e., it is configured
+ by a different installer module).
 
 Template: s390-netdevice/ctc/choose_read
 Type: select
diff --git a/netdevice.c b/netdevice.c
index c886170..64ec72e 100644
--- a/netdevice.c
+++ b/netdevice.c
@@ -97,7 +97,7 @@ enum
 	TYPE_CTC,
 	TYPE_IUCV,
 	TYPE_QETH,
-	TYPE_VIRTIO,
+	TYPE_OTHER,
 }
 type = TYPE_NONE;
 
@@ -308,8 +308,8 @@ static enum state_wanted get_networktype (void)
 		type = TYPE_CTC;
 	else if (!strncmp (ptr, "iucv", 4))
 		type = TYPE_IUCV;
-	else if (!strncmp (ptr, "virtio", 6))
-		type = TYPE_VIRTIO;
+	else if (!strncmp (ptr, "other", 5))
+		type = TYPE_OTHER;
 	else
 		return WANT_ERROR;
 
@@ -884,7 +884,7 @@ int main (int argc __attribute__ ((unused)), char *argv[] __attribute__ ((unused
 							case TYPE_IUCV:
 								state = GET_IUCV_DEVICE;
 								break;
-							case TYPE_VIRTIO:
+							case TYPE_OTHER:
 								// no further configuration needed
 								state = FINISH;
 								break;
-- 
1.9.1


Reply to: