DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] segfault with dpdk 16.07 in rte_mempool_populate_phys
@ 2016-08-17 15:03 martin_curran-gray
  2016-08-19  6:10 ` Shreyansh Jain
  0 siblings, 1 reply; 7+ messages in thread
From: martin_curran-gray @ 2016-08-17 15:03 UTC (permalink / raw)
  To: users

Hi All,

Trying to move an application from 2.2.0 to 16.07

Tested out l2fwd in 16.7 , quite happy with that ( in fact very happy with the performance improvement I measure  over 2.2.0 )

But now trying to get our app moved over, and coming un-stuck.

As well as the main packet mbuf pools etc, our app has a little pool for error messages

When that is created with "rte_mempool_create" I get a segmentation fault from rte_mempool_populate_phys

It seems I have nothing valid for this call in rte_mempool.c to work with

    ret = rte_mempool_ops_alloc(mp);

I can see in the user guide in section 5.5 it talks about Mempool Handlers, and new API to do with rte_mempool_create_empty and rte_mempool_set_ops_byname

But the code of rte_mempool _create  seems to call rte_mempool_create_empty and rte_mempool_set_ops_byname

Then it calls the mp_init  before the rte_mempool_populate_default, down in which the call to rte_mempool_populate_phys eventually cores

I've tried building and running the ip_reassembly example program, and I can see that is uses rte_mempool_create in a similar, although admittedly slightly different fashion.
it has flags set as  MEMPOOL_F_SP_PUT | MEMPOOL_F_SC_GET  where as I have 0
but the code in rte_mempool_create uses the flags to call the set_ops_by_name slightly differently depending on what flags you have.

I tried changing my app to use the same parameters in the rte_mempool_create call as the example program, but I still get a segmentation fault

Is there something else I'm missing??

I looked through the ip_reassembly program, but couldn't see it making any extra calls to do anything to the pool before the create is called?

Any help gratefully received

Program terminated with signal 11, Segmentation fault.
#0  0x0000000000000000 in ?? ()

#0  0x0000000000000000 in ?? ()
#1  0x00007f9fa586cdde in rte_mempool_populate_phys (mp=0x7f9f9485dd00,
    vaddr=0x7f9f9485d2c0 <Address 0x7f9f9485d2c0 out of bounds>, paddr=8995066560, len=2560,
    free_cb=0x7f9fa586cbe0 <rte_mempool_memchunk_mz_free>, opaque=0x7f9fb40e4cb4)
    at /root/######/dpdk-16.07/lib/librte_mempool/rte_mempool.c:363
#2  0x00007f9fa586da4a in rte_mempool_populate_default (mp=0x7f9f9485dd00)
    at /root/######/dpdk-16.07/lib/librte_mempool/rte_mempool.c:583
#3  0x00007f9fa586dd49 in rte_mempool_create (name=0x7f9fa588fb56 "Error Ind Mempool", n=<value optimized out>,
    elt_size=256, cache_size=<value optimized out>, private_data_size=<value optimized out>,
    mp_init=0x7f9fa586c2b0 <rte_pktmbuf_pool_init>, mp_init_arg=0x0, obj_init=0x7f9fa586c1c0 <rte_pktmbuf_init>,
    obj_init_arg=0x0, socket_id=-1, flags=0) at /root/######/dpdk-16.07/lib/librte_mempool/rte_mempool.c:909



Thanks

Martin








Martin Curran-Gray
HW/FPGA/SW Engineer
Keysight Technologies UK Ltd

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [dpdk-users] segfault with dpdk 16.07 in rte_mempool_populate_phys
@ 2016-08-24  6:48 martin_curran-gray
  2016-08-24  7:23 ` Shreyansh Jain
  0 siblings, 1 reply; 7+ messages in thread
From: martin_curran-gray @ 2016-08-24  6:48 UTC (permalink / raw)
  To: users, shreyansh.jain; +Cc: martin_curran-gray

Hi Shreyansh

Found my problem, because of the way the dpdk is integrated into our sw as a prebuilt library, we don't get the automatic initialisation of objects the way I think the dpdk examples benefit from.
I'd forgotten this, we have explicit calls to things like

devinitfn_rte_i40e_driver();

so after I added an explicit call to

mp_hdlr_init_ops_mp_mc();

my function pointer deep down below  rte_mempool_create is now valid.

Seem to have a nice performance improvement of about 40% in the rate my app can handle at the front door compared to 2.2.0

Nice

Now I just need to find out why when I turn on vector mode, I never get any mbuffs returned to the pool :)

Thanks for your help

Martin



Martin Curran-Gray
HW/FPGA/SW Engineer
Keysight Technologies UK Ltd

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

end of thread, other threads:[~2016-08-24  7:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-17 15:03 [dpdk-users] segfault with dpdk 16.07 in rte_mempool_populate_phys martin_curran-gray
2016-08-19  6:10 ` Shreyansh Jain
2016-08-19  8:28   ` martin_curran-gray
2016-08-22 13:58     ` Shreyansh Jain
2016-08-22 14:06       ` martin_curran-gray
2016-08-24  6:48 martin_curran-gray
2016-08-24  7:23 ` Shreyansh Jain

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