From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0040.outbound.protection.outlook.com [104.47.36.40]) by dpdk.org (Postfix) with ESMTP id 6607D1E345 for ; Thu, 14 Jun 2018 13:50:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ziaAmlAXiYhEcnYMEIS5VnkhqpLwVKYZ9zrIdL+bOgA=; b=HZFFFaBzMwnxLdXowLTqTXuVshv817l8U8zye/IZEUCUJ89DKLt/B9LC5DZKcYMRANAWrlxqBZg5CDeyxG4c/TmwO/w8gKuhdnXkY/HboaaO4IC2JBgsFOoIqWcEg8ky5MIluPh31QkvhNJfW3rM2ZOZ6WspP1P1ANJlZCyKwAU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.caveonetworks.com (115.113.156.2) by BN7PR07MB4898.namprd07.prod.outlook.com (2603:10b6:406:ef::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.863.16; Thu, 14 Jun 2018 11:50:08 +0000 From: Anoob Joseph To: Bruce Richardson , Pablo de Lara Cc: Anoob Joseph , Jerin Jacob , Narayana Prasad , dev@dpdk.org Date: Thu, 14 Jun 2018 17:18:57 +0530 Message-Id: <1528976946-14396-7-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528976946-14396-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1528477766-15788-1-git-send-email-anoob.joseph@caviumnetworks.com> <1528976946-14396-1-git-send-email-anoob.joseph@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: PN1PR01CA0095.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00::11) To BN7PR07MB4898.namprd07.prod.outlook.com (2603:10b6:406:ef::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a03dce18-c83d-43e2-3a0b-08d5d1ecfb70 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BN7PR07MB4898; X-Microsoft-Exchange-Diagnostics: 1; BN7PR07MB4898; 3:i/1YO1PJWsvrdjDZA4ac3onOGQ+HG4MUPzj/k2IxbL7Gf3jugdApK1+nhJG2pH0/798l3Y1D63W0tbIoG/v+gwl9acPfzb8gvdmrOTREg6/wfhwBh7YC2pcdo/3sPdL1d06IHrRbLD13csCRA5BPM7+UfD5vDMbz4CUEhC1GdQm2vASxRJ6BIZ2hfIDRxQb6/YpWEGASCLPMwhpcR6ZyQO5MiyQYHD+T9Gx/s5UMLM8cAgzlMSaza9CRhettH8Wo; 25:voJjCJy0Bjuu0l2TJI2fdicILMDkgGEPtJvdIv9Xa0dSJFF057RRgRNr2z5GXJoOEPkp1hCoztabqzsrx9q2owlkseXOHKrEzGuyYjQXDwkVAuyAg5r/TypFK9Bhc5ra1XmhVTPK/gQsVgVtSSN3EZY0LrvaoXdTONVApI0d3IGahBjRjWhK/kvLmsqv6FyZoGM8jNVNL1UqaYQTmVDnv6c5FnXS0G/yV8OcKC1rbbEEPcx4B/++YNX9C5jUmouA78S+ebPj6SiUGegUoUtx0n7ooxJA+Lb5WZQ5FRcwUEt6nj4jHLHfdfCh197VVzPeDs/TiZ5XlL363n7oMdY+Sg==; 31:LBy0eoGobrBCD9oXFaA4jBYxsxbsLpYl4t4f5LFaKKw2mcVvTQZaeet1/TATZWVNF7p1sygjEhEVcCVWnffYcUx8XHjEcS0f8c6Pz99NGIZjS0DhpvlNyczDFt5NsAeKed/tde19c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soft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231254)(944501410)(52105095)(93006095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:BN7PR07MB4898; BCL:0; PCL:0; RULEID:; SRVR:BN7PR07MB4898; X-Forefront-PRVS: 0703B549E4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(396003)(376002)(346002)(366004)(199004)(189003)(446003)(956004)(2616005)(305945005)(6666003)(47776003)(476003)(54906003)(44832011)(53936002)(68736007)(486006)(110136005)(8936002)(8676002)(81156014)(16586007)(316002)(81166006)(25786009)(4326008)(7736002)(6116002)(3846002)(11346002)(97736004)(36756003)(106356001)(478600001)(105586002)(42882007)(52116002)(51416003)(26005)(16526019)(186003)(50226002)(66066001)(72206003)(6486002)(2906002)(55236004)(50466002)(6512007)(386003)(6506007)(5660300001)(76176011)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN7PR07MB4898; H:ajoseph83.caveonetworks.com.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN7PR07MB4898; 23:xxmW3qSd4S69LhIxsFZZT+78ACarxyYNQnUgoVRx+?= =?us-ascii?Q?2TR3sS3E4rD/KZK2qkSbgsEViFvNKxZTnq//bc98vmu7CkXS1ckhM/x5OTX6?= =?us-ascii?Q?pa6IK4fYQ6QMsg+nHJ1mkwhl5J/r0yTeQ/zEGqdAOsg40GCaAj2TeYh+pMvX?= =?us-ascii?Q?TJ3Emc86aigxP4Dlwki/eNkgjYRwWpXrhWwg94dkuTYHq3rl5772vCacYeUh?= =?us-ascii?Q?/CAc8t2yrCg19eHaovElFc+reKBHw0w++V31zB0x6nDLFH+PBMdHC0e8eDVV?= =?us-ascii?Q?ZsPXbiCi1gWNh1vjqZKGlNx7He+acWjf7BV1MmlljKgjICGu6IfhqV9Ny2qi?= =?us-ascii?Q?NavOpQG+Qkd9yPWJoryz+x6G+3nRPK4re2rnFAj4ejSjQ7qBWmqow6XrB+eG?= =?us-ascii?Q?/olJp0lFh4doAl1Dys3j9pZREHNg3kQqgZ5N63QteMJ1kIT4y3jFRBi/5qwP?= =?us-ascii?Q?DH9f8XdQEj/yxaTHBMTOJHIpeyVQvTpQwiEdCZl0AD+50jA9EPX6q5CN5bLp?= =?us-ascii?Q?KBlEtuKBmBbyTc6IY5fBcAoDBI1pmWHJzOz6n0UQCSvQotRFvln69dsf6yaG?= =?us-ascii?Q?jokHOiEDkh5XD+lu/k+I9WICiKE82LmcLGMkaQSwToO26dfDAfI8yvRZAec9?= =?us-ascii?Q?AdJDT6iogPU/+5olb3UeYty6+/yhlB4Ysu0CYGClX0ZLLj/8gKvbQl5S36kx?= =?us-ascii?Q?b47kfU/v0FJ30+GHUmJY8OVgJxsxgOf82daYxasQNb9OYvN8ZzgmTb6+pAR4?= =?us-ascii?Q?0z+7FTsSGALQkfO3BIxWVLzN3jXHF/ev1ww+jXlgImJLb5mEy8kEXa/rn43F?= =?us-ascii?Q?9mPW2mQvKeZam5+snqdgBASLcO9vqvnm5ejig99wkZnras7FkdV6Wg82dTGD?= =?us-ascii?Q?WsakHKN/JkiSj6lmI1bTFqC53lO2hKykY5RiqatKkUrUBYGX/IptD4QrqJFA?= =?us-ascii?Q?/fR/f1LWumidn0tf+YvZW9lvb3+w89U4485/PA0YBmigrujWmZn8j+roT2pM?= =?us-ascii?Q?rq6ZM4mG5vyQSuz6hM8DRVWm4CSsuqKhuRJeljMV+ZnARLfsvHL37W5cWTjp?= =?us-ascii?Q?k4B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pQvlecqaxnHJQA3/E3h067RaCpUcwYoRaSFYpnlkoKN/0IFaEvsH1errrvxxXyxu2o4b/WAtvvocPekcYARR/8mmu4WlE=; 24:J9oU9bvuu2PpmB2xyR/ylT98NRj+d4BddN3Se8/grx2Se6r7LmCkCcvb9Z3pGPtz7POWqTlu6FnX+nOMhpgHz4cAwtIhAbej9FBN9SQOuLo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN7PR07MB4898; 7:FJiZiS5iH8f+qpF3cLys8Nk1hBKANsBBIwlmhjY99EdC++xPKIalshk3R6ejueeMlDaOT/suGvZUR1RhjgN/iNrSBZypEooceeaJeIBA1cFqHnAldVzhzY3WPN0sD061VVW2fgl8yDHN8Tbt1OSnOwsbxLSV+Ie542GciWERg2HQs2ELhc7GqcNkMyYVuxFwPORLQpep5X+r30Y79XRpA75nspbN6DPSPtM+NUSf1ysgq2MNmabMnUZ0R3qZmnt2 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2018 11:50:08.6273 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a03dce18-c83d-43e2-3a0b-08d5d1ecfb70 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR07MB4898 Subject: [dpdk-dev] [PATCH v1 06/15] examples/l2fwd: fix lines exceeding 80 char limit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2018 11:50:12 -0000 Fixes: e2366e74e029 ("examples: use buffered Tx") Fixes: af75078fece3 ("first public release") Signed-off-by: Anoob Joseph --- v1: * Replaced 'unsigned' with 'unsigned int' examples/l2fwd/main.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 6229a20..3e0269e 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -147,11 +147,12 @@ l2fwd_main_loop(void) struct rte_mbuf *m; int sent; unsigned lcore_id; + unsigned int master_core_id; uint64_t prev_tsc, diff_tsc, cur_tsc, timer_tsc; unsigned i, j, portid, nb_rx; struct lcore_queue_conf *qconf; - const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) / US_PER_S * - BURST_TX_DRAIN_US; + const uint64_t drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) + / US_PER_S * BURST_TX_DRAIN_US; struct rte_eth_dev_tx_buffer *buffer; prev_tsc = 0; @@ -175,6 +176,8 @@ l2fwd_main_loop(void) } + master_core_id = rte_get_master_lcore(); + while (!force_quit) { cur_tsc = rte_rdtsc(); @@ -187,10 +190,12 @@ l2fwd_main_loop(void) for (i = 0; i < qconf->n_rx_port; i++) { - portid = l2fwd_dst_ports[qconf->rx_port_list[i]]; + portid = + l2fwd_dst_ports[qconf->rx_port_list[i]]; buffer = tx_buffer[portid]; - sent = rte_eth_tx_buffer_flush(portid, 0, buffer); + sent = rte_eth_tx_buffer_flush(portid, 0, + buffer); if (sent) port_statistics[portid].tx += sent; @@ -206,7 +211,7 @@ l2fwd_main_loop(void) if (unlikely(timer_tsc >= timer_period)) { /* do this only on master core */ - if (lcore_id == rte_get_master_lcore()) { + if (lcore_id == master_core_id) { print_stats(); /* reset the timer */ timer_tsc = 0; -- 2.7.4