DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Problem while running dpdk
@ 2021-05-27 22:05 Raunak Laddha
  2021-06-01  8:03 ` Bruce Richardson
  0 siblings, 1 reply; 3+ messages in thread
From: Raunak Laddha @ 2021-05-27 22:05 UTC (permalink / raw)
  To: dev; +Cc: Mike Banatt

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]

Hello,
I am using dpdk 20.11.1 . I tried to use your resource to build a custom application which uses dpdk. I compiled my app using meson and makefile to see if I get different result for my issue. I have used pkg-config to load cflags and ldflags in my application and linking it as a static library.
Problem I am facing:
No buses are loaded. I can see that RTE_INIT_PRIO is used as constructor to load the buses. But in my application, buses are not loaded.
I tried to run the dpdk app named test-pipeline to check if it works and it does in that case. But same application with my makefile or meson file does not work.
First call in my program is rte_eal_init(argc, argv); (the init call of dpdk).
My app gets compiles. Also verified cflags and ldflags to check if dpdk flags are added.
My assumption is whatever RTE_INIT_PRIO is loading, it gets loaded correctly in dpdk test-pipeline app but not in my custom app.
Is there any config I am missing?
I have attached the makefile and meson file.

Thanks,
Raunak

[-- Attachment #2: test.c --]
[-- Type: text/plain, Size: 120 bytes --]

#include <stdio.h>
#include <rte_eal.h>

int main(int argc, char **argv) {
    rte_eal_init(argc, argv);
    return 0;
}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] Problem while running dpdk
  2021-05-27 22:05 [dpdk-dev] Problem while running dpdk Raunak Laddha
@ 2021-06-01  8:03 ` Bruce Richardson
  2021-06-01 14:40   ` [dpdk-dev] [External] : " Raunak Laddha
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Richardson @ 2021-06-01  8:03 UTC (permalink / raw)
  To: Raunak Laddha; +Cc: dev, Mike Banatt

On Thu, May 27, 2021 at 10:05:39PM +0000, Raunak Laddha wrote:
> Hello,
> I am using dpdk 20.11.1 . I tried to use your resource to build a custom application which uses dpdk. I compiled my app using meson and makefile to see if I get different result for my issue. I have used pkg-config to load cflags and ldflags in my application and linking it as a static library.
> Problem I am facing:
> No buses are loaded. I can see that RTE_INIT_PRIO is used as constructor to load the buses. But in my application, buses are not loaded.
> I tried to run the dpdk app named test-pipeline to check if it works and it does in that case. But same application with my makefile or meson file does not work.
> First call in my program is rte_eal_init(argc, argv); (the init call of dpdk).
> My app gets compiles. Also verified cflags and ldflags to check if dpdk flags are added.
> My assumption is whatever RTE_INIT_PRIO is loading, it gets loaded correctly in dpdk test-pipeline app but not in my custom app.
> Is there any config I am missing?
> I have attached the makefile and meson file.
> 
> Thanks,
> Raunak

Hi Raunak,

I'm afraid that the attachments got stripped on the email. To help resolve
the problem you encountered, the first thing to check would be the actual
link-command used when linking your app. Check that the drivers are being
linked into the static binary appropriately.  Also, depending on the Linux
distro in use, some versions of pkg-config have a problem with reordering
the linker flags, so I'd recommend installing and using pkgconf package
rather than pkg-config to remove this as a source of error.

Regards,
/Bruce

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [External] : Re:  Problem while running dpdk
  2021-06-01  8:03 ` Bruce Richardson
@ 2021-06-01 14:40   ` Raunak Laddha
  0 siblings, 0 replies; 3+ messages in thread
From: Raunak Laddha @ 2021-06-01 14:40 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Mike Banatt

Hi Bruce,
Thank you for giving solution to my problem. I will try it and let you know if it works or not.

Thanks,
Raunak
________________________________
From: Bruce Richardson <bruce.richardson@intel.com>
Sent: Tuesday, June 1, 2021 4:03 AM
To: Raunak Laddha <raunak.laddha@oracle.com>
Cc: dev@dpdk.org <dev@dpdk.org>; Mike Banatt <mike.banatt@oracle.com>
Subject: [External] : Re: [dpdk-dev] Problem while running dpdk

On Thu, May 27, 2021 at 10:05:39PM +0000, Raunak Laddha wrote:
> Hello,
> I am using dpdk 20.11.1 . I tried to use your resource to build a custom application which uses dpdk. I compiled my app using meson and makefile to see if I get different result for my issue. I have used pkg-config to load cflags and ldflags in my application and linking it as a static library.
> Problem I am facing:
> No buses are loaded. I can see that RTE_INIT_PRIO is used as constructor to load the buses. But in my application, buses are not loaded.
> I tried to run the dpdk app named test-pipeline to check if it works and it does in that case. But same application with my makefile or meson file does not work.
> First call in my program is rte_eal_init(argc, argv); (the init call of dpdk).
> My app gets compiles. Also verified cflags and ldflags to check if dpdk flags are added.
> My assumption is whatever RTE_INIT_PRIO is loading, it gets loaded correctly in dpdk test-pipeline app but not in my custom app.
> Is there any config I am missing?
> I have attached the makefile and meson file.
>
> Thanks,
> Raunak

Hi Raunak,

I'm afraid that the attachments got stripped on the email. To help resolve
the problem you encountered, the first thing to check would be the actual
link-command used when linking your app. Check that the drivers are being
linked into the static binary appropriately.  Also, depending on the Linux
distro in use, some versions of pkg-config have a problem with reordering
the linker flags, so I'd recommend installing and using pkgconf package
rather than pkg-config to remove this as a source of error.

Regards,
/Bruce

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-03 16:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27 22:05 [dpdk-dev] Problem while running dpdk Raunak Laddha
2021-06-01  8:03 ` Bruce Richardson
2021-06-01 14:40   ` [dpdk-dev] [External] : " Raunak Laddha

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).