DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix dcb configure failure
@ 2016-11-04  5:42 Jingjing Wu
  2016-11-04 13:44 ` Xing, Beilei
  0 siblings, 1 reply; 3+ messages in thread
From: Jingjing Wu @ 2016-11-04  5:42 UTC (permalink / raw)
  To: dev; +Cc: jingjing.wu, beilei.xing, helin.zhang

Removing stopping LLDP in firmware is a workaround for a
known errata which can cause Rx hang. But the changing will
cause DCB configuration fails. That is because when LLDP is
enabled, the return value of i40e_init_dcb is success. But
following check just considered the case when LLDP agent
is disabled.
This patch fixes this issue.

Fixes: fcbd40d4327b ("net/i40e: fix Rx hang when disable LLDP")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index bb81b15..5afca1e 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -9428,12 +9428,12 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)
 	 */
 	if (sw_dcb == TRUE) {
 		ret = i40e_init_dcb(hw);
-		/* if sw_dcb, lldp agent is stopped, the return from
+		/* If lldp agent is stopped, the return value from
 		 * i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM
-		 * adminq status.
+		 * adminq status. Otherwise, it should return success.
 		 */
-		if (ret != I40E_SUCCESS &&
-		    hw->aq.asq_last_status == I40E_AQ_RC_EPERM) {
+		if ((ret == I40E_SUCCESS) || (ret != I40E_SUCCESS &&
+		    hw->aq.asq_last_status == I40E_AQ_RC_EPERM)) {
 			memset(&hw->local_dcbx_config, 0,
 				sizeof(struct i40e_dcbx_config));
 			/* set dcb default configuration */
@@ -9462,8 +9462,8 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)
 				return -ENOSYS;
 			}
 		} else {
-			PMD_INIT_LOG(ERR, "DCBX configuration failed, err = %d,"
-					  " aq_err = %d.", ret,
+			PMD_INIT_LOG(ERR, "DCB initialization in FW fails,"
+					  " err = %d, aq_err = %d.", ret,
 					  hw->aq.asq_last_status);
 			return -ENOTSUP;
 		}
-- 
2.4.11

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

* Re: [dpdk-dev] [PATCH] net/i40e: fix dcb configure failure
  2016-11-04  5:42 [dpdk-dev] [PATCH] net/i40e: fix dcb configure failure Jingjing Wu
@ 2016-11-04 13:44 ` Xing, Beilei
  2016-11-07 16:39   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Xing, Beilei @ 2016-11-04 13:44 UTC (permalink / raw)
  To: Wu, Jingjing, dev; +Cc: Zhang, Helin

> -----Original Message-----
> From: Wu, Jingjing
> Sent: Friday, November 4, 2016 1:43 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>;
> Zhang, Helin <helin.zhang@intel.com>
> Subject: [PATCH] net/i40e: fix dcb configure failure
> 
> Removing stopping LLDP in firmware is a workaround for a known errata which
> can cause Rx hang. But the changing will cause DCB configuration fails. That is
> because when LLDP is enabled, the return value of i40e_init_dcb is success. But
> following check just considered the case when LLDP agent is disabled.
> This patch fixes this issue.
> 
> Fixes: fcbd40d4327b ("net/i40e: fix Rx hang when disable LLDP")
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Beilei Xing<Beilei.xing@intel.com>

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

* Re: [dpdk-dev] [PATCH] net/i40e: fix dcb configure failure
  2016-11-04 13:44 ` Xing, Beilei
@ 2016-11-07 16:39   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-11-07 16:39 UTC (permalink / raw)
  To: Wu, Jingjing; +Cc: dev, Xing, Beilei, Zhang, Helin

> > Removing stopping LLDP in firmware is a workaround for a known errata which
> > can cause Rx hang. But the changing will cause DCB configuration fails. That is
> > because when LLDP is enabled, the return value of i40e_init_dcb is success. But
> > following check just considered the case when LLDP agent is disabled.
> > This patch fixes this issue.
> > 
> > Fixes: fcbd40d4327b ("net/i40e: fix Rx hang when disable LLDP")
> > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> Acked-by: Beilei Xing<Beilei.xing@intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-11-07 16:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-04  5:42 [dpdk-dev] [PATCH] net/i40e: fix dcb configure failure Jingjing Wu
2016-11-04 13:44 ` Xing, Beilei
2016-11-07 16:39   ` Thomas Monjalon

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