numam-dpdk/drivers/net/iavf
Yahui Cao be5466e4e9 net/iavf: fix virtual channel return
In iavf_handle_virtchnl_msg(), it is not appropriate for _clear_cmd()
to be used as a notification to foreground 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: 22b123a36d ("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>
2020-01-17 19:46:01 +01:00
..
base net/iavf/base: update version info 2020-01-17 19:46:01 +01:00
iavf_ethdev.c net/iavf: move device state flag 2020-01-17 19:46:01 +01:00
iavf_log.h net/iavf: use dynamic log type for Tx/Rx debug 2019-10-07 15:00:58 +02:00
iavf_rxtx_vec_avx2.c net/iavf: fix Tx checksum offload in AVX path 2019-11-20 17:36:05 +01:00
iavf_rxtx_vec_common.h net/iavf: enable AVX2 for iavf 2019-10-23 16:43:10 +02:00
iavf_rxtx_vec_sse.c net/iavf: enable AVX2 for iavf 2019-10-23 16:43:10 +02:00
iavf_rxtx.c remove blank lines at end of file 2019-11-26 00:12:08 +01:00
iavf_rxtx.h net/iavf: add TSO offload use basic path 2020-01-17 19:45:23 +01:00
iavf_vchnl.c net/iavf: fix virtual channel return 2020-01-17 19:46:01 +01:00
iavf.h net/iavf: fix virtual channel return 2020-01-17 19:46:01 +01:00
Makefile build: remove individual library versions 2019-11-20 23:05:39 +01:00
meson.build net/iavf: enable AVX2 for iavf 2019-10-23 16:43:10 +02:00
rte_pmd_iavf_version.map build: align symbols with global ABI version 2019-11-20 23:05:39 +01:00