[dpdk-dev] [PATCH v10 1/1] net/af_xdp: introduce AF XDP PMD driver

Ferruh Yigit ferruh.yigit at intel.com
Wed Apr 3 19:44:25 CEST 2019


On 4/3/2019 5:59 PM, Xiaolong Ye wrote:
> Add a new PMD driver for AF_XDP which is a proposed faster version of
> AF_PACKET interface in Linux. More info about AF_XDP, please refer to [1]
> [2].
> 
> This is the vanilla version PMD which just uses a raw buffer registered as
> the umem.
> 
> [1] https://fosdem.org/2018/schedule/event/af_xdp/
> [2] https://lwn.net/Articles/745934/
> 
> Signed-off-by: Xiaolong Ye <xiaolong.ye at intel.com>

I am not able to test functionality but code looks good to me, I can compile via
Makefile (with suggested steps in doc) but not able to build with meson, can you
please check below comments?

<...>

> @@ -0,0 +1,21 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright(c) 2019 Intel Corporation
> +
> +if host_machine.system() != 'linux'
> +	build = false
> +endif

After this point, if build is false it shouldn't continue to below checks I think.

> +
> +bpf_dep = dependency('libbpf', required: false)

My library is in '/usr/local/lib64/libbpf.so' but this line can't find it. Where
does 'dependency()' checks for libraries?

> +if bpf_dep.found()
> +	build = true
> +else
> +	bpf_dep = cc.find_library('libbpf', required: false)

Also this line can't find it, in log it says "(tried pkgconfig and cmake)" and
yes there is no pkgconfig for it, any idea how 'cmake' used?

> +	if bpf_dep.found() and cc.has_header('xsk.h', dependencies: bpf_dep) and cc.has_header('linux/if_xdp.h')

Should this be 'lib/xsk.h' now?

> +		build = true
> +		pkgconfig_extra_libs += '-lbpf'
> +	else
> +		build = false
> +	endif
> +endif
> +sources = files('rte_eth_af_xdp.c')
> +ext_deps += bpf_dep



More information about the dev mailing list