From: Ye Xiaolong <xiaolong.ye@intel.com>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "Cao, Yahui" <yahui.cao@intel.com>,
"Wu, Jingjing" <jingjing.wu@intel.com>,
"Lu, Wenzhuo" <wenzhuo.lu@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>,
"stable@dpdk.org" <stable@dpdk.org>,
"Su, Simei" <simei.su@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3] net/iavf: fix virtual channel return value error
Date: Sat, 4 Jan 2020 18:20:55 +0800 [thread overview]
Message-ID: <20200104102055.GN14498@intel.com> (raw)
In-Reply-To: <039ED4275CED7440929022BC67E7061153DF2DF1@SHSMSX105.ccr.corp.intel.com>
On 12/24, Zhang, Qi Z wrote:
>
>
>> -----Original Message-----
>> From: Cao, Yahui <yahui.cao@intel.com>
>> Sent: Tuesday, December 24, 2019 12:13 PM
>> To: Wu, Jingjing <jingjing.wu@intel.com>; Lu, Wenzhuo
>> <wenzhuo.lu@intel.com>
>> Cc: dev@dpdk.org; stable@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>; Cao,
>> Yahui <yahui.cao@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com>; Su,
>> Simei <simei.su@intel.com>
>> Subject: [PATCH v3] net/iavf: fix virtual channel return value error
>>
>> In iavf_handle_virtchnl_msg(), it is not appropriate for _clear_cmd() to be used
>> as a notification to forground thread. So introduce
>> _notify_cmd() to fix this error. In addition, since _notify_cmd() contains
>> rte_wmb(), rte_compiler_barrier() is not necessary.
>>
>> Sending msg from VF to PF is mainly by calling iavf_execute_vf_cmd(), the
>> whole virtchnl msg process is like,
>>
>> iavf_execute_vf_cmd() will call iavf_aq_send_msg_to_pf() to send msg and
>> then polling the cmd done flag as "if (vf->pend_cmd ==
>> VIRTCHNL_OP_UNKNOWN)"
>>
>> When reply msg is returned by pf, iavf_handle_virtchnl_msg() in isr will read
>> msg return value by "vf->cmd_retval = msg_ret" and immediately set the cmd
>> done flag by calling _clear_cmd() to notify the iavf_execute_vf_cmd().
>>
>> iavf_execute_vf_cmd() find the cmd done flag is set and then check whether
>> command return value vf->cmd_retval is success or not.
>>
>> However _clear_cmd() also resets the vf->cmd_retval to success, overwriting
>> the actual return value which is used for diagnosis.
>> So iavf_execute_vf_cmd() will always find vf->cmd_retval is success and then
>> return success.
>>
>> Fixes: 22b123a36d07 ("net/avf: initialize PMD")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Yahui Cao <yahui.cao@intel.com>
>
>Acked-by: Qi Zhang <qi.z.zhang@intel.com>
>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Applied to dpdk-next-net-intel, Thanks.
prev parent reply other threads:[~2020-01-04 10:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-19 5:56 [dpdk-dev] [PATCH] net/iavf: fix virtual channel return value error Yahui Cao
2019-12-23 7:11 ` [dpdk-dev] [PATCH v2] " Yahui Cao
2019-12-24 4:13 ` [dpdk-dev] [PATCH v3] " Yahui Cao
2019-12-24 5:16 ` Zhang, Qi Z
2020-01-04 10:20 ` Ye Xiaolong [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=20200104102055.GN14498@intel.com \
--to=xiaolong.ye@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=simei.su@intel.com \
--cc=stable@dpdk.org \
--cc=wenzhuo.lu@intel.com \
--cc=yahui.cao@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.