DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kevin Laatz <kevin.laatz@intel.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, bruce.richardson@intel.com,
	fengchengwen@huawei.com, conor.walsh@intel.com,
	Kevin Laatz <kevin.laatz@intel.com>
Subject: [dpdk-dev] [PATCH v5 5/8] examples/ioat: add signal-triggered device dumps
Date: Tue, 26 Oct 2021 13:14:29 +0000	[thread overview]
Message-ID: <20211026131432.2734145-6-kevin.laatz@intel.com> (raw)
In-Reply-To: <20211026131432.2734145-1-kevin.laatz@intel.com>

Enable dumping device info via the signal handler. With this change, when a
SIGUSR1 is issued, the application will print a dump of all devices being
used by the application.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Conor Walsh <conor.walsh@intel.com>
---
 examples/ioat/ioatfwd.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c
index 995ba7b8db..e8a3f2f88a 100644
--- a/examples/ioat/ioatfwd.c
+++ b/examples/ioat/ioatfwd.c
@@ -1004,6 +1004,20 @@ port_init(uint16_t portid, struct rte_mempool *mbuf_pool, uint16_t nb_queues)
 	cfg.ports[cfg.nb_ports++].nb_queues = nb_queues;
 }
 
+/* Get a device dump for each device being used by the application */
+static void
+rawdev_dump(void)
+{
+	uint32_t i, j;
+
+	if (copy_mode != COPY_MODE_IOAT_NUM)
+		return;
+
+	for (i = 0; i < cfg.nb_ports; i++)
+		for (j = 0; j < cfg.ports[i].nb_queues; j++)
+			rte_rawdev_dump(cfg.ports[i].ioat_ids[j], stdout);
+}
+
 static void
 signal_handler(int signum)
 {
@@ -1011,6 +1025,8 @@ signal_handler(int signum)
 		printf("\n\nSignal %d received, preparing to exit...\n",
 			signum);
 		force_quit = true;
+	} else if (signum == SIGUSR1) {
+		rawdev_dump();
 	}
 }
 
@@ -1034,6 +1050,7 @@ main(int argc, char **argv)
 	force_quit = false;
 	signal(SIGINT, signal_handler);
 	signal(SIGTERM, signal_handler);
+	signal(SIGUSR1, signal_handler);
 
 	nb_ports = rte_eth_dev_count_avail();
 	if (nb_ports == 0)
-- 
2.30.2


  parent reply	other threads:[~2021-10-26 13:16 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 17:27 [dpdk-dev] [PATCH 0/6] port ioatfwd app to dmadev Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 1/6] examples/ioat: always use same lcore for both DMA requests enqueue and dequeue Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 2/6] examples/ioat: add cmd-line option to control DMA batch size Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 3/6] examples/ioat: add cmd line option to control max frame size Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 4/6] examples/ioat: port application to dmadev APIs Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 5/6] examples/ioat: update naming to match change to dmadev Kevin Laatz
