[dpdk-dev] [PATCH] lib/rib: Add Routing Information Base library
Stephen Hemminger
stephen at networkplumber.org
Tue Jul 11 22:28:07 CEST 2017
On Tue, 11 Jul 2017 19:33:05 +0000
Medvedkin Vladimir <medvedkinv at gmail.com> wrote:
> +
> +#define ROUNDUP(x, y) ((((x - 1) >> (32 - y)) + 1) << (32 - y))
There is already RTE_ALIGN_FLOOR/RTE_ALIGN_CEIL
> +#define RTE_DIR24_8_GET_TBL24_P(fib, ip) \
> + ((void *)&((uint8_t *)fib->tbl24)[(ip & \
> + RTE_DIR24_8_TBL24_MASK) >> (8 - fib->nh_sz)]) \
> +
Why is this a macro and not an inline function.
The expresion could also be split up to be simpler, and compiler
would generate same result.
More information about the dev
mailing list