[dpdk-dev] app/testpmd: add meter to the actions table

Message ID 1517140719-18237-1-git-send-email-tdu@semihalf.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tomasz Duszynski Jan. 28, 2018, 11:58 a.m. UTC
  Since METER action is supported by the testpmd application
suitable entry should exist in flow actions information table.

Without that testpmd will return error on adding a new flow to
the list of flows attached to a given port.

Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 app/test-pmd/config.c | 1 +
 1 file changed, 1 insertion(+)

--
2.7.4
  

Comments

Adrien Mazarguil Jan. 30, 2018, 10 a.m. UTC | #1
On Sun, Jan 28, 2018 at 12:58:39PM +0100, Tomasz Duszynski wrote:
> Since METER action is supported by the testpmd application
> suitable entry should exist in flow actions information table.
> 
> Without that testpmd will return error on adding a new flow to
> the list of flows attached to a given port.
> 
> Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
> Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>

I think it's also candidate for:

Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")
Cc: stable@dpdk.org

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
  
Thomas Monjalon Jan. 31, 2018, 10:43 p.m. UTC | #2
30/01/2018 11:00, Adrien Mazarguil:
> On Sun, Jan 28, 2018 at 12:58:39PM +0100, Tomasz Duszynski wrote:
> > Since METER action is supported by the testpmd application
> > suitable entry should exist in flow actions information table.
> > 
> > Without that testpmd will return error on adding a new flow to
> > the list of flows attached to a given port.
> > 
> > Signed-off-by: Tomasz Duszynski <tdu@semihalf.com>
> > Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
> 
> I think it's also candidate for:
> 
> Fixes: 30ffb4e67ee3 ("app/testpmd: add commands traffic metering and policing")
> Cc: stable@dpdk.org
> 
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

Applied, thanks
  

Patch

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 0a84481..4ad19fb 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -1038,6 +1038,7 @@  static const struct {
 	MK_FLOW_ACTION(RSS, sizeof(struct rte_flow_action_rss)), /* +queue[] */
 	MK_FLOW_ACTION(PF, 0),
 	MK_FLOW_ACTION(VF, sizeof(struct rte_flow_action_vf)),
+	MK_FLOW_ACTION(METER, sizeof(struct rte_flow_action_meter)),
 };

 /** Compute storage space needed by action configuration. */