app/testpmd: allow none shaper profile
authorTomasz Duszynski <tdu@semihalf.com>
Tue, 30 Jan 2018 07:37:08 +0000 (08:37 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 23 Apr 2018 19:42:31 +0000 (21:42 +0200)
commit54fbcfc6e04807e5806eb7d22d0b3f30dd29f26d
tree09c6fa6e2790b8c9329f4afbc4a6d775f9a5d750
parentb94fcf6bdf7126eda53e1ccf0e4c0fe20735bda0
app/testpmd: allow none shaper profile

Private shaper profiles are attached to nodes defined
in traffic manager hierarchy.

Since not every node must have a configured shaper
testpmd should allow setting shaper profile id to
invalid (RTE_TM_SHAPER_PROFILE_ID_NONE) easily.

This patch follows same approach as in case of setting
parent id of the root node i.e passing a negative value
sets node id to RTE_TM_NODE_ID_NULL.

In case of private shaper profile negative value will set
shaper profile id to RTE_TM_SHAPER_PROFILE_ID_NONE.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
app/test-pmd/cmdline_tm.c