From patchwork Fri Apr 17 13:14:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: William Tu X-Patchwork-Id: 1272239 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=imFvL7YM; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493c5Z6YDTz9sSM for ; Fri, 17 Apr 2020 23:15:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 69D6F85F69; Fri, 17 Apr 2020 13:15:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gYrvqx_RhLin; Fri, 17 Apr 2020 13:15:11 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id DE79985BF2; Fri, 17 Apr 2020 13:15:11 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C3565C1D7E; Fri, 17 Apr 2020 13:15:11 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 12D95C0172 for ; Fri, 17 Apr 2020 13:15:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EF52520022 for ; Fri, 17 Apr 2020 13:15:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EasaNNHafvD2 for ; Fri, 17 Apr 2020 13:15:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by silver.osuosl.org (Postfix) with ESMTPS id 5ECD51FEBF for ; Fri, 17 Apr 2020 13:15:09 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id a22so1065516pjk.5 for ; Fri, 17 Apr 2020 06:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=J0h0KsEZFNTDjPYIE4jSp97EH7Lu1lwgaafA5EqJVI0=; b=imFvL7YMzhsCn3hq7oplDOurW3+85u7f35R2V1CQRhk7LIbkPHWM6bIq90LqfjqHfg wGC8VsD85o+HcL98EWgBIT2/7TY36wf1LcSiYa3kDt1gJDP1e3+ZiPQEGDzOdgHRQC8m 3eIdRXrXqeAHM/k+ZzImywA8Htt2oWYTtPRaRRl3YWVvI3Gt1dfTouC+ZBbkZDDFp1R1 MyY0dTebrZ4jYO1/ReImF+3vl2lWViZrohTUtx4dRyP/dpxA5UUOYUgB4vmwNZErFClz i5T/T8PtzqxV2T8FJpBY/+o5vkxedMLjvc5O2O7KNwb5270Id7+eHsoFoKvrHB0LceYp LzYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=J0h0KsEZFNTDjPYIE4jSp97EH7Lu1lwgaafA5EqJVI0=; b=RO8X2vKC3Kg17K/aQwzm0I9YayIfJSrk5OAJ9zFXNJ9vFNpDu0Qt/rrQnfF79i7mFw Ba4w1K4uHihOAf1VvfjRl+FygRACeVVxeN9b4doCqMVDfm7n3F3mBqVQiQx/0MrtAwhA ajw5s9MApecPfkU3cVAn0z6iE9lnOAYpx6YkcZsYERG/fw4OmScnX4uX+nhXqwyjO/Te QRP41jVTHD3BxPhj5oDK5uG50ndRL/fI14UgF04MkgCZPmVK1G3vzNf2EQCulUW4Afvg 3S9enhBvQiMpWy+aULDJB8pH5fb6xOjBVkMbOcHJfcT1z7nGp5HFVQ1dV79WxWjRxJRa fHow== X-Gm-Message-State: AGi0PuY5//5FgWXW5PorDJTRTwlrSliJVUPVkVL+YArrHVvYsbUCrG/O 8tiihnJ9SaLdVhAOwjpWV0wKuADi X-Google-Smtp-Source: APiQypKUIGIlxTqzkxi7EiEcpaEY99+xVOeSoNCVt3tuOZd/b0dDArbbLD2ZtNvpg5eVGpp2rzwwpw== X-Received: by 2002:a17:90a:2401:: with SMTP id h1mr4508744pje.1.1587129308628; Fri, 17 Apr 2020 06:15:08 -0700 (PDT) Received: from sc9-mailhost2.vmware.com (c-76-21-95-192.hsd1.ca.comcast.net. [76.21.95.192]) by smtp.gmail.com with ESMTPSA id v1sm1260250pfn.212.2020.04.17.06.15.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2020 06:15:08 -0700 (PDT) From: William Tu To: dev@openvswitch.org Date: Fri, 17 Apr 2020 06:14:43 -0700 Message-Id: <1587129283-54396-1-git-send-email-u9012063@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Cc: =?utf-8?q?Michal_Ors=C3=A1k?= Subject: [ovs-dev] [PATCH] acinclude: Check RTE_LIBRTE_PMD_PCAP and libpcap. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" 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 Signed-off-by: William Tu --- 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 ]]) + AC_CHECK_DECL([RTE_LIBRTE_PMD_PCAP], [ + OVS_FIND_DEPENDENCY([pcap_dump], [pcap], [libpcap]) + ], [], [[#include ]]) + 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