From: Jasvinder Singh <jasvinder.singh@intel.com>
To: dev@dpdk.org
Cc: cristian.dumitrescu@intel.com
Subject: [dpdk-dev] [PATCH v2 4/4] examples/ip_pipeline: update flow action pipeline
Date: Tue, 12 Dec 2017 09:53:24 +0000 [thread overview]
Message-ID: <20171212095324.35420-5-jasvinder.singh@intel.com> (raw)
In-Reply-To: <20171212095324.35420-1-jasvinder.singh@intel.com>
Update flow action pipeline to conform the meter api changes.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
.../pipeline/pipeline_flow_actions_be.c | 25 +++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/examples/ip_pipeline/pipeline/pipeline_flow_actions_be.c b/examples/ip_pipeline/pipeline/pipeline_flow_actions_be.c
index 11fcbb7..8874f04 100644
--- a/examples/ip_pipeline/pipeline/pipeline_flow_actions_be.c
+++ b/examples/ip_pipeline/pipeline/pipeline_flow_actions_be.c
@@ -140,6 +140,7 @@ static pipeline_msg_req_handler custom_handlers[] = {
*/
struct meter_policer {
struct rte_meter_trtcm meter;
+ struct rte_meter_trtcm_profile meter_profile;
struct pipeline_fa_policer_params policer;
struct pipeline_fa_policer_stats stats;
};
@@ -156,8 +157,15 @@ flow_table_entry_set_meter(struct flow_table_entry *entry,
{
struct rte_meter_trtcm *meter = &entry->mp[meter_id].meter;
struct rte_meter_trtcm_params *meter_params = ¶ms->m[meter_id];
+ struct rte_meter_trtcm_profile *meter_profile =
+ &entry->mp[meter_id].meter_profile;
+ int status;
- return rte_meter_trtcm_config(meter, meter_params);
+ status = rte_meter_trtcm_profile_config(meter_profile, meter_params);
+ if (status)
+ return status;
+
+ return rte_meter_trtcm_config(meter, meter_profile);
}
static void
@@ -231,11 +239,14 @@ pkt_work(
enum rte_meter_color color = p->dscp[dscp].color;
struct rte_meter_trtcm *meter = &entry->mp[tc].meter;
+ struct rte_meter_trtcm_profile *meter_profile =
+ &entry->mp[tc].meter_profile;
struct pipeline_fa_policer_params *policer = &entry->mp[tc].policer;
struct pipeline_fa_policer_stats *stats = &entry->mp[tc].stats;
/* Read (entry), compute */
enum rte_meter_color color2 = rte_meter_trtcm_color_aware_check(meter,
+ meter_profile,
time,
total_length,
color);
@@ -313,42 +324,54 @@ pkt4_work(
enum rte_meter_color color3 = p->dscp[dscp3].color;
struct rte_meter_trtcm *meter0 = &entry0->mp[tc0].meter;
+ struct rte_meter_trtcm_profile *meter0_profile =
+ &entry0->mp[tc0].meter_profile;
struct pipeline_fa_policer_params *policer0 = &entry0->mp[tc0].policer;
struct pipeline_fa_policer_stats *stats0 = &entry0->mp[tc0].stats;
struct rte_meter_trtcm *meter1 = &entry1->mp[tc1].meter;
+ struct rte_meter_trtcm_profile *meter1_profile =
+ &entry1->mp[tc1].meter_profile;
struct pipeline_fa_policer_params *policer1 = &entry1->mp[tc1].policer;
struct pipeline_fa_policer_stats *stats1 = &entry1->mp[tc1].stats;
struct rte_meter_trtcm *meter2 = &entry2->mp[tc2].meter;
+ struct rte_meter_trtcm_profile *meter2_profile =
+ &entry2->mp[tc2].meter_profile;
struct pipeline_fa_policer_params *policer2 = &entry2->mp[tc2].policer;
struct pipeline_fa_policer_stats *stats2 = &entry2->mp[tc2].stats;
struct rte_meter_trtcm *meter3 = &entry3->mp[tc3].meter;
+ struct rte_meter_trtcm_profile *meter3_profile =
+ &entry3->mp[tc3].meter_profile;
struct pipeline_fa_policer_params *policer3 = &entry3->mp[tc3].policer;
struct pipeline_fa_policer_stats *stats3 = &entry3->mp[tc3].stats;
/* Read (entry), compute, write (entry) */
enum rte_meter_color color2_0 = rte_meter_trtcm_color_aware_check(
meter0,
+ meter0_profile,
time,
total_length0,
color0);
enum rte_meter_color color2_1 = rte_meter_trtcm_color_aware_check(
meter1,
+ meter1_profile,
time,
total_length1,
color1);
enum rte_meter_color color2_2 = rte_meter_trtcm_color_aware_check(
meter2,
+ meter2_profile,
time,
total_length2,
color2);
enum rte_meter_color color2_3 = rte_meter_trtcm_color_aware_check(
meter3,
+ meter3_profile,
time,
total_length3,
color3);
--
2.9.3
next prev parent reply other threads:[~2017-12-12 9:40 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 11:36 [dpdk-dev] [PATCH 0/4] meter: add meter configuration profile api Cristian Dumitrescu
2017-08-23 11:36 ` [dpdk-dev] [PATCH 1/4] meter: add meter configuration profile Cristian Dumitrescu
2017-12-12 9:53 ` [dpdk-dev] [PATCH v2 0/4] meter: add meter configuration profile api Jasvinder Singh
2017-12-12 9:53 ` [dpdk-dev] [PATCH v2 1/4] lib/librte_meter: add meter configuration profile Jasvinder Singh
2018-01-08 10:00 ` [dpdk-dev] [PATCH v3] meter: add meter configuration profile api Jasvinder Singh
2018-01-08 10:00 ` [dpdk-dev] [PATCH v3] lib/librte_meter: add meter configuration profile Jasvinder Singh
2018-01-08 15:43 ` [dpdk-dev] [PATCH v4] " Jasvinder Singh
2018-01-11 13:54 ` Dumitrescu, Cristian
2018-02-19 21:12 ` Thomas Monjalon
2018-04-05 10:12 ` Thomas Monjalon
2018-04-05 11:00 ` Dumitrescu, Cristian
2017-12-12 9:53 ` [dpdk-dev] [PATCH v2 2/4] test/test_meter: update meter test Jasvinder Singh
2017-12-12 9:53 ` [dpdk-dev] [PATCH v2 3/4] examples/qos_meter: accommodate meter api changes Jasvinder Singh
2017-12-12 9:53 ` Jasvinder Singh [this message]
2017-08-23 11:36 ` [dpdk-dev] [PATCH 2/4] test: meter autotest update Cristian Dumitrescu
2017-08-23 11:36 ` [dpdk-dev] [PATCH 3/4] qos_meter: accommodate meter api changes Cristian Dumitrescu
2017-08-23 11:36 ` [dpdk-dev] [PATCH 4/4] deprecation: removed the librte_meter notice Cristian Dumitrescu
2017-10-12 20:51 ` [dpdk-dev] [PATCH 0/4] meter: add meter configuration profile api 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=20171212095324.35420-5-jasvinder.singh@intel.com \
--to=jasvinder.singh@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@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).