From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0050.outbound.protection.outlook.com [104.47.38.50]) by dpdk.org (Postfix) with ESMTP id 798D21E2D0 for ; Thu, 14 Jun 2018 13:50:04 +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=jmsNv1F9TgeVoa11Z2s5sK8OTyalCdqYikCn67zQ8RM=; b=GURP0Hg372ZOX+sAcaE9dHV34m+rG9AeSPWkA5Zwubi+v4NGjQtMFXcthKz9CIUubuAWEqfhtRuReTZxpHs4A85CJZTAZobn6Swyt6nCQaJF8b5Zi4XGPjVjrt2weZntqdtqbFGqp8N0wN4ZUXQt8RJJQUIOa/dXKY1WJ+wmYcc= 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:01 +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:54 +0530 Message-Id: <1528976946-14396-4-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: 6ed41dcc-6f8d-475c-f090-08d5d1ecf750 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:8wWBrRoCXbPtFKLBuLL+5+Ke1rNIJl/B1sjHIQAWlXSz7rUsTsE1OQQi1GCe0UQrUeDiVUxteyRDOc1q1F1XzXBNs9245jIaLKjI+9ITqh3r/p0ShjCQjlfjai+Q3b7H6Trlyc7j1Nj9KzFGNDbDgrPXCyfh3WxX4WAkQ0WhYyUaVBpx5o2rjwIOo+IaGYjudxFmR8hG9lz94xZnDPI+BDTaaSdn05dejZJsZODUcgRO1FVagCpalI5/mHV1tMDl; 25:P7V/9zo7Q/qgYEjv6yUW+w7E3VscZzb9vcIvj6CJPmJqFw090VotRLsj13I+ZOciWOp6D4h5ucUqziMbGnY/GXjaRfhwd0R6/beGFVT0GLFP+OeynE3TDhArSS3fXHU7iPysRclapx/AGa+qGvner4lQltjiMPtln+Xclln7HvmNMXC/nmZm7pGxEVkeduMlHFw0U8DFFJ3P/wFQ6g8/D28PzPu7VoFy50pCWMMxn0nYuQD+b3kSh+byxsz6o9pZJkqjMt1D1c/6MS164xq4ZLwLtl92fy+PzWTmE0CQAhX0ZZx+fjMpgqAPF6kR/WQyRBnrcoTZz8XaA0y+beKsZg==; 31:+yuRIapAfffRsyD79A4AOd6khvNFMRsNCFVHozFnVbDe+FisZKyKDPcklAWTHfLlxx8oUzzxDxKJytJExMsgOashky6xnfZVEnKdjjeTn5hhC6/ai12g1cZvZlK7Pr1MPYTlqEI7f7q9NFHSL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-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)(575784001)(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:BhTUiALS41zCrZDl+KtOpHAiX2+uX20H2XQYaPysz?= =?us-ascii?Q?n+iINk75lp2Pvz0KJF78ojZ0i9F0JOwKSDwCLuSzOWS4SGUJiER6gpjIUB+u?= =?us-ascii?Q?N4rVLZP3xucfjWtB6aUJAWB5o3wPZRhM8KSCfCsoieXPXLGSdXfsBVZAvpRL?= =?us-ascii?Q?LiXZCet2ip6BD8+5jXu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in2y20WQrJzZE8KO208+ZlYVp5Q+XmV8UXznxRv2kTHRq+j0G8uvrz143r?= =?us-ascii?Q?k97Ndn+lTJtSrTbw/TMNCP4g0NgMuPBzhKiiRnVkhVb22G6yTzzrpRmg3BHD?= =?us-ascii?Q?jxthutNmsU7ielUQOr2xBfcY5vFuO4LY5HxTLIaBl6r69dpd74xr++9vYMyh?= =?us-ascii?Q?QGwfvCKsue6cxXVVyTZQ8/IYHbgbEaTWvb69X/JXgZsLrni0GAgPCIiNyJua?= =?us-ascii?B?Zz09?= X-Microsoft-Antispam-Message-Info: UM0VSMpNxkND/Hl9n62OxuylE0ADWQltSDB4lpReuiYJW6a3Z60WnaP5zCKBbt5l2VFT2L+i70zPHUdw8p9KQxXyh9DTjdZ5ViZRsVo45SfkCNg2SGh8E/7OwxEtS+gfLwzr//Lr+YJ36ovj8IbGDltvDq6AWHFY3lHplUqUhfxb0J4NHpLWXvaXioetIw0x X-Microsoft-Exchange-Diagnostics: 1; BN7PR07MB4898; 6:fOsQWoS955WB4mU1kU9vGCdgJ6ZelwPqQktJRTEe75Xd5XXflH3GphHLp6N9b01VUnC1F8fAK1yKKtMvEQhGloRNBQdIogD3nOdgTmClI555t4alS6Eek54fUehXkaOoQyZAV2w7orcFyy4mfa8f0S1dSaxeTyTqxEuRV2D4GbUPFK5XV+d/nw/sa+KOUpnRrNX4GGWClpycutwFbm1uhoAQ5UJcjmUR7R84rpxtaAu513u8J6+35HH1pR5/8FY97cQEuk0SDRDjTMSO8LS/seYW0DKoolCtQYFRYaDIzqV35SvZo70EqbSriufcLN49Nefg9xUHbzcZuW18IrZI1jD0v1EVfJ69CYG9OohI/VsmXf1TescgRUBwC4qpBXrIIxzrtxWsLbXTUR3cThj9GmcXkuyedpp/mTK2ZWz80yv7IDZSlZhNHDWclNa0+6TtWPiwrUKvgpwQRhOqzco6QQ==; 5:BhJsIykr2st1ejKiFIoPm5SXNv2A3JZi0kWG6x3nT51Q6VSOTwrgoltp7eunlZfTf3xzp6DhBiismS0iOVaMNqUxL6gE0hLuglrRLvZaZEwlOAbMNkZV5pNPB/uVWvmzlHcSByzIvsklOOPx2xHU1QdGMSaqWA/Wqg3BrPru6vM=; 24:tgWB7I0S+H+79RI6ucYRhGsQAXcm3R8F2tKhF4/Lkh9wcE7VWwhX+/498g7fWOtcoOZBFT6+Q/S4sJ391aD4beWQVFFTtSrNeug2sX1SdYU= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN7PR07MB4898; 7:vQPax7L/hzJqgbmBR/rVwxUj+gPM/Kg5WPrmM2xhyoRGhW4hxonHJBHcqaooNJeiuEfKh5f1KYHEmXJmr4tF6WqRUQ76TiJqarWX5xJWx/CqpKyTZ3DKCwqoRAGyDJuGQ48pEgKpwDGyCg+gyWQaW4yl8X+QxBo4n2T4F9MdsAx2VJtrJ9KOJStyYViXGRmWllF6yIRvgGnCIxWrcjggEl8eHOo/6yll0ggTUfOALquK90+WoQlWKBBA73EpEsgl X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2018 11:50:01.7214 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6ed41dcc-6f8d-475c-f090-08d5d1ecf750 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 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 11:50:05 -0000 Signed-off-by: Anoob Joseph --- v1: * Replaced 'unsigned' with 'unsigned int' 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