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 3318AA04A4 for ; Fri, 17 Dec 2021 13:45:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1FFBF40F35; Fri, 17 Dec 2021 13:45:09 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 43A7240040; Fri, 17 Dec 2021 13:45:07 +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 1BH3nQVQ015000; Fri, 17 Dec 2021 04:45:06 -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=UKiMWB7cMicIegMqpQj/dTs8O6xMoNtG750x0ixlG9Y=; b=PREEzZSDoG4iw66VZji+vRyJayJ3WJswEiYEbiXRGdo22EbsP4Y3N74AvtWtAWCKlsbx s9Gfy2DlYp/wQJNXOySxEExdWaDaNbvesUr3xta+TZK/9lPhPsK44zDdBHtFGuUdDT9I hzvI2/tQxYUCq6Nln0TmksaKjHahGSRHX2vxPFs/dQLcHrW2uCnRIA6jwkxfqArrgLfZ uHad8Jau0XkdUkc9TgIg6RDydDacULRxSZo/yOBZeP/psUA15RqeN4qld1NNiHx+Z1WM R1pMMmB5P83pjMrowZ4ob+0X7Lb8sKrgdHs6ZBGhXpTHTO9/FAz/erZn894tjEMVaUTq 5Q== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3d0b373emw-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 17 Dec 2021 04:45:06 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 17 Dec 2021 04:45:04 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 17 Dec 2021 04:45:04 -0800 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 370523F70A7; Fri, 17 Dec 2021 04:45:01 -0800 (PST) From: Nithin Dabilpuram To: Radu Nicolau , Akhil Goyal CC: , , Nithin Dabilpuram , , Subject: [PATCH] examples/ipsec-secgw: fix default flow rule creation Date: Fri, 17 Dec 2021 18:14:51 +0530 Message-ID: <20211217124451.7464-1-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: 15UVMwjXVp68WXmDZEUjc7oN2uGOmlwE X-Proofpoint-GUID: 15UVMwjXVp68WXmDZEUjc7oN2uGOmlwE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-17_04,2021-12-16_01,2021-12-02_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 Fix default flow rule to create after ethdev start to align wit RTE flow spec. Fixes: 513f192b5fd4 ("examples/ipsec-secgw: add default flow for inline Rx") Cc: adwivedi@marvell.com Cc: stable@dpdk.org Signed-off-by: Nithin Dabilpuram --- examples/ipsec-secgw/ipsec-secgw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index bf3dbf6..8e2aa46 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -3379,13 +3379,14 @@ main(int32_t argc, char **argv) if ((enabled_port_mask & (1 << portid)) == 0) continue; - /* Create flow before starting the device */ - create_default_ipsec_flow(portid, req_rx_offloads[portid]); - ret = rte_eth_dev_start(portid); if (ret < 0) rte_exit(EXIT_FAILURE, "rte_eth_dev_start: " "err=%d, port=%d\n", ret, portid); + + /* Create flow after starting the device */ + create_default_ipsec_flow(portid, req_rx_offloads[portid]); + /* * If enabled, put device in promiscuous mode. * This allows IO forwarding mode to forward packets -- 2.8.4