patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Xiao Wang <xiao.w.wang@intel.com>
Cc: dpdk stable <stable@dpdk.org>, Jing Chen <jing.d.chen@intel.com>,
	Xueqin Lin <xueqin.lin@intel.com>
Subject: [dpdk-stable] patch 'net/fm10k: fix MAC address removal from switch' has been queued to stable release 16.07.1
Date: Wed, 12 Oct 2016 14:44:24 +0800	[thread overview]
Message-ID: <57fddbc8.ECi6hktpxDDD11hl%yuanhan.liu@linux.intel.com> (raw)

Hi,

FYI, your patch has been queued to stable release 16.07.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
yet. It will be pushed if I get no objections before this Friday.
So please shutout if anyone has objections.

Thanks.

	--yliu

---
>From 8e0ddd39f86ce78cf6519a87b728c6bb2d45e4f1 Mon Sep 17 00:00:00 2001
From: Xiao Wang <xiao.w.wang@intel.com>
Date: Fri, 5 Aug 2016 11:17:43 +0800
Subject: [PATCH] net/fm10k: fix MAC address removal from switch

[ upstream commit b961fe9344ddfb7909b80376e29add4728381f85 ]

When testpmd quits with two ports, the second port's MAC address
remains in the MAC table of switch manager.

There needs to be some time for HW to quiesce when closing a port,
otherwise a subsequent port close won't be handled correctly.

This patch adds a delay after turning off a logic port, just as
the kernel driver does.

Fixes: 8b5c9ec20b7b ("fm10k: support VMDQ in MAC/VLAN filter")

Reported-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
---
 drivers/net/fm10k/fm10k_ethdev.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 01f4a72..89d99d4 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -52,6 +52,8 @@
 #define MAX_QUERY_SWITCH_STATE_TIMES 10
 /* Wait interval to get switch status */
 #define WAIT_SWITCH_MSG_US    100000
+/* A period of quiescence for switch */
+#define FM10K_SWITCH_QUIESCE_US 10000
 /* Number of chars per uint32 type */
 #define CHARS_PER_UINT32 (sizeof(uint32_t))
 #define BIT_MASK_PER_UINT32 ((1 << CHARS_PER_UINT32) - 1)
@@ -1233,6 +1235,9 @@ fm10k_dev_close(struct rte_eth_dev *dev)
 		MAX_LPORT_NUM, false);
 	fm10k_mbx_unlock(hw);
 
+	/* allow 10ms for device to quiesce */
+	rte_delay_us(FM10K_SWITCH_QUIESCE_US);
+
 	/* Stop mailbox service first */
 	fm10k_close_mbx_service(hw);
 	fm10k_dev_stop(dev);
-- 
1.9.0

                 reply	other threads:[~2016-10-12  6:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=57fddbc8.ECi6hktpxDDD11hl%yuanhan.liu@linux.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=jing.d.chen@intel.com \
    --cc=stable@dpdk.org \
    --cc=xiao.w.wang@intel.com \
    --cc=xueqin.lin@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).