* [dpdk-dev] rte_eth_rx_burst stops running on dpdk extlib @ 2013-10-30 0:18 Jose Gavine Cueto 2013-10-30 6:52 ` Jose Gavine Cueto 0 siblings, 1 reply; 6+ messages in thread From: Jose Gavine Cueto @ 2013-10-30 0:18 UTC (permalink / raw) To: dev 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 = 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] rte_eth_rx_burst stops running on dpdk extlib 2013-10-30 0:18 [dpdk-dev] rte_eth_rx_burst stops running on dpdk extlib Jose Gavine Cueto @ 2013-10-30 6:52 ` Jose Gavine Cueto 2013-10-30 6:57 ` Prashant Upadhyaya 0 siblings, 1 reply; 6+ messages in thread From: Jose Gavine Cueto @ 2013-10-30 6:52 UTC (permalink / raw) To: dev Hi, Could someone help me ? Or at least let me know if what I'm doing (diagram 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 <pepedocs@gmail.com>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 = 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] rte_eth_rx_burst stops running on dpdk extlib 2013-10-30 6:52 ` Jose Gavine Cueto @ 2013-10-30 6:57 ` Prashant Upadhyaya 2013-10-30 7:04 ` Jose Gavine Cueto 0 siblings, 1 reply; 6+ messages in thread From: Prashant Upadhyaya @ 2013-10-30 6:57 UTC (permalink / raw) To: Jose Gavine Cueto, dev 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 were 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 (diagram 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 <pepedocs@gmail.com>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 = 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. =============================================================================== Please refer to http://www.aricent.com/legal/email_disclaimer.html for important disclosures regarding this electronic communication. =============================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] rte_eth_rx_burst stops running on dpdk extlib 2013-10-30 6:57 ` Prashant Upadhyaya @ 2013-10-30 7:04 ` Jose Gavine Cueto 2013-10-30 7:13 ` Prashant Upadhyaya 0 siblings, 1 reply; 6+ messages in thread From: Jose Gavine Cueto @ 2013-10-30 7:04 UTC (permalink / raw) To: Prashant Upadhyaya; +Cc: dev 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 PMD 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 were > 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 (diagram > 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 <pepedocs@gmail.com > >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 = 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. > > > > > > =============================================================================== > Please refer to http://www.aricent.com/legal/email_disclaimer.html > for important disclosures regarding this electronic communication. > > =============================================================================== > -- To stop learning is like to stop loving. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] rte_eth_rx_burst stops running on dpdk extlib 2013-10-30 7:04 ` Jose Gavine Cueto @ 2013-10-30 7:13 ` Prashant Upadhyaya 2013-10-30 7:18 ` Jose Gavine Cueto 0 siblings, 1 reply; 6+ messages in thread From: Prashant Upadhyaya @ 2013-10-30 7:13 UTC (permalink / raw) To: Jose Gavine Cueto; +Cc: dev 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't, then you will naturally miss out on some flags and that can 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 PMD 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<mailto: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 were picking from somewhere. Regards -Prashant -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org<mailto:dev-bounces@dpdk.org>] On Behalf Of Jose Gavine Cueto Sent: Wednesday, October 30, 2013 12:22 PM To: dev@dpdk.org<mailto: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 (diagram 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 <pepedocs@gmail.com<mailto:pepedocs@gmail.com>>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 = 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. =============================================================================== Please refer to http://www.aricent.com/legal/email_disclaimer.html for important disclosures regarding this electronic communication. =============================================================================== -- To stop learning is like to stop loving. =============================================================================== Please refer to http://www.aricent.com/legal/email_disclaimer.html for important disclosures regarding this electronic communication. =============================================================================== ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] rte_eth_rx_burst stops running on dpdk extlib 2013-10-30 7:13 ` Prashant Upadhyaya @ 2013-10-30 7:18 ` Jose Gavine Cueto 0 siblings, 0 replies; 6+ messages in thread From: Jose Gavine Cueto @ 2013-10-30 7:18 UTC (permalink / raw) To: Prashant Upadhyaya; +Cc: dev 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 = libpmd.a CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) SRCS-y := ... sources here include $(RTE_SDK)/mk/rte.extlib.mk : *pktdump app Makefile* * * include $(RTE_SDK)/mk/rte.vars.mk APP = pktdump LDFLAGS += -lpmd CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) CFLAGS += -I$(IDIR) CFLAGS += -g SRCS-y := 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’t, then you will naturally miss out on some flags and that can > 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 PMD > 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 were > 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 (diagram > 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 <pepedocs@gmail.com > >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 = 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. > > > > **** > > > =============================================================================== > Please refer to http://www.aricent.com/legal/email_disclaimer.html > for important disclosures regarding this electronic communication. > > =============================================================================== > **** > > > > **** > > ** ** > > -- > To stop learning is like to stop loving. **** > > > > > > =============================================================================== > Please refer to http://www.aricent.com/legal/email_disclaimer.html > for important disclosures regarding this electronic communication. > > =============================================================================== > -- To stop learning is like to stop loving. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-10-30 7:18 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-10-30 0:18 [dpdk-dev] rte_eth_rx_burst stops running on dpdk extlib Jose Gavine Cueto 2013-10-30 6:52 ` Jose Gavine Cueto 2013-10-30 6:57 ` Prashant Upadhyaya 2013-10-30 7:04 ` Jose Gavine Cueto 2013-10-30 7:13 ` Prashant Upadhyaya 2013-10-30 7:18 ` Jose Gavine Cueto
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).