DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Luca Boccassi <bluca@debian.org>,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH 00/14] cleanup resources on shutdown
Date: Wed, 5 Feb 2020 04:07:19 -0800
Message-ID: <20200205040719.0e429ae8@shemminger-XPS-13-9360> (raw)
In-Reply-To: <CAJFAV8z_-tEfopVHPT_CyJoXsBf8wNZEJ-+8xhv-va4tRffoww@mail.gmail.com>

On Wed, 5 Feb 2020 10:32:49 +0100
David Marchand <david.marchand@redhat.com> wrote:

> Hello Stephen,
> 
> On Sat, Jan 4, 2020 at 2:34 AM Stephen Hemminger
> <stephen@networkplumber.org> wrote:
> >
> > Recently started using valgrind with DPDK, and the results
> > are not clean.
> >
> > The DPDK has a function that applications can use to tell it
> > to cleanup resources on shutdown (rte_eal_cleanup). But the
> > current coverage of that API is spotty. Many internal parts of
> > DPDK leave files and allocated memory behind.
> >
> > This patch set is a start at getting the sub-parts of
> > DPDK to cleanup after themselves. These are the easier ones,
> > the harder and more critical ones are in the drivers
> > and the memory subsystem.
> >
> > There are no visible API or ABI changes here.  
> 
> Could you share what you did to run a dpdk application with valgrind?
> 
> I tried with testpmd and a 3.15 valgrind (fc30), but I get an init
> failure on the cpu flags.
> 
> $ LD_LIBRARY_PATH=/home/dmarchan/builds/build-gcc-shared/install/usr/local/lib64
> valgrind /home/dmarchan/builds/build-gcc-shared/install/usr/local/bin/dpdk-testpmd
> -c 3 --no-huge -m 20 -d librte_mempool_ring.so -d librte_pmd_null.so
> -w 0:0.0 --vdev net_null1 --vdev net_null2 -- --no-mlockall
> --total-num-mbufs=2048 -ia
> ==10258== Memcheck, a memory error detector
> ==10258== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
> ==10258== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
> ==10258== Command:
> /home/dmarchan/builds/build-gcc-shared/install/usr/local/bin/dpdk-testpmd
> -c 3 --no-huge -m 20 -d librte_mempool_ring.so -d librte_pmd_null.so
> -w 0:0.0 --vdev net_null1 --vdev net_null2 -- --no-mlockall
> --total-num-mbufs=2048 -ia
> ==10258==
> ERROR: This system does not support "RDSEED".
> Please check that RTE_MACHINE is set correctly.
> EAL: FATAL: unsupported cpu type.
> EAL: unsupported cpu type.
> EAL: Error - exiting with code: 1
>   Cause: Cannot init EAL: Operation not supported
> ==10258==
> ==10258== HEAP SUMMARY:
> ==10258==     in use at exit: 1,388 bytes in 49 blocks
> ==10258==   total heap usage: 97 allocs, 48 frees, 89,426 bytes allocated
> ==10258==
> ==10258== LEAK SUMMARY:
> ==10258==    definitely lost: 0 bytes in 0 blocks
> ==10258==    indirectly lost: 0 bytes in 0 blocks
> ==10258==      possibly lost: 0 bytes in 0 blocks
> ==10258==    still reachable: 1,388 bytes in 49 blocks
> ==10258==         suppressed: 0 bytes in 0 blocks
> ==10258== Rerun with --leak-check=full to see details of leaked memory
> ==10258==
> ==10258== For lists of detected and suppressed errors, rerun with: -s
> ==10258== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
> 

