Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-10-07 Thread Thomas Monjalon
08/10/2021 08:26, lihuisong (C): > As you mentioned, if we do not want the user to free rte_pci_device and > we want rte_pci_device > to be freed in time. Can we add a code logic calculating the number of > ports under a PCI address > and calling rte_dev_remove() in rte_eth_dev_close() to free >

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-10-07 Thread lihuisong (C)
在 2021/9/30 15:50, Thomas Monjalon 写道: 30/09/2021 08:28, Huisong Li: Hi. Thomas I've summed up our previous discussion. Can you look at the final proposal again? Do you think we should deal with the problem better? I don't understand what is the final proposal. Sorry. The last idea we di

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-30 Thread Thomas Monjalon
30/09/2021 08:28, Huisong Li: > Hi. Thomas > > I've summed up our previous discussion. > > Can you look at the final proposal again? > > Do you think we should deal with the problem better? I don't understand what is the final proposal. > 在 2021/9/27 9:44, Huisong Li 写道: > > > > 在 2021/9/27 3

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-29 Thread Huisong Li
Hi. Thomas I've summed up our previous discussion. Can you look at the final proposal again? Do you think we should deal with the problem better? 在 2021/9/27 9:44, Huisong Li 写道: 在 2021/9/27 3:16, Thomas Monjalon 写道: 26/09/2021 14:20, Huisong Li: 在 2021/9/18 16:46, Thomas Monjalon 写道: 18

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-26 Thread Huisong Li
在 2021/9/27 3:16, Thomas Monjalon 写道: 26/09/2021 14:20, Huisong Li: 在 2021/9/18 16:46, Thomas Monjalon 写道: 18/09/2021 05:24, Huisong Li: 在 2021/9/17 20:50, Thomas Monjalon 写道: 17/09/2021 04:13, Huisong Li: How should PMD free it? What should we do? Any good suggestions? Check that there i

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-26 Thread Thomas Monjalon
26/09/2021 14:20, Huisong Li: > 在 2021/9/18 16:46, Thomas Monjalon 写道: > > 18/09/2021 05:24, Huisong Li: > >> 在 2021/9/17 20:50, Thomas Monjalon 写道: > >>> 17/09/2021 04:13, Huisong Li: > How should PMD free it? What should we do? Any good suggestions? > >>> Check that there is no other port sh

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-26 Thread Huisong Li
在 2021/9/18 16:46, Thomas Monjalon 写道: 18/09/2021 05:24, Huisong Li: 在 2021/9/17 20:50, Thomas Monjalon 写道: 17/09/2021 04:13, Huisong Li: 在 2021/9/16 18:36, Thomas Monjalon 写道: 16/09/2021 10:01, Huisong Li: 在 2021/9/8 15:20, Thomas Monjalon 写道: 08/09/2021 04:01, Huisong Li: 在 2021/9/7 16

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-18 Thread Thomas Monjalon
18/09/2021 05:24, Huisong Li: > 在 2021/9/17 20:50, Thomas Monjalon 写道: > > 17/09/2021 04:13, Huisong Li: > >> 在 2021/9/16 18:36, Thomas Monjalon 写道: > >>> 16/09/2021 10:01, Huisong Li: > 在 2021/9/8 15:20, Thomas Monjalon 写道: > > 08/09/2021 04:01, Huisong Li: > >> 在 2021/9/7 16:53, Thom

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-17 Thread Huisong Li
在 2021/9/17 20:50, Thomas Monjalon 写道: 17/09/2021 04:13, Huisong Li: 在 2021/9/16 18:36, Thomas Monjalon 写道: 16/09/2021 10:01, Huisong Li: 在 2021/9/8 15:20, Thomas Monjalon 写道: 08/09/2021 04:01, Huisong Li: 在 2021/9/7 16:53, Thomas Monjalon 写道: 07/09/2021 05:41, Huisong Li: Calling rte_et

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-17 Thread Thomas Monjalon
17/09/2021 04:13, Huisong Li: > 在 2021/9/16 18:36, Thomas Monjalon 写道: > > 16/09/2021 10:01, Huisong Li: > >> 在 2021/9/8 15:20, Thomas Monjalon 写道: > >>> 08/09/2021 04:01, Huisong Li: > 在 2021/9/7 16:53, Thomas Monjalon 写道: > > 07/09/2021 05:41, Huisong Li: > >> Calling rte_eth_dev_clo

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-16 Thread Huisong Li
在 2021/9/16 18:36, Thomas Monjalon 写道: 16/09/2021 10:01, Huisong Li: 在 2021/9/8 15:20, Thomas Monjalon 写道: 08/09/2021 04:01, Huisong Li: 在 2021/9/7 16:53, Thomas Monjalon 写道: 07/09/2021 05:41, Huisong Li: Calling rte_eth_dev_close() will release resources of eth device and close it. But rt

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-16 Thread Thomas Monjalon
16/09/2021 10:01, Huisong Li: > 在 2021/9/8 15:20, Thomas Monjalon 写道: > > 08/09/2021 04:01, Huisong Li: > >> 在 2021/9/7 16:53, Thomas Monjalon 写道: > >>> 07/09/2021 05:41, Huisong Li: > Calling rte_eth_dev_close() will release resources of eth device and > close > it. But rte_pci_dev

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-16 Thread Huisong Li
Hi, Thomas The new comments are as follows, and look forward to your reply. Thanks! 在 2021/9/8 15:20, Thomas Monjalon 写道: 08/09/2021 04:01, Huisong Li: 在 2021/9/7 16:53, Thomas Monjalon 写道: 07/09/2021 05:41, Huisong Li: Calling rte_eth_dev_close() will release resources of eth device and cl

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-08 Thread Thomas Monjalon
08/09/2021 04:01, Huisong Li: > 在 2021/9/7 16:53, Thomas Monjalon 写道: > > 07/09/2021 05:41, Huisong Li: > >> Calling rte_eth_dev_close() will release resources of eth device and close > >> it. But rte_pci_device struct isn't released when app exit, which will lead > >> to memory leak. > > That's a

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-07 Thread Huisong Li
Hi, Thomas 在 2021/9/7 16:53, Thomas Monjalon 写道: 07/09/2021 05:41, Huisong Li: Calling rte_eth_dev_close() will release resources of eth device and close it. But rte_pci_device struct isn't released when app exit, which will lead to memory leak. That's a PMD issue. When the last port of a PCI

Re: [dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-07 Thread Thomas Monjalon
07/09/2021 05:41, Huisong Li: > Calling rte_eth_dev_close() will release resources of eth device and close > it. But rte_pci_device struct isn't released when app exit, which will lead > to memory leak. That's a PMD issue. When the last port of a PCI device is closed, the device should be freed.

[dpdk-dev] [RFC V1] examples/l3fwd-power: fix memory leak for rte_pci_device

2021-09-06 Thread Huisong Li
Calling rte_eth_dev_close() will release resources of eth device and close it. But rte_pci_device struct isn't released when app exit, which will lead to memory leak. Fixes: 613ce6691c0d ("examples/l3fwd-power: implement proper shutdown") Signed-off-by: Huisong Li --- examples/l3fwd-power/main.