From nobody Thu Apr 25 23:08:30 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1495613107142125.38395152345083; Wed, 24 May 2017 01:05:07 -0700 (PDT) Received: from localhost ([::1]:53443 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDRI1-0005xU-3f for importer@patchew.org; Wed, 24 May 2017 04:05:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDRHC-0005fX-Pb for qemu-devel@nongnu.org; Wed, 24 May 2017 04:04:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dDRH8-0004GL-Mv for qemu-devel@nongnu.org; Wed, 24 May 2017 04:04:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58912) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dDRH8-0004GF-Hm for qemu-devel@nongnu.org; Wed, 24 May 2017 04:04:10 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4838FC057FA8 for ; Wed, 24 May 2017 08:04:09 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-128.ams2.redhat.com [10.36.116.128]) by smtp.corp.redhat.com (Postfix) with ESMTP id E0E161799A; Wed, 24 May 2017 08:04:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4838FC057FA8 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=thuth@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4838FC057FA8 From: Thomas Huth To: qemu-devel@nongnu.org Date: Wed, 24 May 2017 10:04:06 +0200 Message-Id: <1495613046-6430-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 24 May 2017 08:04:09 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] net: Mark the 'hubport' netdev as deprecated X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jason Wang Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The 'hubport' netdev is closely tied to the 'vlan' concept which has been marked as deprecated in commit a2dbe1356faff3cb6 already. Thus we should also mark the hubport netdevs as deprecated to make the remaining users aware that they should not use this anymore. Signed-off-by: Thomas Huth --- net/hub.c | 4 ++++ qemu-options.hx | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/net/hub.c b/net/hub.c index 32d8cf5..85bd5bc 100644 --- a/net/hub.c +++ b/net/hub.c @@ -13,6 +13,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/error-report.h" #include "monitor/monitor.h" #include "net/net.h" #include "clients.h" @@ -286,6 +287,9 @@ int net_init_hubport(const Netdev *netdev, const char *= name, { const NetdevHubPortOptions *hubport; =20 + error_report("hubports are deprecated and will be removed in a " + "future release"); + assert(netdev->type =3D=3D NET_CLIENT_DRIVER_HUBPORT); assert(!peer); hubport =3D &netdev->u.hubport; diff --git a/qemu-options.hx b/qemu-options.hx index dc1a48a..efb555c 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1810,7 +1810,7 @@ DEF("netdev", HAS_ARG, QEMU_OPTION_netdev, "-netdev vhost-user,id=3Dstr,chardev=3Ddev[,vhostforce=3Don|off]\n" " configure a vhost-user network, backed by a chardev '= dev'\n" "-netdev hubport,id=3Dstr,hubid=3Dn\n" - " configure a hub port on QEMU VLAN 'n'\n", QEMU_ARCH_A= LL) + " configure a hub port on QEMU VLAN 'n' (deprecated)\n"= , QEMU_ARCH_ALL) DEF("net", HAS_ARG, QEMU_OPTION_net, "-net nic[,vlan=3Dn][,macaddr=3Dmac][,model=3Dtype][,name=3Dstr][,addr= =3Dstr][,vectors=3Dv]\n" " old way to create a new NIC and connect it to VLAN 'n= '\n" @@ -2239,7 +2239,9 @@ Create a hub port on QEMU "vlan" @var{hubid}. =20 The hubport netdev lets you connect a NIC to a QEMU "vlan" instead of a si= ngle netdev. @code{-net} and @code{-device} with parameter @option{vlan} creat= e the -required hub automatically. +required hub automatically. Note that the "vlan" concept and thus the hubp= ort +option, too, are considered as deprecated and might be removed in a future +release of QEMU. =20 @item -netdev vhost-user,chardev=3D@var{id}[,vhostforce=3Don|off][,queues= =3Dn] =20 --=20 1.8.3.1