From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-x22c.google.com (mail-la0-x22c.google.com [IPv6:2a00:1450:4010:c03::22c]) by dpdk.org (Postfix) with ESMTP id 677C32E8A for ; Wed, 30 Oct 2013 08:18:08 +0100 (CET) Received: by mail-la0-f44.google.com with SMTP id ep20so756606lab.3 for ; Wed, 30 Oct 2013 00:18:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=SgJa9lBP+wWjVbthLjp+fK9KFfUcrjsgk4y7bP6+joM=; b=oIsdJv4Lv6FZErUnPkFrzemK+xw/wuQSooLwgNI6PRpaN91L9UBGUHapR0ETN0ysaU Eb3KHm+1cEVQOdQuOp5SdDuHpvK7Oycqp05yVjJ4y/tG8WJNCVeCZZPSoAHuMnp9nUt3 h4XjWmQJiYxxlcsiHN9M+BVfDCoYz5YvDbS/MGAxUf+b/f8gww7h+cGbwpnR7nrxR0x2 0jz6usxcmYUZ1TKGZe31PHRoMzTPclYYHsFG/0LMP+/6gaSXSuGAwiUzydIv5crGSjD+ M7gvW8Rz6s2CBxlDkWNNwfRyATM81EBaQo0GFp/0XKCJp4l04l69b8aRjA1+GYbY7aaq +Qlg== MIME-Version: 1.0 X-Received: by 10.152.228.130 with SMTP id si2mr547409lac.32.1383117539218; Wed, 30 Oct 2013 00:18:59 -0700 (PDT) Received: by 10.114.183.13 with HTTP; Wed, 30 Oct 2013 00:18:59 -0700 (PDT) In-Reply-To: References: Date: Wed, 30 Oct 2013 15:18:59 +0800 Message-ID: From: Jose Gavine Cueto To: Prashant Upadhyaya Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] rte_eth_rx_burst stops running on dpdk extlib X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Oct 2013 07:18:09 -0000 Hi Prashant, Thanks, I will investigate. Though the following is how the pktdump application and pmd lib ext are built, just to give you an overview. *pmd lib Makefile* include $(RTE_SDK)/mk/rte.vars.mk LIB =3D libpmd.a CFLAGS +=3D -O3 CFLAGS +=3D $(WERROR_FLAGS) SRCS-y :=3D ... sources here include $(RTE_SDK)/mk/rte.extlib.mk : *pktdump app Makefile* * * include $(RTE_SDK)/mk/rte.vars.mk APP =3D pktdump LDFLAGS +=3D -lpmd CFLAGS +=3D -O3 CFLAGS +=3D $(WERROR_FLAGS) CFLAGS +=3D -I$(IDIR) CFLAGS +=3D -g SRCS-y :=3D pktdump.c include $(RTE_SDK)/mk/rte.extapp.mk So I'm basically using simple Makefiles for both the lib and app ( rte.extlib.mk, rte.extapp.mk). Thanks, Pepe On Wed, Oct 30, 2013 at 3:13 PM, Prashant Upadhyaya < prashant.upadhyaya@aricent.com> wrote: > Hi Pepe,**** > > ** ** > > Please also make sure that you are following the correct makefile > templates (as present in examples) when you build your app separately.***= * > > If you don=92t, then you will naturally miss out on some flags and that c= an > prove fatal because your app will see some code differently in the header > files of rte than what the library was built with based on the compiler > flags.**** > > ** ** > > Regards**** > > -Prashant**** > > ** ** > > ** ** > > *From:* Jose Gavine Cueto [mailto:pepedocs@gmail.com] > *Sent:* Wednesday, October 30, 2013 12:34 PM > *To:* Prashant Upadhyaya > *Cc:* dev@dpdk.org > > *Subject:* Re: [dpdk-dev] rte_eth_rx_burst stops running on dpdk extlib**= * > * > > ** ** > > Hi Prashant,**** > > ** ** > > Are you referring to the rte_* libraries ? I had actually compiled them > using the setup script ($(RTE_SDK)/tools/setup.sh) and then linked the PM= D > lib extension I've made and then linked the pktdump eventually, before > seeing the problem. However, building it all as an app. didn't show any > issue.**** > > ** ** > > I will try to redo the building/linking just to make sure. **** > > ** ** > > Thank you!**** > > ** ** > > On Wed, Oct 30, 2013 at 2:57 PM, Prashant Upadhyaya < > prashant.upadhyaya@aricent.com> wrote:**** > > Hi Pepe, > > How about this -- compile the libraries yourself and then link your > application with them just like the original usecase where you find the > problem. > If this works, then the problem is with the precompiled libraries you wer= e > picking from somewhere. > > Regards > -Prashant**** > > > > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jose Gavine Cueto > Sent: Wednesday, October 30, 2013 12:22 PM > To: dev@dpdk.org > Subject: Re: [dpdk-dev] rte_eth_rx_burst stops running on dpdk extlib > > Hi, > > Could someone help me ? Or at least let me know if what I'm doing (diagr= am > above) is right with regard to using a external dpdk library ? I assume > dpdk external libraries can be treated as norma C libraries. > > Cheers, > Pepe > > > On Wed, Oct 30, 2013 at 8:18 AM, Jose Gavine Cueto >wrote: > > > Hi, > > > > I'm writing a very simple packet dump application that can be > > described by the following diagram: > > > > --------------------------- > > | pktdump | > > ---------------------------- > > | PMD lib extension | > > | (extlib) | > > ---------------------------- > > | DPDK PMD lib | > > ---------------------------- > > > > pktdump - very simple app. built with gcc and linked with pmd lib > > extension and dpdk libs. > > pmd lib extension - an extension of dpdk pmd library, which provides > > some higher-level APIs dpdk pmd lib - pmd lib provided by Intel > > > > I have an issue where in when I run the pktdump app. it's lcore > > threads stops executing at varying number of times. Sometimes it > doesn't even run. > > But this only happens if I use the PMD lib extension. On the other > > hand, if pktdump is directly built with pmd lib extension code while > > pmd lib extension is built as an extapp, it works very well. I wonder > > what's the difference, code-wise there is none, the only difference I > > can see is how they are built (extapp, extlib). > > > > The pmd lib extension's lcore threads basically do simple forwarding > > (rx > > -> tx). So rte_eth_rx_burst is called when receiving packets and > > rte_eth_tx_burst when transmitting packets. These runs on an lcore > thread. > > > > snippet of code that runs on lcore: > > > > void burst_fwd(...){ > > num_rx =3D rte_eth_rx_burst(...) > > ... > > rte_eth_tx_burst(...) > > } > > > > Any tips on how to debug this, some quick inspections may help. Is > > there some specific build options for building libraries, because this > > only happens on extlib. > > > > > > -- > To stop learning is like to stop loving. > > > > **** > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > Please refer to http://www.aricent.com/legal/email_disclaimer.html > for important disclosures regarding this electronic communication. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > **** > > > > **** > > ** ** > > -- > To stop learning is like to stop loving. **** > > > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > Please refer to http://www.aricent.com/legal/email_disclaimer.html > for important disclosures regarding this electronic communication. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > --=20 To stop learning is like to stop loving.