From: fengchengwen <fengchengwen@huawei.com>
To: David Marchand <david.marchand@redhat.com>, <dev@dpdk.org>
Cc: <stable@dpdk.org>, Chas Williams <chas3@att.com>,
"Min Hu (Connor)" <humin29@huawei.com>,
Pablo de Lara <pablo.de.lara.guarch@intel.com>,
Declan Doherty <declan.doherty@intel.com>
Subject: Re: [PATCH] net/bonding: fix link status callback stop
Date: Mon, 16 Oct 2023 18:33:01 +0800 [thread overview]
Message-ID: <8e752c64-1e94-7147-6f65-e9e924e998ab@huawei.com> (raw)
In-Reply-To: <20231016084744.734493-1-david.marchand@redhat.com>
On 2023/10/16 16:47, David Marchand wrote:
> If a bonding port gets released, a link status alarm callback still
> referenced the ethdev port that may be reused later.
> Cancel this callback when stopping the port.
>
> Bugzilla ID: 1301
> Fixes: a45b288ef21a ("bond: support link status polling")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> Note: this issue was made apparent now that we release the ethdev port
> shared mem, see 36c46e738120 ("ethdev: cleanup shared data with ...").
>
> ---
> drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index 122b1187fd..b8ee8be50f 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -2159,6 +2159,10 @@ bond_ethdev_stop(struct rte_eth_dev *eth_dev)
> eth_dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN;
> eth_dev->data->dev_started = 0;
>
> + if (internals->link_status_polling_enabled) {
> + rte_eal_alarm_cancel(bond_ethdev_member_link_status_change_monitor,
> + (void *)&rte_eth_devices[internals->port_id]);
> + }
> internals->link_status_polling_enabled = 0;
How about move this line in above {}.
Anyway, both OK for me
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
> for (i = 0; i < internals->member_count; i++) {
> uint16_t member_id = internals->members[i].port_id;
>
next prev parent reply other threads:[~2023-10-16 10:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-16 8:47 David Marchand
2023-10-16 10:33 ` fengchengwen [this message]
2023-10-16 12:22 ` Ferruh Yigit
2023-10-16 15:54 ` Stephen Hemminger
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=8e752c64-1e94-7147-6f65-e9e924e998ab@huawei.com \
--to=fengchengwen@huawei.com \
--cc=chas3@att.com \
--cc=david.marchand@redhat.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=humin29@huawei.com \
--cc=pablo.de.lara.guarch@intel.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 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).