DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rongwei Liu <rongweil@nvidia.com>
To: <matan@nvidia.com>, <viacheslavo@nvidia.com>, <orika@nvidia.com>,
	<thomas@monjalon.net>, Wisam Jaddo <wisamm@nvidia.com>
Cc: <dev@dpdk.org>, <rasland@nvidia.com>
Subject: [dpdk-dev] [PATCH v7 3/3] app/flow-perf: add packet mode metering mode
Date: Mon, 8 Nov 2021 13:10:51 +0200	[thread overview]
Message-ID: <20211108111051.1841401-4-rongweil@nvidia.com> (raw)
In-Reply-To: <20211108111051.1841401-1-rongweil@nvidia.com>

The flow perf application used the srtcm_rfc2697 as meter profile
while doing the meter testing.

This patch adds the support new configuration parameter
'--packet-mode' to generate the meter flows with the packet mode.

Signed-off-by: Rongwei Liu <rongweil@nvidia.com>
Acked-by: Wisam Monther <wisamm@nvidia.com>
---
 app/test-flow-perf/main.c      | 6 ++++++
 doc/guides/tools/flow-perf.rst | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index 63675bfcb4..0c5fe6b026 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -68,6 +68,7 @@ static bool dump_socket_mem_flag;
 static bool enable_fwd;
 static bool unique_data;
 static bool policy_mtr;
+static bool packet_mode;
 
 static uint8_t rx_queues_count;
 static uint8_t tx_queues_count;
@@ -496,6 +497,7 @@ usage(char *progname)
 	printf("  --total-mbuf-count=N: to set the count of total mbuf count\n");
 	printf("  --meter-profile=cir,cbs,ebs: set CIR CBS EBS parameters in meter"
 		" profile, default is %d,%d,%d\n", METER_CIR, METER_CIR / 8, 0);
+	printf("  --packet-mode: To enable packet mode for meter profile\n");
 
 	printf("To set flow attributes:\n");
 	printf("  --ingress: set ingress attribute in flows\n");
@@ -710,6 +712,7 @@ args_parse(int argc, char **argv)
 		{ "vxlan-decap",                0, 0, 0 },
 		{ "policy-mtr",                 1, 0, 0 },
 		{ "meter-profile",              1, 0, 0 },
+		{ "packet-mode",                0, 0, 0 },
 	};
 
 	RTE_ETH_FOREACH_DEV(i)
@@ -939,6 +942,8 @@ args_parse(int argc, char **argv)
 					token = strsep(&arg, ",\0");
 				}
 			}
+			if (strcmp(lgopts[opt_idx].name, "packet-mode") == 0)
+				packet_mode = true;
 			if (strcmp(lgopts[opt_idx].name, "policy-mtr") == 0)
 				handle_meter_policy(argv[0], optarg);
 			break;
@@ -1273,6 +1278,7 @@ create_meter_profile(void)
 		mp.srtcm_rfc2697.cbs = meter_profile_values[1] ?
 			meter_profile_values[1] : METER_CIR / 8;
 		mp.srtcm_rfc2697.ebs = meter_profile_values[2];
