From: Xiao Wang Date: Sat, 9 Dec 2017 01:55:41 +0000 (-0800) Subject: net/fm10k: fix logical port delete X-Git-Tag: spdx-start~546 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fc7943aa02f702c528d1a884c91c0939ea443bfb;p=dpdk.git net/fm10k: fix logical port delete When closing port, we need to send mailbox messages to switch manager to reset multicast mode and delete logical port. In the latest IES_SDK, e.g. v4.3.3, switch takes longer time to handle these mailbox messages. So this patch adds longer delay to accommodate this change. Otherwise, the mailbox will be closed before all the messages are handled, as a result, the logical port remains in switch manager after port is closed. Fixes: b961fe9344dd ("net/fm10k: fix MAC address removal from switch") Cc: stable@dpdk.org Signed-off-by: Xiao Wang Acked-by: Helin Zhang --- diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 4495473ca1..80672a3dea 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -25,7 +25,7 @@ /* Wait interval to get switch status */ #define WAIT_SWITCH_MSG_US 100000 /* A period of quiescence for switch */ -#define FM10K_SWITCH_QUIESCE_US 10000 +#define FM10K_SWITCH_QUIESCE_US 100000 /* Number of chars per uint32 type */ #define CHARS_PER_UINT32 (sizeof(uint32_t)) #define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1) @@ -1213,7 +1213,7 @@ fm10k_dev_close(struct rte_eth_dev *dev) MAX_LPORT_NUM, false); fm10k_mbx_unlock(hw); - /* allow 10ms for device to quiesce */ + /* allow 100ms for device to quiesce */ rte_delay_us(FM10K_SWITCH_QUIESCE_US); /* Stop mailbox service first */