automatic DPDK test reports
 help / color / mirror / Atom feed
From: dpdklab@iol.unh.edu
To: test-report@dpdk.org
Cc: dpdk-test-reports@iol.unh.edu
Subject: |WARNING| pw112721 [PATCH] [v7] app/testpmd: add Host Shaper command
Date: Tue, 14 Jun 2022 10:28:57 -0400 (EDT)	[thread overview]
Message-ID: <20220614142857.856956D4CE@noxus.dpdklab.iol.unh.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 4439 bytes --]

Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/112721

_apply patch failure_

Submitter: Spike Du <spiked@nvidia.com>
Date: Tuesday, June 14 2022 12:01:34 
Applied on: CommitID:f940a2e333e3c65ffb53b76bd7b3536084b1acbf
Apply patch set 112721 failed:

Checking patch app/test-pmd/testpmd.c...
error: while searching for:
				break;
			printf("Received avail_thresh event, port:%d rxq_id:%d\n",
			       port_id, rxq_id);
		}
		break;
	default:

error: patch failed: app/test-pmd/testpmd.c:3659
Checking patch doc/guides/nics/mlx5.rst...
error: while searching for:
Meson detects ``libmtcr_ul`` existence at configure stage.
If the library is detected, the application must link with ``-lmtcr_ul``,
as done by the pkg-config file libdpdk.pc.

error: patch failed: doc/guides/nics/mlx5.rst:1727
Checking patch drivers/net/mlx5/meson.build...
Checking patch drivers/net/mlx5/mlx5_testpmd.c...
.git/rebase-apply/patch:314: new blank line at EOF.
+
Checking patch drivers/net/mlx5/mlx5_testpmd.h...
Applying patch app/test-pmd/testpmd.c with 1 reject...
Hunk #1 applied cleanly.
Rejected hunk #2.
Applying patch doc/guides/nics/mlx5.rst with 1 reject...
Rejected hunk #1.
Applied patch drivers/net/mlx5/meson.build cleanly.
Applied patch drivers/net/mlx5/mlx5_testpmd.c cleanly.
Applied patch drivers/net/mlx5/mlx5_testpmd.h cleanly.
diff a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c	(rejected hunks)
@@ -3659,6 +3662,10 @@ struct pmd_test_command {
 				break;
 			printf("Received avail_thresh event, port:%d rxq_id:%d\n",
 			       port_id, rxq_id);
+
+#ifdef RTE_NET_MLX5
+			mlx5_test_avail_thresh_event_handler(port_id, rxq_id);
+#endif
 		}
 		break;
 	default:
diff a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst	(rejected hunks)
@@ -1727,3 +1727,49 @@ which can be installed from OFED mstflint package.
 Meson detects ``libmtcr_ul`` existence at configure stage.
 If the library is detected, the application must link with ``-lmtcr_ul``,
 as done by the pkg-config file libdpdk.pc.
+
+How to use available descriptor threshold and Host Shaper
+------------------------------
+
+There are sample command lines to configure available descriptor threshold in testpmd.
+Testpmd also contains sample logic to handle available descriptor threshold event.
+The typical workflow is: testpmd configure available descriptor threshold for Rx queues, enable
+avail_thresh_triggered in host shaper and register a callback, when traffic from host is
+too high and Rx queue emptiness is below available descriptor threshold, PMD receives an event and
+firmware configures a 100Mbps shaper on host port automatically, then PMD call
+the callback registered previously, which will delay a while to let Rx queue
+empty, then disable host shaper.
+
+Let's assume we have a simple Blue Field 2 setup: port 0 is uplink, port 1
+is VF representor. Each port has 2 Rx queues.
+In order to control traffic from host to ARM, we can enable available descriptor threshold in testpmd by:
+
+.. code-block:: console
+
+   testpmd> mlx5 set port 1 host_shaper avail_thresh_triggered 1 rate 0
+   testpmd> set port 1 rxq 0 avail_thresh 70
+   testpmd> set port 1 rxq 1 avail_thresh 70
+
+The first command disables current host shaper, and enables available descriptor threshold triggered mode.
+The left commands configure available descriptor threshold to 70% of Rx queue size for both Rx queues,
+When traffic from host is too high, you can see testpmd console prints log
+about available descriptor threshold event receiving, then host shaper is disabled.
+The traffic rate from host is controlled and less drop happens in Rx queues.
+
+When disable available descriptor threshold and avail_thresh_triggered, we can invoke below commands in testpmd:
+
+.. code-block:: console
+
+   testpmd> mlx5 set port 1 host_shaper avail_thresh_triggered 0 rate 0
+   testpmd> set port 1 rxq 0 avail_thresh 0
+   testpmd> set port 1 rxq 1 avail_thresh 0
+
+It's recommended an application disables available descriptor threshold and avail_thresh_triggered before exit,
+if it enables them before.
+
+We can also configure the shaper with a value, the rate unit is 100Mbps, below
+command sets current shaper to 5Gbps and disables avail_thresh_triggered.
+
+.. code-block:: console
+
+   testpmd> mlx5 set port 1 host_shaper avail_thresh_triggered 0 rate 50

https://lab.dpdk.org/results/dashboard/patchsets/22598/

UNH-IOL DPDK Community Lab

                 reply	other threads:[~2022-06-14 14:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220614142857.856956D4CE@noxus.dpdklab.iol.unh.edu \
    --to=dpdklab@iol.unh.edu \
    --cc=dpdk-test-reports@iol.unh.edu \
    --cc=test-report@dpdk.org \
    /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).