From patchwork Wed Aug 5 15:24:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 51954 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id A2E31229FD for ; Wed, 5 Aug 2015 15:25:48 +0000 (UTC) Received: by labth1 with SMTP id th1sf16802146lab.2 for ; Wed, 05 Aug 2015 08:25:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=JoKJBbFdXwtV5DBTAefDIMDgAsl7DVQ2ebDOTahpLc0=; b=WacCsd8wxYjFpFJNxiJMCPvDq3B5FDW6XYMbgnZCdc0+Po6o9Pq/k8ekUVu5MO7aqO 14G64cFrktLYQ1qLsQr7xE5YRubwBSwL+Hd602qNvh7bS2rlsfMNg5MgSbLMdvEPBhmj 1H1UvVSGR4asrVBUse+wSiJEJQdUudRtcDVYyiOW0jzHs9Y9newx07/53WDav2QBdCwZ itFhoTlRnD14Tq8rdOKmE0NdGiY4t6LXlwiWLDb7qRHJD8NnI/iYpx43wDX9mALBlXpv RICOLh5BOJj4jTpFzjqXahM6CT5/fFE2YoUx4j6fMP6Wc82bjQaeLfjX4D5LrTUZ1zMB Xx/A== X-Gm-Message-State: ALoCoQlY2cVDoUSf/hZ/r7bFtg2Pxtg+8mkX/ANUhq8TCmx6eBcZG5D2joIjwQundd/qjm5jcQ8K X-Received: by 10.180.87.201 with SMTP id ba9mr2963507wib.3.1438788347625; Wed, 05 Aug 2015 08:25:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.108 with SMTP id kx12ls54176lac.51.gmail; Wed, 05 Aug 2015 08:25:47 -0700 (PDT) X-Received: by 10.152.21.37 with SMTP id s5mr9596822lae.2.1438788347457; Wed, 05 Aug 2015 08:25:47 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id t9si2301077lat.175.2015.08.05.08.25.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Aug 2015 08:25:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbvv8 with SMTP id vv8so24052205lbb.1 for ; Wed, 05 Aug 2015 08:25:47 -0700 (PDT) X-Received: by 10.152.9.66 with SMTP id x2mr8887175laa.76.1438788347272; Wed, 05 Aug 2015 08:25:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp433920lba; Wed, 5 Aug 2015 08:25:46 -0700 (PDT) X-Received: by 10.107.130.11 with SMTP id e11mr10736107iod.156.1438788345808; Wed, 05 Aug 2015 08:25:45 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y99si2720822ioi.44.2015.08.05.08.25.44; Wed, 05 Aug 2015 08:25:45 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 8887D61F43; Wed, 5 Aug 2015 15:25:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id C4BAF61FAD; Wed, 5 Aug 2015 15:25:40 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 01B0F61840; Wed, 5 Aug 2015 15:24:54 +0000 (UTC) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by lists.linaro.org (Postfix) with ESMTPS id 1669D61FBE for ; Wed, 5 Aug 2015 15:24:23 +0000 (UTC) Received: by wicgj17 with SMTP id gj17so197380613wic.1 for ; Wed, 05 Aug 2015 08:24:22 -0700 (PDT) X-Received: by 10.180.206.176 with SMTP id lp16mr19976559wic.85.1438788262348; Wed, 05 Aug 2015 08:24:22 -0700 (PDT) Received: from e106441.cambridge.arm.com ([2001:41d0:a:3cb4::abcd]) by smtp.gmail.com with ESMTPSA id p1sm1192661wjq.28.2015.08.05.08.24.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Aug 2015 08:24:21 -0700 (PDT) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Wed, 5 Aug 2015 16:24:09 +0100 Message-Id: <1438788249-8917-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [PATCH] example: classifier: resolve text alignment issues X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stuart.haslam@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 When the string containing the number of packets processed by one of the queues gets for be longer than a tab the alignment is messed up and the fields overlap with part of a previous value. Signed-off-by: Stuart Haslam Reviewed-by: Balasubramanian Manoharan --- example/classifier/odp_classifier.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c index bed254d..ba79055 100644 --- a/example/classifier/odp_classifier.c +++ b/example/classifier/odp_classifier.c @@ -122,7 +122,7 @@ void print_cls_statistics(appl_args_t *args) printf("-"); printf("\n"); for (i = 0; i < args->policy_count; i++) - printf("%s\t", args->stats[i].queue_name); + printf("%-12s ", args->stats[i].queue_name); printf("Total Packets"); printf("\n"); @@ -135,17 +135,19 @@ void print_cls_statistics(appl_args_t *args) for (; timeout > 0 || infinite; timeout--) { for (i = 0; i < args->policy_count; i++) - printf("%"PRIu64"\t", + printf("%-12" PRIu64 " ", odp_atomic_load_u64(&args->stats[i] .packet_count)); - printf("\t%"PRIu64"\t", odp_atomic_load_u64(&args-> - total_packets)); + printf("%-" PRIu64, odp_atomic_load_u64(&args-> + total_packets)); sleep(1); printf("\r"); fflush(stdout); } + + printf("\n"); } static inline