[ovs-dev] [PATCH v4 2/2] netdev-dpdk: Add new DPDK RFC 4115 egress policer

David Marchand david.marchand at redhat.com
Tue Jan 14 08:35:33 UTC 2020


Hey Eelco,

On Mon, Jan 13, 2020 at 4:57 PM Eelco Chaudron <echaudro at redhat.com> wrote:
[snip]
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
> index 128963f..3f164c8 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -26,7 +26,10 @@
>  #include <sys/socket.h>
>  #include <linux/if.h>
>
> +/* The below is needed as rte_meter.h gets included trough rte_bus_pci.h. */
> +#define ALLOW_EXPERIMENTAL_API
>  #include <rte_bus_pci.h>
> +#undef ALLOW_EXPERIMENTAL_API

__rte_experimental is getting defined at the first inclusion of
rte_compat.h, so here rte_bus_pci.h is the first one.
__rte_experimental ends up being a big "all or nothing" switch, so we
don't need to #undef.

Cc: Neil if he has a better idea/comments.

>  #include <rte_config.h>
>  #include <rte_cycles.h>
>  #include <rte_errno.h>
> @@ -35,7 +38,9 @@
>  #include <rte_flow.h>
>  #include <rte_malloc.h>
>  #include <rte_mbuf.h>
> +#define ALLOW_EXPERIMENTAL_API
>  #include <rte_meter.h>
> +#undef ALLOW_EXPERIMENTAL_API
>  #include <rte_pci.h>
>  #include <rte_version.h>
>  #include <rte_vhost.h>


-- 
David Marchand



More information about the dev mailing list