[ovs-dev] [PATCH] acinclude: Check RTE_LIBRTE_PMD_PCAP and libpcap.

Ilya Maximets i.maximets at ovn.org
Fri Apr 17 16:01:57 UTC 2020


On 4/17/20 3:14 PM, William Tu wrote:
> When enabling RTE_LIBRTE_PMD_PCAP in DPDK, we need to link the libpcap
> library, otherwise 'make' will fail.  I'm using this for creating a
> pcap-based device which read pcap file infinitely to rx queue, acting
> like a traffic generator.  Example:
>   $ ovs-vsctl add-port br0 tg0 -- set int tg0 type=dpdk \
>     options:dpdk-devargs=vdev:net_pcap0,rx_pcap=p0.pcap,infinite_rx=1
> 
> The p0.pcap is replayed into the rx queue of tg0, generating
> traffic rate around 8Mpps into OVS when OVS is doing drop.
> For more info, see https://doc.dpdk.org/guides/nics/pcap_ring.html
> 
> Cc: Michal Orsák <michal.orsak at gmail.com>
> Signed-off-by: William Tu <u9012063 at gmail.com>
> ---

Hi William.

There is already similar patch series from Ciara:
https://patchwork.ozlabs.org/project/openvswitch/list/?series=157685
I just had no enough time to get to them.

Best regards, Ilya Maximets.

>  acinclude.m4 | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/acinclude.m4 b/acinclude.m4
> index 0901f2870239..fd139ec9ea36 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -359,6 +359,10 @@ AC_DEFUN([OVS_CHECK_DPDK], [
>        AC_DEFINE([VHOST_NUMA], [1], [NUMA Aware vHost support detected in DPDK.])
>      ], [], [[#include <rte_config.h>]])
>  
> +    AC_CHECK_DECL([RTE_LIBRTE_PMD_PCAP], [
> +      OVS_FIND_DEPENDENCY([pcap_dump], [pcap], [libpcap])
> +    ], [], [[#include <rte_config.h>]])
> +
>      AC_CHECK_DECL([RTE_LIBRTE_MLX5_PMD], [dnl found
>        OVS_FIND_DEPENDENCY([mnl_attr_put], [mnl], [libmnl])
>        AC_CHECK_DECL([RTE_IBVERBS_LINK_DLOPEN], [], [dnl not found
> 



More information about the dev mailing list