From 044846f071cc5ca78165360f5788036d09758820 Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Mon, 6 Aug 2018 16:05:45 -0400 Subject: [PATCH] net/i40e: stop LLDP before setting local LLDP MIB >From the Intel Ethernet Controller X710/XXV710/XL710 Specification 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 Acked-by: Qi Zhang --- 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 31b5a49ba2..0ada437a90 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -11312,6 +11312,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.20.1