From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 127AFA0C41 for ; Thu, 2 Dec 2021 13:30:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04764426DB; Thu, 2 Dec 2021 13:30:55 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 75DA14067B; Thu, 2 Dec 2021 13:30:52 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1B28NmHi014864; Thu, 2 Dec 2021 04:30:51 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0220; bh=1AxKMzaPzPhD0FQAY5QM1ddgCZs8LfRyVfYMvXYMNZs=; b=c6a+t9RIO/nWD+G7QWbYcLLgOzPUjSXd3UjpKl+/mLA6wJTsTkUTDjjJ+8F7kDdSuR+T MGLxV15bX/rmAj4u2VWF2eGEvjOdvt1OfXkZAa2q/NqFetViLv/yxJWqY5BMfkKAzFTB UnANE9AWHpsBXpSu1o6fNckXOAHNL8/xE8hRBIYotYslErNVk7Vm4eF+FFZP3cty1Tf+ chhq9bsDLXf9XbGX5v+rzu+D3fQ+c2Um/Q1cP9ZcmZmGp61UzQu861oUH3PAIzuqjluN YLtARQWH54YbnsTBaGE5JuxU1gc1A+qqlFwoRxr6KgcSdNacyFeI3Ni3LGdhI7O//asF 1w== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3cpr521fdv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Dec 2021 04:30:51 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 2 Dec 2021 04:30:49 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 2 Dec 2021 04:30:49 -0800 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 274A33F7091; Thu, 2 Dec 2021 04:30:46 -0800 (PST) From: Nithin Dabilpuram To: Radu Nicolau , Akhil Goyal CC: , , Nithin Dabilpuram , , Subject: [PATCH] examples/ipsec-secgw: fix event dev start sequence Date: Thu, 2 Dec 2021 18:00:36 +0530 Message-ID: <20211202123036.2068-1-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: tLNWW3fdo8PaXGFDY_UlRvN_j8T6-9QU X-Proofpoint-ORIG-GUID: tLNWW3fdo8PaXGFDY_UlRvN_j8T6-9QU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-12-02_07,2021-12-02_01,2020-04-07_01 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Start eventdev after complete initialization of event dev, rx adapter and tx adapter. Fixes: e0b0e55c8f15 ("examples/ipsec-secgw: add framework for event helper") Cc: anoobj@marvell.com Cc: stable@dpdk.org Signed-off-by: Nithin Dabilpuram --- examples/ipsec-secgw/event_helper.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/examples/ipsec-secgw/event_helper.c b/examples/ipsec-secgw/event_helper.c index e8600f5..ab96773 100644 --- a/examples/ipsec-secgw/event_helper.c +++ b/examples/ipsec-secgw/event_helper.c @@ -716,6 +716,16 @@ eh_initialize_eventdev(struct eventmode_conf *em_conf) } } + return 0; +} + +static int +eh_start_eventdev(struct eventmode_conf *em_conf) +{ + struct eventdev_params *eventdev_config; + int nb_eventdev = em_conf->nb_eventdev; + int i, ret; + /* Start event devices */ for (i = 0; i < nb_eventdev; i++) { @@ -1688,6 +1698,13 @@ eh_devs_init(struct eh_conf *conf) return ret; } + /* Start eventdev */ + ret = eh_start_eventdev(em_conf); + if (ret < 0) { + EH_LOG_ERR("Failed to start event dev %d", ret); + return ret; + } + /* Start eth devices after setting up adapter */ RTE_ETH_FOREACH_DEV(port_id) { -- 2.8.4