From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: David Marchand <david.marchand@6wind.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"Xie, Huawei" <huawei.xie@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] virtio: fix modify drv_flags for specific device
Date: Mon, 9 May 2016 09:14:41 +0000 [thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E36032E206C@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20160504231819.GS5641@yliu-dev.sh.intel.com>
Hi David and Yuanhan,
> -----Original Message-----
> From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com]
> Sent: Thursday, May 5, 2016 7:18 AM
> To: Tan, Jianfeng
> Cc: David Marchand; dev@dpdk.org; Xie, Huawei
> Subject: Re: [PATCH v2] virtio: fix modify drv_flags for specific device
>
> On Tue, May 03, 2016 at 10:05:01AM +0200, David Marchand wrote:
> > Hello Tan,
> >
> > On Thu, Apr 28, 2016 at 8:08 PM, Jianfeng Tan <jianfeng.tan@intel.com>
> wrote:
> > > Issue: virtio's drv_flags are decided by devices types (modern vs legacy),
> > > and which kernel driver is used, and the negotiated features (especially
> > > VIRTIO_NET_STATUS) with backend, which makes it possible to multiple
> > > virtio devices have different versions of drv_flags, but this variable
> > > is currently shared by each virtio device.
> >
> > The wording is a bit strange, maybe the sentence is a bit too long.
>
> Agreed.
>
> Besides that, it just described the fact that we are sharing one
> flag for all virtio devices, but it didn't state what's wrong with
> it, and what's the per-device flag for. From this point of view,
> I don't think you are actually solving an "issue", as I don't see
> one from your description.
>
> > But the rest looks good to me.
> >
> > Acked-by: David Marchand <david.marchand@6wind.com>
>
> Thanks for the review.
>
> --yliu
Thank you for review and comment. How about change the commit message like this:
The virtio PMD's drv_flags, which is shared by all virtio devices,
is set and referred for per-device purpose. One side, we should not
arbitrarily set drv_flags when each virtio device is initialized.
This disobeys the semantics of _shared_. On the other side, we
refer drv_flags instead of dev_flags for per-device purpose. When
two virtio devices have different flags, it may lead to wrong
result. Then some unexpected behaviors happen, such as virtio would
set irq config when it's not supported.
How to fix: change to set and refer dev_flags, which stores
device-specific flags.
Thanks,
Jianfeng
next prev parent reply other threads:[~2016-05-09 9:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 2:24 [dpdk-dev] [PATCH] " Jianfeng Tan
2016-04-26 11:53 ` David Marchand
2016-04-27 5:10 ` Tan, Jianfeng
2016-04-27 5:20 ` David Marchand
2016-04-28 18:08 ` [dpdk-dev] [PATCH v2] " Jianfeng Tan
2016-05-02 17:55 ` Yuanhan Liu
2016-05-03 8:05 ` David Marchand
2016-05-04 23:18 ` Yuanhan Liu
2016-05-09 9:14 ` Tan, Jianfeng [this message]
2016-05-09 18:01 ` 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=ED26CBA2FAD1BF48A8719AEF02201E36032E206C@SHSMSX103.ccr.corp.intel.com \
--to=jianfeng.tan@intel.com \
--cc=david.marchand@6wind.com \
--cc=dev@dpdk.org \
--cc=huawei.xie@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 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).