Re: [dpdk-dev] [PATCH v2] drivers/net: fix segfault in secondary process

2018-07-20 Thread Ferruh Yigit
On 7/20/2018 1:23 PM, Thomas Monjalon wrote: > 20/07/2018 14:44, Ferruh Yigit: >> --- a/drivers/net/tap/rte_eth_tap.c >> +++ b/drivers/net/tap/rte_eth_tap.c >> if (rte_eal_process_type() == RTE_PROC_SECONDARY && >> strlen(params) == 0) { >> -eth_dev = rte_eth_dev_attach_se

Re: [dpdk-dev] [PATCH v2] drivers/net: fix segfault in secondary process

2018-07-20 Thread Thomas Monjalon
20/07/2018 14:44, Ferruh Yigit: > --- a/drivers/net/tap/rte_eth_tap.c > +++ b/drivers/net/tap/rte_eth_tap.c > if (rte_eal_process_type() == RTE_PROC_SECONDARY && > strlen(params) == 0) { > - eth_dev = rte_eth_dev_attach_secondary(name); > + eth_dev = rte_eth_

[dpdk-dev] [PATCH v2] drivers/net: fix segfault in secondary process

2018-07-20 Thread Ferruh Yigit
Calling rte_eth_dev_info_get() on secondary process cause a crash because eth_dev->device is not set properly. Adding a helper function rte_eth_vdev_secondary_probe() that initializes eth_dev fields properly. Fixes: ee27edbe0c10 ("drivers/net: share vdev data to secondary process") Cc: sta...@dpd