net/i40e: fix wrong return value when handling PF message
When VF receives a message from PF, it should check the return
value. But in i40evf_execute_vf_cmd the value is ignored and not
returned to the caller.
Fixes: 95cd21f45d
("i40evf: allocate virtchnl commands buffer per VF")
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
This commit is contained in:
parent
36ba0c0097
commit
aca95e38cc
@ -527,7 +527,7 @@ struct i40e_vf {
|
||||
enum i40e_aq_link_speed link_speed;
|
||||
bool vf_reset;
|
||||
volatile uint32_t pend_cmd; /* pending command not finished yet */
|
||||
uint32_t cmd_retval; /* return value of the cmd response from PF */
|
||||
int32_t cmd_retval; /* return value of the cmd response from PF */
|
||||
u16 pend_msg; /* flags indicates events from pf not handled yet */
|
||||
uint8_t *aq_resp; /* buffer to store the adminq response from PF */
|
||||
|
||||
|
@ -361,6 +361,7 @@ i40evf_execute_vf_cmd(struct rte_eth_dev *dev, struct vf_cmd_info *args)
|
||||
err = -1;
|
||||
do {
|
||||
ret = i40evf_read_pfmsg(dev, &info);
|
||||
vf->cmd_retval = info.result;
|
||||
if (ret == I40EVF_MSG_CMD) {
|
||||
err = 0;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user