DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix wrong return value when handling PF message
@ 2016-12-21  8:29 Wenzhuo Lu
  2016-12-22 16:59 ` Ferruh Yigit
  2017-01-03 17:13 ` Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Wenzhuo Lu @ 2016-12-21  8:29 UTC (permalink / raw)
  To: dev; +Cc: Wenzhuo Lu

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: 95cd21f45d1b ("i40evf: allocate virtchnl commands buffer per VF")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/i40e/i40e_ethdev.h    | 2 +-
 drivers/net/i40e/i40e_ethdev_vf.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 298cef4..28111a7 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -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 */
 
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 12da0ec..5d25764 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -361,6 +361,7 @@ struct rte_i40evf_xstats_name_off {
 		err = -1;
 		do {
 			ret = i40evf_read_pfmsg(dev, &info);
+			vf->cmd_retval = info.result;
 			if (ret == I40EVF_MSG_CMD) {
 				err = 0;
 				break;
-- 
1.9.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-03 17:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-21  8:29 [dpdk-dev] [PATCH] net/i40e: fix wrong return value when handling PF message Wenzhuo Lu
2016-12-22 16:59 ` Ferruh Yigit
2017-01-03  2:58   ` Lu, Wenzhuo
2017-01-03 17:13 ` Ferruh Yigit

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).