From patchwork Mon Apr 16 06:44:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 898483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 40Pf643GGjz9s0b for ; Mon, 16 Apr 2018 16:45:48 +1000 (AEST) Received: from localhost ([::1]:49730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f7xta-0007IQ-Ci for incoming@patchwork.ozlabs.org; Mon, 16 Apr 2018 02:45:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f7xsq-0007HM-Qd for qemu-devel@nongnu.org; Mon, 16 Apr 2018 02:45:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f7xso-0007bw-D4 for qemu-devel@nongnu.org; Mon, 16 Apr 2018 02:45:00 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50042 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f7xso-0007bf-7J for qemu-devel@nongnu.org; Mon, 16 Apr 2018 02:44:58 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B5E56E44B5; Mon, 16 Apr 2018 06:44:57 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-76.ams2.redhat.com [10.36.116.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id B606B111DCF6; Mon, 16 Apr 2018 06:44:53 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org, Jason Wang Date: Mon, 16 Apr 2018 08:44:40 +0200 Message-Id: <1523861081-3600-3-git-send-email-thuth@redhat.com> In-Reply-To: <1523861081-3600-1-git-send-email-thuth@redhat.com> References: <1523861081-3600-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 16 Apr 2018 06:44:57 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 16 Apr 2018 06:44:57 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'thuth@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 for-2.13 2/3] net: Get rid of 'vlan' terminology and use 'hub' instead in the source files 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: Samuel Thibault , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 'vlan' is very confusing since it does not mean something like IEEE 802.1Q, but rather emulated hubs, so let's switch to that terminology instead. Buglink: https://bugs.launchpad.net/qemu/+bug/658904 Signed-off-by: Thomas Huth Reviewed-by: Stefan Hajnoczi --- net/hub.c | 7 +++---- net/slirp.c | 8 ++++---- net/tap.c | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/net/hub.c b/net/hub.c index 5e84a9a..78b671e 100644 --- a/net/hub.c +++ b/net/hub.c @@ -23,8 +23,7 @@ /* * A hub broadcasts incoming packets to all its ports except the source port. - * Hubs can be used to provide independent network segments, also confusingly - * named the QEMU 'vlan' feature. + * Hubs can be used to provide independent emulated network segments. */ typedef struct NetHub NetHub; @@ -345,10 +344,10 @@ void net_hub_check_clients(void) } } if (has_host_dev && !has_nic) { - warn_report("vlan %d with no nics", hub->id); + warn_report("hub %d with no nics", hub->id); } if (has_nic && !has_host_dev) { - warn_report("vlan %d is not connected to host network", hub->id); + warn_report("hub %d is not connected to host network", hub->id); } } } diff --git a/net/slirp.c b/net/slirp.c index 8991816..6922524 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -415,7 +415,7 @@ static SlirpState *slirp_lookup(Monitor *mon, const char *hub_id, if (hub_id) { nc = net_hub_find_client_by_name(strtol(hub_id, NULL, 0), name); if (!nc) { - monitor_printf(mon, "unrecognized (vlan-id, stackname) pair\n"); + monitor_printf(mon, "unrecognized (hub-id, stackname) pair\n"); return NULL; } } else { @@ -870,9 +870,9 @@ void hmp_info_usernet(Monitor *mon, const QDict *qdict) QTAILQ_FOREACH(s, &slirp_stacks, entry) { int id; - bool got_vlan_id = net_hub_id_for_client(&s->nc, &id) == 0; - monitor_printf(mon, "VLAN %d (%s):\n", - got_vlan_id ? id : -1, + bool got_hub_id = net_hub_id_for_client(&s->nc, &id) == 0; + monitor_printf(mon, "Hub %d (%s):\n", + got_hub_id ? id : -1, s->nc.name); slirp_connection_info(s->slirp, mon); } diff --git a/net/tap.c b/net/tap.c index 2b3a36f..de05f20 100644 --- a/net/tap.c +++ b/net/tap.c @@ -766,10 +766,10 @@ int net_init_tap(const Netdev *netdev, const char *name, queues = tap->has_queues ? tap->queues : 1; vhostfdname = tap->has_vhostfd ? tap->vhostfd : NULL; - /* QEMU vlans does not support multiqueue tap, in this case peer is set. + /* QEMU hubs do not support multiqueue tap, in this case peer is set. * For -netdev, peer is always NULL. */ if (peer && (tap->has_queues || tap->has_fds || tap->has_vhostfds)) { - error_setg(errp, "Multiqueue tap cannot be used with QEMU vlans"); + error_setg(errp, "Multiqueue tap cannot be used with hubs"); return -1; }