I am testing with valgrind on ARM.
It should be possible on x86 but you need to dial down the RTE_MACHINE
choice to something valgrind understands.


  reply	other threads:[~2020-02-05 12:07 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-04  1:33 Stephen Hemminger
2020-01-04  1:33 ` [dpdk-dev] [PATCH 01/14] eal: log: close on cleanup Stephen Hemminger
2020-01-04  1:33 ` [dpdk-dev] [PATCH 02/14] eal: log: free dynamic state " Stephen Hemminger
2020-04-25 16:26   ` David Marchand
2020-01-04  1:33 ` [dpdk-dev] [PATCH 03/14] eal: alarm: close timerfd on eal cleanup Stephen Hemminger
2020-04-25 16:32   ` David Marchand
2020-01-04  1:33 ` [dpdk-dev] [PATCH 04/14] eal: cleanup threads Stephen Hemminger
2020-02-04 14:48   ` Aaron Conole
2020-01-04  1:33 ` [dpdk-dev] [PATCH 05/14] eal: intr: cleanup resources Stephen Hemminger
2020-04-25 16:49   ` David Marchand
2020-04-26 16:24     ` Stephen Hemminger
2020-01-04  1:33 ` [dpdk-dev] [PATCH 06/14] eal: mp: end the multiprocess thread during cleanup Stephen Hemminger
2020-04-27 15:37   ` Burakov, Anatoly
2020-01-04  1:33 ` [dpdk-dev] [PATCH 07/14] eal: interrupts close epoll fd on shutdown Stephen Hemminger
2020-01-04  1:33 ` [dpdk-dev] [PATCH 08/14] eal: vfio: cleanup the mp sync handle Stephen Hemminger
2020-04-27 12:12   ` Burakov, Anatoly
2020-01-04  1:33 ` [dpdk-dev] [PATCH 09/14] eal: close mem config on cleanup Stephen Hemminger
2020-04-27 12:12   ` Burakov, Anatoly
2020-04-27 17:00     ` Stephen Hemminger
2020-04-28  9:20       ` Burakov, Anatoly
2020-01-04  1:33 ` [dpdk-dev] [PATCH 10/14] tap: close netlink socket on device close Stephen Hemminger
2020-04-25 15:52   ` David Marchand
2020-01-04  1:33 ` [dpdk-dev] [PATCH 11/14] eal: cleanup plugins data Stephen Hemminger
2020-01-04  1:33 ` [dpdk-dev] [PATCH 12/14] ethdev: raise priority of old driver warning Stephen Hemminger
2020-04-25 15:53   ` Thomas Monjalon
2020-01-04  1:33 ` [dpdk-dev] [PATCH 13/14] eal: hotplug: cleanup multiprocess resources Stephen Hemminger
2020-01-04  1:33 ` [dpdk-dev] [PATCH 14/14] eal: malloc: cleanup mp resources Stephen Hemminger
2020-04-27 12:10   ` Burakov, Anatoly
2020-02-05  9:32 ` [dpdk-dev] [PATCH 00/14] cleanup resources on shutdown David Marchand
2020-02-05 12:07   ` Stephen Hemminger [this message]
2020-02-05 12:32     ` David Marchand
2020-02-06 14:06 ` David Marchand
2020-02-07 18:24   ` Stephen Hemminger
2020-04-25 19:34 ` David Marchand
2020-04-28 23:14 ` [dpdk-dev] [PATCH v2 0/9] eal: " Stephen Hemminger
2020-04-28 23:14   ` [dpdk-dev] [PATCH v2 1/8] eal: log: close on cleanup Stephen Hemminger
2020-04-28 23:14   ` [dpdk-dev] [PATCH v2 2/8] eal: log: free dynamic state " Stephen Hemminger
2020-04-28 23:14   ` [dpdk-dev] [PATCH v2 3/8] eal: alarm: close file " Stephen Hemminger
2020-04-28 23:14   ` [dpdk-dev] [PATCH v2 4/8] eal: cleanup threads Stephen Hemminger
2020-04-28 23:14   ` [dpdk-dev] [PATCH v2 5/8] eal: mp: end the multiprocess thread during cleanup Stephen Hemminger
2020-04-28 23:14   ` [dpdk-dev] [PATCH v2 6/8] eal: vfio: cleanup the mp sync handle Stephen Hemminger
2020-04-28 23:14   ` [dpdk-dev] [PATCH v2 7/8] eal: hotplug: cleanup multiprocess resources Stephen Hemminger
2020-04-28 23:14   ` [dpdk-dev] [PATCH v2 8/8] eal: malloc: cleanup mp resources Stephen Hemminger
2020-04-28 23:58 ` [dpdk-dev] [PATCH v3 0/8] eal: cleanup resources on shutdown Stephen Hemminger
2020-04-28 23:58   ` [dpdk-dev] [PATCH v3 1/8] eal: log: close on cleanup Stephen Hemminger
2020-04-28 23:58   ` [dpdk-dev] [PATCH v3 2/8] eal: log: free dynamic state " Stephen Hemminger
2020-04-28 23:58   ` [dpdk-dev] [PATCH v3 3/8] eal: alarm: close file " Stephen Hemminger
2020-04-28 23:58   ` [dpdk-dev] [PATCH v3 4/8] eal: cleanup threads Stephen Hemminger
2020-04-28 23:58   ` [dpdk-dev] [PATCH v3 5/8] eal: mp: end the multiprocess thread during cleanup Stephen Hemminger
2020-04-28 23:58   ` [dpdk-dev] [PATCH v3 6/8] eal: vfio: cleanup the mp sync handle Stephen Hemminger
2020-04-28 23:58   ` [dpdk-dev] [PATCH v3 7/8] eal: hotplug: cleanup multiprocess resources Stephen Hemminger
2020-04-28 23:58   ` [dpdk-dev] [PATCH v3 8/8] eal: malloc: cleanup mp resources Stephen Hemminger
2020-05-03 17:21   ` [dpdk-dev] [PATCH v3 0/8] eal: cleanup resources on shutdown David Marchand
2020-10-19 22:24     ` Thomas Monjalon
2021-03-24 21:30       ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200205040719.0e429ae8@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=bluca@debian.org \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git