From patchwork Thu Jan 4 20:02:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Scheurich X-Patchwork-Id: 855874 X-Patchwork-Delegate: ian.stokes@intel.com 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=) 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 3zCQKw35vwz9s7n for ; Fri, 5 Jan 2018 11:20:20 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 343EBCFC; Fri, 5 Jan 2018 00:19: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 B1C10CF2 for ; Fri, 5 Jan 2018 00:19:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mout.web.de (mout.web.de [212.227.15.3]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id EAB8A18A for ; Fri, 5 Jan 2018 00:19:07 +0000 (UTC) Received: from ubuntu.fritz.box ([89.0.12.95]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MCNY9-1egMWl2PWD-009BPG; Fri, 05 Jan 2018 01:19:02 +0100 From: Jan Scheurich To: dev@openvswitch.org Date: Thu, 4 Jan 2018 21:02:45 +0100 Message-Id: <1515096166-16257-8-git-send-email-jan.scheurich@ericsson.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1515096166-16257-1-git-send-email-jan.scheurich@ericsson.com> References: <1515096166-16257-1-git-send-email-jan.scheurich@ericsson.com> X-Provags-ID: V03:K0:jzWS09/GxwPQCrGRBG6s3cUQGa+kbwIHuf0DT2A4utgm7Hhk5vw jEWpihvSoN37k5gg/dA5/NOyZ+C96sqO9W0w5iiStbAo6fICtXdgmKq7a5SjgH6ZsJgqUFh btYXwM8Rw9RHVKgQxs8t/Zy+8pp+y9Kpynl5V0W5Ad/5HP6vM6Rch8QyXfg0oiDG71tuXXF x0bxKOMj9DWZeLSZSPkQQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:AhFDTJ44rb0=:TqdUyqb0zJklFWsGW9Y+OM gLXtLUu3aDL4qk5f5JIcgNaUDDQdUQaNM1ieaO3blGMfRYDyrOFj8v6+ZmYaZszs3s1zxTKbk HB4rh3qqYEKICQZFwb2VMI9z7/YTNPfz3jDzs7QHfJDOYrsnCHEcdJMV051xbmjdhafW8f0Pg ieqxA/hdeynElewjhkDaCBDd2EvIdxX43mSIMBQO0G8jxi7eFNSeH+tMYDGoxQ5/vsOqj/fOc GzBJnc8amffHg6Fo4MTbC9JfzPagSqzXJQy8qryD3YG+0lccBiESSQZgC9u5UbAviCYhHc/bf x0fsrHslV0F5YZ1aa6Ooui2RmmXw2IguAFwD1ZU+NbkilKpcKzH37TwqrsjKEKgRmiVZLjdKa EGKqhGyaqDNDRUz8IOhsN9J7hBhwLg9S3bX1MbDCYpbGjdZ5kNk90CxaYqfHXw/VZy1peix6z 9Np4bwd9N91/77uIf+qd0BTygcJyAQtF0zvoxZLmN7h1VdILTe8jbPFijhijJOY2bQTGz5xz/ zZWQtDqP9Z3ZM7uXVxJPypfIfBOewVKrGc7/yDYkRirUSenw82k66H6X3/v9Nn9XTpVo5VLDt ip5Nnmze5v6Uh1EnJSUvy+DJbAS5N6oNubRKd87CIqNStUYKWtl4Fu3SyRiMheyKev04Jkrf0 95JpcdgWhlfjyTImwOJBf2neTat98BN0e9qga75V/FKd8xmgKoYceSoTEFlrBckE0jBb6nR5e 02YWxqpEjETrxbaiZpMiCn6SEKq210GqsZzfYpPAs524RrWFwT0F7DgQnsC1vcmgn71ZAy9Xw KZhnZ8b1LXrmqGPTwX/au3Hpa6NZQ== X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DATE_IN_PAST_03_06, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [RFC PATCH 7/8] dpif-netdev: Reset the rxq current cycle counter on reload. 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 From: Kevin Traynor An rxq may have processing cycles counted in the current counter when a reload happens. That could temporarily create a small skew on the stats for an rxq. Reset the counter after reload. Fixes: 4809891b2e01 ("dpif-netdev: Count the rxq processing cycles for an rxq.") Signed-off-by: Kevin Traynor --- lib/dpif-netdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 5d23128..fc10f8e 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -4246,6 +4246,8 @@ reload: VLOG_DBG("Core %d processing port \'%s\' with queue-id %d\n", pmd->core_id, netdev_rxq_get_name(poll_list[i].rxq->rx), netdev_rxq_get_queue_id(poll_list[i].rxq->rx)); + /* Reset the rxq current cycles counter. */ + dp_netdev_rxq_set_cycles(poll_list[i].rxq, RXQ_CYCLES_PROC_CURR, 0); } if (!poll_cnt) {