From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Qi Zhang <qi.z.zhang@intel.com>,
jingjing.wu@intel.com, helin.zhang@intel.com, dev@dpdk.org,
Thomas Monjalon <thomas.monjalon@6wind.com>
Subject: Re: [dpdk-dev] [PATCH] net/i40e: fix wrong device flag setup
Date: Wed, 8 Feb 2017 09:49:51 +0800 [thread overview]
Message-ID: <20170208014951.GM20916@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <fb52d206-8464-baf3-dfa2-24fb208c2a3b@intel.com>
On Tue, Feb 07, 2017 at 10:32:32AM +0000, Ferruh Yigit wrote:
> On 2/7/2017 10:24 AM, Ferruh Yigit wrote:
> > On 2/3/2017 11:36 PM, Qi Zhang wrote:
> >> dev_flags is wrong overwritten by RTE_ETH_DEV_DETACHABLE after
> >> rte_eth_copy_pci_info.
> >>
...
> Hi Yuanhan,
>
> I saw while checking for this, there can be an issue in virtio for this
> path, can you please check:
>
> eth_virtio_dev_init()
> set-some-eth_dev-dev_flags
> virtio_init_device()
> rte_eth_copy_pci_info()
> eth_dev->data->dev_flags = 0; <---- Reset previous flags
Hi Ferruh,
Nice catch! And yes, it's buggy. It may be trivially fixed by setting
the orders correctly. But my question is why "rte_eth_copy_pci_info"
does a reset on "dev_flags"? It's an *un-documented* side-effect of
this function, which could be very error-prone, like this one.
--yliu
prev parent reply other threads:[~2017-02-08 1:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-03 23:36 Qi Zhang
2017-02-07 10:24 ` Ferruh Yigit
2017-02-07 10:32 ` Ferruh Yigit
2017-02-08 1:49 ` 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=20170208014951.GM20916@yliu-dev.sh.intel.com \
--to=yuanhan.liu@linux.intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=helin.zhang@intel.com \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=thomas.monjalon@6wind.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).