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>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"Liang, Cunming" <cunming.liang@intel.com>
Subject: Re: [PATCH v2 2/7] net/virtio_user: postpone DRIVER OK notification
Date: Mon, 26 Dec 2016 08:26:03 +0000	[thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E36510FC938@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20161226080208.GG19288@yliu-dev.sh.intel.com>

As discussed offline, this will lead to many DRIVER OK among dev_stop()/dev_start(). I'll remove this patch.

Thanks,
Jianfeng

> -----Original Message-----
> From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
> Sent: Monday, December 26, 2016 4:02 PM
> To: Tan, Jianfeng
> Cc: dev@dpdk.org; Yigit, Ferruh; Liang, Cunming
> Subject: Re: [PATCH v2 2/7] net/virtio_user: postpone DRIVER OK notification
> 
> On Mon, Dec 26, 2016 at 06:55:16AM +0000, Tan, Jianfeng wrote:
> >
> >
> > > -----Original Message-----
> > > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
> > > Sent: Monday, December 26, 2016 2:27 PM
> > > To: Tan, Jianfeng
> > > Cc: dev@dpdk.org; Yigit, Ferruh; Liang, Cunming
> > > Subject: Re: [PATCH v2 2/7] net/virtio_user: postpone DRIVER OK
> notification
> > >
> > > On Fri, Dec 23, 2016 at 07:14:21AM +0000, Jianfeng Tan wrote:
> > > > In driver probe phase, we obtain device information; and then virtio
> > > > driver will initialize device and stores info, like negotiated
> > > > features, in vhost_user layer; finally, vhost_user gets DRIVER_OK
> > > > notification from virtio driver, and then sync with backend device.
> > > >
> > > > Previously, DRIVER_OK could be sent twice: 1. when ether layer
> invokes
> > > > eth_device_init to initialize device; 2. when user configures it with
> > > > different configuration from that of previous.
> > >
> > > Yes, but that's wrong. Now only 1) will be taken.
> >
> > >From code in virtio_dev_configure() as below, if hw_ip_checksum or
> enable_lro is configured, the device will be reset and re-initialized.
> >         if (rxmode->hw_ip_checksum)
> >                 req_features |= (1ULL << VIRTIO_NET_F_GUEST_CSUM);
> >         if (rxmode->enable_lro)
> >                 req_features |=
> >                         (1ULL << VIRTIO_NET_F_GUEST_TSO4) |
> >                         (1ULL << VIRTIO_NET_F_GUEST_TSO6);
> >
> >         /* if request features changed, reinit the device */
> >         if (req_features != hw->req_guest_features) {
> >                 ret = virtio_init_device(dev, req_features);
> >                 if (ret < 0)
> >                         return ret;
> >         }
> 
> Yes, I know. But virtio_init_device() will call vtpci_reinit_complete()
> at the end, doesn't it?
> 
> > > > Since we can only depend on DRIVER_OK notification to sync with
> backend
> > > > device, we postpone it to virtio_dev_start when everything is settled.
> > >
> > > I don't quite understand what you were going to fix here; you don't
> > > state it in the commit log after all. Normally, when everything is
> > > negotiated (when DRIVER_OK is set), we should not set it again, unless
> > > a reset has been happened.
> >
> > I agree that DRIVER_OK should be set only if everything is settled. Under
> the case of hw_ip_checksum or enable_lro, a reset will be sent and the
> device will be re-initialized.
> >
> > So my point is that since the configuration might be changed in
> dev_configure(), why not just send DRIVER_OK after everything is done.
> >
> > >
> > > If you look at QEMU, qemu will simply ignore it once vhost has already
> > > started.
> >
> > It does not apply here. The configuration is changed, and it cannot be
> ignored.
> 
> Why it doesn't apply here? What makes virtio_user special? If it works
> to QEMU and it doesn't to virtio_user, it basically means the virtio_user
> is broken ...
> 
> 	--yliu

  reply	other threads:[~2016-12-26  8:26 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02 14:31 [PATCH 0/3] virtio_user as an alternative exception path Jianfeng Tan
2016-12-02 14:31 ` [PATCH 1/3] net/virtio_user: add vhost layer Jianfeng Tan
2016-12-08  7:21   ` Yuanhan Liu
2016-12-02 14:31 ` [PATCH 2/3] net/virtio_user: add vhost kernel support Jianfeng Tan
2016-12-02 14:31 ` [PATCH 3/3] net/virtio_user: fix wrongly set features Jianfeng Tan
2016-12-08  8:32   ` Yuanhan Liu
2016-12-02 14:44 ` [PATCH 0/3] virtio_user as an alternative exception path Thomas Monjalon
2016-12-23  7:14 ` [PATCH v2 0/7] " Jianfeng Tan
2016-12-23  7:14   ` [PATCH v2 1/7] net/virtio_user: fix wrongly set features Jianfeng Tan
2016-12-23  7:14   ` [PATCH v2 2/7] net/virtio_user: postpone DRIVER OK notification Jianfeng Tan
2016-12-26  6:27     ` Yuanhan Liu
2016-12-26  6:55       ` Tan, Jianfeng
2016-12-26  8:02         ` Yuanhan Liu
2016-12-26  8:26           ` Tan, Jianfeng [this message]
2016-12-23  7:14   ` [PATCH v2 3/7] net/virtio_user: move vhost user specific code Jianfeng Tan
2016-12-26  6:28     ` Yuanhan Liu
2016-12-26  6:58       ` Tan, Jianfeng
2016-12-26  7:57         ` Yuanhan Liu
2016-12-29  9:40           ` Tan, Jianfeng
2016-12-23  7:14   ` [PATCH v2 4/7] net/virtio_user: abstract virtio user backend ops Jianfeng Tan
2016-12-26  6:41     ` Yuanhan Liu
2016-12-23  7:14   ` [PATCH v2 5/7] net/virtio_user: add vhost kernel support Jianfeng Tan
2016-12-26  7:44     ` Yuanhan Liu
2017-01-04  7:22       ` Tan, Jianfeng
2017-01-04  7:46         ` Yuanhan Liu
2017-01-09  4:51         ` Jason Wang
2017-01-09  4:39     ` Jason Wang
2017-01-10  6:11       ` Tan, Jianfeng
2017-01-10  8:46         ` Thomas Monjalon
2017-01-10  9:11           ` Tan, Jianfeng
2017-01-11  2:42         ` Jason Wang
2017-01-11  3:13           ` Tan, Jianfeng
2017-01-11  3:23             ` Jason Wang
2017-01-12  9:40               ` Tan, Jianfeng
2017-01-13  2:27                 ` Jason Wang
2017-01-11  2:30       ` Tan, Jianfeng
2017-01-11  2:45         ` Jason Wang
2016-12-23  7:14   ` [PATCH v2 6/7] net/virtio_user: enable offloading Jianfeng Tan
2016-12-26  7:53     ` Yuanhan Liu
2016-12-23  7:14   ` [PATCH v2 7/7] net/virtio_user: enable multiqueue with vhost kernel Jianfeng Tan
2017-01-04  3:59 ` [PATCH v3 0/7] virtio_user as an alternative exception path Jianfeng Tan
2017-01-04  3:59   ` [PATCH v3 1/7] net/virtio_user: fix wrongly set features Jianfeng Tan
2017-01-04  3:59   ` [PATCH v3 2/7] net/virtio_user: fix not properly reset device Jianfeng Tan
2017-01-04  5:46     ` Yuanhan Liu
2017-01-04  3:59   ` [PATCH v3 3/7] net/virtio_user: move vhost user specific code Jianfeng Tan
2017-01-04  6:02     ` Yuanhan Liu
2017-01-04  6:46       ` Tan, Jianfeng
2017-01-04  7:08         ` Yuanhan Liu
2017-01-04  3:59   ` [PATCH v3 4/7] net/virtio_user: abstract virtio user backend ops Jianfeng Tan
2017-01-04  6:11     ` Yuanhan Liu
2017-01-04  3:59   ` [PATCH v3 5/7] net/virtio_user: add vhost kernel support Jianfeng Tan
2017-01-04  6:13     ` Yuanhan Liu
2017-01-04  3:59   ` [PATCH v3 6/7] net/virtio_user: enable offloading Jianfeng Tan
2017-01-04  3:59   ` [PATCH v3 7/7] net/virtio_user: enable multiqueue with vhost kernel Jianfeng Tan
2017-01-09 14:06   ` [PATCH v3 0/7] virtio_user as an alternative exception path Bruce Richardson
2017-01-10  8:46     ` Tan, Jianfeng
2017-01-13 12:18 ` [PATCH v4 0/8] " Jianfeng Tan
2017-01-13 12:18   ` [PATCH v4 1/8] net/virtio_user: fix wrongly get/set features Jianfeng Tan
2017-01-13 12:18   ` [PATCH v4 2/8] net/virtio_user: fix not properly reset device Jianfeng Tan
2017-01-13 12:18   ` [PATCH v4 3/8] net/virtio_user: move vhost user specific code Jianfeng Tan
2017-01-13 12:18   ` [PATCH v4 4/8] net/virtio_user: abstract virtio user backend ops Jianfeng Tan
2017-01-13 12:18   ` [PATCH v4 5/8] net/virtio_user: add vhost kernel support Jianfeng Tan
2017-01-13 12:18   ` [PATCH v4 6/8] net/virtio_user: enable offloading Jianfeng Tan
2017-01-13 12:18   ` [PATCH v4 7/8] net/virtio_user: enable multiqueue with vhost kernel Jianfeng Tan
2017-01-13 12:18   ` [PATCH v4 8/8] doc: add guide to use virtio_user as exceptional path Jianfeng Tan
2017-01-16  6:00     ` Yuanhan Liu
2017-01-16  6:04       ` Yuanhan Liu
2017-01-16  9:44       ` Thomas Monjalon
2017-01-16  9:49         ` Yuanhan Liu
2017-01-16 14:45           ` Thomas Monjalon
2017-01-22  0:46     ` Aws Ismail
2017-01-22  7:16       ` Tan, Jianfeng
2017-01-16 15:05   ` [PATCH v4 0/8] virtio_user as an alternative exception path 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=ED26CBA2FAD1BF48A8719AEF02201E36510FC938@SHSMSX103.ccr.corp.intel.com \
    --to=jianfeng.tan@intel.com \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --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.