From patchwork Tue Nov 7 17:31:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 835384 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 3yWc1N6Smzz9s7C for ; Wed, 8 Nov 2017 04:31:52 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 464B4CC5; Tue, 7 Nov 2017 17:31:50 +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 646FACC4 for ; Tue, 7 Nov 2017 17:31:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id AEDBE1A6 for ; Tue, 7 Nov 2017 17:31:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 01737624C9 for ; Tue, 7 Nov 2017 17:31:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 01737624C9 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ktraynor@redhat.com Received: from ktraynor.remote.csb (unknown [10.36.117.255]) by smtp.corp.redhat.com (Postfix) with ESMTP id 36AF760C90; Tue, 7 Nov 2017 17:31:46 +0000 (UTC) From: Kevin Traynor To: dev@openvswitch.org Date: Tue, 7 Nov 2017 17:31:40 +0000 Message-Id: <1510075901-32305-1-git-send-email-ktraynor@redhat.com> In-Reply-To: <1504115149-26864-1-git-send-email-ktraynor@redhat.com> References: <1504115149-26864-1-git-send-email-ktraynor@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 07 Nov 2017 17:31:47 +0000 (UTC) X-Spam-Status: No, score=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH v2 1/2] dpif-netdev: Rename rxq_interval. 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 rxq_interval was added before there was other #defines and code related to rxq intervals. Rename to rxq_next_cycles_store in order to make it more intuitive. Requested-by: Ilya Maximets Signed-off-by: Kevin Traynor Acked-by: Antonio Fischetti --- v2: Rebase. lib/dpif-netdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 599308d..66c14f9 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -590,5 +590,5 @@ struct dp_netdev_pmd_thread { /* End of the next time interval for which processing cycles are stored for each polled rxq. */ - long long int rxq_interval; + long long int rxq_next_cycle_store; /* Cycles counters */ @@ -4544,5 +4544,5 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread *pmd, struct dp_netdev *dp, cmap_init(&pmd->classifiers); pmd->next_optimization = time_msec() + DPCLS_OPTIMIZATION_INTERVAL; - pmd->rxq_interval = time_msec() + PMD_RXQ_INTERVAL_LEN; + pmd->rxq_next_cycle_store = time_msec() + PMD_RXQ_INTERVAL_LEN; hmap_init(&pmd->poll_list); hmap_init(&pmd->tx_ports); @@ -6011,5 +6011,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, long long int now = time_msec(); - if (now > pmd->rxq_interval) { + if (now > pmd->rxq_next_cycle_store) { /* Get the cycles that were used to process each queue and store. */ for (unsigned i = 0; i < poll_cnt; i++) { @@ -6021,5 +6021,5 @@ dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd, } /* Start new measuring interval */ - pmd->rxq_interval = now + PMD_RXQ_INTERVAL_LEN; + pmd->rxq_next_cycle_store = now + PMD_RXQ_INTERVAL_LEN; }