DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Problem in dpdk mpool initialization in dpdk20.11
@ 2021-03-08  7:45 Pinak Tripathy
  2021-03-08  8:42 ` Pinak Tripathy
  0 siblings, 1 reply; 5+ messages in thread
From: Pinak Tripathy @ 2021-03-08  7:45 UTC (permalink / raw)
  To: users

Hi,

I am porting the application from dpdk 17.11 to dpdk 20.11
Application uses centos7.9 and melanox 5.2.2 PMD

Below api call works fine in dpdk17.11 but fails in dpdk20.11

rte_pktmbuf_pool_create ("mbuf_pool_0", (4096 * 64 * 16 - 1), 512, 0, RTE_MBUF_DEFAULT_BUF_SIZE) fails with error no 22 (EINVAL)
              -MBUF: error setting mempool handler
              -PANIC in app_init_mbuf_pools():
              -Cannot create mbuf pool on socket 0 (errno=22)

On adding debug trace found that  rte_mempool_ops_table.num_ops =0.

Not sure what is causing this issue. Can you please point out likely cause of this?


Best Regards,
Pinak

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

* [dpdk-users] Problem in dpdk mpool initialization in dpdk20.11
  2021-03-08  7:45 [dpdk-users] Problem in dpdk mpool initialization in dpdk20.11 Pinak Tripathy
@ 2021-03-08  8:42 ` Pinak Tripathy
  2021-03-08 10:16   ` David Marchand
  0 siblings, 1 reply; 5+ messages in thread
From: Pinak Tripathy @ 2021-03-08  8:42 UTC (permalink / raw)
  To: users

Hi,

I am porting the application from dpdk 17.11 to dpdk 20.11
Application uses centos7.9 and melanox 5.2.2 PMD

Below api call works fine in dpdk17.11 but fails in dpdk20.11

rte_pktmbuf_pool_create ("mbuf_pool_0", (4096 * 64 * 16 - 1), 512, 0, RTE_MBUF_DEFAULT_BUF_SIZE) fails with error no 22 (EINVAL)
              -MBUF: error setting mempool handler
              -PANIC in app_init_mbuf_pools():
              -Cannot create mbuf pool on socket 0 (errno=22)

On adding debug trace found that  rte_mempool_ops_table.num_ops =0.

Not sure what is causing this issue. Can you please point out likely cause of this?


Best Regards,
Pinak

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

* Re: [dpdk-users] Problem in dpdk mpool initialization in dpdk20.11
  2021-03-08  8:42 ` Pinak Tripathy
@ 2021-03-08 10:16   ` David Marchand
  2021-03-08 11:18     ` [dpdk-users] [E!] : " Pinak Tripathy
  2021-03-08 12:47     ` [dpdk-users] " David Marchand
  0 siblings, 2 replies; 5+ messages in thread
From: David Marchand @ 2021-03-08 10:16 UTC (permalink / raw)
  To: Pinak Tripathy; +Cc: users

On Mon, Mar 8, 2021 at 9:42 AM Pinak Tripathy <Pinak.Tripathy@exfo.com> wrote:
> I am porting the application from dpdk 17.11 to dpdk 20.11
> Application uses centos7.9 and melanox 5.2.2 PMD
>
> Below api call works fine in dpdk17.11 but fails in dpdk20.11
>
> rte_pktmbuf_pool_create ("mbuf_pool_0", (4096 * 64 * 16 - 1), 512, 0, RTE_MBUF_DEFAULT_BUF_SIZE) fails with error no 22 (EINVAL)
>               -MBUF: error setting mempool handler
>               -PANIC in app_init_mbuf_pools():
>               -Cannot create mbuf pool on socket 0 (errno=22)
>
> On adding debug trace found that  rte_mempool_ops_table.num_ops =0.
>
> Not sure what is causing this issue. Can you please point out likely cause of this?

This is likely a problem with loading mempool drivers.
Does adding "-d /path/to/librte_mempool_ring.so" to your EAL options
help with this issue?


-- 
David Marchand


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

* Re: [dpdk-users] [E!] : Re: Problem in dpdk mpool initialization in dpdk20.11
  2021-03-08 10:16   ` David Marchand
@ 2021-03-08 11:18     ` Pinak Tripathy
  2021-03-08 12:47     ` [dpdk-users] " David Marchand
  1 sibling, 0 replies; 5+ messages in thread
From: Pinak Tripathy @ 2021-03-08 11:18 UTC (permalink / raw)
  To: David Marchand; +Cc: users

Hi David,

