From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Dharmappa, Savinay" <savinay.dharmappa@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "Iremonger, Bernard" <bernard.iremonger@intel.com>,
"akhil.goyal@nxp.com" <akhil.goyal@nxp.com>
Subject: Re: [dpdk-dev] [PATCH v2] app: test: measure libipsec performance
Date: Tue, 3 Mar 2020 15:34:52 +0000 [thread overview]
Message-ID: <SN6PR11MB2558E6833357D03C33EE62189AE40@SN6PR11MB2558.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20200302114319.3886-1-savinay.dharmappa@intel.com>
Hi Savinay,
> +static int
> +testsuite_setup(void)
> +{
> + struct rte_mbuf *mbuf[NUM_MBUF];
> + int ret, i;
> +
> + mbuf_pool = rte_pktmbuf_pool_create("IPSEC_PERF_MBUFPOOL",
> + NUM_MBUFS, MBUF_CACHE_SIZE, 0, MBUF_SIZE,
> + rte_socket_id());
> + if (mbuf_pool == NULL) {
> + RTE_LOG(ERR, USER1, "Can't create MBUFPOOL\n");
> + return TEST_FAILED;
> + }
> +
> + cop_pool = rte_crypto_op_pool_create(
> + "MBUF_CRYPTO_SYM_OP_POOL",
> + RTE_CRYPTO_OP_TYPE_SYMMETRIC,
> + NUM_MBUFS, MBUF_CACHE_SIZE,
> + DEFAULT_NUM_XFORMS *
> + sizeof(struct rte_crypto_sym_xform) +
> + MAXIMUM_IV_LENGTH,
> + rte_socket_id());
> + if (cop_pool == NULL) {
> + RTE_LOG(ERR, USER1, "Can't create CRYPTO_OP_POOL\n");
> + return TEST_FAILED;
> + }
> +
> + ring_inb_prepare = rte_ring_create("ring0", RING_SIZE,
> + SOCKET_ID_ANY, 0);
> + if (ring_inb_prepare == NULL)
> + return TEST_FAILED;
> +
> + ring_inb_process = rte_ring_create("ring1", RING_SIZE,
> + SOCKET_ID_ANY, 0);
> + if (ring_inb_process == NULL)
> + return TEST_FAILED;
> +
> + ring_outb_prepare = rte_ring_create("ring2", RING_SIZE,
> + SOCKET_ID_ANY, 0);
> + if (ring_outb_prepare == NULL)
> + return TEST_FAILED;
> +
> + ring_outb_process = rte_ring_create("ring3", RING_SIZE,
> + SOCKET_ID_ANY, 0);
> + if (ring_outb_process == NULL)
> + return TEST_FAILED;
> +
> + for (i = 0; i < NUM_MBUF; i++)
> + mbuf[i] = generate_mbuf_data(mbuf_pool);
> +
I think enqueue below could be moved to the loop above,
so don't need to allocate mbuf[NUM_MBUF] at stack.
struct rte_mbuf *mbuf;
...
for (i = 0; i < NUM_MBUF; i++) {
mbuf = generate_mbuf_data(mbuf_pool);
if (mbuf == NULL && rte_ring_sp_enqueue_bulk(ring_inb_prepare,
(void **)mbuf, 1) == 0)
break;
}
If (i != NUM_BUF)
return TEST_FAILED;
> + ret = rte_ring_sp_enqueue_bulk(ring_inb_prepare, (void **)mbuf,
> + NUM_MBUF, NULL);
> + if (ret == 0)
> + return TEST_FAILED;
> +
> + return TEST_SUCCESS;
> +}
> +
next prev parent reply other threads:[~2020-03-03 15:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 10:53 [dpdk-dev] [PATCH v1] " Savinay Dharmappa
2020-03-02 11:43 ` [dpdk-dev] [PATCH v2] " Savinay Dharmappa
2020-03-02 12:51 ` David Marchand
2020-03-02 14:40 ` Medvedkin, Vladimir
2020-03-03 15:34 ` Ananyev, Konstantin [this message]
2020-03-05 7:15 ` [dpdk-dev] [PATCH v3] " Savinay Dharmappa
2020-03-05 11:45 ` Ananyev, Konstantin
2020-03-05 17:11 ` Thomas Monjalon
2020-03-05 22:51 ` Ananyev, Konstantin
2020-03-06 8:58 ` Thomas Monjalon
2020-03-10 13:24 ` Ananyev, Konstantin
2020-03-10 20:14 ` Thomas Monjalon
2020-03-06 7:08 ` [dpdk-dev] [PATCH v4] test/ipsec: " Savinay Dharmappa
2020-04-19 21:43 ` Akhil Goyal
2020-04-21 2:29 ` Thomas Monjalon
2020-04-21 2:35 ` Thomas Monjalon
2020-04-21 10:21 ` Ananyev, Konstantin
2020-04-21 10:28 ` Thomas Monjalon
2020-04-21 11:07 ` Ananyev, Konstantin
2020-04-21 11:49 ` Thomas Monjalon
2020-04-21 12:04 ` Ananyev, Konstantin
2020-04-21 12:58 ` Thomas Monjalon
2020-04-23 15:25 ` [dpdk-dev] [PATCH v5] " Savinay Dharmappa
2020-04-24 10:06 ` Ananyev, Konstantin
2020-05-09 21:46 ` Akhil Goyal
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=SN6PR11MB2558E6833357D03C33EE62189AE40@SN6PR11MB2558.namprd11.prod.outlook.com \
--to=konstantin.ananyev@intel.com \
--cc=akhil.goyal@nxp.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=savinay.dharmappa@intel.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).