From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0078.outbound.protection.outlook.com [104.47.34.78]) by dpdk.org (Postfix) with ESMTP id 824C91BB7F for ; Fri, 8 Jun 2018 19:10:24 +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=tbU6OoQ7w41YUqqQAseQqCSz80lIRkVMpeQBxm9JeMc=; b=mLkmEAngLPCpiU/R+h4sQ0tsdCjGsnymO7eNOzUJIfKBji/BOHEgTpgmF0JvCix2Om/guMI4NeohHWMtqv62b0vTlGql09VL+UzmbwcJhRwUwTHO1CaUp/9OHZNmi1ZEaDTWiFcUAwdpU716LyWM+/AxYIpwiMJ93HemUhHDLnM= 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:20 +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:13 +0530 Message-Id: <1528477766-15788-3-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:b7BVCFrDo0jBB6aO6ju2uYDl+1g2XptJeWTXWrSj0cNYhbE1+kOJl5IPvbqmUiRjP41XpnW4ej9tUQctMcZ5+HK2OXkKxX7I4W6cmdmNAj0vWjD74Ww/wl07FO/Dp2CEketB1gXzucjfo4YiMmUKChV0MAKVu3nmZCi9qQeFpxem2KmkAoPbYli9PTCKJANQ/tHYdeFgNFOxBypMvw4ZNpkqBU+JxA9xXLp2FMUDCT4Pr0BKxHUY0yJBcQKXF+IU; 25:e3ZnWF4yxFnwsuVhvccFtJsPKJpowdS3FEaMVhGOvF6DtLdvluccQhXtvwFSuEVn1AznZUt6o/RFb8BmFbPwEl6ADN0OLsuE+ao0qxHMYhnpHfV8514m72FydGhxDOgFOQ9DGweZJ/ZYWGgiE9jBsoZ5PDgT4vjr0RQpw3jyFGkPmAsxBqlPA7AtmHbPTjOzATdFb9UGUoPl9S1GofvQga+JwhRhSNRWDL9mHeB3YGi2gRmpkck66CuX+9A5dGSyuObfLi4IajemEaFD0CtA8I0IfiC721dg1Bkw3re3sleok6ph1ZG+F5ZNczEInfNdU5g63D7vrmoHASCBJSJdHA==; 31:vcwkVrEk20R34V4zM0SNiMrKsXKWJk7KFBtM6poeWv+s/UxIstWyfXBMfuixVgk+0w4UQ+G+4px1tlU/lX5gCRb9hcppKt0I4OvLoo+fyT8JnGY4iNAA7K19dDBwipZ/LRsE3tuGeP/MUKgUCGq71erhBLDAUWO8bp/AwMwSqxb9Xn+p74hOgXJ9yBT37Sv6dHBhtLeHfA8uz48cI0VORNdlKvCr7GEJk8uXUW6iato= X-MS-TrafficTypeDiagnostic: SN6PR07MB4911: X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4911; 20:lP9ReRKJkdpdpJSgVTdE3mzCd2WZy8QTCWFEvA0z8sgo2NSQIbrYa/AAfd95uFp33JzJ5bDJC1T4LbgfB4Ex3Qt41UnCikS3EV+n7L1DkVjBciWQpI/HD8sH5xdOwBixff3gLZ0bFlzoGiWUDu60b/Qugi/tRxRxIcyjI8xp48hZUXgjsFKbcTBNvsMdbOAU2Rl0At0dIOTrIlfimTVcrnDTpwgYkQAexsw4JEAdUmN7zGlSRbX2VwHBNPUZWnaCW0ok+MJPe7POwxkOXwKX+F0WC4DKcUboqYuYe7cmJvWljWu3rZJMSq69/fG8qODi/xpkiiSjDZfe0mKJDOgypVVlfWBHYILAF6Q6h4skBPhADjwUZUhl8sUNvFnjHECLxWHMNkYPvIhTHPbfRbiS7HufoLpRDoj4O/5iudNAyWaOPULP+A//aB8jAmfX3LBjt1wV4o8jUH/3So/eu3Z2yLkFzv667PnCUUa15vXv4q+nHfJcQVyZlA6MrA0XfMYNCWoSdsOgCTdnBzliEZgPQEZsd4tAFuCoUkOvEib0ifXV8RtocrquEKUmpttYNuXe5w36FEVxlB+EX2BwET3+FwDyQ45MpA2U1LCWmGJeZQ8=; 4:K1wqgSKdaePAFhUadUrhuMhFDLOsAbdRbAqvX5SJRbirGhhUe5nBFbsPlds4ZCXS44QuCQW2XTajYiBmnk9OrlFc5CwMUN+Le37Lc0XcNiGRzk51tR2Y4Ib2prxAXdHdTfsKbY0p8V5FVAdHGYvfy/wtw88xPA6DEyUL7ZacdoeiKGJMo+8fX9d1oNGij3dcBI4AVb9BdexbUjB0laQtYqRnAe8iMHzpUEJw1r6t77TTxoPchO+EJ5t1iDE0viApMaa8ozm2KOaI+AmZ7il6Cg== 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:hUBpTN8mdgk5HI6dEBDkfUSOtRLpJ4EdqmGuMcn6w?= =?us-ascii?Q?om/Nvtd3GkC9UZb9qSn+jxEdPDUk9PdSCL9gjxN1jNQJunDmDiNMGv1ma9v9?= =?us-ascii?Q?gVrnNJvN0kPmX46joYJR8x7YrtuYxVff8FpJcDg9CmL9+XnGN4MkM9loudwC?= =?us-ascii?Q?/FkNIlSkpS/vHR4+6g2xuCWo/eZrqnqNuTaYfSGOZrTfs5wzN3KSJtZ+sxra?= =?us-ascii?Q?cZt450mgqrLM7qHrXAOQv2h7qD3DY7Q4khdiXHyq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REvTqvsCtUWkoLc7VTZckHM+onUlXtalKJHa3WRVgqdgju0t20zBxR8nHwmizUFqMZtZBbkNrckT66McDITv4n21zVxuTIvgcgv1U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4911; 7:qH4xEvWVjyODDgD4rX6ghnbU3AdieCeo1oYxeKf+r0BBtz2KqRf+aB6D9hdPr79+zV5DNmTUInzWXxWPjikNweykpucdoG4WtG6B4vlXmzwwKwbmRmLlkqzz5WLt9JInIFxsDpxyyNLdQTl2Wbn3w2QePT0RdpP7j6N1XOn8eLEKPqnB/1rVUEvzIyu7GvcrYPGsGhtUeJFN87GGcTrywxekD4XiNhsyq9heo52LYFarM3wd1oma/e/e4P9fA9vz X-MS-Office365-Filtering-Correlation-Id: b7ce219a-ef8f-404e-7b2d-08d5cd62b873 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2018 17:10:20.5832 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b7ce219a-ef8f-404e-7b2d-08d5cd62b873 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 02/15] examples/l2fwd: move macro 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: Fri, 08 Jun 2018 17:10:25 -0000 Signed-off-by: Anoob Joseph --- examples/l2fwd/l2fwd_common.h | 18 ++++++++++++++++++ examples/l2fwd/main.c | 16 ++-------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/examples/l2fwd/l2fwd_common.h b/examples/l2fwd/l2fwd_common.h index 15059f4..fe354cf 100644 --- a/examples/l2fwd/l2fwd_common.h +++ b/examples/l2fwd/l2fwd_common.h @@ -3,4 +3,22 @@ */ #ifndef _L2FWD_COMMON_H_ #define _L2FWD_COMMON_H_ + +#define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1 + +#define MAX_PKT_BURST 32 +#define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */ +#define MEMPOOL_CACHE_SIZE 256 + +/* + * Configurable number of RX/TX ring descriptors + */ +#define RTE_TEST_RX_DESC_DEFAULT 1024 +#define RTE_TEST_TX_DESC_DEFAULT 1024 + +#define MAX_RX_QUEUE_PER_LCORE 16 +#define MAX_TX_QUEUE_PER_PORT 16 + +#define MAX_TIMER_PERIOD 86400 /* 1 day max */ + #endif /* _L2FWD_COMMON_H_ */ diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 6908435..9f873c7 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -39,22 +39,13 @@ #include #include +#include "l2fwd_common.h" + static volatile bool force_quit; /* MAC updating enabled by default */ static int mac_updating = 1; -#define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1 - -#define MAX_PKT_BURST 32 -#define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */ -#define MEMPOOL_CACHE_SIZE 256 - -/* - * Configurable number of RX/TX ring descriptors - */ -#define RTE_TEST_RX_DESC_DEFAULT 1024 -#define RTE_TEST_TX_DESC_DEFAULT 1024 static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT; static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT; @@ -69,8 +60,6 @@ static uint32_t l2fwd_dst_ports[RTE_MAX_ETHPORTS]; static unsigned int l2fwd_rx_queue_per_lcore = 1; -#define MAX_RX_QUEUE_PER_LCORE 16 -#define MAX_TX_QUEUE_PER_PORT 16 struct lcore_queue_conf { unsigned n_rx_port; unsigned rx_port_list[MAX_RX_QUEUE_PER_LCORE]; @@ -100,7 +89,6 @@ struct l2fwd_port_statistics { } __rte_cache_aligned; struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS]; -#define MAX_TIMER_PERIOD 86400 /* 1 day max */ /* A tsc-based timer responsible for triggering statistics printout */ static uint64_t timer_period = 10; /* default period is 10 seconds */ -- 2.7.4