[dpdk-users] Attaching to an ethernet port from a secondary process

Pattan, Reshma reshma.pattan at intel.com
Fri Feb 19 13:58:38 CET 2016


> -----Original Message-----
> From: users [mailto:users-bounces at dpdk.org] On Behalf Of Lazaros Koromilas
> Sent: Wednesday, February 17, 2016 11:40 AM
> To: users at dpdk.org
> Subject: Re: [dpdk-users] Attaching to an ethernet port from a secondary
> process
> On Wed, Feb 17, 2016 at 1:17 PM, Lazaros Koromilas <l at nofutznetworks.com>
> wrote:
> > 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.

From quick glance of dpdk code what I see is  rte_eth_dev_attach  will  not attach existing port to DPDK app. 
Because from "librte_ether/rte_ethdev.c" rte_eth_dev_attach()==> rte_eth_dev_attach_vdev()==>rte_eal_vdev_init() creates new vdev and returns you the port id.
And moreover vdevs are local to process. 
You may have to check clearly what is the hot plug functionality and do you really need it in your case.

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

Since in secondary  new device is created, but device configuration and queue configuration  is not done,  crash is expected.


More information about the users mailing list