From patchwork Wed May 24 08:04:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 766364 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wXlKx1nG6z9sNb for ; Wed, 24 May 2017 18:04:36 +1000 (AEST) Received: from localhost ([::1]:53440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dDRHV-0005fn-P0 for incoming@patchwork.ozlabs.org; Wed, 24 May 2017 04:04:33 -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) 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 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) 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 @@ */ #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; + error_report("hubports are deprecated and will be removed in a " + "future release"); + assert(netdev->type == NET_CLIENT_DRIVER_HUBPORT); assert(!peer); hubport = &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=str,chardev=dev[,vhostforce=on|off]\n" " configure a vhost-user network, backed by a chardev 'dev'\n" "-netdev hubport,id=str,hubid=n\n" - " configure a hub port on QEMU VLAN 'n'\n", QEMU_ARCH_ALL) + " configure a hub port on QEMU VLAN 'n' (deprecated)\n", QEMU_ARCH_ALL) DEF("net", HAS_ARG, QEMU_OPTION_net, "-net nic[,vlan=n][,macaddr=mac][,model=type][,name=str][,addr=str][,vectors=v]\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}. The hubport netdev lets you connect a NIC to a QEMU "vlan" instead of a single netdev. @code{-net} and @code{-device} with parameter @option{vlan} create the -required hub automatically. +required hub automatically. Note that the "vlan" concept and thus the hubport +option, too, are considered as deprecated and might be removed in a future +release of QEMU. @item -netdev vhost-user,chardev=@var{id}[,vhostforce=on|off][,queues=n]