app/testpmd: fix flow rule copy functions
authorMatan Azrad <matan@mellanox.com>
Mon, 24 Jul 2017 13:47:32 +0000 (16:47 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 31 Jul 2017 12:08:25 +0000 (14:08 +0200)
commit79bf388493b5c4be104c6c17fd98aa293dafa42d
tree5139412b5fff3b65248968bce43169e16d896448
parent3070419e84e578ec7bf1e02555d88b26ce7d9fc2
app/testpmd: fix flow rule copy functions

The corrupted code checks only RAW flow item type special case for
returning its size but doesn't deal with any other flow item type
and returns 0 for all the others.

This bug leaves the flow descriptor empty for non RAW types.

The fix takes the correct size to any regular types from appropriate
array.

The same issue, with a similar fix, is in flow action size method which
deals only with RSS special type.

Fixes: 938a184a1870 ("app/testpmd: implement basic support for flow API")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
app/test-pmd/config.c