summaryrefslogtreecommitdiff
path: root/lib/librte_acl
diff options
context:
space:
mode:
authorMichał Mirosław <michal.miroslaw@atendesoftware.pl>2017-01-18 20:32:51 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2017-01-30 11:08:47 +0100
commitc6c7a8d7e6a81320b17dccf63e274bd62df262ae (patch)
tree59690fa5e64efc705f208c69e273d370449b4a33 /lib/librte_acl
parent7601d32ed3a07d2c341095aa3a47b72e78b12f6a (diff)
downloaddpdk-c6c7a8d7e6a81320b17dccf63e274bd62df262ae.zip
dpdk-c6c7a8d7e6a81320b17dccf63e274bd62df262ae.tar.gz
dpdk-c6c7a8d7e6a81320b17dccf63e274bd62df262ae.tar.xz
acl: allow zero verdict
This enables ACL matches to return 0 where the distinction from no-match case is not needed. Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Diffstat (limited to 'lib/librte_acl')
-rw-r--r--lib/librte_acl/rte_acl.c3
-rw-r--r--lib/librte_acl/rte_acl.h2
2 files changed, 1 insertions, 4 deletions
diff --git a/lib/librte_acl/rte_acl.c b/lib/librte_acl/rte_acl.c
index 8b7e92c..d1f40be 100644
--- a/lib/librte_acl/rte_acl.c
+++ b/lib/librte_acl/rte_acl.c
@@ -313,8 +313,7 @@ acl_check_rule(const struct rte_acl_rule_data *rd)
if ((RTE_LEN2MASK(RTE_ACL_MAX_CATEGORIES, typeof(rd->category_mask)) &
rd->category_mask) == 0 ||
rd->priority > RTE_ACL_MAX_PRIORITY ||
- rd->priority < RTE_ACL_MIN_PRIORITY ||
- rd->userdata == RTE_ACL_INVALID_USERDATA)
+ rd->priority < RTE_ACL_MIN_PRIORITY)
return -EINVAL;
return 0;
}
diff --git a/lib/librte_acl/rte_acl.h b/lib/librte_acl/rte_acl.h
index caa91f7..b53179a 100644
--- a/lib/librte_acl/rte_acl.h
+++ b/lib/librte_acl/rte_acl.h
@@ -120,8 +120,6 @@ enum {
RTE_ACL_MIN_PRIORITY = 0,
};
-#define RTE_ACL_INVALID_USERDATA 0
-
#define RTE_ACL_MASKLEN_TO_BITMASK(v, s) \
((v) == 0 ? (v) : (typeof(v))((uint64_t)-1 << ((s) * CHAR_BIT - (v))))