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 BDF3BA09E7; Wed, 19 Oct 2022 18:54:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 31A5E42C2C; Wed, 19 Oct 2022 18:54:36 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 3AB6742C1B for ; Wed, 19 Oct 2022 18:54:32 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29J8AnTY010348; Wed, 19 Oct 2022 09:54:31 -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=pfpt0220; bh=V8wLROkFNnAhi2G4dfEn2TuMwE+AFLaJ3banPCPLokc=; b=CZZdsyqP05bqPIm5sdidPg98IA4b/bQyTAELjZ61k6L5tKqhLAxHtx2FlzTKTkEV0NBB UcLomFvsoJEKXVl7K7NZH7v4bZNVtjKfHSnFEodKIPsXyfbg+zMW7KS2knOpQhD93EeT B/HmR4WJ2KysdEzRMCDJSLeZL2GW5ZmNBo3giFC4YvzMF5S36pHwR+SiaHj2JlsVHjtX LykTB1YhKfSex5Nmr8RfzyJGp6+WOWo5na4tsSkP9cb+uima4bauZfGDR6Y0OlPdQ/ky SHtdY7i3zrJcWjRnc/a3lVFqqrV1X+KH5CizEWkbseA2fhsEZ+tCKwXWIZDn/plMV4Wf ng== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3kadg5a7bn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 19 Oct 2022 09:54:31 -0700 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; Wed, 19 Oct 2022 09:54:29 -0700 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; Wed, 19 Oct 2022 09:54:29 -0700 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id ADBD13F709C; Wed, 19 Oct 2022 09:54:27 -0700 (PDT) From: Tejasree Kondoj To: Akhil Goyal , Fan Zhang , Ciara Power CC: Vidya Sagar Velumuri , Anoob Joseph , Subject: [PATCH 3/6] test/security: update antireplay unit test for event mode Date: Wed, 19 Oct 2022 22:24:15 +0530 Message-ID: <20221019165418.1970445-4-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221019165418.1970445-1-ktejasree@marvell.com> References: <20221019165418.1970445-1-ktejasree@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: NeBkOpTqPbL0TVGXU-Joz29DUZTR5lqE X-Proofpoint-ORIG-GUID: NeBkOpTqPbL0TVGXU-Joz29DUZTR5lqE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-19_09,2022-10-19_04,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Vidya Sagar Velumuri With event mode is enabled, send and receive packets via event dev Signed-off-by: Vidya Sagar Velumuri --- app/test/test_security_inline_proto.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c index feef54f538..700ed3844b 100644 --- a/app/test/test_security_inline_proto.c +++ b/app/test/test_security_inline_proto.c @@ -1378,8 +1378,13 @@ test_ipsec_inline_proto_process_with_esn(struct ipsec_test_data td[], tx_pkt, NULL); tx_pkt->ol_flags |= RTE_MBUF_F_TX_SEC_OFFLOAD; } + /* Send packet to ethdev for inline IPsec processing. */ - nb_sent = rte_eth_tx_burst(port_id, 0, &tx_pkt, 1); + if (event_mode_enabled) + nb_sent = event_tx_burst(&tx_pkt, 1); + else + nb_sent = rte_eth_tx_burst(port_id, 0, &tx_pkt, 1); + if (nb_sent != 1) { printf("\nUnable to TX packets"); rte_pktmbuf_free(tx_pkt); @@ -1390,11 +1395,14 @@ test_ipsec_inline_proto_process_with_esn(struct ipsec_test_data td[], rte_pause(); /* Receive back packet on loopback interface. */ - do { - rte_delay_ms(1); - nb_rx = rte_eth_rx_burst(port_id, 0, &rx_pkt, 1); - } while (nb_rx == 0); - + if (event_mode_enabled) + nb_rx = event_rx_burst(&rx_pkt, nb_sent); + else { + do { + rte_delay_ms(1); + nb_rx = rte_eth_rx_burst(port_id, 0, &rx_pkt, 1); + } while (nb_rx == 0); + } rte_pktmbuf_adj(rx_pkt, RTE_ETHER_HDR_LEN); if (res_d != NULL) -- 2.25.1