From patchwork Wed Aug 30 17:45:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 807810 X-Patchwork-Delegate: dlu998@gmail.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 3xjCc82g5yz9sN5 for ; Thu, 31 Aug 2017 03:46:32 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 376C0C0C; Wed, 30 Aug 2017 17:46:03 +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 6E3B6C04 for ; Wed, 30 Aug 2017 17:46:00 +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 EC3D342E for ; Wed, 30 Aug 2017 17:45:59 +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 61AB95F7BD; Wed, 30 Aug 2017 17:45:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 61AB95F7BD 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 (ovpn-117-75.ams2.redhat.com [10.36.117.75]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE18E9B519; Wed, 30 Aug 2017 17:45:57 +0000 (UTC) From: Kevin Traynor To: dev@openvswitch.org, ktraynor@redhat.com, dball@vmware.com, i.maximets@samsung.com Date: Wed, 30 Aug 2017 18:45:48 +0100 Message-Id: <1504115149-26864-2-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]); Wed, 30 Aug 2017 17:45:59 +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 2/3] dpif-netdev: Fix a couple of coding style issues. 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 A couple of trivial fixes for a ternery operator placement and pointer declaration. Fixes: 655856ef39b9 ("dpif-netdev: Change rxq_scheduling to use rxq processing cycles.") Fixes: a2ac666d5265 ("dpif-netdev: Change definitions of 'idle' & 'processing' cycles") Cc: ciara.loftus@intel.com Reported-by: Ilya Maximets Signed-off-by: Kevin Traynor Acked-by: Ciara Loftus --- lib/dpif-netdev.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 55d5656..1db9f10 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -3429,6 +3429,6 @@ static int rxq_cycle_sort(const void *a, const void *b) { - struct dp_netdev_rxq * qa; - struct dp_netdev_rxq * qb; + struct dp_netdev_rxq *qa; + struct dp_netdev_rxq *qb; uint64_t total_qa, total_qb; unsigned i; @@ -3865,7 +3865,8 @@ dpif_netdev_run(struct dpif *dpif) port->rxqs[i].rx, port->port_no); - cycles_count_intermediate(non_pmd, NULL, process_packets ? - PMD_CYCLES_PROCESSING - : PMD_CYCLES_IDLE); + cycles_count_intermediate(non_pmd, NULL, + process_packets + ? PMD_CYCLES_PROCESSING + : PMD_CYCLES_IDLE); } }