net/i40e: fix port close
authorZhirun Yan <zhirun.yan@intel.com>
Mon, 10 Dec 2018 14:08:58 +0000 (14:08 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 13 Dec 2018 17:44:52 +0000 (17:44 +0000)
commit38827a04812c232ef10ec2d7cde1ca133923c225
treed4188eb8aecb22cfa626b93127e7954c67684b78
parent8832837c6e64a75be31f32c49da261db15054c0d
net/i40e: fix port close

Port reset will call i40evf_uninit_vf() to release resource. It wants
to call i40evf_dev_close() to release resources. Before this patch,
hw->adapter_stopped was used to mark the status about start/stop and
close. So it will never call i40evf_dev_close() after stopping the port.

This patch added hw->adapter_closed flag in i40evf_dev_close() and
i40e_dev_close() to control the status of close.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org
Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/i40e/base/i40e_type.h
drivers/net/i40e/i40e_ethdev.c
drivers/net/i40e/i40e_ethdev_vf.c