From: Kevin Traynor <ktraynor@redhat.com>
To: Xiao Wang <xiao.w.wang@intel.com>
Cc: xiaolong.ye@intel.com, tiwei.bie@intel.com, dev@dpdk.org,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/ifc: do not notify before HW ready
Date: Tue, 25 Sep 2018 18:15:52 +0100 [thread overview]
Message-ID: <57299da3-af0a-01a1-d4f5-0fbe8b9ce0be@redhat.com> (raw)
In-Reply-To: <20180914012517.44977-1-xiao.w.wang@intel.com>
On 09/14/2018 02:25 AM, Xiao Wang wrote:
> If the device is not clearly reset by the previous driver and holds
> some invalid ring addr, and the relay thread kicks it before HW is
> properly re-configured, a bad DMA request may happen.
>
> Besides, the notify_addr which is used by the relay thread is set in
> the vdpa_ifcvf_start function, if a kick relay happens before
> vdpa_ifcvf_start finishes, a null addr is accessed.
>
> Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
>
Looks like this should be in stable branch too. Can you confirm?
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> ---
> v2:
> * Add description for the fix in the commit log.
> ---
> drivers/net/ifc/ifcvf_vdpa.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c
> index 3c5430dc0..7d3085d8d 100644
> --- a/drivers/net/ifc/ifcvf_vdpa.c
> +++ b/drivers/net/ifc/ifcvf_vdpa.c
> @@ -503,11 +503,11 @@ update_datapath(struct ifcvf_internal *internal)
> if (ret)
> goto err;
>
> - ret = setup_notify_relay(internal);
> + ret = vdpa_ifcvf_start(internal);
> if (ret)
> goto err;
>
> - ret = vdpa_ifcvf_start(internal);
> + ret = setup_notify_relay(internal);
> if (ret)
> goto err;
>
> @@ -515,12 +515,12 @@ update_datapath(struct ifcvf_internal *internal)
> } else if (rte_atomic32_read(&internal->running) &&
> (!rte_atomic32_read(&internal->started) ||
> !rte_atomic32_read(&internal->dev_attached))) {
> - vdpa_ifcvf_stop(internal);
> -
> ret = unset_notify_relay(internal);
> if (ret)
> goto err;
>
> + vdpa_ifcvf_stop(internal);
> +
> ret = vdpa_disable_vfio_intr(internal);
> if (ret)
> goto err;
>
next prev parent reply other threads:[~2018-09-25 17:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 11:05 [dpdk-dev] [PATCH] " Xiao Wang
2018-09-13 12:55 ` Ye Xiaolong
2018-09-13 7:23 ` Wang, Xiao W
2018-09-13 20:25 ` Ye Xiaolong
2018-09-14 1:25 ` [dpdk-dev] [PATCH v2] " Xiao Wang
2018-09-14 8:41 ` Ye Xiaolong
2018-09-18 14:20 ` Zhang, Qi Z
2018-09-25 17:15 ` Kevin Traynor [this message]
2018-09-26 0:12 ` Wang, Xiao W
2018-09-26 7:53 ` Ferruh Yigit
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=57299da3-af0a-01a1-d4f5-0fbe8b9ce0be@redhat.com \
--to=ktraynor@redhat.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=tiwei.bie@intel.com \
--cc=xiao.w.wang@intel.com \
--cc=xiaolong.ye@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).