All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"david.marchand@6wind.com" <david.marchand@6wind.com>
Subject: Re: [PATCH 2/5] net/virtio-user: add rxq interrupt mode support
Date: Tue, 28 Mar 2017 01:33:31 +0000	[thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E3651173226@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20170317064757.GG18844@yliu-dev.sh.intel.com>



> -----Original Message-----
> From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
> Sent: Friday, March 17, 2017 2:48 PM
> To: Tan, Jianfeng
> Cc: dev@dpdk.org; david.marchand@6wind.com
> Subject: Re: [PATCH 2/5] net/virtio-user: add rxq interrupt mode support
> 
> On Fri, Mar 03, 2017 at 05:56:40PM +0000, Jianfeng Tan wrote:
> > Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
> 
> I don't see a single word to explain how this patch works :/

Sorry, will add that in next version.

> 
> > ---
> >  drivers/net/virtio/virtio_ethdev.c               | 17 ++++++++++++++--
> >  drivers/net/virtio/virtio_user/virtio_user_dev.c | 25
> +++++++++++++++++++++++-
> >  drivers/net/virtio/virtio_user/virtio_user_dev.h |  2 +-
> >  drivers/net/virtio/virtio_user_ethdev.c          | 12 +++++++++++-
> >  4 files changed, 51 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> > index 4dc03b9..5d80d1a 100644
> > --- a/drivers/net/virtio/virtio_ethdev.c
> > +++ b/drivers/net/virtio/virtio_ethdev.c
> > @@ -1264,6 +1264,10 @@ virtio_configure_intr(struct rte_eth_dev *dev)
> >  {
> >  	struct virtio_hw *hw = dev->data->dev_private;
> >
> > +
> > +#ifdef RTE_VIRTIO_USER
> > +        if (!hw->virtio_user_dev) {
> > +#endif
> 
> No need to put the #ifdef block here. virtio_user_dev is defined even
> when RTE_VIRTIO_USER is not configured.

Correct. I'll remove that.

> 
> ...
> 
> > +	vtpci_reinit_complete(hw);
> > +
> >  	if (eth_dev->data->dev_conf.intr_conf.rxq) {
> >  		if (virtio_configure_intr(eth_dev) < 0) {
> >  			PMD_INIT_LOG(ERR, "failed to configure interrupt");
> > @@ -1416,8 +1431,6 @@ virtio_init_device(struct rte_eth_dev *eth_dev,
> uint64_t req_features)
> >  		}
> >  	}
> >
> > -	vtpci_reinit_complete(hw);
> 
> 
> Hmm, why ...? Such stealthy change definitely need an explanation.
> And it's more likely it needs a single patch.

I should have described it more. The reason of above change is to make sure intr_handle is filled in virtio_user_start_device(). But reconsidering this, this could have effect on virtio pci device as it requires interrupts are set up before setting DRIVER_OK. So how about:

1. configure intr for PCI devices;
2. vtpci_reinit_complete();
3. configure intr for vdev;

Thanks,
Jianfeng

  reply	other threads:[~2017-03-28  1:33 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 17:56 [PATCH 0/5] add LSC and Rxq interrupt for virtio-user Jianfeng Tan
2017-03-03 17:56 ` [PATCH 1/5] eal/linux: add interrupt type for vdev Jianfeng Tan
2017-03-03 17:56 ` [PATCH 2/5] net/virtio-user: add rxq interrupt mode support Jianfeng Tan
2017-03-17  6:47   ` Yuanhan Liu
2017-03-28  1:33     ` Tan, Jianfeng [this message]
2017-03-03 17:56 ` [PATCH 3/5] net/virtio-user: support to report net status Jianfeng Tan
2017-03-17  6:54   ` Yuanhan Liu
2017-03-27  7:46     ` Tan, Jianfeng
2017-03-29  6:33       ` Yuanhan Liu
2017-03-29  7:07         ` Tan, Jianfeng
2017-03-29  7:14           ` Yuanhan Liu
2017-03-29  7:48             ` Tan, Jianfeng
2017-03-29  8:00               ` Yuanhan Liu
2017-03-29  8:33                 ` Tan, Jianfeng
2017-03-29  8:36                   ` Yuanhan Liu
2017-03-30  3:14                     ` Tan, Jianfeng
2017-03-03 17:56 ` [PATCH 4/5] net/virtio-user: add lsc support with vhost-user adapter Jianfeng Tan
2017-03-17  8:29   ` Yuanhan Liu
2017-03-27  1:51     ` Tan, Jianfeng
2017-03-03 17:56 ` [PATCH 5/5] net/virtio-user: add lsc support with vhost-kernel adapter Jianfeng Tan
2017-03-28  8:21 ` [PATCH v2 0/5] add LSC and Rxq interrupt for virtio-user Jianfeng Tan
2017-03-28  8:21   ` [PATCH v2 1/5] eal/linux: add interrupt type for vdev Jianfeng Tan
2017-03-28  8:21   ` [PATCH v2 2/5] net/virtio: add interrupt configure " Jianfeng Tan
2017-03-29  6:27     ` Yuanhan Liu
2017-03-29  7:03       ` Tan, Jianfeng
2017-03-29  7:09         ` Yuanhan Liu
2017-03-29  7:27           ` Tan, Jianfeng
2017-03-29  7:30             ` Yuanhan Liu
2017-03-28  8:21   ` [PATCH v2 3/5] net/virtio-user: add rxq interrupt mode support Jianfeng Tan
2017-03-28  8:21   ` [PATCH v2 4/5] net/virtio-user: support to report net status Jianfeng Tan
2017-03-28  8:21   ` [PATCH v2 5/5] net/virtio-user: add lsc support Jianfeng Tan
2017-03-31 19:44 ` [PATCH v3 0/5] add LSC and Rxq interrupt for virtio-user Jianfeng Tan
2017-03-31 19:44   ` [PATCH v3 1/5] eal/linux: add interrupt type for vdev Jianfeng Tan
2017-03-31 19:44   ` [PATCH v3 2/5] net/virtio-user: move eventfd open/close into init/uninit Jianfeng Tan
2017-03-31 19:44   ` [PATCH v3 3/5] net/virtio-user: add rxq interrupt mode support Jianfeng Tan
2017-03-31 19:44   ` [PATCH v3 4/5] net/virtio-user: support to report net status Jianfeng Tan
2017-03-31 19:44   ` [PATCH v3 5/5] net/virtio-user: add lsc support Jianfeng Tan
2017-04-01  5:13     ` Yuanhan Liu

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=ED26CBA2FAD1BF48A8719AEF02201E3651173226@SHSMSX103.ccr.corp.intel.com \
    --to=jianfeng.tan@intel.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    --cc=yuanhan.liu@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.