From: Jie Liu <[email protected]>
sxe2_drv_dev_munmap() refuses to unmap the BAR region when
cdev->config.kernel_reset is set, returning -EPERM. After a kernel
reset the application still needs to release the previously mapped
regions during cleanup; blocking munmap leaves stale mappings and
prevents a clean teardown.
Remove the kernel_reset check from sxe2_drv_dev_munmap() so the
mapping is always released. The cdev parameter is no longer used,
so mark it __rte_unused.
Fixes: 66a10eb60e ("net/sxe2: add PCI BAR mapping")
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Jie Liu <[email protected]>
---
drivers/common/sxe2/sxe2_ioctl_chnl.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/common/sxe2/sxe2_ioctl_chnl.c
b/drivers/common/sxe2/sxe2_ioctl_chnl.c
index a233a78136..3e2fbf572f 100644
--- a/drivers/common/sxe2/sxe2_ioctl_chnl.c
+++ b/drivers/common/sxe2/sxe2_ioctl_chnl.c
@@ -367,16 +367,10 @@ void
RTE_EXPORT_INTERNAL_SYMBOL(sxe2_drv_dev_munmap)
int32_t
-sxe2_drv_dev_munmap(struct sxe2_common_device *cdev, void *virt, uint64_t len)
+sxe2_drv_dev_munmap(struct sxe2_common_device *cdev __rte_unused, void *virt,
uint64_t len)
{
int32_t ret = 0;
- if (cdev->config.kernel_reset) {
- ret = -EPERM;
- PMD_LOG_WARN(COM, "kernel reset, need restart app.");
- goto l_end;
- }
-
PMD_LOG_DEBUG(COM, "Munmap virt=%p, len=0x%"PRIx64"",
virt, len);
--
2.52.0