[dpdk-dev] [EXT] [PATCH 1/5] examples/l2fwd-event: free resources in case of error

Stephen Hemminger stephen at networkplumber.org
Mon Jun 12 18:56:39 CEST 2023


On Tue, 16 Jun 2020 10:38:01 +0000
Sunil Kumar Kori <skori at marvell.com> wrote:

> >> >> >>
> >> >> >> Also I think, it is better to release the relevant resources on error.  
> >> >> >Here I'm solving the problem reported in bugzilla id 437. The bug
> >> >> >was that if we use --vdev=net_memif with l2fwd application (and
> >> >> >with its other variants) then a socket is created by memif PMD,
> >> >> >after rte_eal_init function has run successfully. And if an error
> >> >> >occurs then the application exits without freeing the resources
> >> >> >(socket). On running the application 2nd time we get an error of "socket  
> >already exists". 

Bottom line: Fix memif, don't wallpaper over the bug by fixing the examples.

Other user applications, can and do crash. The driver needs to be robust
and handle that.


More information about the dev mailing list