DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuanhan Liu <yliu@fridaylinux.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Jingjing Wu <jingjing.wu@intel.com>,
	dev@dpdk.org, Zhiyong Yang <zhiyong.yang@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix failsafe PMD failure on exit
Date: Sat, 2 Jun 2018 13:01:35 +0800	[thread overview]
Message-ID: <20180602050135.a3p2uttxuomr2w2v@yuanhanliu-NB0.tencent.com> (raw)
In-Reply-To: <6066559.Wi7eJV5HDK@xps>

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);
> > >  		}
> > >  	}
> > 
> 
> 
> 
> 

      reply	other threads:[~2018-06-02  5:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22 18:35 Ferruh Yigit
2018-05-22 19:47 ` Thomas Monjalon
2018-05-22 20:49   ` Ferruh Yigit
2018-05-22 20:50     ` Ferruh Yigit
2018-05-27  4:06 ` Yuanhan Liu
2018-05-27 12:37   ` Thomas Monjalon
2018-06-02  5:01     ` Yuanhan Liu [this message]

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=20180602050135.a3p2uttxuomr2w2v@yuanhanliu-NB0.tencent.com \
    --to=yliu@fridaylinux.org \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jingjing.wu@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=thomas@monjalon.net \
    --cc=wenzhuo.lu@intel.com \
    --cc=zhiyong.yang@intel.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).