From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0048.outbound.protection.outlook.com [104.47.42.48]) by dpdk.org (Postfix) with ESMTP id 258CB1D004 for ; Fri, 8 Jun 2018 19:25:18 +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=4iDieXkkqb5OOk3DExOUd3xXXucT15gusIyQY+RHFdQ=; b=o2Z9sAY9YIDpXPqmWzczvwnyn9x6CsFEy+dOg3NPHazQaycOVdVVuZYOcGXoS9RBNYgPLqFxoK/1UJikc2v3xx5CMzTuPNXlaAf2UDvsAejTBaVHg2617meXBOVauOdOAmeahK6bxGZp8rOdXKmYYnfgIOPgfrj+m46Aui50PSg= 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 DM6PR07MB4906.namprd07.prod.outlook.com (2603:10b6:5:a3::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.841.17; Fri, 8 Jun 2018 17:25:13 +0000 From: Anoob Joseph To: Bruce Richardson , Jerin Jacob , Pablo de Lara Cc: Anoob Joseph , Hemant Agrawal , Narayana Prasad , Nikhil Rao , Pavan Nikhilesh , Sunil Kumar Kori , dev@dpdk.org Date: Fri, 8 Jun 2018 22:54:04 +0530 Message-Id: <1528478659-15859-6-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1528478659-15859-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1528478659-15859-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: BM1PR0101CA0050.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::12) To DM6PR07MB4906.namprd07.prod.outlook.com (2603:10b6:5:a3::11) 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:DM6PR07MB4906; X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 3:evGEP6vT8LJVImWCyFq+CI0xPlaWt8N1tkOt+eychrPCQJ0YpmOtGQMKjNd/fH9zZddHx7w67yYFkNPBHHy9QnyhL1g96YCk3vvOcNo2XxGZjXQYdBiAa/AkCIAQW64yS3/mt/bAOa0/6D4T0b9MPbTXW7WHmE+ztxv2KDeXJowmpH4JXkOOnsWr10wkBOalaWJpooP0csiBfYNBcy8A4g8Abaq5HIgVFwWCojiDf5CtL/E7D3veL3QWBsGj0NKg; 25:JA00JZd6gMirogh8J2JuJJ87qdnVG/sLlkznvlkZe/g6wsv3bDiZF9SJth3hqmc4YUDzpFWStMB4J6cEYS6MDia4n1AdZLnT+bDVHNJYC1fdiUIWAXfJ/Z1oXuk5XvHYjE1nmFqJ4A4w43zdOa0nOxcmmDmcwtTP+syy9Ds7XYfSjCZIWa/gA7BdaXWg7OkGMEPRsQ0GDkvKa4PUVK/vOfXRQvKD2gu2gPA5jtFhuBZrWh5nBXGnmOAeTQUNZFBvn13rnDuIDptub9khqHuwMJfOBNLz5V8vkegViBu9Bhk3wiDdEiOng2/rn/9XKr3triOVhwHrRAvVoQI5pMp5zQ==; 31:VtdyNSHEnq2ukqYaLW057CCkkslQ5xFplEshZNkP2/T2R1qC/Q4+IeofcUbUPoyD1SO6bUiB7It/aD0y6IAtn04mJSlpknKSFmo+6PF2/j/9ypW7JmlPgDu3je9nLkfFKv/i8M8sZFbnZpHMsCWVo8VPjCpscssoZqfrE8lXef+z9/YTbqsr0H3UT8OegPILT3touD5cr05naMKYOXhV56vTXioisUJZlRlP5zYiFbA= X-MS-TrafficTypeDiagnostic: DM6PR07MB4906: X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 20:2Pwfh0GiVdHqegZE/C0fWZNolf2cB5+ulDA0+2JXoivtZMNs63sZdKa9wtSiLG+x0d8UrbHpo+wNPHKInG74+t5+D4Jo8q3MgkLHjtDDEYX6pRVReOoNpe7kw5gUJZeV3QHsVA/SgQRENfakILGr+8QZRNIKwAs8e9o/50pshwR5dErgZ3m0HBhCKTmRkR8La9G8YVr/2UpNGkh/vaC2B+6k7QDE28eL3VuGQCXi9MiuFXGiEhDpb5/KIUwTrzAGWmK6FNZ5TF/rEYDn+6H259m/h4V0iD5Y+VMjYotPf4jA0Yrlyo6LBWJFTA4y+knMoD3L/IrDEtR1wuaLkD/4T4AscWEfu0oI3+QJGQn+R/HdrLNebi8LKYsdiattsAS9fMN0YNkJlrUuJP3J5MIJg9f8g/Bta5pWLc7KqdgL6fmhrw6sZRoihSxB4IzQB2jxwVPg+MT8ybkwTdL7JJDJRgcu0S8CcrCPQuewGoW1tnkxlGP1sHkuhQZLaHjTuXFA5vx26zpGEFcLllmlVo6Zcn2Nl8anpU+lghtHI9PS3IklTQGOGaCyswXPX57LKhg7fVMejAKHAzC2+G8b/wKgtMF1FZEbAbIY0sgQcV+f5S0=; 4:3aBSgESZzb3q+jrH+DhWdOnwDwInKOemwB+aZ5cBgKS7r4D3ma1U8tAhblFi0AzdGyshUu8+/EMoZ2R4C2eI8Grb09BXolEUNlYJZGDvoiIILS0QoDPOLpqAcnTyvNXBvt3DEAyCcBbLfk3rP/nyuZ0lcdLUYBtxKBZ14OA59IZuR30vuu6J9xYIE3/736IeWpQyEYbeqYcy2DRw62AAilbhJjHJo01DGNtW4VtK8kh4KqGIGvZQuTaUogD4x77LWJmCSv2WMnDlSUrbYS8SEA== 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)(93006095)(3231254)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:DM6PR07MB4906; BCL:0; PCL:0; RULEID:; SRVR:DM6PR07MB4906; X-Forefront-PRVS: 06973FFAD3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(366004)(376002)(396003)(39380400002)(189003)(199004)(186003)(16526019)(5660300001)(26005)(42882007)(55236004)(66066001)(47776003)(68736007)(6666003)(305945005)(2906002)(8676002)(7736002)(8936002)(36756003)(52116002)(2616005)(956004)(476003)(446003)(50226002)(81166006)(11346002)(44832011)(6506007)(386003)(486006)(76176011)(51416003)(48376002)(50466002)(97736004)(316002)(6512007)(25786009)(53936002)(6486002)(81156014)(4326008)(3846002)(6116002)(16586007)(54906003)(110136005)(105586002)(106356001)(72206003)(478600001)(8656006); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR07MB4906; 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; DM6PR07MB4906; 23:d2/1NEk0xAAz2n5OHYtZqhQ7bnSZM2UqhsFF8FSMJ?= =?us-ascii?Q?crwv9aEObzMimsRO4rKW0gOUJ2XLh1WfhiFZMNCjjBSbOr4RGSQt2Nd8H+UY?= =?us-ascii?Q?svzfH/0w7+Nrf7PPknnhNARnoG9siQUm3fb36Mq7Vmf4XYmaxRJW4IqOgHxK?= =?us-ascii?Q?3E5g/NeHS52haZepMA+DYve+2C+7kN9/ulbEwJdFxZcyZz1xu6h3fbd6PsoI?= =?us-ascii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JQFx5ojPJfds+4vEB9J08m68NU1NEukZ2MOrzC1EebKD93S1HylYiF7640J5bMZrzGY1X+xSE=; 24:zzjlH95gDPs+bteb8oBG4eLD3FkOAj29TZbh/1KMx68edHGdQ9CsHXj+ixxRWixA8cn3eKIqwLeDL1SFy5oDm+4cwwKpOxbULTf+FLnepW8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM6PR07MB4906; 7:J2u7seBivzwoiaOjfxV/BPL0J8VQ5fIUOZejgC4SCiDh778s+6gLWOzR6cYiyEMUit28aIamNKp8ljNCcGk7osez7KT2f8+a6o/Ljtnmgm43mi5gqJ7/Pmtovp9dj8JcieIK9eqP2pqDqhywmHFLVly8GueOv9VcqW2Keql1C9Xp/iqn4l5Pdra5IW8y/NDGIYhe+xXX7H4b9hblgIz/VyilZgl1DpXvGO8+qU7nF9Y28AF7/mRLQnYjMWQ21XrG X-MS-Office365-Filtering-Correlation-Id: 0e12c2f4-9f84-45ac-ccfd-08d5cd64cd54 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2018 17:25:13.9978 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e12c2f4-9f84-45ac-ccfd-08d5cd64cd54 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR07MB4906 Subject: [dpdk-dev] [PATCH 05/20] eventdev: add framework for eventmode conf 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:25:18 -0000 Adding eventmode conf which would have all required configuration for the event mode. Signed-off-by: Anoob Joseph --- lib/librte_eventdev/rte_eventmode_helper.c | 16 ++++++++++++++++ lib/librte_eventdev/rte_eventmode_helper_internal.h | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/lib/librte_eventdev/rte_eventmode_helper.c b/lib/librte_eventdev/rte_eventmode_helper.c index 9282682..ec014a6 100644 --- a/lib/librte_eventdev/rte_eventmode_helper.c +++ b/lib/librte_eventdev/rte_eventmode_helper.c @@ -97,6 +97,7 @@ rte_eventmode_helper_parse_args(int argc, char **argv) { int32_t opt, ret; struct rte_eventmode_helper_conf *conf = NULL; + struct eventmode_conf *em_conf = NULL; /* Allocate memory for conf */ conf = rte_zmalloc("eventmode-helper-conf", @@ -108,9 +109,21 @@ rte_eventmode_helper_parse_args(int argc, char **argv) goto err; } + /* Allocate memory for event mode params */ + conf->mode_params = rte_zmalloc("eventmode-helper-mode-params", + sizeof(struct eventmode_conf), + RTE_CACHE_LINE_SIZE); + if (conf->mode_params == NULL) { + RTE_EM_HLPR_LOG_ERR( + "Failed allocating memory for event mode params"); + goto err; + } + /* Initialize conf with default values */ em_initialize_helper_conf(conf); + em_conf = (struct eventmode_conf *)(conf->mode_params); + while ((opt = getopt_long(argc, argv, short_options, lgopts, NULL)) != EOF) { switch (opt) { @@ -131,6 +144,9 @@ rte_eventmode_helper_parse_args(int argc, char **argv) return conf; err: + if (em_conf != NULL) + rte_free(em_conf); + if (conf != NULL) rte_free(conf); diff --git a/lib/librte_eventdev/rte_eventmode_helper_internal.h b/lib/librte_eventdev/rte_eventmode_helper_internal.h index e946f11..134ddd3 100644 --- a/lib/librte_eventdev/rte_eventmode_helper_internal.h +++ b/lib/librte_eventdev/rte_eventmode_helper_internal.h @@ -27,4 +27,9 @@ #define RTE_EM_HLPR_LOG_DEBUG(...) (void)0 #endif +/* Eventmode conf data */ +struct eventmode_conf { + uint64_t dummy; +}; + #endif /* _RTE_EVENTMODE_HELPER_INTERNAL_H_ */ -- 2.7.4