From patchwork Tue Oct 2 23:02:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 978068 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=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Pvnq2VCkz9s3x for ; Wed, 3 Oct 2018 09:03:11 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 87BDE1698; Tue, 2 Oct 2018 23:03:09 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id BE6151465 for ; Tue, 2 Oct 2018 23:03:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 613648D for ; Tue, 2 Oct 2018 23:03:07 +0000 (UTC) X-Originating-IP: 208.91.3.26 Received: from sigabrt.benpfaff.org (unknown [208.91.3.26]) (Authenticated sender: blp@ovn.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 21C22FF805; Tue, 2 Oct 2018 23:03:03 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Tue, 2 Oct 2018 16:02:59 -0700 Message-Id: <20181002230300.19452-1-blp@ovn.org> X-Mailer: git-send-email 2.16.1 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Flavio Leitner , Ben Pfaff Subject: [ovs-dev] [PATCH 1/2] netdev: Properly clear 'details' when iterating in NETDEV_QOS_FOR_EACH. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The function comment for netdev_queue_dump_next() said that it cleared its 'detail' argument, but it didn't actually do that, which meant that details could be incorrectly carried along from one queue to the next. Reported-by: Flavio Leitner Signed-off-by: Ben Pfaff Acked-by: Flavio Leitner Acked-by: Eelco Chaudron --- lib/netdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/netdev.c b/lib/netdev.c index 690d284092d4..722ea89bfeba 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -1801,8 +1801,9 @@ bool netdev_queue_dump_next(struct netdev_queue_dump *dump, unsigned int *queue_id, struct smap *details) { - const struct netdev *netdev = dump->netdev; + smap_clear(details); + const struct netdev *netdev = dump->netdev; if (dump->error) { return false; } From patchwork Tue Oct 2 23:03:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 978069 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=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42PvpB2QdXz9s3x for ; Wed, 3 Oct 2018 09:03:30 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 30801151C; Tue, 2 Oct 2018 23:03:10 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 4B8821465 for ; Tue, 2 Oct 2018 23:03:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id C42018D for ; Tue, 2 Oct 2018 23:03:08 +0000 (UTC) X-Originating-IP: 208.91.3.26 Received: from sigabrt.benpfaff.org (unknown [208.91.3.26]) (Authenticated sender: blp@ovn.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 61FBCFF802; Tue, 2 Oct 2018 23:03:06 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Tue, 2 Oct 2018 16:03:00 -0700 Message-Id: <20181002230300.19452-2-blp@ovn.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20181002230300.19452-1-blp@ovn.org> References: <20181002230300.19452-1-blp@ovn.org> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Ben Pfaff Subject: [ovs-dev] [PATCH 2/2] Revert "bridge: Fix ovs-appctl qos/show repeated queue information" X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org This reverts commit 6b4d0211e84a ("bridge: Fix ovs-appctl qos/show repeated queue information"), which is no longer necessary now that commit 65f3c34c7417 ("netdev: Properly clear 'details' when iterating in NETDEV_QOS_FOR_EACH.") has been applied. The former commit fixed a symptom of the root cause fixed by the latter. Signed-off-by: Ben Pfaff Acked-by: Flavio Leitner Acked-by: Eelco Chaudron --- vswitchd/bridge.c | 1 - 1 file changed, 1 deletion(-) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 875bb607c603..706a07cc6fb9 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -3235,7 +3235,6 @@ qos_unixctl_show(struct unixctl_conn *conn, int argc OVS_UNUSED, smap_init(&details); NETDEV_QUEUE_FOR_EACH (&queue_id, &details, &dump, iface->netdev) { qos_unixctl_show_queue(queue_id, &details, iface, &ds); - smap_clear(&details); } smap_destroy(&details);