* [dpdk-dev] [PATCH] net/virtio: fix memory leak in dev close
@ 2021-07-25 2:03 Gaoxiang Liu
2021-07-26 8:42 ` Xia, Chenbo
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Gaoxiang Liu @ 2021-07-25 2:03 UTC (permalink / raw)
To: Maxime Coquelin, Chenbo Xia; +Cc: dev, liugaoxiang, Gaoxiang Liu
Free the "intr_handle" memory in virtio_user_dev_uninit() to
avoid memory leak.
when virtio user dev closes, the "intr_handle" memory is not freeed
that is alloced in virtio_user_fill_intr_handle().
Fixes: 7f468b2ebfad ("net/virtio: release port upon close")
Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 1cd1e95f4..16c58710d 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
void
virtio_user_dev_uninit(struct virtio_user_dev *dev)
{
+ struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id];
+
+ if (eth_dev->intr_handle) {
+ free(eth_dev->intr_handle);
+ eth_dev->intr_handle = NULL;
+ }
+
virtio_user_stop_device(dev);
rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME, dev);
--
2.32.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio: fix memory leak in dev close
2021-07-25 2:03 [dpdk-dev] [PATCH] net/virtio: fix memory leak in dev close Gaoxiang Liu
@ 2021-07-26 8:42 ` Xia, Chenbo
2021-07-26 11:38 ` 刘高翔
2021-07-26 11:59 ` [dpdk-dev] [PATCH] net/virtio: fix memory leak of interrupt handle Gaoxiang Liu
2021-07-26 14:42 ` Gaoxiang Liu
2 siblings, 1 reply; 9+ messages in thread
From: Xia, Chenbo @ 2021-07-26 8:42 UTC (permalink / raw)
To: Gaoxiang Liu, Maxime Coquelin; +Cc: dev, liugaoxiang
Hi Gaoxiang,
> -----Original Message-----
> From: Gaoxiang Liu <clgx0086@163.com>
> Sent: Sunday, July 25, 2021 10:03 AM
> To: Maxime Coquelin <maxime.coquelin@redhat.com>; Xia, Chenbo
> <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; liugaoxiang@huawei.com; Gaoxiang Liu <clgx0086@163.com>
> Subject: [PATCH] net/virtio: fix memory leak in dev close
I suggest the title: fix memory leak of interrupt handle
>
> Free the "intr_handle" memory in virtio_user_dev_uninit() to
> avoid memory leak.
> when virtio user dev closes, the "intr_handle" memory is not freeed
> that is alloced in virtio_user_fill_intr_handle().
I suggest to replace 'intr_handle memory' with 'memory of interrupt handle'
freeed -> freed
alloced -> allocated
>
> Fixes: 7f468b2ebfad ("net/virtio: release port upon close")
Please add cc stable tag under fixes line:
Cc: stable@dpdk.org
And I think the fix commit id is not correct. Fix commit id should be the
first commit that introduces the bug. I think it's:
3d4fb6fd2505 ("net/virtio-user: support Rx interrupt")
Please help me double confirm.
>
> Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
I suggest to send patch using this email too.
The patch content looks good to me.
Thanks,
Chenbo
> ---
> drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> index 1cd1e95f4..16c58710d 100644
> --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> @@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev,
> char *path, int queues,
> void
> virtio_user_dev_uninit(struct virtio_user_dev *dev)
> {
> + struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id];
> +
> + if (eth_dev->intr_handle) {
> + free(eth_dev->intr_handle);
> + eth_dev->intr_handle = NULL;
> + }
> +
> virtio_user_stop_device(dev);
>
> rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME,
> dev);
> --
> 2.32.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio: fix memory leak in dev close
2021-07-26 8:42 ` Xia, Chenbo
@ 2021-07-26 11:38 ` 刘高翔
0 siblings, 0 replies; 9+ messages in thread
From: 刘高翔 @ 2021-07-26 11:38 UTC (permalink / raw)
To: Xia, Chenbo; +Cc: Maxime Coquelin, dev, liugaoxiang
>Hi, chen bo
>>And I think the fix commit id is not correct. Fix commit id should be the
>>first commit that introduces the bug. I think it's:
>>3d4fb6fd2505 ("net/virtio-user: support Rx interrupt")
> Yes, it should be the commit id. And I will fix other issues right now.
> Thanks.
At 2021-07-26 16:42:57, "Xia, Chenbo" <chenbo.xia@intel.com> wrote:
>Hi Gaoxiang,
>
>> -----Original Message-----
>> From: Gaoxiang Liu <clgx0086@163.com>
>> Sent: Sunday, July 25, 2021 10:03 AM
>> To: Maxime Coquelin <maxime.coquelin@redhat.com>; Xia, Chenbo
>> <chenbo.xia@intel.com>
>> Cc: dev@dpdk.org; liugaoxiang@huawei.com; Gaoxiang Liu <clgx0086@163.com>
>> Subject: [PATCH] net/virtio: fix memory leak in dev close
>
>I suggest the title: fix memory leak of interrupt handle
>
>>
>> Free the "intr_handle" memory in virtio_user_dev_uninit() to
>> avoid memory leak.
>> when virtio user dev closes, the "intr_handle" memory is not freeed
>> that is alloced in virtio_user_fill_intr_handle().
>
>I suggest to replace 'intr_handle memory' with 'memory of interrupt handle'
>
>freeed -> freed
>
>alloced -> allocated
>
>>
>> Fixes: 7f468b2ebfad ("net/virtio: release port upon close")
>
>Please add cc stable tag under fixes line:
>Cc: stable@dpdk.org
>
>And I think the fix commit id is not correct. Fix commit id should be the
>first commit that introduces the bug. I think it's:
>
>3d4fb6fd2505 ("net/virtio-user: support Rx interrupt")
>
>Please help me double confirm.
>
>>
>> Signed-off-by: Gaoxiang Liu <liugaoxiang@huawei.com>
>
>I suggest to send patch using this email too.
>
>The patch content looks good to me.
>Thanks,
>Chenbo
>
>> ---
>> drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c
>> b/drivers/net/virtio/virtio_user/virtio_user_dev.c
>> index 1cd1e95f4..16c58710d 100644
>> --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
>> +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
>> @@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev,
>> char *path, int queues,
>> void
>> virtio_user_dev_uninit(struct virtio_user_dev *dev)
>> {
>> + struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id];
>> +
>> + if (eth_dev->intr_handle) {
>> + free(eth_dev->intr_handle);
>> + eth_dev->intr_handle = NULL;
>> + }
>> +
>> virtio_user_stop_device(dev);
>>
>> rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME,
>> dev);
>> --
>> 2.32.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH] net/virtio: fix memory leak of interrupt handle
2021-07-25 2:03 [dpdk-dev] [PATCH] net/virtio: fix memory leak in dev close Gaoxiang Liu
2021-07-26 8:42 ` Xia, Chenbo
@ 2021-07-26 11:59 ` Gaoxiang Liu
2021-07-26 12:54 ` Maxime Coquelin
2021-07-26 14:42 ` Gaoxiang Liu
2 siblings, 1 reply; 9+ messages in thread
From: Gaoxiang Liu @ 2021-07-26 11:59 UTC (permalink / raw)
To: chenbo.xia, dev, liugaoxiang; +Cc: Gaoxiang Liu
Free memory of interrupt handle in virtio_user_dev_uninit() to
avoid memory leak.
when virtio user dev closes, the "intr_handle" memory is not freed
that is allocated in virtio_user_fill_intr_handle().
Fixes: 3d4fb6fd2505 <"net/virtio-user: support Rx interrupt">
Signed-off-by: Gaoxiang Liu <clgx0086@163.com>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 1cd1e95f4..16c58710d 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
void
virtio_user_dev_uninit(struct virtio_user_dev *dev)
{
+ struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id];
+
+ if (eth_dev->intr_handle) {
+ free(eth_dev->intr_handle);
+ eth_dev->intr_handle = NULL;
+ }
+
virtio_user_stop_device(dev);
rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME, dev);
--
2.32.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio: fix memory leak of interrupt handle
2021-07-26 11:59 ` [dpdk-dev] [PATCH] net/virtio: fix memory leak of interrupt handle Gaoxiang Liu
@ 2021-07-26 12:54 ` Maxime Coquelin
0 siblings, 0 replies; 9+ messages in thread
From: Maxime Coquelin @ 2021-07-26 12:54 UTC (permalink / raw)
To: Gaoxiang Liu, chenbo.xia, dev, liugaoxiang
On 7/26/21 1:59 PM, Gaoxiang Liu wrote:
> Free memory of interrupt handle in virtio_user_dev_uninit() to
> avoid memory leak.
> when virtio user dev closes, the "intr_handle" memory is not freed
> that is allocated in virtio_user_fill_intr_handle().
>
> Fixes: 3d4fb6fd2505 <"net/virtio-user: support Rx interrupt">
>
> Signed-off-by: Gaoxiang Liu <clgx0086@163.com>
> ---
> drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> index 1cd1e95f4..16c58710d 100644
> --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> @@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
> void
> virtio_user_dev_uninit(struct virtio_user_dev *dev)
> {
> + struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id];
> +
> + if (eth_dev->intr_handle) {
> + free(eth_dev->intr_handle);
> + eth_dev->intr_handle = NULL;
> + }
> +
> virtio_user_stop_device(dev);
>
> rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME, dev);
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH] net/virtio: fix memory leak of interrupt handle
2021-07-25 2:03 [dpdk-dev] [PATCH] net/virtio: fix memory leak in dev close Gaoxiang Liu
2021-07-26 8:42 ` Xia, Chenbo
2021-07-26 11:59 ` [dpdk-dev] [PATCH] net/virtio: fix memory leak of interrupt handle Gaoxiang Liu
@ 2021-07-26 14:42 ` Gaoxiang Liu
2021-07-27 1:52 ` Xia, Chenbo
2021-07-28 6:51 ` Xia, Chenbo
2 siblings, 2 replies; 9+ messages in thread
From: Gaoxiang Liu @ 2021-07-26 14:42 UTC (permalink / raw)
To: chenbo.xia, dev, liugaoxiang; +Cc: Gaoxiang Liu
Free memory of interrupt handle in virtio_user_dev_uninit() to
avoid memory leak.
when virtio user dev closes, memory of interrupt handle is not freed
that is allocated in virtio_user_fill_intr_handle().
Fixes: 3d4fb6fd2505 <"net/virtio-user: support Rx interrupt">
Signed-off-by: Gaoxiang Liu <clgx0086@163.com>
---
drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 1cd1e95f4..16c58710d 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
void
virtio_user_dev_uninit(struct virtio_user_dev *dev)
{
+ struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id];
+
+ if (eth_dev->intr_handle) {
+ free(eth_dev->intr_handle);
+ eth_dev->intr_handle = NULL;
+ }
+
virtio_user_stop_device(dev);
rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME, dev);
--
2.32.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio: fix memory leak of interrupt handle
2021-07-26 14:42 ` Gaoxiang Liu
@ 2021-07-27 1:52 ` Xia, Chenbo
2021-07-27 1:54 ` Xia, Chenbo
2021-07-28 6:51 ` Xia, Chenbo
1 sibling, 1 reply; 9+ messages in thread
From: Xia, Chenbo @ 2021-07-27 1:52 UTC (permalink / raw)
To: Gaoxiang Liu, dev, liugaoxiang; +Cc: Maxime Coquelin
Hi Gaoxiang,
> -----Original Message-----
> From: Gaoxiang Liu <clgx0086@163.com>
> Sent: Monday, July 26, 2021 10:42 PM
> To: Xia, Chenbo <chenbo.xia@intel.com>; dev@dpdk.org; liugaoxiang@huawei.com
> Cc: Gaoxiang Liu <clgx0086@163.com>
> Subject: [PATCH] net/virtio: fix memory leak of interrupt handle
>
> Free memory of interrupt handle in virtio_user_dev_uninit() to
> avoid memory leak.
> when virtio user dev closes, memory of interrupt handle is not freed
> that is allocated in virtio_user_fill_intr_handle().
>
> Fixes: 3d4fb6fd2505 <"net/virtio-user: support Rx interrupt">
>
Please note two things here:
1. Next time you send a v2 patch, please add the prefix like:
[v2] net/virtio: fix memory leak of interrupt handle
2. We prefer '()' rather than '<>' for fix line and you may miss one comment
that we need cc stable tag for most fixes:
Fixes: 3d4fb6fd2505 ("net/virtio-user: support Rx interrupt")
Cc: stable@dpdk.org
And no need to send v3, I will help you fix it when applying. Welcome to DPDK!
For this patch:
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
> Signed-off-by: Gaoxiang Liu <clgx0086@163.com>
> ---
> drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> index 1cd1e95f4..16c58710d 100644
> --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> @@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char
> *path, int queues,
> void
> virtio_user_dev_uninit(struct virtio_user_dev *dev)
> {
> + struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id];
> +
> + if (eth_dev->intr_handle) {
> + free(eth_dev->intr_handle);
> + eth_dev->intr_handle = NULL;
> + }
> +
> virtio_user_stop_device(dev);
>
> rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME, dev);
> --
> 2.32.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio: fix memory leak of interrupt handle
2021-07-27 1:52 ` Xia, Chenbo
@ 2021-07-27 1:54 ` Xia, Chenbo
0 siblings, 0 replies; 9+ messages in thread
From: Xia, Chenbo @ 2021-07-27 1:54 UTC (permalink / raw)
To: Xia, Chenbo, Gaoxiang Liu, dev, liugaoxiang; +Cc: Maxime Coquelin
Missed R-by of Maxime will also be added when applying.
/Chenbo
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Xia, Chenbo
> Sent: Tuesday, July 27, 2021 9:53 AM
> To: Gaoxiang Liu <clgx0086@163.com>; dev@dpdk.org; liugaoxiang@huawei.com
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
> Subject: Re: [dpdk-dev] [PATCH] net/virtio: fix memory leak of interrupt
> handle
>
> Hi Gaoxiang,
>
> > -----Original Message-----
> > From: Gaoxiang Liu <clgx0086@163.com>
> > Sent: Monday, July 26, 2021 10:42 PM
> > To: Xia, Chenbo <chenbo.xia@intel.com>; dev@dpdk.org; liugaoxiang@huawei.com
> > Cc: Gaoxiang Liu <clgx0086@163.com>
> > Subject: [PATCH] net/virtio: fix memory leak of interrupt handle
> >
> > Free memory of interrupt handle in virtio_user_dev_uninit() to
> > avoid memory leak.
> > when virtio user dev closes, memory of interrupt handle is not freed
> > that is allocated in virtio_user_fill_intr_handle().
> >
> > Fixes: 3d4fb6fd2505 <"net/virtio-user: support Rx interrupt">
> >
>
> Please note two things here:
>
> 1. Next time you send a v2 patch, please add the prefix like:
> [v2] net/virtio: fix memory leak of interrupt handle
>
> 2. We prefer '()' rather than '<>' for fix line and you may miss one comment
> that we need cc stable tag for most fixes:
> Fixes: 3d4fb6fd2505 ("net/virtio-user: support Rx interrupt")
> Cc: stable@dpdk.org
>
> And no need to send v3, I will help you fix it when applying. Welcome to DPDK!
>
> For this patch:
>
> Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
>
> > Signed-off-by: Gaoxiang Liu <clgx0086@163.com>
> > ---
> > drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> > b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> > index 1cd1e95f4..16c58710d 100644
> > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> > @@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char
> > *path, int queues,
> > void
> > virtio_user_dev_uninit(struct virtio_user_dev *dev)
> > {
> > + struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id];
> > +
> > + if (eth_dev->intr_handle) {
> > + free(eth_dev->intr_handle);
> > + eth_dev->intr_handle = NULL;
> > + }
> > +
> > virtio_user_stop_device(dev);
> >
> > rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME, dev);
> > --
> > 2.32.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio: fix memory leak of interrupt handle
2021-07-26 14:42 ` Gaoxiang Liu
2021-07-27 1:52 ` Xia, Chenbo
@ 2021-07-28 6:51 ` Xia, Chenbo
1 sibling, 0 replies; 9+ messages in thread
From: Xia, Chenbo @ 2021-07-28 6:51 UTC (permalink / raw)
To: Gaoxiang Liu, dev, liugaoxiang
> -----Original Message-----
> From: Gaoxiang Liu <clgx0086@163.com>
> Sent: Monday, July 26, 2021 10:42 PM
> To: Xia, Chenbo <chenbo.xia@intel.com>; dev@dpdk.org; liugaoxiang@huawei.com
> Cc: Gaoxiang Liu <clgx0086@163.com>
> Subject: [PATCH] net/virtio: fix memory leak of interrupt handle
>
> Free memory of interrupt handle in virtio_user_dev_uninit() to
> avoid memory leak.
> when virtio user dev closes, memory of interrupt handle is not freed
> that is allocated in virtio_user_fill_intr_handle().
>
> Fixes: 3d4fb6fd2505 <"net/virtio-user: support Rx interrupt">
>
> Signed-off-by: Gaoxiang Liu <clgx0086@163.com>
> ---
> drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> index 1cd1e95f4..16c58710d 100644
> --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
> +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
> @@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char
> *path, int queues,
> void
> virtio_user_dev_uninit(struct virtio_user_dev *dev)
> {
> + struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id];
> +
> + if (eth_dev->intr_handle) {
> + free(eth_dev->intr_handle);
> + eth_dev->intr_handle = NULL;
> + }
> +
> virtio_user_stop_device(dev);
>
> rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME, dev);
> --
> 2.32.0
Applied to next-virtio/main. Thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-07-28 6:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-25 2:03 [dpdk-dev] [PATCH] net/virtio: fix memory leak in dev close Gaoxiang Liu
2021-07-26 8:42 ` Xia, Chenbo
2021-07-26 11:38 ` 刘高翔
2021-07-26 11:59 ` [dpdk-dev] [PATCH] net/virtio: fix memory leak of interrupt handle Gaoxiang Liu
2021-07-26 12:54 ` Maxime Coquelin
2021-07-26 14:42 ` Gaoxiang Liu
2021-07-27 1:52 ` Xia, Chenbo
2021-07-27 1:54 ` Xia, Chenbo
2021-07-28 6:51 ` Xia, Chenbo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).