This patch set fixes problem when mbufs are not released back to the
original memory pool during Rx queue relese call leading to mbufs
"leakage".
This issue happens when device stop (rte_eth_dev_stop()) will be called
after device start (rte_eth_dev_start()) without any incoming packets
received since device start. In this case both rxq->rx_tail and
rxq->rxrearm_start equal to 0 and release cycle will not be executed.
On the next device start (rte_eth_dev_start()) new set of mbufs for the
RX queue will be allocated.
Yury Kylulin (2):
net/ixgbe: fix mbufs leakage during Rx queue release
net/i40e: fix mbufs leakage during Rx queue release
drivers/net/i40e/i40e_rxtx_vec.c | 16 ++++++++++++++--
drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 16 ++++++++++++++--
2 files changed, 28 insertions(+), 4 deletions(-)
--
2.7.4
For the vector PMD release all mbufs from the Rx queue if no packets
received after device start.
Fixes: 11b220c6498d ("ixgbe: fix release queue mbufs")
Signed-off-by: Yury Kylulin <redacted>
---
drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
@@ -204,8 +204,20 @@ _ixgbe_rx_queue_release_mbufs_vec(struct ixgbe_rx_queue *rxq)return;/* free all mbufs that are valid in the ring */-for(i=rxq->rx_tail;i!=rxq->rxrearm_start;i=(i+1)&mask)-rte_pktmbuf_free_seg(rxq->sw_ring[i].mbuf);+if(rxq->rxrearm_nb==0){+for(i=0;i<rxq->nb_rx_desc;i++){+if(rxq->sw_ring[i].mbuf!=NULL)+rte_pktmbuf_free_seg(rxq->sw_ring[i].mbuf);+}+}else{+for(i=rxq->rx_tail;+i!=rxq->rxrearm_start;+i=(i+1)&mask){+if(rxq->sw_ring[i].mbuf!=NULL)+rte_pktmbuf_free_seg(rxq->sw_ring[i].mbuf);+}+}+rxq->rxrearm_nb=rxq->nb_rx_desc;/* set all entries to NULL */
For the vector PMD release all mbufs from the Rx queue if no packets
received after device start.
Fixes: 9ed94e5bb04e ("i40e: add vector Rx")
Signed-off-by: Yury Kylulin <redacted>
---
drivers/net/i40e/i40e_rxtx_vec.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
@@ -692,8 +692,20 @@ i40e_rx_queue_release_mbufs_vec(struct i40e_rx_queue *rxq)return;/* free all mbufs that are valid in the ring */-for(i=rxq->rx_tail;i!=rxq->rxrearm_start;i=(i+1)&mask)-rte_pktmbuf_free_seg(rxq->sw_ring[i].mbuf);+if(rxq->rxrearm_nb==0){+for(i=0;i<rxq->nb_rx_desc;i++){+if(rxq->sw_ring[i].mbuf!=NULL)+rte_pktmbuf_free_seg(rxq->sw_ring[i].mbuf);+}+}else{+for(i=rxq->rx_tail;+i!=rxq->rxrearm_start;+i=(i+1)&mask){+if(rxq->sw_ring[i].mbuf!=NULL)+rte_pktmbuf_free_seg(rxq->sw_ring[i].mbuf);+}+}+rxq->rxrearm_nb=rxq->nb_rx_desc;/* set all entries to NULL */
-----Original Message-----
From: Kylulin, Yury
Sent: Tuesday, August 30, 2016 12:51 AM
To: Zhang, Helin; Ananyev, Konstantin; Wu, Jingjing
Cc: Lu, Wenzhuo; dev@dpdk.org; Kylulin, Yury
Subject: [PATCH 1/2] net/ixgbe: fix mbufs leakage during Rx queue release
For the vector PMD release all mbufs from the Rx queue if no packets received
after device start.
Fixes: 11b220c6498d ("ixgbe: fix release queue mbufs")
Signed-off-by: Yury Kylulin <redacted>
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yury Kylulin
Sent: Tuesday, August 30, 2016 12:51 AM
To: Zhang, Helin <redacted>; Ananyev, Konstantin
[off-list ref]; Wu, Jingjing [off-list ref]
Cc: Lu, Wenzhuo <redacted>; dev@dpdk.org; Kylulin, Yury
[off-list ref]
Subject: [dpdk-dev] [PATCH 2/2] net/i40e: fix mbufs leakage during Rx
queue release
For the vector PMD release all mbufs from the Rx queue if no packets
received after device start.
Fixes: 9ed94e5bb04e ("i40e: add vector Rx")
Signed-off-by: Yury Kylulin <redacted>
From: Bruce Richardson <hidden> Date: 2016-09-19 13:29:37
On Mon, Aug 29, 2016 at 07:50:46PM +0300, Yury Kylulin wrote:
This patch set fixes problem when mbufs are not released back to the
original memory pool during Rx queue relese call leading to mbufs
"leakage".
This issue happens when device stop (rte_eth_dev_stop()) will be called
after device start (rte_eth_dev_start()) without any incoming packets
received since device start. In this case both rxq->rx_tail and
rxq->rxrearm_start equal to 0 and release cycle will not be executed.
On the next device start (rte_eth_dev_start()) new set of mbufs for the
RX queue will be allocated.
Yury Kylulin (2):
net/ixgbe: fix mbufs leakage during Rx queue release
net/i40e: fix mbufs leakage during Rx queue release
From: Christian Ehrhardt <hidden> Date: 2016-09-19 13:52:55
On Mon, Sep 19, 2016 at 3:29 PM, Bruce Richardson <
bruce.richardson@intel.com> wrote:
quoted
This patch set fixes problem when mbufs are not released back to the
original memory pool during Rx queue relese call leading to mbufs
"leakage".
This issue happens when device stop (rte_eth_dev_stop()) will be called
after device start (rte_eth_dev_start()) without any incoming packets
received since device start. In this case both rxq->rx_tail and
rxq->rxrearm_start equal to 0 and release cycle will not be executed.
On the next device start (rte_eth_dev_start()) new set of mbufs for the
RX queue will be allocated.
Yury Kylulin (2):
net/ixgbe: fix mbufs leakage during Rx queue release
net/i40e: fix mbufs leakage during Rx queue release
Applied to dpdk-next-net/rel_16_11
I don't know the underlying code well enough, but given the description I'd
expect that qualifies for the stable tree?
Set stable@dpdk on cc.
From: Yuanhan Liu <hidden> Date: 2016-09-19 14:47:43
On Mon, Sep 19, 2016 at 03:52:25PM +0200, Christian Ehrhardt wrote:
On Mon, Sep 19, 2016 at 3:29 PM, Bruce Richardson <
bruce.richardson@intel.com> wrote:
quoted
quoted
This patch set fixes problem when mbufs are not released back to the
original memory pool during Rx queue relese call leading to mbufs
"leakage".
This issue happens when device stop (rte_eth_dev_stop()) will be called
after device start (rte_eth_dev_start()) without any incoming packets
received since device start. In this case both rxq->rx_tail and
rxq->rxrearm_start equal to 0 and release cycle will not be executed.
On the next device start (rte_eth_dev_start()) new set of mbufs for the
RX queue will be allocated.
Yury Kylulin (2):
net/ixgbe: fix mbufs leakage during Rx queue release
net/i40e: fix mbufs leakage during Rx queue release
Applied to dpdk-next-net/rel_16_11
I don't know the underlying code well enough,
Me, neither.
but given the description I'd
expect that qualifies for the stable tree?