From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: Naga Suresh Somarowthu <naga.sureshx.somarowthu@intel.com>, dev@dpdk.org
Cc: remy.horton@intel.com, reshma.pattan@intel.com
Subject: Re: [dpdk-dev] [PATCH v5 4/4] test: add unit test for pdump library
Date: Tue, 24 Jul 2018 13:27:14 +0100 [thread overview]
Message-ID: <8017c659-e9d7-7d33-bdb8-2d0bef05a275@intel.com> (raw)
In-Reply-To: <1532429671-1606-5-git-send-email-naga.sureshx.somarowthu@intel.com>
On 24-Jul-18 11:54 AM, Naga Suresh Somarowthu wrote:
> Unit test cases are added for pdump library.
> Primary process will act as server, forks a child secondary process.
> Secondary process acts as client.
> Server will do pdump init to serve any pdump client requests.
> Server will create a vdev, send/receive packets continuously in a separate thread.
> Client will create virtual rings to receive the packet dump.
> Client sends pdump enable/disable requests using either port id or device id.
> Packet flow direction can be tx/rx/tx&rx.
> In Server, appropriate pdump callbacks are triggered when packets are transmitted/received.
> Pdump packet is copied to client rings.
>
> Signed-off-by: Naga Suresh Somarowthu <naga.sureshx.somarowthu@intel.com>
> Reviewed-by: Reshma Pattan <reshma.pattan@intel.com>
> ---
<snip>
> + char buf[PATH_MAX] = { 0 };
> +
> + /* get file for config (fd is always 3) */
> + snprintf(path, sizeof(path), "/proc/self/fd/%d", 3);
> +
> + /* return NULL on error */
> + if (readlink(path, buf, sizeof(buf)) == -1)
> + return NULL;
> +
> + /* get the basename */
> + snprintf(buf, sizeof(buf), "%s", basename(buf));
> +
> + /* copy string all the way from second char up to start of _config */
> + snprintf(prefix, size, "%.*s",
> + (int)(strnlen(buf, sizeof(buf)) - sizeof("_config")), &buf[1]);
> +
> + return prefix;
> +}
> +#endif
This will not work in 18.08, see http://patches.dpdk.org/patch/43102/
Can we perhaps make it a standard test-app function? It is already
duplicated in two places, this will make it third.
> +
> +int
> +test_pdump_init(void)
> +{
> + int ret = 0;
> +
> + ret = rte_pdump_init(NULL);
> + if (ret < 0) {
> + printf("rte_pdump_init failed\n");
> + return -1;
> + }
> + ret = test_ring_setup(ring_server, &portid);
> + if (ret < 0) {
> + printf("test_ring_setup failed\n");
> + return -1;
> + }
> + printf("pdump_init success\n");
> + return ret;
> +}
--
Thanks,
Anatoly
next prev parent reply other threads:[~2018-07-24 12:27 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-06 17:07 [dpdk-dev] [PATCH] add sample functions for packet forwarding Jananee Parthasarathy
2018-07-10 9:53 ` Pattan, Reshma
2018-07-12 8:53 ` [dpdk-dev] [PATCH v2] " Jananee Parthasarathy
2018-07-12 16:00 ` Pattan, Reshma
2018-07-16 16:00 ` [dpdk-dev] [PATCH v3] test: " Jananee Parthasarathy
2018-07-17 8:15 ` Pattan, Reshma
2018-07-17 10:00 ` [dpdk-dev] [PATCH v4] " Jananee Parthasarathy
2018-07-17 10:22 ` Burakov, Anatoly
2018-07-24 10:54 ` [dpdk-dev] [PATCH v5 0/4] add unit tests for bitrate, latency and pdump libraries Naga Suresh Somarowthu
2018-07-24 10:54 ` [dpdk-dev] [PATCH v5 1/4] test: add ring pmd based packet rx/tx for UT Naga Suresh Somarowthu
2018-07-24 11:21 ` Burakov, Anatoly
2018-07-24 10:54 ` [dpdk-dev] [PATCH v5 2/4] test: add unit tests for bitrate library Naga Suresh Somarowthu
2018-07-24 10:54 ` [dpdk-dev] [PATCH v5 3/4] test: add unit tests for latencystats library Naga Suresh Somarowthu
2018-07-24 10:54 ` [dpdk-dev] [PATCH v5 4/4] test: add unit test for pdump library Naga Suresh Somarowthu
2018-07-24 12:27 ` Burakov, Anatoly [this message]
2018-07-25 17:05 ` [dpdk-dev] [PATCH v6 0/4] add unit tests for bitrate, latency and pdump libraries Naga Suresh Somarowthu
2018-07-25 17:05 ` [dpdk-dev] [PATCH v6 1/4] test: add ring pmd based packet rx/tx for UT Naga Suresh Somarowthu
2018-07-26 9:59 ` Burakov, Anatoly
2018-07-25 17:05 ` [dpdk-dev] [PATCH v6 2/4] test: add unit tests for bitrate library Naga Suresh Somarowthu
2018-07-25 17:05 ` [dpdk-dev] [PATCH v6 3/4] test: add unit tests for latencystats library Naga Suresh Somarowthu
2018-07-25 17:06 ` [dpdk-dev] [PATCH v6 4/4] test: add unit test for pdump library Naga Suresh Somarowthu
2018-07-26 10:02 ` Burakov, Anatoly
2018-07-26 12:50 ` [dpdk-dev] [PATCH v7 0/4] add unit tests for bitrate, latency and pdump libraries Naga Suresh Somarowthu
2018-07-26 12:50 ` [dpdk-dev] [PATCH v7 1/4] test: add ring pmd based packet rx/tx for UT Naga Suresh Somarowthu
2018-07-26 16:43 ` Pattan, Reshma
2018-07-27 7:40 ` Burakov, Anatoly
2018-07-26 12:50 ` [dpdk-dev] [PATCH v7 2/4] test: add unit tests for bitrate library Naga Suresh Somarowthu
2018-07-26 12:50 ` [dpdk-dev] [PATCH v7 3/4] test: add unit tests for latencystats library Naga Suresh Somarowthu
2018-07-26 12:50 ` [dpdk-dev] [PATCH v7 4/4] test: add unit test for pdump library Naga Suresh Somarowthu
2018-07-26 16:04 ` [dpdk-dev] [PATCH v7 0/4] add unit tests for bitrate, latency and pdump libraries Pattan, Reshma
2018-07-27 14:26 ` [dpdk-dev] [PATCH v8 " Naga Suresh Somarowthu
2018-07-27 14:26 ` [dpdk-dev] [PATCH v8 1/4] test: add helper functions for tests using ring-PMD Rx/Tx Naga Suresh Somarowthu
2018-07-27 14:26 ` [dpdk-dev] [PATCH v8 2/4] test: add unit tests for bitrate library Naga Suresh Somarowthu
2018-07-27 14:26 ` [dpdk-dev] [PATCH v8 3/4] test: add unit tests for latencystats library Naga Suresh Somarowthu
2018-07-27 14:26 ` [dpdk-dev] [PATCH v8 4/4] test: add unit test for pdump library Naga Suresh Somarowthu
2018-07-31 14:57 ` [dpdk-dev] [PATCH v8 0/4] add unit tests for bitrate, latency and pdump libraries Thomas Monjalon
2018-07-31 16:43 ` Pattan, Reshma
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=8017c659-e9d7-7d33-bdb8-2d0bef05a275@intel.com \
--to=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=naga.sureshx.somarowthu@intel.com \
--cc=remy.horton@intel.com \
--cc=reshma.pattan@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).