net/af_packet: fix stale sockets
authorAbhishek Sachan <abhishek.sachan@altran.com>
Thu, 22 Aug 2019 06:25:36 +0000 (11:55 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 27 Aug 2019 13:31:16 +0000 (15:31 +0200)
commit7c3bcc7b6dc14623bd17960fa3236e6fa9e2711b
tree2601d748e621485bc029a2695d37baedb589bdd3
parentfbb25a3878cc7c6de4c68c8cee01983d127e2205
net/af_packet: fix stale sockets

af_packet driver is leaving stale socket after device is removed.

Ring buffers are memory mapped when device is added using rte_dev_probe.
There is no corresponding munmap call when device is removed/closed.

This commit fixes the issue by calling munmap
from rte_pmd_af_packet_remove().

Bugzilla ID: 339
Fixes: e6ee4db01b4d ("af_packet: make the device detachable")
Cc: stable@dpdk.org
Signed-off-by: Abhishek Sachan <abhishek.sachan@altran.com>
Reviewed-by: John W. Linville <linville@tuxdriver.com>
drivers/net/af_packet/rte_eth_af_packet.c