From patchwork Thu Dec 18 11:33:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatesh Vivekanandan X-Patchwork-Id: 42425 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CC50E26C8B for ; Thu, 18 Dec 2014 11:35:09 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id y19sf619259wgg.7 for ; Thu, 18 Dec 2014 03:35:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id :mime-version:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=Y9xkFRo2uhqyWnEeLAqBiv7Z22wb7wGfgSssWkfTAxA=; b=RZ1I7IlNflqbqNR27L4pmT3yAmTjrlzfLF7LhWfkrlLook31a80sh7oas3CFl9X1xA hpVXAqZuCMl9TjldhBZan/zuf2jIM4nDpajMkZmd/vNIbUo9cUdynW9hNhHixDcsaOKa XnTPSbQLQRjf303H1gFbnEsEdXmFf51dLoEvYo1/qA4R3WdRTJOK5+CXgVz3AwwS0vC0 j13Oet/Jw7pjWQ4iqHn9440+Hcj9pcZxlf9/878Nf3CQ+eqjLP/7xAjLm/nH2c8UNjWs 7XkDklvueNdeMQHO3766qCDUIVXxP5wQElWEPoDmH0oTMe4AacL8Sgz+R91Toc8VITUz V+rA== X-Gm-Message-State: ALoCoQmlT7ToGfUPJNbT1Yk0vKRcWAj5watiIr7Hu1GocFcDfg94nXzv+Ccs0i/FnJD9rUZRnFbu X-Received: by 10.181.13.147 with SMTP id ey19mr2071273wid.2.1418902509132; Thu, 18 Dec 2014 03:35:09 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.72 with SMTP id y8ls1217857lay.99.gmail; Thu, 18 Dec 2014 03:35:08 -0800 (PST) X-Received: by 10.112.38.4 with SMTP id c4mr1789393lbk.46.1418902508960; Thu, 18 Dec 2014 03:35:08 -0800 (PST) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id lc1si6598098lab.57.2014.12.18.03.35.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Dec 2014 03:35:08 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by mail-lb0-f169.google.com with SMTP id p9so794982lbv.14 for ; Thu, 18 Dec 2014 03:35:08 -0800 (PST) X-Received: by 10.152.43.103 with SMTP id v7mr1721336lal.29.1418902508386; Thu, 18 Dec 2014 03:35:08 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.142.69 with SMTP id ru5csp1673987lbb; Thu, 18 Dec 2014 03:35:07 -0800 (PST) X-Received: by 10.140.39.201 with SMTP id v67mr2317818qgv.45.1418902506759; Thu, 18 Dec 2014 03:35:06 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id x9si525706qaw.6.2014.12.18.03.35.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 18 Dec 2014 03:35:06 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y1ZMF-0007g8-CK; Thu, 18 Dec 2014 11:35:03 +0000 Received: from mail-gw2-out.broadcom.com ([216.31.210.63]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y1ZM9-0007fc-6m for lng-odp@lists.linaro.org; Thu, 18 Dec 2014 11:34:57 +0000 X-IronPort-AV: E=Sophos;i="5.07,600,1413270000"; d="scan'208";a="53364435" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw2-out.broadcom.com with ESMTP; 18 Dec 2014 04:06:21 -0800 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 18 Dec 2014 03:35:04 -0800 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.3.174.1; Thu, 18 Dec 2014 03:34:49 -0800 Received: from localhost.localdomain (unknown [10.131.60.56]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 96A4940FE9; Thu, 18 Dec 2014 03:34:12 -0800 (PST) From: To: Date: Thu, 18 Dec 2014 17:03:00 +0530 Message-ID: <1418902380-15719-1-git-send-email-venkatesh.vivekanandan@linaro.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Topics: patch Subject: [lng-odp] [PATCH DPDK] Add support for DPDK 1.7.1 X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: venkatesh.vivekanandan@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Venkatesh Vivekanandan - Added math library while linking - Added -rpath to locate the shared objects - Code modification done to support DPDK 1.7.1 - Updated README Signed-off-by: Venkatesh Vivekanandan Reviewed-by: Zoltan Kiss --- platform/linux-dpdk/Makefile.am | 2 +- platform/linux-dpdk/Makefile.inc | 1 + platform/linux-dpdk/README | 19 ++++++++++--------- platform/linux-dpdk/odp_buffer_pool.c | 2 +- platform/linux-dpdk/odp_init.c | 5 ----- platform/linux-dpdk/odp_packet.c | 2 +- 6 files changed, 14 insertions(+), 17 deletions(-) diff --git a/platform/linux-dpdk/Makefile.am b/platform/linux-dpdk/Makefile.am index 686df6a..db11e0a 100644 --- a/platform/linux-dpdk/Makefile.am +++ b/platform/linux-dpdk/Makefile.am @@ -18,7 +18,7 @@ AM_CFLAGS += -I$(top_srcdir)/platform/linux-generic/include AM_CFLAGS += -I$(top_srcdir)/platform/linux-generic/include/api AM_CFLAGS += -I$(top_srcdir)/helper/include -DPDK_LIBS="-lintel_dpdk -ldl" +DPDK_LIBS="-lintel_dpdk -ldl -lm" LIBS += $(DPDK_LIBS) include_HEADERS = \ diff --git a/platform/linux-dpdk/Makefile.inc b/platform/linux-dpdk/Makefile.inc index e69de29..f681940 100644 --- a/platform/linux-dpdk/Makefile.inc +++ b/platform/linux-dpdk/Makefile.inc @@ -0,0 +1 @@ +AM_LDFLAGS += -R$(SDK_INSTALL_PATH)/lib diff --git a/platform/linux-dpdk/README b/platform/linux-dpdk/README index 0f2210b..85ff112 100644 --- a/platform/linux-dpdk/README +++ b/platform/linux-dpdk/README @@ -7,15 +7,15 @@ ODP-DPDK: --------- This effort is to port ODP on top of DPDK and use DPDK as the accelerator for all intel NIC's. Pre-requisite is DPDK should be cloned and -compiled. DPDK and ODP was compiled and tested on Ubuntu 14.04 +compiled. DPDK and ODP was compiled and tested on Ubuntu 14.04 LTS 3.13.0-29-generic kernel. # To Clone DPDK $ git clone http://92.243.14.124/git/dpdk ./ -# we support only 1.6.0r2 of DPDK for now +# we support only 1.7.1 of DPDK for now $ git tag -l -- will list all the tags available -$ git checkout -b 1.6.0 tags/v1.6.0r2 +$ git checkout -b 1.7.1 tags/v1.7.1 # Please refer to http://dpdk.org/doc for more details on how to build # DPDK. Getting started guide for Linux might be of help. # Best effort is done to provide some help on DPDK cmds below for Ubuntu, @@ -27,7 +27,7 @@ $ git checkout -b 1.6.0 tags/v1.6.0r2 $ export RTE_SDK= # For example $ export RTE_SDK=/root/dpdk -$ export RTE_TARGET=x86_64-default-linuxapp-gcc +$ export RTE_TARGET=x86_64-native-linuxapp-gcc # RTE_TARGET is the configuration used while building DPDK $ cd @@ -48,11 +48,12 @@ How to setup and compile DPDK: $ cd # This has to be done only once. -$ make config T=x86_64-default-linuxapp-gcc O=x86_64-default-linuxapp-gcc -# set CONFIG_RTE_BUILD_COMBINE_LIBS=y in .config file -# Note: if non-intel SFP's are used in IXGBE, then set CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y in .config file -$ make install T=x86_64-default-linuxapp-gcc EXTRA_CFLAGS="-fPIC" - +$ make config T=x86_64-native-linuxapp-gcc O=x86_64-native-linuxapp-gcc +# set CONFIG_RTE_BUILD_COMBINE_LIBS=y and CONFIG_RTE_BUILD_SHARED_LIB=y in +# ./x86_64-native-linuxapp-gcc/.config file +# Note: if non-intel SFP's are used in IXGBE, then set +# CONFIG_RTE_LIBRTE_IXGBE_ALLOW_UNSUPPORTED_SFP=y in .config file +$ make install T=x86_64-native-linuxapp-gcc EXTRA_CFLAGS="-fPIC" # If "conflicting types for skb_set_hash" error happens during DPDK # build, then please knock-off skb_set_hash function from kcompat.h as diff --git a/platform/linux-dpdk/odp_buffer_pool.c b/platform/linux-dpdk/odp_buffer_pool.c index 8325b9e..ca25ace 100644 --- a/platform/linux-dpdk/odp_buffer_pool.c +++ b/platform/linux-dpdk/odp_buffer_pool.c @@ -282,5 +282,5 @@ void odp_buffer_free(odp_buffer_t buf) void odp_buffer_pool_print(odp_buffer_pool_t pool_id) { - rte_mempool_dump((const struct rte_mempool *)pool_id); + rte_mempool_dump(stdout, (const struct rte_mempool *)pool_id); } diff --git a/platform/linux-dpdk/odp_init.c b/platform/linux-dpdk/odp_init.c index 404e616..fa10022 100644 --- a/platform/linux-dpdk/odp_init.c +++ b/platform/linux-dpdk/odp_init.c @@ -37,11 +37,6 @@ int odp_init_dpdk(void) return -1; } - if (rte_pmd_init_all() < 0) { - ODP_ERR("Cannot init pmd\n"); - return -1; - } - if (rte_eal_pci_probe() < 0) { ODP_ERR("Cannot probe PCI\n"); return -1; diff --git a/platform/linux-dpdk/odp_packet.c b/platform/linux-dpdk/odp_packet.c index 7b6b082..beb69b2 100644 --- a/platform/linux-dpdk/odp_packet.c +++ b/platform/linux-dpdk/odp_packet.c @@ -367,7 +367,7 @@ void odp_packet_print(odp_packet_t pkt) str[len] = '\0'; printf("\n%s\n", str); - rte_pktmbuf_dump(&hdr->buf_hdr.mb, 32); + rte_pktmbuf_dump(stdout, &hdr->buf_hdr.mb, 32); p = odp_packet_start(pkt); printf("00000000: %02X %02X %02X %02X %02X %02X %02X %02X\n",