From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Jasvinder Singh <jasvinder.singh@intel.com>, dev@dpdk.org
Cc: cristian.dumitrescu@intel.com, thomas@monjalon.net, wenzhuo.lu@intel.com
Subject: Re: [dpdk-dev] [PATCH v7 5/5] app/testpmd: add traffic management forwarding mode
Date: Mon, 9 Oct 2017 21:17:40 +0100 [thread overview]
Message-ID: <b365444e-3c31-8574-8d1e-c8e8e2db94ae@intel.com> (raw)
In-Reply-To: <20171009125846.106218-6-jasvinder.singh@intel.com>
On 10/9/2017 1:58 PM, Jasvinder Singh wrote:
> This commit extends the testpmd application with new forwarding engine
> that demonstrates the use of ethdev traffic management APIs and softnic
> PMD for QoS traffic management.
>
> In this mode, 5-level hierarchical tree of the QoS scheduler is built
> with the help of ethdev TM APIs such as shaper profile add/delete,
> shared shaper add/update, node add/delete, hierarchy commit, etc.
> The hierarchical tree has following nodes; root node(x1, level 0),
> subport node(x1, level 1), pipe node(x4096, level 2),
> tc node(x16348, level 3), queue node(x65536, level 4).
>
> During runtime, each received packet is first classified by mapping the
> packet fields information to 5-tuples (HQoS subport, pipe, traffic class,
> queue within traffic class, and color) and storing it in the packet mbuf
> sched field. After classification, each packet is sent to softnic port
> which prioritizes the transmission of the received packets, and
> accordingly sends them on to the output interface.
>
> To enable traffic management mode, following testpmd command is used;
>
> $ ./testpmd -c c -n 4 --vdev
> 'net_softnic0,hard_name=0000:06:00.1,soft_tm=on' -- -i
> --forward-mode=tm
>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> Acked-by: Thomas Monjalon <thomas@monjalon.net>
<...>
> +static int
> +softport_tm_subport_node_add(portid_t port_id, struct tm_hierarchy *h,
> + struct rte_tm_error *error)
> +{
> + uint32_t subport_parent_node_id, subport_node_id;
> + struct rte_tm_node_params snp;
> + struct rte_tm_shaper_params ssp;
> + uint32_t priority, weight, level_id, shaper_profile_id;
> + uint32_t i;
> +
> + memset(&ssp, 0, sizeof(struct rte_tm_shaper_params));
> + memset(&snp, 0, sizeof(struct rte_tm_node_params));
> +
> + shaper_profile_id = h->n_shapers;
> +
> + /* Add Shaper Profile to TM Hierarchy */
> + for (i = 0; i < SUBPORT_NODES_PER_PORT; i++) {
> + ssp.peak.rate = h->subport_node_shaper_rate;
> + ssp.peak.size = TOKEN_BUCKET_SIZE;
> + ssp.pkt_length_adjust = RTE_TM_ETH_FRAMING_OVERHEAD_FCS;
> +
> + if (rte_tm_shaper_profile_add(port_id, shaper_profile_id,
> + &ssp, error)) {
> + printf("%s ERROR(%d)-%s!(shaper_id %u)\n ",
> + __func__, error->type, error->message,
> + shaper_profile_id);
> + return -1;
> + }
> +
> + /* Node Parameters */
> + h->subport_node_id[i] = SUBPORT_NODES_START_ID + i;
> + subport_parent_node_id = h->root_node_id;
> + weight = 1;
> + priority = 0;
> + level_id = TM_NODE_LEVEL_SUBPORT;
> + snp.shaper_profile_id = shaper_profile_id;
> + snp.nonleaf.n_sp_priorities = 1;
> + snp.stats_mask = STATS_MASK_DEFAULT;
> +
> + /* Add Node to TM Hiearchy */
> + if (rte_tm_node_add(port_id,
> + h->subport_node_id[i],
> + subport_parent_node_id,
> + priority, weight,
> + level_id,
> + &snp,
> + error)) {
> + printf("%s ERROR(%d)-%s!(node %u,parent %u,level %u)\n",
> + __func__,
> + error->type,
> + error->message,
> + h->subport_node_id[i],
> + subport_parent_node_id,
> + level_id);
> + return -1;
> + }
> + shaper_profile_id++;
> + subport_node_id++;
This is causing following build error:
.../dpdk/app/test-pmd/tm.c:462:3: error: variable 'subport_node_id' is
uninitialized when used here [-Werror,-Wuninitialized]
subport_node_id++;
^~~~~~~~~~~~~~~
.../dpdk/app/test-pmd/tm.c:409:50: note: initialize the variable
'subport_node_id' to silence this warning
uint32_t subport_parent_node_id, subport_node_id;
^
= 0
next prev parent reply other threads:[~2017-10-09 20:17 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 18:11 [dpdk-dev] [PATCH 0/2] net/softnic: sw fall-back for traffic management Jasvinder Singh
2017-05-26 18:11 ` [dpdk-dev] [PATCH 1/2] net/softnic: add softnic PMD " Jasvinder Singh
2017-06-26 16:43 ` [dpdk-dev] [PATCH v2 0/2] net/softnic: sw fall-back " Jasvinder Singh
2017-06-26 16:43 ` [dpdk-dev] [PATCH v2 1/2] net/softnic: add softnic PMD " Jasvinder Singh
2017-08-11 12:49 ` [dpdk-dev] [PATCH v3 0/4] net/softnic: sw fall-back pmd for traffic mgmt and others Jasvinder Singh
2017-08-11 12:49 ` [dpdk-dev] [PATCH v3 1/4] net/softnic: add softnic PMD Jasvinder Singh
2017-09-05 14:53 ` Ferruh Yigit
2017-09-08 9:30 ` Singh, Jasvinder
2017-09-08 9:48 ` Ferruh Yigit
2017-09-08 10:42 ` Singh, Jasvinder
2017-09-18 9:10 ` [dpdk-dev] [PATCH v4 0/4] net/softnic: sw fall-back pmd for traffic mgmt and others Jasvinder Singh
2017-09-18 9:10 ` [dpdk-dev] [PATCH v4 1/4] net/softnic: add softnic PMD Jasvinder Singh
2017-09-18 16:58 ` Singh, Jasvinder
2017-09-18 19:09 ` Thomas Monjalon
2017-09-18 9:10 ` [dpdk-dev] [PATCH v4 2/4] net/softnic: add traffic management support Jasvinder Singh
2017-09-25 1:58 ` Lu, Wenzhuo
2017-09-28 8:14 ` Singh, Jasvinder
2017-09-29 14:04 ` [dpdk-dev] [PATCH v5 0/5] net/softnic: sw fall-back pmd for traffic mgmt and others Jasvinder Singh
2017-09-29 14:04 ` [dpdk-dev] [PATCH v5 1/5] net/softnic: add softnic PMD Jasvinder Singh
2017-09-29 14:04 ` [dpdk-dev] [PATCH v5 2/5] net/softnic: add traffic management support Jasvinder Singh
2017-10-06 16:59 ` [dpdk-dev] [PATCH v6 0/5] net/softnic: sw fall-back pmd for traffic mgmt and others Jasvinder Singh
2017-10-06 16:59 ` [dpdk-dev] [PATCH v6 1/5] net/softnic: add softnic PMD Jasvinder Singh
2017-10-09 12:58 ` [dpdk-dev] [PATCH v7 0/5] net/softnic: sw fall-back pmd for traffic mgmt and others Jasvinder Singh
2017-10-09 12:58 ` [dpdk-dev] [PATCH v7 1/5] net/softnic: add softnic PMD Jasvinder Singh
2017-10-09 20:18 ` Ferruh Yigit
2017-10-10 10:08 ` Singh, Jasvinder
2017-10-10 10:18 ` [dpdk-dev] [PATCH v8 0/5] net/softnic: sw fall-back pmd for traffic mgmt and others Jasvinder Singh
2017-10-10 10:18 ` [dpdk-dev] [PATCH v8 1/5] net/softnic: add softnic PMD Jasvinder Singh
2017-10-11 23:18 ` Thomas Monjalon
2017-10-12 8:22 ` Singh, Jasvinder
2017-10-10 10:18 ` [dpdk-dev] [PATCH v8 2/5] net/softnic: add traffic management support Jasvinder Singh
2017-10-10 10:18 ` [dpdk-dev] [PATCH v8 3/5] net/softnic: add TM capabilities ops Jasvinder Singh
2017-10-10 10:18 ` [dpdk-dev] [PATCH v8 4/5] net/softnic: add TM hierarchy related ops Jasvinder Singh
2017-10-10 10:18 ` [dpdk-dev] [PATCH v8 5/5] app/testpmd: add traffic management forwarding mode Jasvinder Singh
2017-10-10 18:24 ` Ferruh Yigit
2017-10-10 18:31 ` [dpdk-dev] [PATCH v8 0/5] net/softnic: sw fall-back pmd for traffic mgmt and others Ferruh Yigit
2017-10-10 19:09 ` Singh, Jasvinder
2017-10-09 12:58 ` [dpdk-dev] [PATCH v7 2/5] net/softnic: add traffic management support Jasvinder Singh
2017-10-09 12:58 ` [dpdk-dev] [PATCH v7 3/5] net/softnic: add TM capabilities ops Jasvinder Singh
2017-10-09 12:58 ` [dpdk-dev] [PATCH v7 4/5] net/softnic: add TM hierarchy related ops Jasvinder Singh
2017-10-09 12:58 ` [dpdk-dev] [PATCH v7 5/5] app/testpmd: add traffic management forwarding mode Jasvinder Singh
2017-10-09 20:17 ` Ferruh Yigit [this message]
2017-10-10 10:07 ` Singh, Jasvinder
2017-10-06 17:00 ` [dpdk-dev] [PATCH v6 2/5] net/softnic: add traffic management support Jasvinder Singh
2017-10-06 17:00 ` [dpdk-dev] [PATCH v6 3/5] net/softnic: add TM capabilities ops Jasvinder Singh
2017-10-06 17:00 ` [dpdk-dev] [PATCH v6 4/5] net/softnic: add TM hierarchy related ops Jasvinder Singh
2017-10-06 17:00 ` [dpdk-dev] [PATCH v6 5/5] app/testpmd: add traffic management forwarding mode Jasvinder Singh
2017-10-06 18:57 ` [dpdk-dev] [PATCH v6 0/5] net/softnic: sw fall-back pmd for traffic mgmt and others Ferruh Yigit
2017-10-09 11:32 ` Singh, Jasvinder
2017-09-29 14:04 ` [dpdk-dev] [PATCH v5 3/5] net/softnic: add TM capabilities ops Jasvinder Singh
2017-09-29 14:04 ` [dpdk-dev] [PATCH v5 4/5] net/softnic: add TM hierarchy related ops Jasvinder Singh
2017-09-29 14:04 ` [dpdk-dev] [PATCH v5 5/5] app/testpmd: add traffic management forwarding mode Jasvinder Singh
2017-09-18 9:10 ` [dpdk-dev] [PATCH v4 3/4] net/softnic: add TM capabilities ops Jasvinder Singh
2017-09-25 2:33 ` Lu, Wenzhuo
2017-09-28 8:16 ` Singh, Jasvinder
2017-09-18 9:10 ` [dpdk-dev] [PATCH v4 4/4] net/softnic: add TM hierarchy related ops Jasvinder Singh
2017-09-25 7:14 ` Lu, Wenzhuo
2017-09-28 8:39 ` Singh, Jasvinder
2017-09-20 15:35 ` [dpdk-dev] [PATCH v4 0/4] net/softnic: sw fall-back pmd for traffic mgmt and others Thomas Monjalon
2017-09-22 22:07 ` Singh, Jasvinder
2017-10-06 10:40 ` Dumitrescu, Cristian
2017-10-06 12:13 ` Thomas Monjalon
2017-08-11 12:49 ` [dpdk-dev] [PATCH v3 2/4] net/softnic: add traffic management support Jasvinder Singh
2017-08-11 12:49 ` [dpdk-dev] [PATCH v3 3/4] net/softnic: add TM capabilities ops Jasvinder Singh
2017-08-11 12:49 ` [dpdk-dev] [PATCH v3 4/4] net/softnic: add TM hierarchy related ops Jasvinder Singh
2017-09-08 17:08 ` [dpdk-dev] [PATCH v3 0/4] net/softnic: sw fall-back pmd for traffic mgmt and others Dumitrescu, Cristian
2017-06-26 16:43 ` [dpdk-dev] [PATCH v2 2/2] net/softnic: add traffic management ops Jasvinder Singh
2017-05-26 18:11 ` [dpdk-dev] [PATCH " Jasvinder Singh
2017-06-07 14:32 ` [dpdk-dev] [PATCH 0/2] net/softnic: sw fall-back for traffic management Thomas Monjalon
2017-06-08 13:27 ` Dumitrescu, Cristian
2017-06-08 13:59 ` Thomas Monjalon
2017-06-08 15:27 ` Dumitrescu, Cristian
2017-06-08 16:16 ` Thomas Monjalon
2017-06-08 16:43 ` Dumitrescu, Cristian
2017-07-04 23:48 ` Thomas Monjalon
2017-07-05 9:32 ` Dumitrescu, Cristian
2017-07-05 10:17 ` Thomas Monjalon
2017-08-11 15:28 ` Stephen Hemminger
2017-08-11 16:22 ` 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=b365444e-3c31-8574-8d1e-c8e8e2db94ae@intel.com \
--to=ferruh.yigit@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=thomas@monjalon.net \
--cc=wenzhuo.lu@intel.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).