[dpdk-dev] [dpdk-stable] [PATCH] test/eal: do not scan PCI devices for memory tests

David Marchand david.marchand at redhat.com
Fri Aug 2 15:45:22 CEST 2019


On Fri, Aug 2, 2019 at 3:37 PM Aaron Conole <aconole at redhat.com> wrote:
>
> David Marchand <david.marchand at redhat.com> writes:
>
> > On Thu, Aug 1, 2019 at 2:28 PM David Marchand <david.marchand at redhat.com> wrote:
> >>
> >> The memory tests currently check that, for normal mode (not legacy mode),
> >> there is no memory left behind when exiting.
> >>
> >> The problem is that if a ethdev port is allocated when scanning pci
> >> devices (even if the driver probe fails like when you have a virtio
> >> management interface attached to the kernel), on exit, dpdk won't free
> >> the associated memory since ethdev never frees the ethdev memzone.
> >>
> >> Workaround this by disabling pci scan.
> >
> > Not entirely happy with this patch.
> > I am open to suggestions :-)
>
> Seems like an order of allocation / free issue.  Is it possible to
> change the order to be consistent?  IE: we only allocate something after
> we know there's good reason to do so and then we can be sure to always
> free?  I don't know the code in this area well enough yet to comment any
> more than that.

Err, this looks hard to achieve.
The test is quite basic, in that it expects all hugepage files to be
removed on dpdk exit (meaning all allocations freed).


-- 
David Marchand


More information about the dev mailing list