From patchwork Fri Oct 21 07:26:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejasree Kondoj X-Patchwork-Id: 118893 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BB01BA0032; Fri, 21 Oct 2022 09:27:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E52A42BB6; Fri, 21 Oct 2022 09:27:30 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 5202342B8A for ; Fri, 21 Oct 2022 09:27:26 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29L1fGCG009605; Fri, 21 Oct 2022 00:27:25 -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=kiyeEEAYJs6rdVXnRP0FO5npotAN6cvH6nL+8Lf0atENoTVKkhD4iw5k2qkzI92dLRgK YUp4P77pVKrH2P3c5MO3nXZL++YxX1dHJCBhJhFh/NugbuXF0Q83OcEcS0/GvJH/W5Jo kOG1SjZ3o297q1c3jQa+nphbVPn4nlpe5u+/6S93wKiNxDz+zNCXfLQzcgw13PqDRtdZ EX79oIazZBTNz7JQfb9U0xyKnfNH/HdDwOhEuSwoB8jvrVuPjzNFVTUZXvHV/6khaKjf smUtjSMs5uzcP5ZwwKEqm6fKKEJopmf89ukVzJaERIiA+ziCYQe83XlYtAZUaeqNvx3k uw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3kb125d6gh-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 21 Oct 2022 00:27:25 -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; Fri, 21 Oct 2022 00:27:23 -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; Fri, 21 Oct 2022 00:27:23 -0700 Received: from hyd1554.marvell.com (unknown [10.29.57.11]) by maili.marvell.com (Postfix) with ESMTP id 283F25B6994; Fri, 21 Oct 2022 00:27:01 -0700 (PDT) From: Tejasree Kondoj To: Akhil Goyal , Fan Zhang , Ciara Power CC: Vidya Sagar Velumuri , Anoob Joseph , Subject: [PATCH v2 3/6] test/security: update antireplay unit test for event mode Date: Fri, 21 Oct 2022 12:56:48 +0530 Message-ID: <20221021072651.1985340-4-ktejasree@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221021072651.1985340-1-ktejasree@marvell.com> References: <20221021072651.1985340-1-ktejasree@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: mwI3K0EKVm8BcSDPvOXRbDB30XQgKx03 X-Proofpoint-ORIG-GUID: mwI3K0EKVm8BcSDPvOXRbDB30XQgKx03 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-21_03,2022-10-20_01,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)