From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0046.outbound.protection.outlook.com [104.47.32.46]) by dpdk.org (Postfix) with ESMTP id 9EF231B015 for ; Wed, 10 Jan 2018 12:11:19 +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=eEJfdRR5GGkTFC+7mwnipYRZgZDAMXhrCWzEFyIdzto=; b=laKdL7Ote8vWMBkMyREpugBIwPDQAUYODb4LpBrKWdoYBoc5hfboUizQAIwWN3pkLw4tRFgzHk8Rg8XrUZYQGKwfi53mne+MoxiZzA0GeOUFrtFLAhQp0kKX/xY+Xec/PTAQUpkJ920gHr9JEhWhjD4O0rDhr4SZb9V0dCrACxQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by MWHPR07MB3469.namprd07.prod.outlook.com (10.164.192.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Wed, 10 Jan 2018 11:11:15 +0000 From: Pavan Nikhilesh To: gage.eads@intel.com, jerin.jacobkollanukkaran@cavium.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, liang.j.ma@intel.com, santosh.shukla@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 10 Jan 2018 16:40:11 +0530 Message-Id: <20180110111013.14644-13-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180110111013.14644-1-pbhagavatula@caviumnetworks.com> References: <20171207203705.25020-1-pbhagavatula@caviumnetworks.com> <20180110111013.14644-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: CY4PR1701CA0010.namprd17.prod.outlook.com (10.171.208.20) To MWHPR07MB3469.namprd07.prod.outlook.com (10.164.192.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 63aa5de7-b7fe-4ff0-b1d7-08d5581adf54 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:MWHPR07MB3469; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3469; 3:exAwfCWPITzNgnTz2S7Rr5G4SjyTe/RgW5vBUvWpqI3zwT+2weV+ZcrBC2O66fyQeawfsSC0NqMwlZ25yRzpbebT8jwgeIb2qGgnqwUsGpcAcivyNFuFXvJdgwzk1HjYIWfzoWiDiq9Zfe/qf84GiUO2btU+I5xbqSDNA00++/r1sHf6X1BRHEUXloBCAwvp3Yb/wMF1eJ8ogJqMxqaFEkXqw8e+Sx9dAjs36l7NNDVFyptxVk3m3n897PciOWZ/; 25:AHOouDrSq8Bs8VIChqLFBFEhF13cqve/4jxJN2y9UrX5pQWZzQFrvJ++PBXsOqZvACQX1POl32mJQdEQumwcb8TtGxj5IFEXokOnPeb7Sh/c6Ye6B9CjjaMlAKucUCn+hzVNR2zfcsf5iQTPiTH8td9j3zExyQCzO2DQeYcAKGS74xmbL9znlvTwc5Qc9+6FNc0dTBh/CeC0pYeCQQj1d+Q/D//uV0766ce0yisIZEGW3gwUEETpVGgwMDtBCxLP7v0aKKMm4vaDeuKzHwuMjKJvr+APdWNpmdlDxPLToH1whl7XlcMw89WvFYngHdUhMMuhNgiYyAbUNC/aEYYG7A==; 31:7ARVz3gPKYN0MSh9ggW/bBrunsUEsiXRaZ8Dc+h0fqAZpqFR0JwdebC8OWKVB5TrUcWgVAEgQeguWGRUbTsSYmY9f4K/7MHhcXNG07l0Si4hSUswKetUp6wYQrM6+5XRQC+5TpRT0Io49Ag2XlUSowlT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-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(3002001)(93006095)(10201501046)(3231023)(944501075)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011); SRVR:MWHPR07MB3469; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:MWHPR07MB3469; X-Forefront-PRVS: 0548586081 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39380400002)(376002)(346002)(396003)(39860400002)(199004)(189003)(4326008)(8656006)(81156014)(316002)(81166006)(5009440100003)(53416004)(50466002)(50226002)(16586007)(8936002)(16526018)(47776003)(68736007)(66066001)(48376002)(36756003)(69596002)(25786009)(107886003)(42882006)(2950100002)(106356001)(5660300001)(51416003)(52116002)(386003)(53936002)(6636002)(6666003)(105586002)(97736004)(305945005)(7736002)(8676002)(6116002)(3846002)(2906002)(478600001)(72206003)(6512007)(76176011)(6486002)(6506007)(1076002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3469; H:Pavan-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; MWHPR07MB3469; 23:R2/F4lU5rwZRFaM0Kd0VeLEhOpWw2j0I0Y93o85HW?= =?us-ascii?Q?0r+r65hslnrlkXJ24HXMduOLtsjwHbGYstxeXMSDlLkOUPeHs9Onc5P0/4Z0?= =?us-ascii?Q?PLQDQsaVg4/umg/rj+pTFaRWdX7yIpcsq4tsQ5m0qnXvmZ3wOSjEFvy/qeRk?= =?us-ascii?Q?b6WtMFu/LtakclaYEgwGvkfVd3PJakZJ6F8fJu3nngXM2nU4oW9tFOu3UQVl?= =?us-ascii?Q?7Bo28ZCy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mCx2jW1ZT99+MOdKtlOKsJjdcZxYyQgXOG4IgKsf4LcVudhb0eEM9wcPDkqQKGn9BE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 11:11:15.6119 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63aa5de7-b7fe-4ff0-b1d7-08d5581adf54 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3469 Subject: [dpdk-dev] [PATCH v2 13/15] examples/eventdev: add mempool size configuration 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: Wed, 10 Jan 2018 11:11:20 -0000 Add option to configure the mempool size at run time instead of hardcoding it to 16384 * num_ports. Signed-off-by: Pavan Nikhilesh --- examples/eventdev_pipeline_sw_pmd/main.c | 12 ++++++++++-- examples/eventdev_pipeline_sw_pmd/pipeline_common.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/examples/eventdev_pipeline_sw_pmd/main.c b/examples/eventdev_pipeline_sw_pmd/main.c index 2c7b02b86..bf2a04edb 100644 --- a/examples/eventdev_pipeline_sw_pmd/main.c +++ b/examples/eventdev_pipeline_sw_pmd/main.c @@ -144,6 +144,7 @@ static struct option long_options[] = { {"sched-mask", required_argument, 0, 'e'}, {"cq-depth", required_argument, 0, 'c'}, {"work-cycles", required_argument, 0, 'W'}, + {"mempool-size", required_argument, 0, 'm'}, {"queue-priority", no_argument, 0, 'P'}, {"parallel", no_argument, 0, 'p'}, {"ordered", no_argument, 0, 'o'}, @@ -173,6 +174,7 @@ usage(void) " -p, --parallel Use parallel scheduling\n" " -q, --quiet Minimize printed output\n" " -a, --use-atq Use all type queues\n" + " -m, --mempool-size=N Dictate the mempool size\n" " -D, --dump Print detailed statistics before exit" "\n"; fprintf(stderr, "%s", usage_str); @@ -193,7 +195,7 @@ parse_app_args(int argc, char **argv) int i; for (;;) { - c = getopt_long(argc, argv, "r:t:e:c:w:n:f:s:paoPqDW:", + c = getopt_long(argc, argv, "r:t:e:c:w:n:f:s:m:paoPqDW:", long_options, &option_index); if (c == -1) break; @@ -253,6 +255,9 @@ parse_app_args(int argc, char **argv) popcnt = __builtin_popcountll(sched_lcore_mask); fdata->sched_single = (popcnt == 1); break; + case 'm': + cdata.num_mbuf = (uint64_t)atol(optarg); + break; default: usage(); } @@ -356,8 +361,11 @@ init_ports(unsigned int num_ports) uint8_t portid; unsigned int i; + if (!cdata.num_mbuf) + cdata.num_mbuf = 16384 * num_ports; + struct rte_mempool *mp = rte_pktmbuf_pool_create("packet_pool", - /* mbufs */ 16384 * num_ports, + /* mbufs */ cdata.num_mbuf, /* cache_size */ 512, /* priv_size*/ 0, /* data_room_size */ RTE_MBUF_DEFAULT_BUF_SIZE, diff --git a/examples/eventdev_pipeline_sw_pmd/pipeline_common.h b/examples/eventdev_pipeline_sw_pmd/pipeline_common.h index 66553038c..9703396f8 100644 --- a/examples/eventdev_pipeline_sw_pmd/pipeline_common.h +++ b/examples/eventdev_pipeline_sw_pmd/pipeline_common.h @@ -70,6 +70,7 @@ struct config_data { unsigned int active_cores; unsigned int num_workers; int64_t num_packets; + uint64_t num_mbuf; unsigned int num_fids; int queue_type; int worker_cycles; -- 2.15.1