[dpdk-dev] [PATCH] lib/rib: Add Routing Information Base library

Vladimir Medvedkin medvedkinv at gmail.com
Wed Jul 12 01:17:00 CEST 2017


Thanks, I'll change it.

2017-07-11 23:28 GMT+03:00 Stephen Hemminger <stephen at networkplumber.org>:

> 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.
>



-- 
Regards,
Vladimir


More information about the dev mailing list