On 1/23/2017 10:34 AM, Yuanhan Liu wrote: > On Mon, Jan 23, 2017 at 09:41:35AM +0000, Ferruh Yigit wrote: >> On 1/22/2017 2:45 AM, Yuanhan Liu wrote: >>> On Fri, Jan 20, 2017 at 03:27:43PM +0000, Ferruh Yigit wrote: >>>> On 1/20/2017 11:21 AM, Ferruh Yigit wrote: >>>>> On 1/20/2017 8:04 AM, Yuanhan Liu wrote: >>>>>> Fix an silly error by auto-complete while managing the merge conflicts. >>>>>> It's the eth_dev_data (but not eth_dev) entry should be memset. >>>>>> >>>>>> Fixes: d948f596fee2 ("ethdev: fix port data mismatched in multiple >>>>>> process model") >>>>>> >>>>>> Reported-by: Ferruh Yigit <ferruh.yi...@intel.com> >>>>>> Signed-off-by: Yuanhan Liu <yuanhan....@linux.intel.com> >>>>>> --- >>>>>> lib/librte_ether/rte_ethdev.c | 2 +- >>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/lib/librte_ether/rte_ethdev.c >>>>>> b/lib/librte_ether/rte_ethdev.c >>>>>> index 4790faf..61f44e2 100644 >>>>>> --- a/lib/librte_ether/rte_ethdev.c >>>>>> +++ b/lib/librte_ether/rte_ethdev.c >>>>>> @@ -225,7 +225,7 @@ struct rte_eth_dev * >>>>>> return NULL; >>>>>> } >>>>>> >>>>>> - memset(&rte_eth_devices[port_id], 0, sizeof(*eth_dev->data)); >>>>>> + memset(&rte_eth_dev_data[port_id], 0, sizeof(struct >>>>>> rte_eth_dev_data)); >>>>> >>>>> Not directly related to the this issue, but, after fix, this may have >>>>> issues with secondary process. >>>>> >>>>> There were patches sent to fix this. >>>> >>>> I mean this one: >>>> http://dpdk.org/ml/archives/dev/2017-January/054422.html >>> >>> d948f596fee2 ("ethdev: fix port data mismatched in multiple process >>> model") should have fixed it. >> >> Think about case, where secondary process uses a virtual PMD, which does >> a rte_eth_dev_allocate() call, shouldn't this corrupt primary process >> device data? > > Yes, it may. However, I doubt that's the typical usage.
But this is a use case, and broken now, and fix is known. Should be fixed I think. > Besides that, > most of virtual PMDs don't support Multipleprocess: git grep shows pcap > is the only one that does claim Multipleprocess is supported. I guess you searched for NIC feature documentation for this. But as far as I know, all virtual drivers can be used in both primary and secondary process. > > --yliu >