From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id EF142A0096 for ; Mon, 3 Jun 2019 18:53:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5300D1B9DF; Mon, 3 Jun 2019 18:51:31 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 81AFA1B964 for ; Mon, 3 Jun 2019 18:51:28 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x53GdvXm031510; Mon, 3 Jun 2019 09:51:27 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=rUJtwQLese5RnBeXMb6qs399MnHwHGa/xJefXAcC49Y=; b=ocppLPWFNKFO4dLMk7v+7oPgK4TqF1+sAuv2Xd00qn+POSycbyo5hWy80Z0BPhoNzg1j sT92Ym28HglBOCiTLiEEe8VD7c00HcN9Ddi0iUF1LFd3fJkwj50OX/UbZqU35LSqHBI8 cSW/HNyn7AEEpN8eY/AtAlL6w8mRZG15XNUdfI/Eju+gBGLHYy2H8WxIXIx+Yfusl7KW kHNSNCrYMfVEHGCLVq0I/AfgsuTxJ8mF11fFtg1IYDI9db0+ERylWfZTRYkmdaGMUHj5 6QsPLDP509yxWcq4eDXJfhORFKBsQGl/hfiSYoenFqyY3660sGRK6myJmqKbzYoF3HwH ag== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2sw2wmh74x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2019 09:51:27 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 3 Jun 2019 09:51:26 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 3 Jun 2019 09:51:25 -0700 Received: from ajoseph83.caveonetworks.com.com (unknown [10.29.45.56]) by maili.marvell.com (Postfix) with ESMTP id 0358E3F703F; Mon, 3 Jun 2019 09:51:20 -0700 (PDT) From: Anoob Joseph To: Jerin Jacob , Nikhil Rao , "Erik Gabriel Carrillo" , Abhinandan Gujjar , Bruce Richardson , Pablo de Lara CC: Narayana Prasad , , Lukasz Bartosik , Pavan Nikhilesh , "Hemant Agrawal" , Nipun Gupta , "Harry van Haaren" , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , Liang Ma , "Anoob Joseph" Date: Mon, 3 Jun 2019 22:19:23 +0530 Message-ID: <1559580584-5728-19-git-send-email-anoobj@marvell.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559580584-5728-1-git-send-email-anoobj@marvell.com> References: <1559580584-5728-1-git-send-email-anoobj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-03_13:, , signatures=0 Subject: [dpdk-dev] [PATCH 18/39] 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Adding eventmode conf which would have all required configuration for the event mode. Signed-off-by: Anoob Joseph Signed-off-by: Lukasz Bartosik --- 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 dc2c934..38f1a2b 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 7af7758..2ee7711 100644 --- a/lib/librte_eventdev/rte_eventmode_helper_internal.h +++ b/lib/librte_eventdev/rte_eventmode_helper_internal.h @@ -32,4 +32,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