[dpdk-dev] [PATCH] app/testpmd: fix failsafe PMD failure on exit

Yuanhan Liu yliu at fridaylinux.org
Sat Jun 2 07:01:35 CEST 2018


On Sun, May 27, 2018 at 02:37:28PM +0200, Thomas Monjalon wrote:
> 27/05/2018 06:06, Yuanhan Liu:
> > On Tue, May 22, 2018 at 07:35:08PM +0100, Ferruh Yigit wrote:
> > > +			/*
> > > +			 * This is a workaround to fix a virtio-user issue that
> > > +			 * requires to call clean-up routine to remove existing
> > > +			 * socket.
> > 
> > I came across this patch while I was cherry-picking patches to 17.11.4
> > release. And this patch seems wrong to me.
> 
> Yes it is far from perfect.
> 
> > Any particular reason why the socket removal can not be done in virtio-user
> > pmd, say at its close method?
> 
> The socket is removed in the remove function of the driver.
> The right fix is to call the remove functions of all driver from
> the EAL cleanup function.
> We have decided of this last minute workaround for testpmd
> because we need it for testing convenience, but do not want to
> take any risk with a proper fix as it is really late for that.

If there must be a workaround, I would do it at virtio-user pmd.

	--yliu
> 
> 
> > > +			 * This workaround valid only for testpmd, needs a fix
> > > +			 * valid for all applications.
> > > +			 * TODO: Implement proper resource cleanup
> > > +			 */
> > > +			device = rte_eth_devices[pt_id].device;
> > > +			if (device && !strcmp(device->driver->name, "net_virtio_user"))
> > >  				detach_port(pt_id);
> > >  		}
> > >  	}
> > 
> 
> 
> 
> 


More information about the dev mailing list