2021-09-10 17:27 ` [dpdk-dev] [PATCH 6/6] examples/ioat: rename application to dmafwd Kevin Laatz
2021-09-17 16:41 ` [dpdk-dev] [PATCH v2 0/6] port ioatfwd app to dmadev Kevin Laatz
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 1/6] examples/ioat: always use same lcore for both DMA requests enqueue and dequeue Kevin Laatz
2021-09-20 11:24     ` Conor Walsh
2021-09-23 15:33       ` Kevin Laatz
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 2/6] examples/ioat: add cmd-line option to control DMA batch size Kevin Laatz
2021-09-20 11:24     ` Conor Walsh
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 3/6] examples/ioat: add cmd line option to control max frame size Kevin Laatz
2021-09-20 11:24     ` Conor Walsh
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 4/6] examples/ioat: port application to dmadev APIs Kevin Laatz
2021-09-20 11:25     ` Conor Walsh
2021-09-24  4:00     ` fengchengwen
2021-09-24  8:40       ` Kevin Laatz
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 5/6] examples/ioat: update naming to match change to dmadev Kevin Laatz
2021-09-20 11:25     ` Conor Walsh
2021-09-17 16:41   ` [dpdk-dev] [PATCH v2 6/6] examples/ioat: rename application to dmafwd Kevin Laatz
2021-09-20 11:25     ` Conor Walsh
2021-09-23 13:53   ` [dpdk-dev] [PATCH v2 0/6] port ioatfwd app to dmadev fengchengwen
2021-09-23 14:00     ` Kevin Laatz
2021-09-28 16:29 ` [dpdk-dev] [PATCH v3 0/8] " Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 1/8] examples/ioat: always use same lcore for both DMA requests enqueue and dequeue Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 2/8] examples/ioat: add cmd line option to control DMA batch size Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 3/8] examples/ioat: add cmd line option to control max frame size Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 4/8] examples/ioat: add cmd line option to control stats print interval Kevin Laatz
2021-09-29 10:32     ` Conor Walsh
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 5/8] examples/ioat: add signal-triggered device dumps Kevin Laatz
2021-09-29 10:33     ` Conor Walsh
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 6/8] examples/ioat: port application to dmadev APIs Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 7/8] examples/ioat: update naming to match change to dmadev Kevin Laatz
2021-09-28 16:29   ` [dpdk-dev] [PATCH v3 8/8] examples/ioat: rename application to dmafwd Kevin Laatz
2021-10-14  9:53 ` [dpdk-dev] [PATCH v4 0/8] port ioatfwd app to dmadev Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 1/8] examples/ioat: always use same lcore for both DMA requests enqueue and dequeue Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 2/8] examples/ioat: add cmd line option to control DMA batch size Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 3/8] examples/ioat: add cmd line option to control max frame size Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 4/8] examples/ioat: add cmd line option to control stats print interval Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 5/8] examples/ioat: add signal-triggered device dumps Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 6/8] examples/ioat: port application to dmadev APIs Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 7/8] examples/ioat: update naming to match change to dmadev Kevin Laatz
2021-10-14  9:53   ` [dpdk-dev] [PATCH v4 8/8] examples/ioat: rename application to dmafwd Kevin Laatz
2021-10-22 19:48   ` [dpdk-dev] [PATCH v4 0/8] port ioatfwd app to dmadev Thomas Monjalon
2021-10-25 19:59     ` Kevin Laatz
2021-10-26  0:56   ` fengchengwen
2021-10-26 11:46     ` Kevin Laatz
2021-10-26 13:14 ` [dpdk-dev] [PATCH v5 " Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 1/8] examples/ioat: always use same lcore for both DMA requests enqueue and dequeue Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 2/8] examples/ioat: add cmd line option to control DMA batch size Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 3/8] examples/ioat: add cmd line option to control max frame size Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 4/8] examples/ioat: add cmd line option to control stats print interval Kevin Laatz
2021-10-26 13:14   ` Kevin Laatz [this message]
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 6/8] examples/ioat: port application to dmadev APIs Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 7/8] examples/ioat: update naming to match change to dmadev Kevin Laatz
2021-10-26 13:14   ` [dpdk-dev] [PATCH v5 8/8] examples/ioat: rename application to dmafwd Kevin Laatz
2021-10-27 13:23   ` [dpdk-dev] [PATCH v5 0/8] port ioatfwd app to dmadev Thomas Monjalon
2021-10-27 13:35     ` Kevin Laatz
2021-10-27 14:07       ` Thomas Monjalon
2021-10-27 14:14         ` Kevin Laatz
2021-10-27 14:54   ` Thomas Monjalon

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=20211026131432.2734145-6-kevin.laatz@intel.com \
    --to=kevin.laatz@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=conor.walsh@intel.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=thomas@monjalon.net \
    /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).