+		mp.packet_mode = packet_mode;
 		ret = rte_mtr_meter_profile_add
 			(port_id, DEFAULT_METER_PROF_ID, &mp, &error);
 		if (ret != 0) {
diff --git a/doc/guides/tools/flow-perf.rst b/doc/guides/tools/flow-perf.rst
index 4074b0a94d..57a3653f4f 100644
--- a/doc/guides/tools/flow-perf.rst
+++ b/doc/guides/tools/flow-perf.rst
@@ -137,6 +137,9 @@ The command line options are:
 *	``--meter-profile=N1,N2,N3``
 	Set the CIR, CBS and EBS parameter, default value is 1250000, 156250 and 0.
 
+*	``--packet-mode``
+	Enable packets mode for meter profile.
+
 Attributes:
 
 *	``--ingress``
-- 
2.27.0


  parent reply	other threads:[~2021-11-08 11:11 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  6:50 [dpdk-dev] [PATCH] app/flow-perf: support meter policy API Haifei Luo
2021-05-09 10:47 ` Wisam Monther
2021-07-21  7:05 ` [dpdk-dev] [PATCH v2 0/3] support new format meter Rongwei Liu
2021-07-21  7:05   ` [dpdk-dev] [PATCH v2 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-09-26  9:45     ` Wisam Monther
2021-10-28  3:25       ` [dpdk-dev] [PATCH v3 0/3] add meter policy support in flow-perf Rongwei Liu
2021-10-28  3:25         ` [dpdk-dev] [PATCH v3 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-05  9:57           ` Thomas Monjalon
2021-11-05 10:24             ` Rongwei Liu
2021-11-05 10:34               ` Thomas Monjalon
2021-11-08  8:53                 ` [dpdk-dev] [PATCH v4 0/3] add meter policy support in flow-perf Rongwei Liu
2021-11-08  8:53                   ` [dpdk-dev] [PATCH v4 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-08  9:05                     ` Thomas Monjalon
2021-11-08  9:23                       ` [dpdk-dev] [PATCH v5 0/3] add meter policy support in flow-perf Rongwei Liu
2021-11-08  9:23                         ` [dpdk-dev] [PATCH v5 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-08  9:23                         ` [dpdk-dev] [PATCH v5 2/3] app/flow-perf: add meter-profile to support cir cbs and ebs Rongwei Liu
2021-11-08  9:23                         ` [dpdk-dev] [PATCH v5 3/3] app/flow-perf: add packet mode metering mode Rongwei Liu
2021-11-08  9:35                         ` [dpdk-dev] [PATCH v5 0/3] add meter policy support in flow-perf Thomas Monjalon
2021-11-08  9:39                           ` Rongwei Liu
2021-11-08  9:40                             ` Thomas Monjalon
2021-11-08  9:58                       ` [dpdk-dev] [PATCH v6 " Rongwei Liu
2021-11-08  9:58                         ` [dpdk-dev] [PATCH v6 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-08 10:08                           ` Thomas Monjalon
2021-11-08  9:58                         ` [dpdk-dev] [PATCH v6 2/3] app/flow-perf: add meter-profile to support cir cbs and ebs Rongwei Liu
2021-11-08 10:10                           ` Thomas Monjalon
2021-11-08  9:58                         ` [dpdk-dev] [PATCH v6 3/3] app/flow-perf: add packet mode metering mode Rongwei Liu
2021-11-08 11:10                       ` [dpdk-dev] [PATCH v7 0/3] add meter policy support in flow-perf Rongwei Liu
2021-11-08 11:10                         ` [dpdk-dev] [PATCH v7 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-08 11:10                         ` [dpdk-dev] [PATCH v7 2/3] app/flow-perf: add meter-profile to support cir cbs and ebs Rongwei Liu
2021-11-08 11:10                         ` Rongwei Liu [this message]
2021-11-10 12:57                       ` [dpdk-dev] [PATCH v8 0/3] add meter policy support in flow-perf Rongwei Liu
2021-11-10 12:57                         ` [dpdk-dev] [PATCH v8 1/3] app/flow-perf: support meter policy API Rongwei Liu
2021-11-10 12:57                         ` [dpdk-dev] [PATCH v8 2/3] app/flow-perf: support dynamic values for meter profile Rongwei Liu
2021-11-10 12:57                         ` [dpdk-dev] [PATCH v8 3/3] app/flow-perf: add packet metering mode Rongwei Liu
2021-11-11 14:23                       ` [PATCH v9 0/5] add meter policy support in flow-perf Rongwei Liu
2021-11-11 14:23                         ` [PATCH v9 1/5] app/flow-perf: define flow-options as global Rongwei Liu
2021-11-16 10:05                           ` Wisam Monther
2021-11-11 14:23                         ` [PATCH v9 2/5] app/flow-perf: support meter policy API Rongwei Liu
2021-11-16 10:05                           ` Wisam Monther
2021-11-11 14:23                         ` [PATCH v9 3/5] app/flow-perf: support dynamic values for meter profile Rongwei Liu
2021-11-16 10:05                           ` Wisam Monther
2021-11-11 14:23                         ` [PATCH v9 4/5] app/flow-perf: add packet metering mode Rongwei Liu
2021-11-16 10:05                           ` Wisam Monther
2021-11-11 14:23                         ` [PATCH v9 5/5] app/flow-perf: fix previous wrong indentation Rongwei Liu
2021-11-16 10:05                           ` Wisam Monther
2021-11-16 10:07                             ` Rongwei Liu
2021-11-16 11:33                         ` [PATCH v9 0/5] add meter policy support in flow-perf Thomas Monjalon
2021-11-08  8:53                   ` [dpdk-dev] [PATCH v4 2/3] app/flow-perf: add meter-profile to support cir cbs and ebs Rongwei Liu
2021-11-08  8:53                   ` [dpdk-dev] [PATCH v4 3/3] app/flow-perf: add packet mode metering mode Rongwei Liu
2021-10-28  3:25         ` [dpdk-dev] [PATCH v3 2/3] app/flow-perf: add meter-profile to support cir cbs and ebs Rongwei Liu
2021-10-28  3:26         ` [dpdk-dev] [PATCH v3 3/3] app/flow-perf: add packet mode metering mode Rongwei Liu
2021-07-21  7:05   ` [dpdk-dev] [PATCH v2 2/3] app/flow-perf: add new meter CIR Configuration Rongwei Liu
2021-09-26  9:46     ` Wisam Monther
2021-07-21  7:05   ` [dpdk-dev] [PATCH v2 3/3] app/flow-perf: add the supports for meter PPS Rongwei Liu
2021-09-26  9:47     ` Wisam Monther

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=20211108111051.1841401-4-rongweil@nvidia.com \
    --to=rongweil@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=viacheslavo@nvidia.com \
    --cc=wisamm@nvidia.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).