DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Attaching to an ethernet port from a secondary process
@ 2016-02-17 11:17 Lazaros Koromilas
  2016-02-17 11:40 ` Lazaros Koromilas
  0 siblings, 1 reply; 4+ messages in thread
From: Lazaros Koromilas @ 2016-02-17 11:17 UTC (permalink / raw)
  To: users

Hi all,

I'm trying to take advantage of the multi-process support together
with the port hotplugging framework. The idea is that my primary
process will configure all ports I'm going to need and then secondary
processes will come up, selectively attach to ports and perform rx/tx.
I succeed up to the point that I attach to the pre-configured ports
but the rx/tx queue descriptors are uninitialized, so I get a segfault
there. This can be reproduced with the attached, slightly modified
examples/skeleton/basicfwd.c sdk app. I run this as follows:

sudo ./build/basicfwd -l0 -n2 --proc-type=primary --vdev
eth_pcap0,rx_pcap=pcap0-in.pcap,tx_pcap=pcap0-out.pcap --vdev
eth_pcap1,rx_pcap=pcap1-in.pcap,tx_pcap=pcap1-out.pcap
sudo ./build/basicfwd -l2 -n2 --proc-type=secondary
eth_pcap0,rx_pcap=pcap0-in.pcap,tx_pcap=pcap0-out.pcap
eth_pcap1,rx_pcap=pcap1-in.pcap,tx_pcap=pcap1-out.pcap

Where pcap{0,1}-in.pcap files are pcap dumps. The primary will
initialize the ports and pause(2). The secondary will attach to the
same ports and do work. The latter then segfaults in
rte_eth_rx_burst() with dev->data->{rx,tx}_queues being NULL pointers.

All privileged operations are done from the primary. As far as I can
tell, these are all functions in librte_ether that need to run in a
primary process:
grep -B12 PROC_PRIMARY_ rte_ethdev.c | grep '^rte_eth' | sed 's/(.*//'
rte_eth_dev_rx_queue_start
rte_eth_dev_rx_queue_stop
rte_eth_dev_tx_queue_start
rte_eth_dev_tx_queue_stop
rte_eth_dev_configure
rte_eth_dev_start
rte_eth_dev_stop
rte_eth_dev_set_link_up
rte_eth_dev_set_link_down
rte_eth_dev_close
rte_eth_rx_queue_setup
rte_eth_tx_queue_setup

Any hints are much appreciated.

Thanks!
Lazaros.

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

end of thread, other threads:[~2016-02-19 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17 11:17 [dpdk-users] Attaching to an ethernet port from a secondary process Lazaros Koromilas
2016-02-17 11:40 ` Lazaros Koromilas
2016-02-19 12:58   ` Pattan, Reshma
2016-02-19 16:22     ` Lazaros Koromilas

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