DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chas Williams <3chas3@gmail.com>
To: dev@dpdk.org
Cc: beilei.xing@intel.com, qi.z.zhang@intel.com,
	"Charles (Chas) Williams" <chas3@att.com>
Subject: [dpdk-dev] [PATCH v2] net/i40e: stop lldp before setting local lldp MIB
Date: Mon,  6 Aug 2018 16:05:45 -0400	[thread overview]
Message-ID: <20180806200545.32226-1-3chas3@gmail.com> (raw)
In-Reply-To: <20180801040712.13792-1-3chas3@gmail.com>

From: "Charles (Chas) Williams" <chas3@att.com>

>From the Intel Ethernet Controller X710/XXV710/XL710 Specifiction
Update:

    Starting from NVM 5.02, if the Set Local LLDP MIB command is
    received while the DCBx specific agent is stopped, the command
    returns an EPERM error. If the command is received while the
    LLDP agent is stopped, it sets the local MIB without exchanging
    LLDP with peer, and returns SUCCESS.

This results in the harmless, but annoying, diagnostic:

    default dcb config fails. err = -53, aq_err = 1.

So, if possible (older firmwares cannot safely stop LLDP), stop the
lldp daemon when we are in software mod before we attempt to call
i40e_set_dcb_config.

Signed-off-by: Chas Williams <chas3@att.com>
---
 drivers/net/i40e/i40e_ethdev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a340540ef..de3761933 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11232,6 +11232,16 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)
 	 * LLDP MIB change event.
 	 */
 	if (sw_dcb == TRUE) {
+		/* When using NVM 6.01 or later, the RX data path does
+		 * not hang if the FW LLDP is stopped.
+		 */
+		if (((hw->nvm.version >> 12) & 0xf) >= 6 &&
+		    ((hw->nvm.version >> 4) & 0xff) >= 1) {
+			ret = i40e_aq_stop_lldp(hw, TRUE, NULL);
+			if (ret != I40E_SUCCESS)
+				PMD_INIT_LOG(DEBUG, "Failed to stop lldp");
+		}
+
 		ret = i40e_init_dcb(hw);
 		/* If lldp agent is stopped, the return value from
 		 * i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM
-- 
2.14.4

  parent reply	other threads:[~2018-08-06 20:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01  4:07 [dpdk-dev] [PATCH] " Chas Williams
2018-08-01 13:59 ` Zhang, Qi Z
2018-08-01 15:31   ` Chas Williams
2018-08-02  2:16     ` Zhang, Qi Z
2018-08-02 21:19       ` Chas Williams
2018-08-03  2:10         ` Zhang, Qi Z
2018-08-06 19:03           ` Chas Williams
2018-08-06 20:05 ` Chas Williams [this message]
2018-09-13 12:30   ` [dpdk-dev] [PATCH v2] " Zhang, Qi Z

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=20180806200545.32226-1-3chas3@gmail.com \
    --to=3chas3@gmail.com \
    --cc=beilei.xing@intel.com \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@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 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).