summaryrefslogtreecommitdiff
path: root/examples/ip_pipeline/cli.c
diff options
context:
space:
mode:
authorJasvinder Singh <jasvinder.singh@intel.com>2018-03-30 15:31:07 +0100
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-04-05 19:00:22 +0200
commit085c3d8c4d5266e16a7edce32af0625e2b447bb8 (patch)
tree7e03f779133574f82c93d44852ae8308c338dfe7 /examples/ip_pipeline/cli.c
parent1286b7af1bfbb2fa46a75ec804acc4835c3911fe (diff)
downloaddpdk-085c3d8c4d5266e16a7edce32af0625e2b447bb8.zip
dpdk-085c3d8c4d5266e16a7edce32af0625e2b447bb8.tar.gz
dpdk-085c3d8c4d5266e16a7edce32af0625e2b447bb8.tar.xz
examples/ip_pipeline: fix load balance table action
Fix bug in load balance action for pipeline table. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Diffstat (limited to 'examples/ip_pipeline/cli.c')
-rw-r--r--examples/ip_pipeline/cli.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c
index fa371b3..199a31f 100644
--- a/examples/ip_pipeline/cli.c
+++ b/examples/ip_pipeline/cli.c
@@ -2314,8 +2314,7 @@ cmd_pipeline_table_stats(char **tokens,
* priority <priority>
* ipv4 | ipv6 <sa> <sa_depth> <da> <da_depth>
* <sp0> <sp1> <dp0> <dp1> <proto>
- * | array
- * pos
+ * | array <pos>
* | hash
* raw <key>
* | ipv4_5tuple <sa> <da> <sp> <dp> <proto>
@@ -2845,15 +2844,15 @@ parse_table_action_balance(char **tokens,
tokens++;
n_tokens--;
- if (n_tokens < RTE_TABLE_ACTION_LB_KEY_SIZE_MAX)
+ if (n_tokens < RTE_TABLE_ACTION_LB_TABLE_SIZE)
return 0;
- for (i = 0; i < RTE_TABLE_ACTION_LB_KEY_SIZE_MAX; i++)
+ for (i = 0; i < RTE_TABLE_ACTION_LB_TABLE_SIZE; i++)
if (parser_read_uint32(&a->lb.out[i], tokens[i]) != 0)
return 0;
a->action_mask |= 1 << RTE_TABLE_ACTION_LB;
- return 1 + RTE_TABLE_ACTION_LB_KEY_SIZE_MAX;
+ return 1 + RTE_TABLE_ACTION_LB_TABLE_SIZE;
}