2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 22:35:15 +00:00

netdev-dpdk: Fix xstats leak on port destruction.

CC: Michal Weglicki <michalx.weglicki@intel.com>
Fixes: 971f4b394c ("netdev: Custom statistics.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
Ilya Maximets
2018-01-23 10:51:31 +03:00
committed by Ian Stokes
parent 34eb086342
commit ac1a9bb93f

View File

@@ -452,6 +452,8 @@ struct netdev_rxq_dpdk {
static void netdev_dpdk_destruct(struct netdev *netdev);
static void netdev_dpdk_vhost_destruct(struct netdev *netdev);
static void netdev_dpdk_clear_xstats(struct netdev_dpdk *dev);
int netdev_dpdk_get_vid(const struct netdev_dpdk *dev);
struct ingress_policer *
@@ -1104,6 +1106,7 @@ netdev_dpdk_destruct(struct netdev *netdev)
}
}
netdev_dpdk_clear_xstats(dev);
free(dev->devargs);
common_destruct(dev);
@@ -1169,7 +1172,7 @@ netdev_dpdk_dealloc(struct netdev *netdev)
}
static void
netdev_dpdk_clear_xstats(struct netdev_dpdk *dev) OVS_REQUIRES(dev->mutex)
netdev_dpdk_clear_xstats(struct netdev_dpdk *dev)
{
/* If statistics are already allocated, we have to
* reconfigure, as port_id could have been changed. */