patch 'common/idpf/base: fix memory leaks on control queue' has been queued to stable release 22.11.3
Xueming Li
xuemingl at nvidia.com
Sun Jun 25 08:35:29 CEST 2023
Hi,
FYI, your patch has been queued to stable release 22.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/27/23. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=b9f3b81e9eae675b51be236741cfa6ae3d511ade
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From b9f3b81e9eae675b51be236741cfa6ae3d511ade Mon Sep 17 00:00:00 2001
From: Wenjing Qiao <wenjing.qiao at intel.com>
Date: Wed, 26 Apr 2023 06:22:54 -0400
Subject: [PATCH] common/idpf/base: fix memory leaks on control queue
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit e83aa09770603943f7abd1b736f8c01ea4273e16 ]
idpf_init_hw needs to free it's q_info.
idpf_clean_arq_element needs to return buffers via post_rx_buffs
Fixes: fb4ac04e9bfa ("common/idpf: introduce common library")
Signed-off-by: Christopher Pau <christopher.pau at intel.com>
Signed-off-by: Wenjing Qiao <wenjing.qiao at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
drivers/common/idpf/base/idpf_common.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/common/idpf/base/idpf_common.c b/drivers/common/idpf/base/idpf_common.c
index 69e3b32f85..de82c3458f 100644
--- a/drivers/common/idpf/base/idpf_common.c
+++ b/drivers/common/idpf/base/idpf_common.c
@@ -130,6 +130,8 @@ int idpf_init_hw(struct idpf_hw *hw, struct idpf_ctlq_size ctlq_size)
hw->mac.addr[4] = 0x03;
hw->mac.addr[5] = 0x14;
+ idpf_free(hw, q_info);
+
return 0;
}
@@ -219,6 +221,7 @@ bool idpf_check_asq_alive(struct idpf_hw *hw)
int idpf_clean_arq_element(struct idpf_hw *hw,
struct idpf_arq_event_info *e, u16 *pending)
{
+ struct idpf_dma_mem *dma_mem = NULL;
struct idpf_ctlq_msg msg = { 0 };
int status;
u16 msg_data_len;
@@ -226,6 +229,8 @@ int idpf_clean_arq_element(struct idpf_hw *hw,
*pending = 1;
status = idpf_ctlq_recv(hw->arq, pending, &msg);
+ if (status == -ENOMSG)
+ goto exit;
/* ctlq_msg does not align to ctlq_desc, so copy relevant data here */
e->desc.opcode = msg.opcode;
@@ -240,7 +245,14 @@ int idpf_clean_arq_element(struct idpf_hw *hw,
msg_data_len = msg.data_len;
idpf_memcpy(e->msg_buf, msg.ctx.indirect.payload->va, msg_data_len,
IDPF_DMA_TO_NONDMA);
+ dma_mem = msg.ctx.indirect.payload;
+ } else {
+ *pending = 0;
}
+
+ status = idpf_ctlq_post_rx_buffs(hw, hw->arq, pending, &dma_mem);
+
+exit:
return status;
}
--
2.25.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-06-25 14:32:01.459682900 +0800
+++ 0111-common-idpf-base-fix-memory-leaks-on-control-queue.patch 2023-06-25 14:31:58.565773900 +0800
@@ -1 +1 @@
-From e83aa09770603943f7abd1b736f8c01ea4273e16 Mon Sep 17 00:00:00 2001
+From b9f3b81e9eae675b51be236741cfa6ae3d511ade Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit e83aa09770603943f7abd1b736f8c01ea4273e16 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 2394f85580..da352ea88f 100644
+index 69e3b32f85..de82c3458f 100644
More information about the stable
mailing list