summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2018-08-24 17:47:06 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-09-16 11:53:25 +0200
commit53945477981cf75cf8d66e67a098b486e37df167 (patch)
treeb4c139ca57cb5c721a8ac2efa98bb1d95a010fd1 /test
parent23f1c424599008a990bfcdf283a0c935bf5b3cdf (diff)
downloaddpdk-53945477981cf75cf8d66e67a098b486e37df167.zip
dpdk-53945477981cf75cf8d66e67a098b486e37df167.tar.gz
dpdk-53945477981cf75cf8d66e67a098b486e37df167.tar.xz
acl: forbid rule with priority zero
If user specifies priority=0 for some of ACL rules that can cause rte_acl_classify to return wrong results. The reason is that priority zero is used internally for no-match nodes. See more details at: https://bugs.dpdk.org/show_bug.cgi?id=79. The simplest way to overcome the issue is just not allow zero to be a valid priority for the rule. Fixes: dc276b5780c2 ("acl: new library") Cc: stable@dpdk.org Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Diffstat (limited to 'test')
-rw-r--r--test/test/test_acl.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/test/test_acl.h b/test/test/test_acl.h
index c4811c8..bbb0447 100644
--- a/test/test/test_acl.h
+++ b/test/test/test_acl.h
@@ -80,34 +80,40 @@ enum {
struct rte_acl_ipv4vlan_rule invalid_layout_rules[] = {
/* test src and dst address */
{
- .data = {.userdata = 1, .category_mask = 1},
+ .data = {.userdata = 1, .category_mask = 1,
+ .priority = 1},
.src_addr = IPv4(10,0,0,0),
.src_mask_len = 24,
},
{
- .data = {.userdata = 2, .category_mask = 1},
+ .data = {.userdata = 2, .category_mask = 1,
+ .priority = 1},
.dst_addr = IPv4(10,0,0,0),
.dst_mask_len = 24,
},
/* test src and dst ports */
{
- .data = {.userdata = 3, .category_mask = 1},
+ .data = {.userdata = 3, .category_mask = 1,
+ .priority = 1},
.dst_port_low = 100,
.dst_port_high = 100,
},
{
- .data = {.userdata = 4, .category_mask = 1},
+ .data = {.userdata = 4, .category_mask = 1,
+ .priority = 1},
.src_port_low = 100,
.src_port_high = 100,
},
/* test proto */
{
- .data = {.userdata = 5, .category_mask = 1},
+ .data = {.userdata = 5, .category_mask = 1,
+ .priority = 1},
.proto = 0xf,
.proto_mask = 0xf
},
{
- .data = {.userdata = 6, .category_mask = 1},
+ .data = {.userdata = 6, .category_mask = 1,
+ .priority = 1},
.dst_port_low = 0xf,
.dst_port_high = 0xf,
}