All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Jiawen Wu <jiawenwu@trustnetic.com>, dev@dpdk.org
Cc: stable@dpdk.org
Subject: Re: [PATCH] net/txgbe: fix blocking system events
Date: Thu, 29 Jun 2023 15:20:26 +0100	[thread overview]
Message-ID: <c4757272-9eff-3d79-50bb-8cdacbee0cd5@amd.com> (raw)
In-Reply-To: <20230629100735.297306-1-jiawenwu@trustnetic.com>

On 6/29/2023 11:07 AM, Jiawen Wu wrote:
> Refer to commit 819d0d1d57f1 ("net/ixgbe: fix blocking system events").
> Fix the same issue as ixgbe.
> 

Can you please describe the problem in this commit log, it is OK to keep
reference to the ixgbe too, but better to describe problem here.

> Replace rte alarm thread with an independent thread.
> 
> Fixes: 0c061eadec59 ("net/txgbe: add link status change")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>

<...>

> +static uint32_t
> +txgbe_dev_setup_link_thread_handler(void *param)
> +{
> +	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
> +	struct txgbe_hw *hw = TXGBE_DEV_HW(dev);
> +	struct txgbe_interrupt *intr = TXGBE_DEV_INTR(dev);
> +	struct txgbe_adapter *ad = TXGBE_DEV_ADAPTER(dev);
> +	u32 speed;
> +	bool autoneg = false;
> +
> +	rte_thread_detach(rte_thread_self());
> +	speed = hw->phy.autoneg_advertised;
> +	if (!speed)
> +		hw->mac.get_link_capabilities(hw, &speed, &autoneg);
> +
> +	hw->mac.setup_link(hw, speed, true);
> +
> +	intr->flags &= ~TXGBE_FLAG_NEED_LINK_CONFIG;
> +	__atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST);
> +	return 0;
> +}
> +

'txgbe_dev_setup_link_alarm_handler()' and above new
'txgbe_dev_setup_link_thread_handler()' are smilar and share common
code, what do you think to extract common code to a function?



  reply	other threads:[~2023-06-29 14:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-29 10:07 [PATCH] net/txgbe: fix blocking system events Jiawen Wu
2023-06-29 14:20 ` Ferruh Yigit [this message]
2023-06-30  9:35 ` [PATCH v2] " Jiawen Wu
2023-06-30 10:03   ` Ferruh Yigit

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=c4757272-9eff-3d79-50bb-8cdacbee0cd5@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=dev@dpdk.org \
    --cc=jiawenwu@trustnetic.com \
    --cc=stable@dpdk.org \
    /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.