diff options
author | Luca Boccassi <luca.boccassi@gmail.com> | 2017-11-13 10:38:04 +0000 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2017-11-13 10:38:39 +0000 |
commit | 976be7358289d46cd5ed8131bbf2e2c5a6838d3c (patch) | |
tree | 5e6f873dd1658446539f9d4621e2d16f559c867d /drivers/net/mlx5/mlx5_utils.h | |
parent | 055c52583a2794da8ba1e85a48cce3832372b12f (diff) |
New upstream version 17.11~rc4
Change-Id: I5cc288310eaa28cb8c2e475afce5e19f8c08ba1e
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_utils.h')
-rw-r--r-- | drivers/net/mlx5/mlx5_utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h index 218ae831..2fbd10b1 100644 --- a/drivers/net/mlx5/mlx5_utils.h +++ b/drivers/net/mlx5/mlx5_utils.h @@ -35,6 +35,7 @@ #define RTE_PMD_MLX5_UTILS_H_ #include <stddef.h> +#include <stdint.h> #include <stdio.h> #include <limits.h> #include <assert.h> @@ -61,6 +62,9 @@ !!(((bf)[((b) / (sizeof((bf)[0]) * CHAR_BIT))] & \ ((size_t)1 << ((b) % (sizeof((bf)[0]) * CHAR_BIT)))))) +/* Convert a bit number to the corresponding 64-bit mask */ +#define MLX5_BITSHIFT(v) (UINT64_C(1) << (v)) + /* Save and restore errno around argument evaluation. */ #define ERRNO_SAFE(x) ((errno = (int []){ errno, ((x), 0) }[0])) |