From patchwork Mon May 14 07:55:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 912735 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 40ktS71vQGz9s15 for ; Mon, 14 May 2018 18:01:11 +1000 (AEST) Received: from localhost ([::1]:48926 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fI8Ps-0003GE-SR for incoming@patchwork.ozlabs.org; Mon, 14 May 2018 04:01:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fI8LD-0007np-5H for qemu-devel@nongnu.org; Mon, 14 May 2018 03:56:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fI8LA-0004SN-GU for qemu-devel@nongnu.org; Mon, 14 May 2018 03:56:19 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38834 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 1fI8LA-0004Rq-B3 for qemu-devel@nongnu.org; Mon, 14 May 2018 03:56:16 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4155406E897; Mon, 14 May 2018 07:56:15 +0000 (UTC) Received: from jason-ThinkPad-T450s.redhat.com (ovpn-12-146.pek2.redhat.com [10.72.12.146]) by smtp.corp.redhat.com (Postfix) with ESMTP id 99483AB401; Mon, 14 May 2018 07:56:13 +0000 (UTC) From: Jason Wang To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Mon, 14 May 2018 15:55:59 +0800 Message-Id: <1526284560-20266-4-git-send-email-jasowang@redhat.com> In-Reply-To: <1526284560-20266-1-git-send-email-jasowang@redhat.com> References: <1526284560-20266-1-git-send-email-jasowang@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 14 May 2018 07:56:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 14 May 2018 07:56:15 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jasowang@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] [PULL 3/4] 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: Thomas Huth , Jason Wang Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth '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 Reviewed-by: Stefan Hajnoczi Signed-off-by: Thomas Huth Signed-off-by: Jason Wang --- 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; }