net/ice: fix data path in secondary process
authorQi Zhang <qi.z.zhang@intel.com>
Wed, 26 May 2021 06:12:56 +0000 (14:12 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Thu, 10 Jun 2021 10:04:16 +0000 (12:04 +0200)
commit45f6a19f6565a3ae8572868c1a6fd2ad70687171
tree1a2706d4f5be0476fa5b72abc9b84cac2900993d
parentf8b3326f3116afb357beac730577fec6ffbf2d83
net/ice: fix data path in secondary process

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

The patch removed the field "eth_dev" from ice_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: f9cf4f864150 ("net/ice: support device initialization")
Cc: stable@dpdk.org
Reported-by: Yixue Wang <yixue.wang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Tested-by: Yixue Wang <yixue.wang@intel.com>
drivers/net/ice/ice_dcf_parent.c
drivers/net/ice/ice_ethdev.c
drivers/net/ice/ice_ethdev.h
drivers/net/ice/ice_fdir_filter.c
drivers/net/ice/ice_rxtx.c
drivers/net/ice/ice_rxtx.h
drivers/net/ice/ice_rxtx_vec_avx2.c
drivers/net/ice/ice_rxtx_vec_avx512.c
drivers/net/ice/ice_rxtx_vec_common.h
drivers/net/ice/ice_rxtx_vec_sse.c
drivers/net/ice/ice_switch_filter.c