From: Tejasree Kondoj <ktejasree@marvell.com>
To: Akhil Goyal <gakhil@marvell.com>,
Fan Zhang <royzhang1980@gmail.com>,
Ciara Power <ciara.power@intel.com>
Cc: Vidya Sagar Velumuri <vvelumuri@marvell.com>,
Anoob Joseph <anoobj@marvell.com>, <dev@dpdk.org>
Subject: [PATCH 3/6] test/security: update antireplay unit test for event mode
Date: Wed, 19 Oct 2022 22:24:15 +0530 [thread overview]
Message-ID: <20221019165418.1970445-4-ktejasree@marvell.com> (raw)
In-Reply-To: <20221019165418.1970445-1-ktejasree@marvell.com>
From: Vidya Sagar Velumuri <vvelumuri@marvell.com>
With event mode is enabled, send and receive packets via event dev
Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
---
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
next prev parent reply other threads:[~2022-10-19 16:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 16:54 [PATCH 0/6] update autotest with new algorithms Tejasree Kondoj
2022-10-19 16:54 ` [PATCH 1/6] test/security: add unit tests for DES and 3DES Tejasree Kondoj
2022-10-19 16:54 ` [PATCH 2/6] test/security: add unit tests for auth algo MD5 Tejasree Kondoj
2022-10-19 16:54 ` Tejasree Kondoj [this message]
2022-10-19 16:54 ` [PATCH 4/6] test/crypto: check antireply capability only for ingress Tejasree Kondoj
2022-10-19 16:54 ` [PATCH 5/6] test/crypto: add unit tests for DES and MD5 Tejasree Kondoj
2022-10-20 16:23 ` Akhil Goyal
2022-10-19 16:54 ` [PATCH 6/6] test/crypto: add unit test for custom UDP ports Tejasree Kondoj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221019165418.1970445-4-ktejasree@marvell.com \
--to=ktejasree@marvell.com \
--cc=anoobj@marvell.com \
--cc=ciara.power@intel.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=royzhang1980@gmail.com \
--cc=vvelumuri@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).