Makefile statically linking the libraries. Do I still need to use -d /path/to/librte_mempool_ring.so. I tried this also and error persists.

Do I need to link all the library (*.a) files individually in my Makefile


Below is the snippet of project source Makefile

PC_FILE := $(shell $(PKGCONF) --path libdpdk 2>/dev/null)
PKGCONF ?= pkg-config
CFLAGS += -O3 $(shell $(PKGCONF) --cflags libdpdk)
LDFLAGS_STATIC = $(shell $(PKGCONF) --libs --static libdpdk)

build/$(APP): $(SRCS-y) Makefile  $(PC_FILE) | build
	$(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS)  $(LDFLAGS_STATIC)
	
build:
	@mkdir -p $@

Best Regards,
Pinak


-----Original Message-----
From: David Marchand <david.marchand@redhat.com> 
Sent: Monday, March 8, 2021 3:47 PM
To: Pinak Tripathy <Pinak.Tripathy@exfo.com>
Cc: users@dpdk.org
Subject: [E!] : Re: [dpdk-users] Problem in dpdk mpool initialization in dpdk20.11

On Mon, Mar 8, 2021 at 9:42 AM Pinak Tripathy <Pinak.Tripathy@exfo.com> wrote:
> I am porting the application from dpdk 17.11 to dpdk 20.11 Application 
> uses centos7.9 and melanox 5.2.2 PMD
>
> Below api call works fine in dpdk17.11 but fails in dpdk20.11
>
> rte_pktmbuf_pool_create ("mbuf_pool_0", (4096 * 64 * 16 - 1), 512, 0, RTE_MBUF_DEFAULT_BUF_SIZE) fails with error no 22 (EINVAL)
>               -MBUF: error setting mempool handler
>               -PANIC in app_init_mbuf_pools():
>               -Cannot create mbuf pool on socket 0 (errno=22)
>
> On adding debug trace found that  rte_mempool_ops_table.num_ops =0.
>
> Not sure what is causing this issue. Can you please point out likely cause of this?

This is likely a problem with loading mempool drivers.
Does adding "-d /path/to/librte_mempool_ring.so" to your EAL options help with this issue?


--
David Marchand


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

* Re: [dpdk-users] Problem in dpdk mpool initialization in dpdk20.11
  2021-03-08 10:16   ` David Marchand
  2021-03-08 11:18     ` [dpdk-users] [E!] : " Pinak Tripathy
