From nobody Wed May 15 21:29:55 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=1667566680; cv=none; d=zohomail.com; s=zohoarc; b=R1B961VJ6RoAwFxdRKTFX1SvUFgd8O3JMThs1a89EdebHG9fRXsTj0lHVa8k2cRSmaE3kHix4pIwlOS7CmhRGrPyjr89kvC8GFgq7KI0o9LCLX5A9Chp5IPI9Bp4oZovGSLaONHzQ36OmMsJYMFhYrU8lQ8bKg0PiTtM82fYH34= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667566680; 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=U3MTINOv8swD+GxcCT4C/zeD7r2SDABiXF+ucJxL6Qs=; b=JFB/2wWh1fB79RAaUTDihu4SPrbz/1QqBkoswrAK+qCIUiHimdYXBqQzLMk/CJLOq0ysix5+9maf/TrKEZ4qmeFTdVOZ3mP7YeFl1is0a9VTJVi7UtWpCfwaUWa4JOO57WKfYX4zRJxObp7q0R2/ci+r1Hg2viUgj2eLNOOXvQ4= 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 1667566680820865.8099751333687; Fri, 4 Nov 2022 05:58:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqwG9-0001hc-30; Fri, 04 Nov 2022 08:57:21 -0400 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 1oqwG2-0001bQ-7A for qemu-devel@nongnu.org; Fri, 04 Nov 2022 08:57:14 -0400 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 1oqwG0-0004LT-88 for qemu-devel@nongnu.org; Fri, 04 Nov 2022 08:57:13 -0400 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-533-ssnCdeZNMYWe00O4MyI90w-1; Fri, 04 Nov 2022 08:57:09 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 71E062999B25 for ; Fri, 4 Nov 2022 12:57:09 +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 9F21C4A9254; Fri, 4 Nov 2022 12:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667566631; 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=U3MTINOv8swD+GxcCT4C/zeD7r2SDABiXF+ucJxL6Qs=; b=ZUEkFrDvpwAl5bpyPWObX6d+dmU8M2Y2T5fM0PLDlN4qyxH385OsPjwsmQ+JPKG8jPvR9X QlMgytCjwE9qa4ok13PtJidQPfLJjaa+WP1UkBfqnt9Wi0Th/WAVfPyWv8AaRMbrOu/2wm oKZMZC3IvXcQZRwbVsjCE8r5y5tdgsI= X-MC-Unique: ssnCdeZNMYWe00O4MyI90w-1 From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang Cc: "Michael S. Tsirkin" , pbonzini@redhat.com Subject: [PATCH 1/3] net: Move the code to collect available NIC models to a separate function Date: Fri, 4 Nov 2022 13:57:03 +0100 Message-Id: <20221104125705.415923-2-thuth@redhat.com> In-Reply-To: <20221104125705.415923-1-thuth@redhat.com> References: <20221104125705.415923-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.045, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667566681688100005 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 | 1 + hw/pci/pci.c | 29 +---------------------------- net/net.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 28 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 3db75ff841..c96cefb89a 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -189,6 +189,7 @@ void qemu_set_vnet_hdr_len(NetClientState *nc, int len); int qemu_set_vnet_le(NetClientState *nc, bool is_le); int qemu_set_vnet_be(NetClientState *nc, bool is_be); void qemu_macaddr_default_if_unset(MACAddr *macaddr); +GPtrArray *qemu_get_nic_models(const char *device_type); int qemu_show_nic_models(const char *arg, const char *const *models); void qemu_check_nic_model(NICInfo *nd, const char *model); int qemu_find_nic_model(NICInfo *nd, const char * const *models, 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..c0516a8067 100644 --- a/net/net.c +++ b/net/net.c @@ -899,6 +899,42 @@ static int nic_get_free_idx(void) return -1; } =20 +GPtrArray *qemu_get_nic_models(const char *device_type) +{ + GPtrArray *nic_models; + GSList *list; + + list =3D object_class_get_list_sorted(device_type, false); + 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(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 Wed May 15 21:29:55 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=1667566680; cv=none; d=zohomail.com; s=zohoarc; b=aZGHsCeNFrZ6GhKVLALMGVDMU0t9KLk9zrG/bJjoxfZ9Ztz1fs6/Aypt7Mqm9Ut8QEX3wE0cyKo+CeEmxr3i2BTxHOnFuGlDq56fhLFBuRpPqagNbQgAFcSSSjywP9xMEJgtd5W1bFN4GoZp4JyGfxX7PQZSNnAt9gFPTvAuJV8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667566680; 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=6i0TfV8fQHuUuTevLU4tHY7HAj/CnID54/AJhwVFNnY=; b=BEzipNKxRE0mZS2D1umoJwgzOYcQ0Pmjzu6l7wC6mUIL11qzCInSZZcHRTDHxVksgdA2yWTjANXwZnt6jVkyJ9Ho3ohYD/i+ByLQJr52RfTqyIkEVlRU1NGI/LOIzpCQyPmgyQIH9nqAab80rTUohBc3lAbKbtTJ/EGizK2Sw/c= 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 1667566680589342.3033326704675; Fri, 4 Nov 2022 05:58:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqwG9-0001ik-V1; Fri, 04 Nov 2022 08:57:22 -0400 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 1oqwG4-0001dV-94 for qemu-devel@nongnu.org; Fri, 04 Nov 2022 08:57:16 -0400 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 1oqwG0-0004Lc-Rz for qemu-devel@nongnu.org; Fri, 04 Nov 2022 08:57:16 -0400 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-461-8r5TLW20OpOPXTsgBfFT6g-1; Fri, 04 Nov 2022 08:57:10 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7FE2A2999B28 for ; Fri, 4 Nov 2022 12:57:10 +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 AFB964A9254; Fri, 4 Nov 2022 12:57:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667566632; 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=6i0TfV8fQHuUuTevLU4tHY7HAj/CnID54/AJhwVFNnY=; b=NppefNPBYZfach0PNsKKzdbmJZuWmiAqoNaV2PECi9l30s0Bi7rIVDzjVP6BZ+/DnX/zpL fWLJZtz/ljumFpYzEA7FCJE/ONdXnZ7aXBoryhj2Zmy6ZAi8jrZib/hHagJJVafIIuCleE JEMdoVXD0IutRyWp23Hu4tTWJrgzvkU= X-MC-Unique: 8r5TLW20OpOPXTsgBfFT6g-1 From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang Cc: "Michael S. Tsirkin" , pbonzini@redhat.com Subject: [PATCH 2/3] net: Restore printing of the help text with "-nic help" Date: Fri, 4 Nov 2022 13:57:04 +0100 Message-Id: <20221104125705.415923-3-thuth@redhat.com> In-Reply-To: <20221104125705.415923-1-thuth@redhat.com> References: <20221104125705.415923-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.045, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667566681669100003 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 c0516a8067..b4b8f2a9cc 100644 --- a/net/net.c +++ b/net/net.c @@ -1571,8 +1571,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 Wed May 15 21:29:55 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=1667566724; cv=none; d=zohomail.com; s=zohoarc; b=eKhE9l1O0y9/+oOSWvZJDeUP1Y4Pis6t1f5fRERam9q7z5txFBiPpbScltTn43FNZfMjLiDssktIcUJLcBFovwz5kt91NWuGrUch50FNoZkRJAees/WXhkTaocOj+QQJnVnru92jDQzXwAzum1UgCsD93lsFyO3N1fpr9LDlYaM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667566724; 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=9bckxzEt+3VgSaPYJ9G43DS/NL0CDIE8SBblgiNSMQQ=; b=Lvks88mQ+4ThahMt9zYG1vaf24Wg5uMT/7e8aVY8kHmHRNbCaDvyNuYtsLww3lGu3nY7HKKeSs5DftPJNKLswu2sdkT1ohXMsnZ1E8qUGROMOR1UBWiQxtZVKDlJVw9HwizyG1r0rwsHdhS0uWfSEAcG2CthKUbPZO+6KDAQ9hM= 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 1667566724966625.4089197983003; Fri, 4 Nov 2022 05:58:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqwGI-0001sr-9O; Fri, 04 Nov 2022 08:57:30 -0400 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 1oqwGG-0001r7-QL for qemu-devel@nongnu.org; Fri, 04 Nov 2022 08:57:28 -0400 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 1oqwGE-0004Na-7n for qemu-devel@nongnu.org; Fri, 04 Nov 2022 08:57:27 -0400 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-449-OYpf3DFJO829ay44hNA5nw-1; Fri, 04 Nov 2022 08:57:11 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 886D93C01DED for ; Fri, 4 Nov 2022 12:57:11 +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 BA3B04A9254; Fri, 4 Nov 2022 12:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667566645; 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=9bckxzEt+3VgSaPYJ9G43DS/NL0CDIE8SBblgiNSMQQ=; b=Chey5VdlpwrBojkHLSs+n8v3gpEr57VdFtbhdPEDQKiSkTnB+3uaGeygSHzO+DdC2MQlw2 RuPlRGO20u4BVW24SiqlF9rS3Q7zeuoaALpshyly6FDfYeEgZydPp6GXUDGNZuw79tSpPu 0HWVVaKffXccvR7XK9EKnjKgy8LaLio= X-MC-Unique: OYpf3DFJO829ay44hNA5nw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang Cc: "Michael S. Tsirkin" , pbonzini@redhat.com Subject: [PATCH 3/3] net: Replace "Supported NIC models" with "Available NIC models" Date: Fri, 4 Nov 2022 13:57:05 +0100 Message-Id: <20221104125705.415923-4-thuth@redhat.com> In-Reply-To: <20221104125705.415923-1-thuth@redhat.com> References: <20221104125705.415923-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.045, 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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667566725625100001 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. Signed-off-by: Thomas Huth Reviewed-by: Claudio Fontana --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index b4b8f2a9cc..173195dbf9 100644 --- a/net/net.c +++ b/net/net.c @@ -943,7 +943,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