X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_acl%2Frte_acl.h;h=bd8f892e6f62ed094a2f2c02ceec2bd15c261ecc;hb=cd40cd919540489e9da57863ac88136a89ac8759;hp=8d9bbe5c9b47b60370f79ed0620d0e456e0d1551;hpb=4a6ce751ace3708ed33248582cf24f808933e957;p=dpdk.git diff --git a/lib/librte_acl/rte_acl.h b/lib/librte_acl/rte_acl.h index 8d9bbe5c9b..bd8f892e6f 100644 --- a/lib/librte_acl/rte_acl.h +++ b/lib/librte_acl/rte_acl.h @@ -122,6 +122,9 @@ enum { #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)))) + /** * Miscellaneous data for ACL rule. */