From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: Cristian Dumitrescu <cristian.dumitrescu@intel.com>, <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <adrien.mazarguil@6wind.com>,
<jingjing.wu@intel.com>, <jerin.jacob@caviumnetworks.com>,
<jasvinder.singh@intel.com>
Subject: Re: [dpdk-dev] [PATCH V3 3/5] ethdev: add new api for traffic metering and policing
Date: Thu, 12 Oct 2017 16:24:10 +0530 [thread overview]
Message-ID: <293766e1-462b-70e2-9fba-7f9cab5f24ee@nxp.com> (raw)
In-Reply-To: <c22ea29e-4793-ef67-6fbd-f2ca447717bb@nxp.com>
On 10/12/2017 4:18 PM, Hemant Agrawal wrote:
> On 10/6/2017 8:15 PM, Cristian Dumitrescu wrote:
>
> Overall the patch looks ok. Few small comments.
>
>> diff --git a/lib/librte_ether/rte_mtr.h b/lib/librte_ether/rte_mtr.h
>> new file mode 100644
>> index 0000000..f0f897f
>> --- /dev/null
>> +++ b/lib/librte_ether/rte_mtr.h
>> @@ -0,0 +1,723 @@
>> +/*-
>> + * BSD LICENSE
>> + *
>> + * Copyright(c) 2017 Intel Corporation.
>> + * Copyright(c) 2017 NXP.
>
> can you make it "Copyright 2017 NXP"
>> + * Copyright(c) 2017 Cavium.
>> + * All rights reserved.
>> + *
>
> <snip>...
>
>> +/**
>> + * Statistics counter type
>> + */
>> +enum rte_mtr_stats_type {
>> + /** Number of packets passed as green by the policer. */
>> + RTE_MTR_STATS_N_PKTS_GREEN = 1 << 0,
>> +
>> + /** Number of bytes passed as green by the policer. */
>> + RTE_MTR_STATS_N_BYTES_GREEN = 1 << 1,
>> +
>> + /** Number of packets passed as yellow by the policer. */
>> + RTE_MTR_STATS_N_PKTS_YELLOW = 1 << 2,
>> +
>> + /** Number of bytes passed as yellow by the policer. */
>> + RTE_MTR_STATS_N_BYTES_YELLOW = 1 << 3,
>> +
>> + /** Number of packets passed as red by the policer. */
>> + RTE_MTR_STATS_N_PKTS_RED = 1 << 4,
>> +
>> + /** Number of bytes passed as red by the policer. */
>> + RTE_MTR_STATS_N_BYTES_RED = 1 << 5,
>> +
>> + /** Number of packets dropped by the policer. */
>> + RTE_MTR_STATS_N_PKTS_DROPPED = 1 << 6,
>> +
>> + /** Number of bytes dropped by the policer. */
>> + RTE_MTR_STATS_N_BYTES_DROPPED = 1 << 7,
>
> Trivial one.
> do you want to group the pkts and bytes in separate group respectively?
>
>> +};
>> +
>> +/**
>> + * Statistics counters
>> + */
>> +struct rte_mtr_stats {
>> + /** Number of packets passed by the policer (per color). */
>> + uint64_t n_pkts[RTE_MTR_COLORS];
>> +
>> + /** Number of bytes passed by the policer (per color). */
>> + uint64_t n_bytes[RTE_MTR_COLORS];
>> +
>> + /** Number of packets dropped by the policer. */
>> + uint64_t n_pkts_dropped;
>> +
>> + /** Number of bytes passed by the policer. */
>> + uint64_t n_bytes_dropped;
>> +};
>> +
>> +/**
>> + * Traffic metering algorithms
>> + */
>> +enum rte_mtr_algorithm {
>> + /** Single Rate Three Color Marker (srTCM) - IETF RFC 2697. */
>> + RTE_MTR_SRTCM_RFC2697,
>> +
>> + /** Two Rate Three Color Marker (trTCM) - IETF RFC 2698. */
>> + RTE_MTR_TRTCM_RFC2698,
>> +
>> + /** Two Rate Three Color Marker (trTCM) - IETF RFC 4115. */
>> + RTE_MTR_TRTCM_RFC4115,
>
> I will still prefer if you still add "PASS_THROUGH" as explicit algo.
>
>> +};
>> +
>> +/**
>> + * Meter profile
>> + */
>
>
>
Reviewed-by: Hemant Agrawal <hemant.agrawal@nxp.com>
next prev parent reply other threads:[~2017-10-12 10:54 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 16:44 [dpdk-dev] [RFC 0/3] rte_mtr: generic ethdev API for " Cristian Dumitrescu
2017-05-30 16:44 ` [dpdk-dev] [RFC 1/3] ethdev: add traffic metering and policing ops get API Cristian Dumitrescu
2017-05-30 16:44 ` [dpdk-dev] [RFC 2/3] ethdev: add new rte_mtr API for traffic metering and policing Cristian Dumitrescu
2017-08-26 0:06 ` [dpdk-dev] [PATCH 0/3] rte_mtr: generic ethdev API for " Cristian Dumitrescu
2017-08-26 0:06 ` [dpdk-dev] [PATCH 1/3] ethdev: add new eth_dev_ops function for mtr ops get Cristian Dumitrescu
2017-09-13 5:50 ` Jerin Jacob
2017-09-19 15:52 ` Dumitrescu, Cristian
2017-10-05 13:09 ` [dpdk-dev] [PATCH V2 0/5] rte_mtr: generic ethdev api for metering and policing Cristian Dumitrescu
2017-10-05 13:09 ` [dpdk-dev] [PATCH V2 1/5] ethdev: add new flow action " Cristian Dumitrescu
2017-10-06 13:57 ` Adrien Mazarguil
2017-10-06 14:50 ` Dumitrescu, Cristian
2017-10-06 14:45 ` [dpdk-dev] [PATCH V3 0/5] rte_mtr: generic ethdev api " Cristian Dumitrescu
2017-10-06 14:45 ` [dpdk-dev] [PATCH V3 1/5] ethdev: add new flow action " Cristian Dumitrescu
2017-10-06 14:55 ` Adrien Mazarguil
2017-10-13 12:22 ` [dpdk-dev] [PATCH V4 0/5] rte_mtr: generic ethdev api " Cristian Dumitrescu
2017-10-13 12:22 ` [dpdk-dev] [PATCH V4 1/5] ethdev: add new flow action " Cristian Dumitrescu
2017-10-18 2:55 ` Jerin Jacob
2017-10-13 12:22 ` [dpdk-dev] [PATCH V4 2/5] ethdev: add new eth_dev_ops function for mtr ops get Cristian Dumitrescu
2017-10-17 12:40 ` Hemant Agrawal
2017-10-13 12:22 ` [dpdk-dev] [PATCH V4 3/5] ethdev: add new api for traffic metering and policing Cristian Dumitrescu
2017-10-17 12:39 ` Hemant Agrawal
2017-10-18 2:58 ` Jerin Jacob
2017-10-13 12:22 ` [dpdk-dev] [PATCH V4 4/5] doc: ethdev traffic metering and policing api Cristian Dumitrescu
2017-10-13 15:43 ` Mcnamara, John
2017-10-13 12:22 ` [dpdk-dev] [PATCH V4 5/5] app/testpmd: cli for traffic metering and policing Cristian Dumitrescu
2017-10-16 9:49 ` Wu, Jingjing
2017-10-16 10:10 ` Wu, Jingjing
2017-10-20 12:15 ` [dpdk-dev] [PATCH V4 0/5] rte_mtr: generic ethdev api for " Dumitrescu, Cristian
2017-10-06 14:45 ` [dpdk-dev] [PATCH V3 2/5] ethdev: add new eth_dev_ops function for mtr ops get Cristian Dumitrescu
2017-10-12 10:58 ` Hemant Agrawal
2017-10-06 14:45 ` [dpdk-dev] [PATCH V3 3/5] ethdev: add new api for traffic metering and policing Cristian Dumitrescu
2017-10-12 10:48 ` Hemant Agrawal
2017-10-12 10:54 ` Hemant Agrawal [this message]
2017-10-13 12:29 ` Dumitrescu, Cristian
2017-10-06 14:45 ` [dpdk-dev] [PATCH V3 4/5] doc: ethdev traffic metering and policing api Cristian Dumitrescu
2017-10-12 14:59 ` Mcnamara, John
2017-10-13 12:26 ` Dumitrescu, Cristian
2017-10-12 15:01 ` Mcnamara, John
2017-10-06 14:45 ` [dpdk-dev] [PATCH V3 5/5] app/testpmd: cli for traffic metering and policing Cristian Dumitrescu
2017-10-13 6:32 ` Wu, Jingjing
2017-10-13 12:30 ` Dumitrescu, Cristian
2017-10-05 13:09 ` [dpdk-dev] [PATCH V2 2/5] ethdev: add new eth_dev_ops function for mtr ops get Cristian Dumitrescu
2017-10-05 13:09 ` [dpdk-dev] [PATCH V2 3/5] ethdev: add new api for traffic metering and policing Cristian Dumitrescu
2017-10-05 13:09 ` [dpdk-dev] [PATCH V2 4/5] doc: ethdev traffic metering and policing api Cristian Dumitrescu
2017-10-05 13:09 ` [dpdk-dev] [PATCH V2 5/5] app/testpmd: cli for traffic metering and policing Cristian Dumitrescu
2017-10-06 13:58 ` Adrien Mazarguil
2017-08-26 0:06 ` [dpdk-dev] [PATCH 2/3] ethdev: add new rte_mtr API " Cristian Dumitrescu
2017-09-01 8:09 ` Hemant Agrawal
2017-09-04 14:32 ` Dumitrescu, Cristian
2017-09-06 9:15 ` Hemant Agrawal
2017-09-19 16:14 ` Dumitrescu, Cristian
2017-09-21 13:20 ` Thomas Monjalon
2017-10-06 10:03 ` Dumitrescu, Cristian
2017-08-26 0:06 ` [dpdk-dev] [PATCH 3/3] rte_flow: add new action " Cristian Dumitrescu
2017-09-06 16:23 ` Adrien Mazarguil
2017-09-19 16:36 ` Dumitrescu, Cristian
2017-09-19 17:00 ` Adrien Mazarguil
2017-10-06 10:02 ` Dumitrescu, Cristian
2017-09-21 13:28 ` [dpdk-dev] [PATCH 0/3] rte_mtr: generic ethdev API for " Thomas Monjalon
2017-05-30 16:44 ` [dpdk-dev] [RFC 3/3] rte_flow: add new action for traffic " Cristian Dumitrescu
2017-06-01 15:13 ` Adrien Mazarguil
2017-06-06 18:37 ` Dumitrescu, Cristian
2017-07-10 15:21 ` Adrien Mazarguil
2017-07-12 18:06 ` Dumitrescu, Cristian
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=293766e1-462b-70e2-9fba-7f9cab5f24ee@nxp.com \
--to=hemant.agrawal@nxp.com \
--cc=adrien.mazarguil@6wind.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=jerin.jacob@caviumnetworks.com \
--cc=jingjing.wu@intel.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).