From: Ye Xiaolong <xiaolong.ye@intel.com>
To: Phil Yang <phil.yang@arm.com>
Cc: dev@dpdk.org, wei.zhao1@intel.com, jia.guo@intel.com,
Lijian.Zhang@arm.com, nd@arm.com, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix link state timing issue on fiber ports
Date: Mon, 11 May 2020 10:49:15 +0800 [thread overview]
Message-ID: <20200511024915.GI75514@intel.com> (raw)
In-Reply-To: <1588933707-4672-1-git-send-email-phil.yang@arm.com>
On 05/08, Phil Yang wrote:
>In ixgbe_dev_link_update_share(), if the media type is fiber and the
>link is down, a flag (IXGBE_FLAG_NEED_LINK_CONFIG) is set. A callback
>to ixgbe_dev_setup_link_thread_handler() is scheduled which should
>try to set up the link and clear the flag afterwards. This flag works
>as a guard variable between threads.
>
>To avoid potential race condition between threads, set the
>IXGBE_FLAG_NEED_LINK_CONFIG flag only when there is no link thread
>running.
>
>Fixes: 819d0d1d57f1 ("net/ixgbe: fix blocking system events")
>Cc: stable@dpdk.org
>
>Bugzilla ID: 388
>
>Signed-off-by: Phil Yang <phil.yang@arm.com>
>Reviewed-by: Lijian Zhang <lijian.zhang@arm.com>
>---
>v2:
>1. rebase code.
>
> drivers/net/ixgbe/ixgbe_ethdev.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
>index aa1e8aa..dc19f0c 100644
>--- a/drivers/net/ixgbe/ixgbe_ethdev.c
>+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
>@@ -4276,9 +4276,13 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev,
>
> if (link_up == 0) {
> if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) {
>- intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
> ixgbe_dev_wait_setup_link_complete(dev, 0);
> if (rte_atomic32_test_and_set(&ad->link_thread_running)) {
>+ /* To avoid race condition between threads, set
>+ * the IXGBE_FLAG_NEED_LINK_CONFIG flag only
>+ * when there is no link thread running.
>+ */
>+ intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG;
> if (rte_ctrl_thread_create(&ad->link_thread_tid,
> "ixgbe-link-handler",
> NULL,
>--
>2.7.4
>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
Applied to dpdk-next-net-intel, Thanks.
prev parent reply other threads:[~2020-05-11 2:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-19 6:41 [dpdk-dev] [PATCH] net/ixgbe: fix link state timing issue on fiber ports Phil Yang
2020-03-19 10:51 ` Lijian Zhang
2020-05-08 2:48 ` Phil Yang
2020-05-08 8:36 ` Ye Xiaolong
2020-05-08 10:31 ` Phil Yang
2020-05-08 10:28 ` [dpdk-dev] [PATCH v2] " Phil Yang
2020-05-11 2:49 ` Ye Xiaolong [this message]
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=20200511024915.GI75514@intel.com \
--to=xiaolong.ye@intel.com \
--cc=Lijian.Zhang@arm.com \
--cc=dev@dpdk.org \
--cc=jia.guo@intel.com \
--cc=nd@arm.com \
--cc=phil.yang@arm.com \
--cc=stable@dpdk.org \
--cc=wei.zhao1@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.