From nobody Thu May 16 07:48:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1668084827; cv=none; d=zohomail.com; s=zohoarc; b=PpSz03sehlsvYrf5eTvrwZ2NcUKpS0/AANmOTFhBk7PGo2H6GzMn5+jfKo44k44t6oymwuPFMYuuwRb9iyMfTU8GwEfAToxZ4mGN17N3H6RMoRWBYk0BSJsmHGyDCZiWJcwY2AXPz9qjmKhyUoaDEN2h9ifn61BWfI6Q9E5qFkE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1668084827; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uTglEbbDj11oIDjEbvN+mtjXcvK2ZfPZnI1aXwSGuuk=; b=n9Hl7WsScKWvpRv0TgJJajJWB0BLmJ5cQ/q4kg7nVD+FVkOOq1EgNULNPoNcZWP+0jynGV2Ij1E9aZn0PzgzUKBEfOdLdV6mnE3BqrUqc4927SnzI4Oc0SGgT67MRbmWzKhrp3Di+FUU6HxaBtTyxDzbx5FvEkNKWFMjXKEwAds= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1668084827896569.6505449338222; Thu, 10 Nov 2022 04:53:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot72z-00049e-7I; Thu, 10 Nov 2022 07:52:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot72o-00044R-Ks for qemu-devel@nongnu.org; Thu, 10 Nov 2022 07:52:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot72n-0007VF-02 for qemu-devel@nongnu.org; Thu, 10 Nov 2022 07:52:34 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-540-O5nnsToMMxe9Y8TPQp5PWA-1; Thu, 10 Nov 2022 07:52:28 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B1251185A79C; Thu, 10 Nov 2022 12:52:27 +0000 (UTC) Received: from thuth.com (dhcp-192-232.str.redhat.com [10.33.192.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id B8E362166B29; Thu, 10 Nov 2022 12:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668084751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uTglEbbDj11oIDjEbvN+mtjXcvK2ZfPZnI1aXwSGuuk=; b=HNTrW3LmYw2XQP7FLpZ2gmN0ykiKJT6EXAwoq5e7QfHAc47dbw3oeXiwefynQcKT5/dzlF 2fSa9zP6N8492TavqVSgE9DhCTJlOEWNZFUFacziOKOU6+erXjVZcDfio7oTbRriAergTt 9TxA6RWMrPhGZ4SENbP4PWy05KFbQzA= X-MC-Unique: O5nnsToMMxe9Y8TPQp5PWA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang Cc: "Michael S. Tsirkin" , pbonzini@redhat.com, Marcel Apfelbaum , Claudio Fontana , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 1/3] net: Move the code to collect available NIC models to a separate function Date: Thu, 10 Nov 2022 13:52:22 +0100 Message-Id: <20221110125224.99596-2-thuth@redhat.com> In-Reply-To: <20221110125224.99596-1-thuth@redhat.com> References: <20221110125224.99596-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1668084829962100005 Content-Type: text/plain; charset="utf-8" The code that collects the available NIC models is not really specific to PCI anymore and will be required in the next patch, too, so let's move this into a new separate function in net.c instead. Signed-off-by: Thomas Huth --- include/net/net.h | 14 ++++++++++++++ hw/pci/pci.c | 29 +---------------------------- net/net.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 28 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 3db75ff841..31d9b980c7 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -201,6 +201,20 @@ void net_socket_rs_init(SocketReadState *rs, bool vnet_hdr); NetClientState *qemu_get_peer(NetClientState *nc, int queue_index); =20 +/** + * qemu_get_nic_models: + * @device_type: Defines which devices should be taken into consideration + * (e.g. TYPE_DEVICE for all devices, or TYPE_PCI_DEVICE for= PCI) + * + * Get an array of pointers to names of NIC devices that are available in + * the QEMU binary. The array is terminated with a NULL pointer entry. + * The caller is responsible for freeing the memory when it is not required + * anymore, e.g. with g_ptr_array_free(..., true). + * + * Returns: Pointer to the array that contains the pointers to the names. + */ +GPtrArray *qemu_get_nic_models(const char *device_type); + /* NIC info */ =20 #define MAX_NICS 8 diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 2f450f6a72..2b7b343e82 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1964,7 +1964,6 @@ PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *r= ootbus, const char *default_devaddr) { const char *devaddr =3D nd->devaddr ? nd->devaddr : default_devaddr; - GSList *list; GPtrArray *pci_nic_models; PCIBus *bus; PCIDevice *pci_dev; @@ -1979,33 +1978,7 @@ PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *= rootbus, nd->model =3D g_strdup("virtio-net-pci"); } =20 - list =3D object_class_get_list_sorted(TYPE_PCI_DEVICE, false); - pci_nic_models =3D g_ptr_array_new(); - while (list) { - DeviceClass *dc =3D OBJECT_CLASS_CHECK(DeviceClass, list->data, - TYPE_DEVICE); - GSList *next; - if (test_bit(DEVICE_CATEGORY_NETWORK, dc->categories) && - dc->user_creatable) { - const char *name =3D object_class_get_name(list->data); - /* - * A network device might also be something else than a NIC, s= ee - * e.g. the "rocker" device. Thus we have to look for the "net= dev" - * property, too. Unfortunately, some devices like virtio-net = only - * create this property during instance_init, so we have to cr= eate - * a temporary instance here to be able to check it. - */ - Object *obj =3D object_new_with_class(OBJECT_CLASS(dc)); - if (object_property_find(obj, "netdev")) { - g_ptr_array_add(pci_nic_models, (gpointer)name); - } - object_unref(obj); - } - next =3D list->next; - g_slist_free_1(list); - list =3D next; - } - g_ptr_array_add(pci_nic_models, NULL); + pci_nic_models =3D qemu_get_nic_models(TYPE_PCI_DEVICE); =20 if (qemu_show_nic_models(nd->model, (const char **)pci_nic_models->pda= ta)) { exit(0); diff --git a/net/net.c b/net/net.c index 840ad9dca5..49cced691f 100644 --- a/net/net.c +++ b/net/net.c @@ -899,6 +899,40 @@ static int nic_get_free_idx(void) return -1; } =20 +GPtrArray *qemu_get_nic_models(const char *device_type) +{ + GPtrArray *nic_models =3D g_ptr_array_new(); + GSList *list =3D object_class_get_list_sorted(device_type, false); + + while (list) { + DeviceClass *dc =3D OBJECT_CLASS_CHECK(DeviceClass, list->data, + TYPE_DEVICE); + GSList *next; + if (test_bit(DEVICE_CATEGORY_NETWORK, dc->categories) && + dc->user_creatable) { + const char *name =3D object_class_get_name(list->data); + /* + * A network device might also be something else than a NIC, s= ee + * e.g. the "rocker" device. Thus we have to look for the "net= dev" + * property, too. Unfortunately, some devices like virtio-net = only + * create this property during instance_init, so we have to cr= eate + * a temporary instance here to be able to check it. + */ + Object *obj =3D object_new_with_class(OBJECT_CLASS(dc)); + if (object_property_find(obj, "netdev")) { + g_ptr_array_add(nic_models, (gpointer)name); + } + object_unref(obj); + } + next =3D list->next; + g_slist_free_1(list); + list =3D next; + } + g_ptr_array_add(nic_models, NULL); + + return nic_models; +} + int qemu_show_nic_models(const char *arg, const char *const *models) { int i; --=20 2.31.1 From nobody Thu May 16 07:48:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1668084828; cv=none; d=zohomail.com; s=zohoarc; b=SpMqVtVi7pDPwwW+poAb7LIZ60m718LhlE6mR0K3NOMQ4EJnxb9wU89bWEzhqeBQk1Iy+4D3NPpaDH7q7b8nEyafG4bHnUFSUJB4MZNknr+unUilitgElFNpbDCdYHcSuoG/9bussp7WeJlypv2poxKS8ytxN00hI/qrfPpQPxI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1668084828; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YaFQHuJ+gBs7mXa5s9O6Yq0lVA17Ly2iYAp3nsSWluM=; b=O25qav8/PlvgFDvWEeHK5+IPh07/0ciWTIWbNFniWoDLFatiS5wJAoc2F1JAPfO1Mj7dkn5Qcx7fatEXTArghRdfUWc1+KF/6fGMaIs/QLXG55O7b2/w4DuWKOvYIC8GThJ7dRQzn4tG40wfstQe26Yr9+IAQHMFZNhBUpwtVjA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1668084828766350.09882044786275; Thu, 10 Nov 2022 04:53:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot72z-0004AI-Ux; Thu, 10 Nov 2022 07:52:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot72q-00044q-IX for qemu-devel@nongnu.org; Thu, 10 Nov 2022 07:52:43 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot72o-0007Vl-0x for qemu-devel@nongnu.org; Thu, 10 Nov 2022 07:52:36 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-25-oNE9TYboMzusj1MW9cjG4w-1; Thu, 10 Nov 2022 07:52:29 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D9D4C3C025C0; Thu, 10 Nov 2022 12:52:28 +0000 (UTC) Received: from thuth.com (dhcp-192-232.str.redhat.com [10.33.192.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1C982166B29; Thu, 10 Nov 2022 12:52:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668084753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YaFQHuJ+gBs7mXa5s9O6Yq0lVA17Ly2iYAp3nsSWluM=; b=S/gU4qOlDTYqYTfs1MdkeWL0SrjuiIXSC4xqnPxZXC8LZpJXF+550buOrcopbeB2tzRgT0 X0uKdF1A5zAkZPTjFhgJNBSXM5OFRN7JUjIAdzRbvSDae8tGHg+NNcjXxGWGxvAyQp5KfT 84vGJc+ObhnyQL7Etpg35B6UJsXeIrg= X-MC-Unique: oNE9TYboMzusj1MW9cjG4w-1 From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang Cc: "Michael S. Tsirkin" , pbonzini@redhat.com, Marcel Apfelbaum , Claudio Fontana , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 2/3] net: Restore printing of the help text with "-nic help" Date: Thu, 10 Nov 2022 13:52:23 +0100 Message-Id: <20221110125224.99596-3-thuth@redhat.com> In-Reply-To: <20221110125224.99596-1-thuth@redhat.com> References: <20221110125224.99596-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1668084829938100003 Content-Type: text/plain; charset="utf-8" Running QEMU with "-nic help" used to work in QEMU 5.2 and earlier versions (it showed the available netdev backends), but this feature got broken duri= ng some refactoring in version 6.0. Let's restore the old behavior, and while we're at it, let's also print the available NIC models here now since this option can be used to configure both, netdev backend and model in one go. Fixes: ad6f932fe8 ("net: do not exit on "netdev_add help" monitor command") Signed-off-by: Thomas Huth --- net/net.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/net/net.c b/net/net.c index 49cced691f..cdd3ebc515 100644 --- a/net/net.c +++ b/net/net.c @@ -1569,8 +1569,18 @@ static int net_param_nic(void *dummy, QemuOpts *opts= , Error **errp) const char *type; =20 type =3D qemu_opt_get(opts, "type"); - if (type && g_str_equal(type, "none")) { - return 0; /* Nothing to do, default_net is cleared in vl.c */ + if (type) { + if (g_str_equal(type, "none")) { + return 0; /* Nothing to do, default_net is cleared in vl.c = */ + } + if (is_help_option(type)) { + GPtrArray *nic_models =3D qemu_get_nic_models(TYPE_DEVICE); + show_netdevs(); + printf("\n"); + qemu_show_nic_models(type, (const char **)nic_models->pdata); + g_ptr_array_free(nic_models, true); + exit(0); + } } =20 idx =3D nic_get_free_idx(); --=20 2.31.1 From nobody Thu May 16 07:48:13 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1668084827; cv=none; d=zohomail.com; s=zohoarc; b=OS0fcLc1esrUiBKdK/S2npGwqTv2ZhgUnywZyf2YDTfpiurWl1NqHDmXBeOHvT51XL03J1lcPAFSnUkWyUaiGdbGz+O64eJvc7ZD7P/95oaln1pt1YdY8MphxIfsf8YqpltrWLs4o9ckOTepK8Vhh0NfAqLSmRMmz8E3Z0FpNd0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1668084827; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yt3kIUE40aFmrB/WJw24YkSi3cH7sKtl0qiAtyDPQSc=; b=h2c1ur4/tu0xh3TH3RT3sfEN1yNZmvNQi6MN0/ASIgOs6ilM2aVdnDrlAqiwSu0JdDf+cQqobCNuZvgjTaBPZpUfINg2h7fdKiRfYKk7iU0RhqMIgtmStUgOllxeiCRIGjUOIQmOJAT/OfaXAchMyvGMWUgNJaaOZjuMAzxYy9Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1668084827944953.4594249848927; Thu, 10 Nov 2022 04:53:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot72x-00044o-FT; Thu, 10 Nov 2022 07:52:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot72o-00044C-3B for qemu-devel@nongnu.org; Thu, 10 Nov 2022 07:52:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot72m-0007VH-Ol for qemu-devel@nongnu.org; Thu, 10 Nov 2022 07:52:33 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-67-USV8hlDjPRCIXRQ1j5RgZg-1; Thu, 10 Nov 2022 07:52:30 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0F2C21C05AAB; Thu, 10 Nov 2022 12:52:30 +0000 (UTC) Received: from thuth.com (dhcp-192-232.str.redhat.com [10.33.192.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id 166302166B29; Thu, 10 Nov 2022 12:52:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668084751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yt3kIUE40aFmrB/WJw24YkSi3cH7sKtl0qiAtyDPQSc=; b=i7FVHAeFyNfxUVK+kGaWzG0nGDapDNby4egc/6B679cyrqEGfim8UAiKxqTkcVWFq+mzRU VOVUCh1/RKwPuzSbVLCAFK/jV5l2TjkDZwFXDdDqMDsThbf4HjBzwLwLLTTPHNLky2Untp H8veNjwUKQwBLUXYW7irkjilLjep6b8= X-MC-Unique: USV8hlDjPRCIXRQ1j5RgZg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang Cc: "Michael S. Tsirkin" , pbonzini@redhat.com, Marcel Apfelbaum , Claudio Fontana , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 3/3] net: Replace "Supported NIC models" with "Available NIC models" Date: Thu, 10 Nov 2022 13:52:24 +0100 Message-Id: <20221110125224.99596-4-thuth@redhat.com> In-Reply-To: <20221110125224.99596-1-thuth@redhat.com> References: <20221110125224.99596-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1668084829960100004 Content-Type: text/plain; charset="utf-8" Just because a NIC model is compiled into the QEMU binary does not necessary mean that it can be used with each and every machine. So let's rather talk about "available" models instead of "supported" models, just to avoid confusion. Reviewed-by: Claudio Fontana Signed-off-by: Thomas Huth --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index cdd3ebc515..5d96c8858f 100644 --- a/net/net.c +++ b/net/net.c @@ -941,7 +941,7 @@ int qemu_show_nic_models(const char *arg, const char *c= onst *models) return 0; } =20 - printf("Supported NIC models:\n"); + printf("Available NIC models:\n"); for (i =3D 0 ; models[i]; i++) { printf("%s\n", models[i]); } --=20 2.31.1