From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690069.outbound.protection.outlook.com [40.107.69.69]) by dpdk.org (Postfix) with ESMTP id F22641E9AA for ; Thu, 14 Jun 2018 12:19:08 +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=UpjPHQj/kzpzNPnIfwiQBr4NtuyNFSQ83NwnERTTGtQ=; b=mJ2gEupZqbzrcoP2OnI+TlLk6WI7OVMdqK7lw2Fw5EEAL5S9iiELIRXvtQedN4ErtMJ30+f8oXVZYj4RJFy1pFcfZowjnwT+vEEjhWDN7PIqBnwRaM9oOS+BPB00MgOax8jYPPspIudDmr9xFz9hrR+MttHr9aQgSgYaQIwLp8k= 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 BYAPR07MB4902.namprd07.prod.outlook.com (2603:10b6:a02:ef::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.19; Thu, 14 Jun 2018 10:19:05 +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 15:47:48 +0530 Message-Id: <1528971477-14156-7-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528971477-14156-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1528477766-15788-1-git-send-email-anoob.joseph@caviumnetworks.com> <1528971477-14156-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: BM1PR0101CA0031.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::17) To BYAPR07MB4902.namprd07.prod.outlook.com (2603:10b6:a02:ef::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a0a38cc5-1f12-4a64-7c51-08d5d1e04354 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4902; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4902; 3:k5CHEzis8yu18DdRvVZOXsWzBHtIw0qUa59E1kqzzTdraCb0tvoFohHPb7eN014CKQowp2aVOWXQPKpZkEZgQCOQ78vvGLs1JLPvdrpubju7uHsuXdYvZU+jCZgBYAI9F2zF+wRTZXkpV7cet52gysMJQEk/i2NzMBfD7ANRwnRfKsBzCPORi4fEZfND5sh8jB/uVDC979eHi+2jrUFr7FCEZTRs64m0ZiMQzcblvWuw2aPq8X3AO1uOlDoQosxS; 25:6t112Zwk6rize1YAgTtxDeWZrFLdh5O3Ia+nwQa3eruQAfS5ufo88X8441swBIUHexk00iwnIdmEggywIv/dcFU8jeR2mlxW6ZvqA4MC69Bp80I5b69cu+kSYGBysouaIafAkHcDGew2LSNx7b9hK3PdbMNi4jbxshLo/JKvDq3trM276MUH0EbfqRrrbpt0dT53dD70bM4WSLxo52CT2+zq/IlGMH/jqlyritVOGmn0B7rAzqvzn7TnTGud8mLaFb21H23KJoZYd10MoiWih/XiueBe6ote9qi3U2LNaXQTZ6WiuYTwwzE1tcIIUfgC1oRPkL4WiUU009wBkByWnw==; 31:r03+x4d2JPn/d2YSJHDtYrPXyiVVa37bpZ6jaCQzGcIjcQnEsgBLh/+HzWOhcoH5S7OppJkRTPTp6hyed+SCsenoMavk+imk3Ln2C5lRMYlEtCddmD1CXYzvwd0mtJSZSzd/pkvW5HhWiW+U2NbKpfIWOt0XLjikipYi7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report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(10201501046)(93006095)(3002001)(149027)(150027)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:BYAPR07MB4902; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4902; X-Forefront-PRVS: 0703B549E4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(39860400002)(39380400002)(376002)(396003)(366004)(189003)(199004)(316002)(6666003)(110136005)(68736007)(2906002)(66066001)(54906003)(47776003)(6512007)(5660300001)(50466002)(72206003)(48376002)(97736004)(6116002)(3846002)(53936002)(16586007)(105586002)(478600001)(6486002)(106356001)(6506007)(36756003)(11346002)(956004)(25786009)(4326008)(50226002)(16526019)(186003)(81156014)(486006)(81166006)(8676002)(7736002)(26005)(8936002)(2616005)(476003)(386003)(44832011)(55236004)(52116002)(42882007)(51416003)(76176011)(446003)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4902; H:ajoseph83.caveonetworks.com.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB4902; 23:MASw+xCXLcox+FFmHKT9lA+5ep9unIzXM9H24cXeV?= =?us-ascii?Q?d4KqS17weeUmmp9jBmzm/3sGPXBsG7ImFgjh0sBwUYLtiI/A8uxmO2Omb7Rz?= =?us-ascii?Q?6z0X6kyHTtlllSsMui0VU27hld6BXj/ARsyKQp4WoLF/lF95WtproWux2Y7f?= =?us-ascii?Q?Vf0uHscJdiOpkRc/Y7D4hA00aEOk8Ka48eRpihOpXc8AVEXmTVF8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MrhMUVKbAgMBg5/N1pgxUqpuY5oT9YeY1Hgu4ZquPZLmB43yJl0Zvx3VUKCQgCRi2wpw=; 24:iYmF9/TTycGiQsZF8UH+VnCWMosZvEAGsdR5185L/t2tz887tu/UYcNtL5xneGWwUQ9vrUbVTThnT/BQIojgJtoz6OuGF3H/ZENJih3ivGo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4902; 7:V2WjH9SAQVKWOnfn/0ASue/YHNhDwceY7PdiAzHII4NoYiL3uZ1OquxJkA2GoPLV/RFiNtgi9/GZ8ZcWAVHglrgl9dpAe4LyvYwi22I+IlabWoxrs2kaeKLKslxVRNEdLO+q/XEik3oeTC7yf+WqGEPKwEG8bQgpnjr9L2QYNAyV2Z3nGvXw3mREJCC61TD0GRbAqgQRPBQ5Lv1E+gqNYAPiKLprSHgnHu5u+Hd4/Ho292xUhDObu6r6/uC4NDhG X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2018 10:19:05.2106 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a0a38cc5-1f12-4a64-7c51-08d5d1e04354 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4902 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 10:19:10 -0000 v1: * Replaced 'unsigned' with 'unsigned int' Fixes: e2366e74e029 ("examples: use buffered Tx") Fixes: af75078fece3 ("first public release") Signed-off-by: Anoob Joseph --- 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