From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0074.outbound.protection.outlook.com [104.47.40.74]) by dpdk.org (Postfix) with ESMTP id 0B0C523D for ; Thu, 28 Dec 2017 21:41:39 +0100 (CET) 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; bh=k2lzDMHw7diCw01df87DUNrtH9AjOeLY/rjuBjxkAJE=; b=YpjYS+N8rBL5j+ZKYGKnWha3FXehCFxrnNzZgH7eQrWWLIcf1Pwe4hKAuI7EN1w/DPmHaoZ7nH3zVJbVk+YQHi+nAzpWMpWuRi/RHaA1MzD/Cwc9JXG4Lp4tzFcW1xDWYYz9F/k/BFe/h++R16NwbEY+lOtGmUWkVKD/0T0TtoM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT (111.93.218.67) by BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Thu, 28 Dec 2017 20:41:35 +0000 Date: Fri, 29 Dec 2017 02:11:14 +0530 From: Pavan Nikhilesh To: Stephen Hemminger Cc: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com, dev@dpdk.org Message-ID: <20171228204113.ljlkmeycmntjvbfg@Pavan-LT> References: <20171228201906.22770-1-pbhagavatula@caviumnetworks.com> <20171228123642.39c7aca4@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171228123642.39c7aca4@xeon-e3> User-Agent: NeoMutt/20170609 (1.8.3) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR06CA0103.apcprd06.prod.outlook.com (10.170.138.29) To BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1874279d-ff66-4c3f-13a6-08d54e336417 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:BN6PR07MB3458; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 3:wBNmkwSZCSZg5gIZu8kPywTO08S6hl+mF9mASQMlit0SC6dLv9n8XAZtui/BGZEeSbaaXrZFW9EOFXjRqwm8gTN0eQKJPxAsj4ZYWiSXTeDyh1ipdQf0RcsiYCb9gP16BdYkQzylVu/BWs25ogjfsuUczZgGp7GlvmGyHfUHeJaVQk80o+eIPMXf3MjY2xBXYJ0SDxphU3Vt+g1RZqWh9Ey5q6LHejKMnEJpkFt3+AXKSeiK9oxBavs5xk8C/aYM; 25:W867IBa7b2c4P7wg2OoMvzgz2fIv+RW1ym317w7C4eITvrUsDh6Tag0yQtT6aaWzgm9DIPN3n8wxx3OsG9+qg0zdGPjVNQWGOQNV16qNvInx//BTl/CIzX8oYox8pyuwzeXLio6cGoVuexE/2ZWnit6AOQjVp3UlKz1XxQ8MhHvyTt3NJ6pWabqS8XunZz2Tnim4e64zYAVQTBApeSGibhcUZorN6VfUaJURIctWzdwH2OAYhFtTVvXEWRdy/62h++JjyZke4r74UlNFrBfpH9obbcYd5X30uPj3spORqTDzc3fnVPlhRdmzvrsc+y2iyG9ER50x7uEwmLEuu4dnxw==; 31:Z9UFKqUDE797wEMqlQUVFViZjmPm+Vyf5Bu874c03yTOrCBfse2ZndAVQoM7kbZOTBK25fQNvzCZu4m2TZlKpSe968UyQOtM+t4iA3RM+11FDLyPgN+rG4lIugxLRaEiCYWjsjWkfbz1YGIk9Cdl3hRgfXpTUrXok/X33vLwaabkiKo4zr8LI3apvS5WAaKiylbeJuVYboeEOc5ftgJlEttFZRyn02nALBWE2Fp05vc= X-MS-TrafficTypeDiagnostic: BN6PR07MB3458: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 20:ncKNKQgI4WhcnplmdYimHzKp23N0s3qGEdxhIuQlu3TPPdQZYuLqE/UfW34MZYUHHDYtZ7A5ZBb/5VuKkUU9Dxh6fOqGzsVfZ45AlF5cMUw1nVRRT/Go8dTiuh+UURv96ZxJtXDN+XET8jgb+WDlbQIhr+51w37xS47+8RlBDg7QrJ2WWVJyQeeRIo8oWjWtM3OvhqJ46OuL7oohHh7hPsJMeIQKQiMbjS+6qjwYC9kpRKr1R7BG9R4z3z1Nes+WE3Zcaqry5L4aQ1Bycu0tmtbGyIGDc/sje8hwKekK1x4rPiw/EIo452RUZ1iVtmU1EF8oGDliVoGKfgBrKbypqWIKmgHRyEMmtDpkzOrYTVfkikkFmFuPy+3DM4Vm1OGDeAPJUWLWZNi18ap7gA3hCcfcCHOYBnOXuYrPq//vpTsorR0M+pI32bD4IDy8p4NMIwWO0NOfdzvg86KuR0RMCvfSDmt2a2IvewruDbasCRsx0TDxjEtme6DWohdahgszKov7tmToApeBecGmscY5aBp2FykecqT+tHFn6xhBbjMLtZYeXHovPd36l5aiUCo8UEv8w39vilSXY0tlk02DA86v/b+h+B1M9NOxuejnz18=; 4:GIAuxJQbhOX5qAJFmnfTffHfKrFImC0ZVNrpLGnSOEYHywMVQJQokxj4WnUsb5vfUYhxP8kYmxnDGhqmch5lwALH9g2hIQGOJYHqvUsJjLJ6gYUrvgEQErOFqX8Yzyu2SCI9z8sQy6MzojioKJiuUHZppr0/A0EoJOb+i8IwFHJvAs+mOg6nNtA0qd2zHAGbA1Se7SeXkWDeosUXT5hbfJNOUjTnCd/NA0Af6TdVXBWL6V5rROhr6pwECR/utAEJQiFj1Gi56bQbxVWmq00mMw== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(3231023)(944501075)(6041268)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:BN6PR07MB3458; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN6PR07MB3458; X-Forefront-PRVS: 05352A48BE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(346002)(396003)(376002)(366004)(39850400004)(24454002)(189003)(199004)(51914003)(47776003)(106356001)(8936002)(229853002)(105586002)(68736007)(23726003)(5009440100003)(55016002)(9686003)(66066001)(1076002)(25786009)(3716004)(72206003)(50466002)(76176011)(6666003)(83506002)(5660300001)(6246003)(59450400001)(305945005)(81166006)(33896004)(6496006)(6916009)(42882006)(3846002)(6116002)(52116002)(2950100002)(478600001)(97736004)(33716001)(81156014)(4326008)(2906002)(53936002)(7736002)(16586007)(16526018)(8676002)(58126008)(316002)(386003)(107986001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3458; H:Pavan-LT; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3458; 23:lDAC50AZOfWI7A+FulelFu4qV5HOxNda0JHrF5PrI?= =?us-ascii?Q?abJiK7bqmQoyy/un/mqfZFHvJ7gilLwYO1zKuvST/XqtCGhPzvyisusRqR+y?= =?us-ascii?Q?e1NUvp1Yut6CfvYdm040idi1SD9cbDWKY7DgnzMmHto4To5dHgUAIXHaCloC?= =?us-ascii?Q?sFWR93zV44dQhqb31xAnlm0c0bTEq2KvX++O7bLO4acXpu52w9MNDSqI78C0?= =?us-ascii?Q?u4ZUem25ElwBc/IMG9DA3qlCNEJku3yOu2rxtUpaaTA7V3z88ZNwfwX3Qxx/?= =?us-ascii?Q?HFlPEfrzib3co5uRBydGPIDYeslmXtUiAI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1FM7wfjM2Oh3oJ07al7eELNS/dRGfvgNPhNEK2YQuUw1HVMx0cS4YyXBgbHW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2017 20:41:35.4513 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1874279d-ff66-4c3f-13a6-08d54e336417 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3458 Subject: Re: [dpdk-dev] [PATCH] examples/l2fwd: increase pktmbuf pool size 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, 28 Dec 2017 20:41:39 -0000 On Thu, Dec 28, 2017 at 12:36:42PM -0800, Stephen Hemminger wrote: > On Fri, 29 Dec 2017 01:49:06 +0530 > Pavan Nikhilesh wrote: > > > +/* > > + * This expression is used to calculate the number of mbufs needed > > + * depending on user input, taking into account memory for rx and > > + * tx hardware rings, cache per lcore and mbuf pkt burst per port > > + * per lcore. RTE_MAX is used to ensure that NB_MBUF never goes below > > + * a minimum value of 8192 > > + */ > > +#define NB_MBUF RTE_MAX(\ > > + nb_ports * (nb_rxd + nb_txd + MAX_PKT_BURST +\ > > + nb_lcores * MEMPOOL_CACHE_SIZE), (unsigned int)8192) > > Why not put this inplace where it is used, rather than keeping > the define? Also good practice with macros is to not have the > macro depend on variables that are in context at that point. Currently, l3fwd is doing the same thing with macros but I do agree it would be clean using it inplace will modify in next version. > > You also don't need a cast of (unsigned int)8192, use 8192u instead Thanks for the heads up will remove the cast in next version. Pavan.