@ 2021-03-08 12:47     ` David Marchand
  1 sibling, 0 replies; 5+ messages in thread
From: David Marchand @ 2021-03-08 12:47 UTC (permalink / raw)
  To: Pinak Tripathy; +Cc: users, Bruce Richardson, Thomas Monjalon

Copied your reply from the other thread.
Please fix your mail client and do not top post.

> > > I am porting the application from dpdk 17.11 to dpdk 20.11
> > > Application uses centos7.9 and melanox 5.2.2 PMD
> > >
> > > Below api call works fine in dpdk17.11 but fails in dpdk20.11
> > >
> > > rte_pktmbuf_pool_create ("mbuf_pool_0", (4096 * 64 * 16 - 1), 512, 0, RTE_MBUF_DEFAULT_BUF_SIZE) fails with error no 22 (EINVAL)
> > >               -MBUF: error setting mempool handler
> > >               -PANIC in app_init_mbuf_pools():
> > >               -Cannot create mbuf pool on socket 0 (errno=22)
> > >
> > > On adding debug trace found that  rte_mempool_ops_table.num_ops =0.
> > >
> > > Not sure what is causing this issue. Can you please point out likely cause of this?
> >
> > This is likely a problem with loading mempool drivers.
> > Does adding "-d /path/to/librte_mempool_ring.so" to your EAL options
> > help with this issue?
>
> Makefile statically linking the libraries. Do I still need to use -d /path/to/librte_mempool_ring.so. I tried this also and error persists.
> Do I need to link all the library (*.a) files individually in my Makefile

Ok, you are statically linking your binary.
Then you are facing the issue mentioned here:
https://doc.dpdk.org/guides-20.11/linux_gsg/sys_reqs.html#building-dpdk-applications
https://git.dpdk.org/dpdk/commit/?id=829b22c212f08a8a1a0bffccc0b6258ca4c635f8

pkg-config reorders some flags from:

$ grep Libs.private build/install/usr/local/lib64/pkgconfig/libdpdk.pc
Libs.private: -Wl,--whole-archive -L${libdir} -l:librte_common_cpt.a
-l:librte_common_dpaax.a -l:librte_common_iavf.a
-l:librte_common_octeontx.a -l:librte_common_octeontx2.a
-l:librte_common_sfc_efx.a -l:librte_bus_dpaa.a -l:librte_bus_fslmc.a
-l:librte_bus_ifpga.a -l:librte_bus_pci.a -l:librte_bus_vdev.a
-l:librte_bus_vmbus.a -l:librte_common_mlx5.a -l:librte_common_qat.a
-l:librte_mempool_bucket.a -l:librte_mempool_dpaa.a
-l:librte_mempool_dpaa2.a -l:librte_mempool_octeontx.a
-l:librte_mempool_octeontx2.a -l:librte_mempool_ring.a
-l:librte_mempool_stack.a -l:librte_net_af_packet.a
-l:librte_net_ark.a -l:librte_net_atlantic.a -l:librte_net_avp.a
-l:librte_net_axgbe.a -l:librte_net_bond.a -l:librte_net_bnx2x.a
-l:librte_net_bnxt.a -l:librte_net_cxgbe.a -l:librte_net_dpaa.a
-l:librte_net_dpaa2.a -l:librte_net_e1000.a -l:librte_net_ena.a
-l:librte_net_enetc.a -l:librte_net_enic.a -l:librte_net_failsafe.a
-l:librte_net_fm10k.a -l:librte_net_i40e.a -l:librte_net_hinic.a
-l:librte_net_hns3.a -l:librte_net_iavf.a -l:librte_net_ice.a
-l:librte_net_igc.a -l:librte_net_ionic.a -l:librte_net_ixgbe.a
-l:librte_net_kni.a -l:librte_net_liquidio.a -l:librte_net_memif.a
-l:librte_net_mlx4.a -l:librte_net_mlx5.a -l:librte_net_netvsc.a
-l:librte_net_nfp.a -l:librte_net_null.a -l:librte_net_octeontx.a
-l:librte_net_octeontx2.a -l:librte_net_octeontx_ep.a
-l:librte_net_pcap.a -l:librte_net_pfe.a -l:librte_net_qede.a
-l:librte_net_ring.a -l:librte_net_sfc.a -l:librte_net_softnic.a
-l:librte_net_tap.a -l:librte_net_thunderx.a -l:librte_net_txgbe.a
-l:librte_net_vdev_netvsc.a -l:librte_net_vhost.a
-l:librte_net_virtio.a -l:librte_net_vmxnet3.a
-l:librte_raw_dpaa2_cmdif.a -l:librte_raw_dpaa2_qdma.a
-l:librte_raw_ioat.a -l:librte_raw_ntb.a -l:librte_raw_octeontx2_dma.a
-l:librte_raw_octeontx2_ep.a -l:librte_raw_skeleton.a
-l:librte_crypto_bcmfs.a -l:librte_crypto_caam_jr.a
-l:librte_crypto_ccp.a -l:librte_crypto_dpaa_sec.a
-l:librte_crypto_dpaa2_sec.a -l:librte_crypto_nitrox.a
-l:librte_crypto_null.a -l:librte_crypto_octeontx.a
-l:librte_crypto_octeontx2.a -l:librte_crypto_openssl.a
-l:librte_crypto_scheduler.a -l:librte_crypto_virtio.a
-l:librte_compress_mlx5.a -l:librte_compress_octeontx.a
-l:librte_compress_zlib.a -l:librte_regex_mlx5.a
-l:librte_regex_octeontx2.a -l:librte_vdpa_ifc.a -l:librte_vdpa_mlx5.a
-l:librte_event_dlb.a -l:librte_event_dlb2.a -l:librte_event_dpaa.a
-l:librte_event_dpaa2.a -l:librte_event_octeontx2.a
-l:librte_event_opdl.a -l:librte_event_skeleton.a -l:librte_event_sw.a
-l:librte_event_dsw.a -l:librte_event_octeontx.a
-l:librte_baseband_null.a -l:librte_baseband_turbo_sw.a
-l:librte_baseband_fpga_lte_fec.a -l:librte_baseband_fpga_5gnr_fec.a
-l:librte_baseband_acc100.a -l:librte_node.a -l:librte_graph.a
-l:librte_bpf.a -l:librte_flow_classify.a -l:librte_pipeline.a
-l:librte_table.a -l:librte_port.a -l:librte_fib.a -l:librte_ipsec.a
-l:librte_vhost.a -l:librte_stack.a -l:librte_security.a
-l:librte_sched.a -l:librte_reorder.a -l:librte_rib.a
-l:librte_regexdev.a -l:librte_rawdev.a -l:librte_pdump.a
-l:librte_power.a -l:librte_member.a -l:librte_lpm.a
-l:librte_latencystats.a -l:librte_kni.a -l:librte_jobstats.a
-l:librte_ip_frag.a -l:librte_gso.a -l:librte_gro.a
-l:librte_eventdev.a -l:librte_efd.a -l:librte_distributor.a
-l:librte_cryptodev.a -l:librte_compressdev.a -l:librte_cfgfile.a
-l:librte_bitratestats.a -l:librte_bbdev.a -l:librte_acl.a
-l:librte_timer.a -l:librte_hash.a -l:librte_metrics.a
-l:librte_cmdline.a -l:librte_pci.a -l:librte_ethdev.a
-l:librte_meter.a -l:librte_net.a -l:librte_mbuf.a -l:librte_mempool.a
-l:librte_rcu.a -l:librte_ring.a -l:librte_eal.a -l:librte_telemetry.a
-l:librte_kvargs.a -Wl,--no-whole-archive -Wl,--export-dynamic -lpcap

as:

$ PKG_CONFIG_PATH=$(pwd)/build/install/usr/local/lib64/pkgconfig
pkg-config --static --libs libdpdk
-Wl,--whole-archive -Wl,--no-whole-archive -Wl,--export-dynamic
-Wl,--as-needed -pthread -L/usr/local/lib64 -L/usr//usr/lib64
-l:librte_common_cpt.a -l:librte_common_dpaax.a
-l:librte_common_iavf.a -l:librte_common_octeontx.a
-l:librte_common_octeontx2.a -l:librte_common_sfc_efx.a
-l:librte_bus_dpaa.a -l:librte_bus_fslmc.a -l:librte_bus_ifpga.a
-l:librte_bus_pci.a -l:librte_bus_vdev.a -l:librte_bus_vmbus.a
-l:librte_common_mlx5.a -l:librte_common_qat.a
-l:librte_mempool_bucket.a -l:librte_mempool_dpaa.a
-l:librte_mempool_dpaa2.a -l:librte_mempool_octeontx.a
-l:librte_mempool_octeontx2.a -l:librte_mempool_ring.a
-l:librte_mempool_stack.a -l:librte_net_af_packet.a
-l:librte_net_ark.a -l:librte_net_atlantic.a -l:librte_net_avp.a
-l:librte_net_axgbe.a -l:librte_net_bond.a -l:librte_net_bnx2x.a
-l:librte_net_bnxt.a -l:librte_net_cxgbe.a -l:librte_net_dpaa.a
-l:librte_net_dpaa2.a -l:librte_net_e1000.a -l:librte_net_ena.a
-l:librte_net_enetc.a -l:librte_net_enic.a -l:librte_net_failsafe.a
-l:librte_net_fm10k.a -l:librte_net_i40e.a -l:librte_net_hinic.a
-l:librte_net_hns3.a -l:librte_net_iavf.a -l:librte_net_ice.a
-l:librte_net_igc.a -l:librte_net_ionic.a -l:librte_net_ixgbe.a
-l:librte_net_kni.a -l:librte_net_liquidio.a -l:librte_net_memif.a
-l:librte_net_mlx4.a -l:librte_net_mlx5.a -l:librte_net_netvsc.a
-l:librte_net_nfp.a -l:librte_net_null.a -l:librte_net_octeontx.a
-l:librte_net_octeontx2.a -l:librte_net_octeontx_ep.a
-l:librte_net_pcap.a -l:librte_net_pfe.a -l:librte_net_qede.a
-l:librte_net_ring.a -l:librte_net_sfc.a -l:librte_net_softnic.a
-l:librte_net_tap.a -l:librte_net_thunderx.a -l:librte_net_txgbe.a
-l:librte_net_vdev_netvsc.a -l:librte_net_vhost.a
-l:librte_net_virtio.a -l:librte_net_vmxnet3.a
-l:librte_raw_dpaa2_cmdif.a -l:librte_raw_dpaa2_qdma.a
-l:librte_raw_ioat.a -l:librte_raw_ntb.a -l:librte_raw_octeontx2_dma.a
-l:librte_raw_octeontx2_ep.a -l:librte_raw_skeleton.a
-l:librte_crypto_bcmfs.a -l:librte_crypto_caam_jr.a
-l:librte_crypto_ccp.a -l:librte_crypto_dpaa_sec.a
-l:librte_crypto_dpaa2_sec.a -l:librte_crypto_nitrox.a
-l:librte_crypto_null.a -l:librte_crypto_octeontx.a
-l:librte_crypto_octeontx2.a -l:librte_crypto_openssl.a
-l:librte_crypto_scheduler.a -l:librte_crypto_virtio.a
-l:librte_compress_mlx5.a -l:librte_compress_octeontx.a
-l:librte_compress_zlib.a -l:librte_regex_mlx5.a
-l:librte_regex_octeontx2.a -l:librte_vdpa_ifc.a -l:librte_vdpa_mlx5.a
-l:librte_event_dlb.a -l:librte_event_dlb2.a -l:librte_event_dpaa.a
-l:librte_event_dpaa2.a -l:librte_event_octeontx2.a
-l:librte_event_opdl.a -l:librte_event_skeleton.a -l:librte_event_sw.a
-l:librte_event_dsw.a -l:librte_event_octeontx.a
-l:librte_baseband_null.a -l:librte_baseband_turbo_sw.a
-l:librte_baseband_fpga_lte_fec.a -l:librte_baseband_fpga_5gnr_fec.a
-l:librte_baseband_acc100.a -l:librte_node.a -l:librte_graph.a
-l:librte_bpf.a -l:librte_flow_classify.a -l:librte_pipeline.a
-l:librte_table.a -l:librte_port.a -l:librte_fib.a -l:librte_ipsec.a
-l:librte_vhost.a -l:librte_stack.a -l:librte_security.a
-l:librte_sched.a -l:librte_reorder.a -l:librte_rib.a
-l:librte_regexdev.a -l:librte_rawdev.a -l:librte_pdump.a
-l:librte_power.a -l:librte_member.a -l:librte_lpm.a
-l:librte_latencystats.a -l:librte_kni.a -l:librte_jobstats.a
-l:librte_ip_frag.a -l:librte_gso.a -l:librte_gro.a
-l:librte_eventdev.a -l:librte_efd.a -l:librte_distributor.a
-l:librte_cryptodev.a -l:librte_compressdev.a -l:librte_cfgfile.a
-l:librte_bitratestats.a -l:librte_bbdev.a -l:librte_acl.a
-l:librte_timer.a -l:librte_hash.a -l:librte_metrics.a
-l:librte_cmdline.a -l:librte_pci.a -l:librte_ethdev.a
-l:librte_meter.a -l:librte_net.a -l:librte_mbuf.a -l:librte_mempool.a
-l:librte_rcu.a -l:librte_ring.a -l:librte_eal.a -l:librte_telemetry.a
-l:librte_kvargs.a -lmlx5 -lcrypto -lmlx4 -lelf -ljansson -lrte_node
-lrte_graph -lrte_bpf -lrte_flow_classify -lrte_pipeline -lrte_table
-lrte_port -lrte_fib -lrte_ipsec -lrte_vhost -lrte_stack
-lrte_security -lrte_sched -lrte_reorder -lrte_rib -lrte_regexdev
-lrte_rawdev -lrte_pdump -lrte_power -lrte_member -lrte_lpm
-lrte_latencystats -lrte_kni -lrte_jobstats -lrte_ip_frag -lrte_gso
-lrte_gro -lrte_eventdev -lrte_efd -lrte_distributor -lrte_cryptodev
-lrte_compressdev -lrte_cfgfile -lrte_bitratestats -lrte_bbdev
-lrte_acl -lrte_timer -lrte_hash -lrte_metrics -lrte_cmdline -lrte_pci
-lrte_ethdev -lrte_meter -lrte_net -lrte_mbuf -lrte_mempool -lrte_rcu
-lrte_ring -lrte_eal -lrte_telemetry -lrte_kvargs -lm -ldl -lnuma
-lpcap -libverbs -lpthread -lz

You can notice the static libraries are not protected by the
--whole-archive / --no-whole-archive options.
The linker won't embed the unreferenced dpdk libraries in the final binary.

There is no clean fix (you could try to reorganise cflags but this is
fragile), unless updating pkg-config.


-- 
David Marchand


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

end of thread, other threads:[~2021-03-08 12:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08  7:45 [dpdk-users] Problem in dpdk mpool initialization in dpdk20.11 Pinak Tripathy
2021-03-08  8:42 ` Pinak Tripathy
2021-03-08 10:16   ` David Marchand
2021-03-08 11:18     ` [dpdk-users] [E!] : " Pinak Tripathy
2021-03-08 12:47     ` [dpdk-users] " David Marchand

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git