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:
committed by
Ian Stokes
parent
34eb086342
commit
ac1a9bb93f
@@ -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. */
|
||||
|
Reference in New Issue
Block a user