From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0062.outbound.protection.outlook.com [104.47.34.62]) by dpdk.org (Postfix) with ESMTP id 197CE1CDF9 for ; Fri, 8 Jun 2018 19:10:36 +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=vYOXNLWODMdccQMRl/F7A+L762tVlavLnxVItseokRg=; b=VPDFlAwotzJrCtUfy5H9QOaSTPsV++GfeEmdGvy+Y9Qmu8tbgzim2wOSRVRvgr08tevM90RZirEKcVmSnS/4iQ/R6CX1jl3z7MmLHjZNkmTqD9k5NGAFf72XxgUlRqD/KpfskjpcXKfefY5b0SX/teFPQOiD/AOUMULbOkrTVKw= 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 SN6PR07MB4911.namprd07.prod.outlook.com (2603:10b6:805:3c::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.15; Fri, 8 Jun 2018 17:10:32 +0000 From: Anoob Joseph To: Bruce Richardson , Pablo de Lara Cc: Anoob Joseph , Jerin Jacob , Narayana Prasad , dev@dpdk.org Date: Fri, 8 Jun 2018 22:39:17 +0530 Message-Id: <1528477766-15788-7-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528477766-15788-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1528477766-15788-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: BM1PR01CA0111.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00::27) To SN6PR07MB4911.namprd07.prod.outlook.com (2603:10b6:805:3c::29) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB4911; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4911; 3:8KshcHIiIyQTQJd1rTiRgylrH98PduhGjeena3fuW6KRxsc1+xCrbBCdTEWnF/xuYBbDFGIu5UBMjPJcHaL2XAr/kbuyIKMbKU2XCe9R9r27T8+V+7Q7BzfCBsDqIRDQ9HojaYwGo2gakKek3AZxNJ5TK+p9pQMRoUaiIAb0qOkltWzG+jK0F6pfU6K5L5SKYEXYqt2kNJ3WF24X4aIdJd8gavF4XKtHkSVoaNh0cyGx20ya9PnOElwcCFgcEz2g; 25:pXxLzJ4GGE5MXwTzXe3kGgTkdx3WHzBoPSIWHdDq+w9RNuEV+ECdDjI4OI+bZ/ctAGMLSWRscwZ/0FI7R51c20wMsclS5iLwfuSlxe8Sh6qhkJX0CHxycl0dSFtp3Mk2jeXDD7K4x9jM4JneHEOZSNg5Qal48eawCCpKHtYxlDg5MOhsjC6IF1aZK5AByxX8yZzjhKPTH6ITR5nNnBmBa8dY9aUva0Cgp/2/yZ6r2LWZRFhTCt5THth6PIiuPtRZdCuMgxTZ8OJoYtkeMqWnTMPehcTIkrM3L6WQMFkaY6Kdp2bJw6Sp7leSA3uzaTXh73PFWPaf2UfO6VDaOIZs7A==; 31:d/7YyWMU968TnEMKwslWoEukpGaVZVtzkvr8Y97d5v2A17ShTQqqts/3/lD+qWLmzYHJCRx2Y6B6F4AUJPaUmodydzwjGpJ9rxa4aLr3OV2Up2YjDe5obEhlTRc+801V2XsyaYw8r9MJdSb0rZg7TBVHwbQEDkscSZaCWvsc8w+3lmsOGuLPjm1QaW7G/S2gTICqybE9MudZk5ATsDARUZFKKr86HSfbMacqzZ5eUDY= X-MS-TrafficTypeDiagnostic: SN6PR07MB4911: X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4911; 20:srcRkn3qSe6GvMGwMPZWkJOEprirJ/gZaGVC8/iORW6NjPr0k8X0KnrkYmXJgUcJq016y0oV33P5LN9gsSa/I8mwW1cRwqozIDytF3BssUNkTspeJiUfUbtswhyrE3zhdCQe86KKI+m1fhEWQojxpT/lZRWsI4dwJYuTxfGQQG58QU0BEMMu/UzDhStgjVYVlQs7745eorFazBod87cBMQQNZJIqV4b/oGfXntvXagup9wcahQqcnlqSArLOvDxfvxZn8LqlGm9LDr3tojoP6MqFvaWKrhcJXThEjjdjeosLim5JBuNxuyg7JbbBPFlTpZAJbWxeqBjgPA2VaUAb/EMWVzdF3jsQmbOSt0oYEKkonFdUBwLl4yhTa0QvWicJhzrs8904TfDw7aLOs4LCnLLxKopJ4SF9XyMxpTQa5LRYsvK66uxovPYtnQt3cHqgfryAg047vMElOsR55pgRRO3qDXUdyT5aHiJuJge1JGa/S3Src0AeSstPrY9liZcUXQa4wHFxVZthKj06WxnQXkKiOMGXWh8plbsxtP9Zd3LLul5lTS4ISgAtk+IWcMdMN/E54f18o9D2SSiMEWB0RgKa1eNI5UqbCDJ3OM8B2QA=; 4:mpu5y9PVa8l/qDpR8u70nzJ3B1Axl3qEnZC69teSFRa9adpiKDP3D6fKhi+okoiVJ+0ctSVuAH/tOos52TQ1K2HeF2K7LFgVLhCc7MW/xXOwTDv3SSACVv6wUZWo0tJy/GM/CCD36G61V5iva3HV4mLFsm0MgzUQ8Oe+buflplFP2F08lJ5WCnZCVRam4TnJGuMYeuOh0zZTW/T2eDmsk3p5scvzZilIIqT/Bcx5ZgdKc3Q7MAr40il/WFirV4au50KFV0UeSLV4kay3PjMzvg== X-Microsoft-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)(5005006)(8121501046)(3002001)(3231254)(944501410)(52105095)(10201501046)(93006095)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:SN6PR07MB4911; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB4911; X-Forefront-PRVS: 06973FFAD3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39380400002)(39860400002)(376002)(396003)(346002)(199004)(189003)(6666003)(4326008)(54906003)(76176011)(5660300001)(25786009)(48376002)(50466002)(446003)(386003)(186003)(11346002)(16526019)(2616005)(42882007)(44832011)(51416003)(476003)(66066001)(110136005)(36756003)(316002)(55236004)(2906002)(7736002)(81156014)(81166006)(8936002)(50226002)(106356001)(105586002)(68736007)(52116002)(26005)(956004)(8676002)(305945005)(53936002)(6512007)(47776003)(486006)(478600001)(6486002)(6116002)(72206003)(3846002)(16586007)(6506007)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4911; 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; SN6PR07MB4911; 23:QTQEflm8IXt9prcYo5TH1B3fEQ5HiA9fkOJ0k9bZh?= =?us-ascii?Q?JAyRMzvc7om9ZL40a0KZB7+/v8QpK4jTkmDDD/v32L3UiLJeiUJ9ZovI1oVy?= =?us-ascii?Q?yNQAZVZE6l8zHb1M+2ZiCjfGM3yPp1ty0SW0wIHrkK3vs7PpH1eu2jOVR8Ej?= =?us-ascii?Q?dHKqzNhMlLm8EL8ajG44hA1+oXaGgMNOeGLjXb59G+wykXXuaOm9eG9e/wWV?= =?us-ascii?Q?zRMk2If1Eq7j4Egb7x2OmbVsxDq73a+9ioLeHlt9+x6HkAgG6bgA/x9b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LdEYLa8Oyr+fKUF8K/xGybBRKVhnvNj2QEf+YKCcqkdqrhGe1EXBAS0f7PdIZ50U9gKNgY5BDVFI47qRBs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4911; 7:ysaB+X2OnOBJaWxDmCqbD54Ji3WGJ3OsXzSaFWADD4XOTXTZ7ouOuukXy1jm1oD4bHiwb3J+CJU0rkXcapFHSnW9/sdSYcWTTYKXHnVQC4RGsQCIN+SIzzz5seOA2ucOUdN5pPRfSjIuAkEwG4cTThydiWsZTnyBmqVHZh9lSruhC/BzyEh0PA+JXPRmhs7oGb1Go7D9+abVSZo3U2MF+mcq65T5s3Q5ybLtQu2KmABqYYUPgCMpdy/fyPCOm/tR X-MS-Office365-Filtering-Correlation-Id: 62f49be1-bf87-444e-4dbc-08d5cd62bf53 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2018 17:10:32.1064 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62f49be1-bf87-444e-4dbc-08d5cd62bf53 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4911 Subject: [dpdk-dev] [PATCH 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: Fri, 08 Jun 2018 17:10:36 -0000 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..bd48295 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 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