net/i40e: fix multi-process shared data
authorDapeng Yu <dapengx.yu@intel.com>
Mon, 21 Jun 2021 07:23:53 +0000 (15:23 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Tue, 6 Jul 2021 02:59:01 +0000 (04:59 +0200)
commite391a7b7f815795eacfae3240c4405353cf37a53
tree728a0c208ca099d9575c5a33dee38dcd9a2293f6
parentbe8ff6210851fdacbe00033259b7dc5426e95589
net/i40e: fix multi-process shared data

The rte_eth_devices array is not in share memory, it should not be
referenced by i40e_adapter which is shared by primary and secondary.
Any process set i40e_adapter->eth_dev will corrupt another process's
context.

The patch removed the field "eth_dev" from i40e_adapter.
Now, when the data paths try to access the rte_eth_dev_data instance,
they should replace adapter->eth_dev->data with adapter->pf.dev_data.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/i40e_ethdev.c
drivers/net/i40e/i40e_ethdev.h
drivers/net/i40e/i40e_fdir.c
drivers/net/i40e/i40e_flow.c
drivers/net/i40e/i40e_hash.c
drivers/net/i40e/i40e_rxtx.c
drivers/net/i40e/i40e_vf_representor.c