From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690078.outbound.protection.outlook.com [40.107.69.78]) by dpdk.org (Postfix) with ESMTP id 9D0811E91C for ; Thu, 14 Jun 2018 12:18:59 +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=o1Y86RXog7idVemQL9XkxEYfy91c90QmfXXhqbhuoPU=; b=Zi474QIOV8YUReK4S/y3yVVI5FzEqGHtSFDAYOQYQBtXALJM4gPVkezAwWaAmAe/BSMRbiVuiktH73HWx9fJ66OuT8y3ms6ADGIEm/vj3JysQNoqEsCAznRPKW3N8VEhaVaq+qphNtZ6Xr/5mgtzMaL+WXexV75bUC/NXHUSK9Q= 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:18:55 +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:45 +0530 Message-Id: <1528971477-14156-4-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: 5504bfed-3439-45ff-5c1c-08d5d1e03dd0 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:5yK9OOti3cGxCiyXcyIG+ZtKsuvxIKqTY3a35bwqQ6orgbFVOEWZrCWKaKeZ23Pp1uGKsjDjgioFGE5AcgBBhdWDQmdjsowMn4KfOnKJDdDMtPsmaPGKqu20a6DbQsRab2jJZhFOwMXLhh82H3HkF+UHGKN9JyhkCW9yHjU6r5XBfTSDV6BqGPv95uvy+TeQBEj1i4hvqmAb+lCN4SvOnNzVonhnCQ9innGNkR7l2GSZoIoZttv4uN9ItHXTrsMY; 25:hBqQ8nPqnwgWQYPI9XHv1jWv1YwVbCInBkE1WPut3Qj3/JJ/0YiX235DSBSg+FaeLp35YT2mlPeEqbJF1UhZK7W9JcxBdk2NC6t6C/rHWATHjP/L2t6Tndip4fRsKouHIQHj8v85RLk46Q4kyUBCLC1cWwb+JP4qrfHMbXYoRNXKhBaOh47FNYdBI4rKwXpP0M/LaJ5MO4M231j4Z8smO2MjyOwYvqirk4Pdic+36CnTduYqEvHRWI3q0PiiThXPBTITzpUv98Tq0QvogQFQdWGD3P/WPXJMp/LoW5Xy5Gifj7kY5Ptn7St7koXm/QO9n2+agxhRqszDvf7TC3TeTw==; 31:kKenhHBjCFh8goFyG4QEoD7z3XL3FFqgTsU/G0uSs4C90QtTEV2alyJyVoDCVhMtl2aisytz6wOWcLstZgo20G5/HcvIw53gci8pB4z7Mzxmu2BOqSD4EqJJ9G9BegsHinKcs/3DYb8bll7c2hwBDuUYqDDyKn6o000TJChT308oqnItX8gINdGH4WMl5bu7GUuBfzNC6YA0LhgIDWUsaZm7gN/8muyGOUQHt4kOwRU= X-MS-TrafficTypeDiagnostic: BYAPR07MB4902: X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4902; 20:Abmjfy2N1jQIf6GF8aKKEWS2427YaCBrkvwcBaRUEYPHp59ThAhtL25qLZA8X8fS93vf+mmHW87wuCeTDVvHtmgS3S21fqoNgtn488aeklJvGQGEuyBEHgfBljPcQEzqNvlkyYH0Da+lMz08rroVEIv+ogeQwJPu1tCkh2USSGxtdIoyg1kkthInmq3r8g06yPn3swVrL2mUut4TSbmoJ4bFSmF/bpaPdKa9emjalyXZsR3tI32ZRbi7HL9LkX7cHkwQfp+Nj7+x22WRA245RYKE7iEE/+zsLVHEI1z1y8Kjo1un1lc0sqJXihlsIKO+vWjUnvURn2zzSq31jYGNF3JN3OMBDuZM9KEXKaH8QgTBmiR6eES6fZvnwZY8J8X+X41rkD7/b2QjNShFN424JheuQFrFvGkFZuOpW0RUSyAnNzZJ3HQfbWA6qtmtNTRJkqtwIzpov+7CSU5QBBhiavqvHw9xKICd466yr3v8WMnfw1h7hzM4sJoeqDuL2lOC0hfh0j7sNoEX9aDwdmJhbTVfuW0WtDCNkTCHr2s2JR6i0tEsqmfwcG1T13GaBkvIGWmC85oOycWeIHL4MozOYwfIojL4+RnBK9VlyWsVz54=; 4:c4PxPUAwc8Xvf/0aTvCIXRYKEfsAN2Gs5IS/s2u+NAMf5fbL8swberUvtPgJhs/NwIGQSvtKR+Bt885zlIuIbRay/uMp50LpEPZyJ6mMx7VnCwjtLHyQXm/6qRX1Wq+TqXaLa3i9gohnRMQk6a5mdgnEBE4CipysJJzY33tcMWnoRiomT0wfxUVTXbsHVjzRy6LF9BTqbZy6CMGg48MAxluBPXSlG7jzqItvTdMXDDieXn4IvE4ldClmb3SyrfOGa6rwcNSPCXh/QwsWy1+eug== 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)(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)(575784001)(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:RFrftV/tJFNoiJl+aW4Yl+dz6bATfYjOBl+e41DD8?= =?us-ascii?Q?X1kyPlB5tB3XmvcPM0dUJ26t7dau0+WLAvRvt2CWUEpMhIFQC+Hu8AySpyKb?= =?us-ascii?Q?dYhmrhKVk+XRfNWvEEcwwtP0rfwUrhe92IOOvFrUs9I9cE8FXbAHD/hjjp38?= =?us-ascii?Q?Ko5cK2hgmApgY9MxmIGX2dHH8VhhcmAG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5H5PUiI4ceEGzrw3wNXycYh/dAzan9b9C+TEdya40gwZz0bv1DP0t+V/a9xG+HLeVhNL87ST14JcLGHWwiZLykUcmJajiIyjr00zvFLRPCSbR5hKdaybgpcg=; 24:GJhPZXG2AefGXTlhYO5sIaE2ZYnzxlT7bgAXcZcjqEVnCd9M8M0WQYGWtFEX4GhhGkPxSouxPqLjaqEvA27tPycWGEAs+2rOcuxWjiJd12g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4902; 7:VCMFW/Dwqk1OWkIcWiWKV5d/4e7b9sp/NT7pu2Qns9735NJ/t+Df24LAIvVndWHbMKEBmSnB7tjwBGTsQ1ufjnbNAmFKE9lY8QeQHVn1njwGKbj1wtPPjn/jCWcn10D5AT3okh1HNjhbUxRrZ8ywllQz693YhOXh6VUSEt9JvUzNZWsfdZLrr1DvzQ3fWREbkBFSYfThnfR5fO+wrbv18L09tHa1clYh68fZe3PRm0LyiWPOGCbI9QxKH4ujT5FD X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2018 10:18:55.9591 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5504bfed-3439-45ff-5c1c-08d5d1e03dd0 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 03/15] examples/l2fwd: move structure definitions to common header 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:00 -0000 v1: * Replaced 'unsigned' with 'unsigned int' Signed-off-by: Anoob Joseph --- examples/l2fwd/l2fwd_common.h | 12 ++++++++++++ examples/l2fwd/main.c | 10 ---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/examples/l2fwd/l2fwd_common.h b/examples/l2fwd/l2fwd_common.h index fceb0c3..ca82e29 100644 --- a/examples/l2fwd/l2fwd_common.h +++ b/examples/l2fwd/l2fwd_common.h @@ -22,4 +22,16 @@ #define MAX_TIMER_PERIOD 86400 /* 1 day max */ +struct lcore_queue_conf { + unsigned int n_rx_port; + unsigned int rx_port_list[MAX_RX_QUEUE_PER_LCORE]; +} __rte_cache_aligned; + +/* Per-port statistics struct */ +struct l2fwd_port_statistics { + uint64_t tx; + uint64_t rx; + uint64_t dropped; +} __rte_cache_aligned; + #endif /* _L2FWD_COMMON_H_ */ diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 9f873c7..11ca170 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -60,10 +60,6 @@ static uint32_t l2fwd_dst_ports[RTE_MAX_ETHPORTS]; static unsigned int l2fwd_rx_queue_per_lcore = 1; -struct lcore_queue_conf { - unsigned n_rx_port; - unsigned rx_port_list[MAX_RX_QUEUE_PER_LCORE]; -} __rte_cache_aligned; struct lcore_queue_conf lcore_queue_conf[RTE_MAX_LCORE]; static struct rte_eth_dev_tx_buffer *tx_buffer[RTE_MAX_ETHPORTS]; @@ -81,12 +77,6 @@ static struct rte_eth_conf port_conf = { struct rte_mempool * l2fwd_pktmbuf_pool = NULL; -/* Per-port statistics struct */ -struct l2fwd_port_statistics { - uint64_t tx; - uint64_t rx; - uint64_t dropped; -} __rte_cache_aligned; struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS]; /* A tsc-based timer responsible for triggering statistics printout */ -- 2.7.4