diff options
author | Ilya Maximets <i.maximets@samsung.com> | 2018-01-23 10:51:31 +0300 |
---|---|---|
committer | Ian Stokes <ian.stokes@intel.com> | 2018-01-26 20:40:52 +0000 |
commit | 448a18458328655539599eb4d24b525d311d13df (patch) | |
tree | a468c22204883c209aa4d84467c9084ada418eeb | |
parent | 0804663d148eda3b3938756bc388c7af5f0b311d (diff) | |
download | openvswitch-448a18458328655539599eb4d24b525d311d13df.tar.gz |
netdev-dpdk: Fix xstats leak on port destruction.
CC: Michal Weglicki <michalx.weglicki@intel.com>
Fixes: 971f4b394c6e ("netdev: Custom statistics.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
-rw-r--r-- | lib/netdev-dpdk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 908ac299f..d41f5aa51 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -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. */ |