From: Jakub Kicinski <kuba@kernel.org>
To: Haiyang Zhang <haiyangz@linux.microsoft.com>
Cc: linux-hyperv@vger.kernel.org, netdev@vger.kernel.org,
haiyangz@microsoft.com, paulros@microsoft.com,
decui@microsoft.com, kys@microsoft.com, wei.liu@kernel.org,
edumazet@google.com, davem@davemloft.net, pabeni@redhat.com,
longli@microsoft.com, ssengar@linux.microsoft.com,
ernis@linux.microsoft.com, dipayanroy@linux.microsoft.com,
kotaranov@microsoft.com, horms@kernel.org,
shradhagupta@linux.microsoft.com, leon@kernel.org,
mlevitsk@redhat.com, yury.norov@gmail.com,
shirazsaleem@microsoft.com, andrew+netdev@lunn.ch,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next,v2] net: mana: Support HW link state events
Date: Fri, 17 Oct 2025 16:05:41 -0700 [thread overview]
Message-ID: <20251017160541.4ce65ede@kernel.org> (raw)
In-Reply-To: <1760477209-9026-1-git-send-email-haiyangz@linux.microsoft.com>
On Tue, 14 Oct 2025 14:26:49 -0700 Haiyang Zhang wrote:
> From: Haiyang Zhang <haiyangz@microsoft.com>
>
> Handle the HW link state events received from HW channel, and
> set the proper link state, also stop/wake queues accordingly.
Why do you have to stop / start the queues? I think it's unusual.
Let the packets get dropped, sending out potentially old packets
when link comes back is not going to make anyone happier.
> +static void mana_link_state_handle(struct work_struct *w)
> +{
> + struct mana_port_context *apc;
> + struct mana_context *ac;
> + struct net_device *ndev;
> + bool link_up;
> + int i;
> +
> + ac = container_of(w, struct mana_context, link_change_work);
> +
> + if (ac->mana_removing)
> + return;
> +
> + rtnl_lock();
> +
> @@ -3500,6 +3556,10 @@ void mana_remove(struct gdma_dev *gd, bool suspending)
> int err;
> int i;
>
> + ac->mana_removing = true;
> +
> + cancel_work_sync(&ac->link_change_work);
Looks racy, the work needs @ac to check the ->mana_removing but
mana_remove() frees @ac. Just use disable_work_sync() please.
--
pw-bot: cr
next prev parent reply other threads:[~2025-10-17 23:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 21:26 [PATCH net-next,v2] net: mana: Support HW link state events Haiyang Zhang
2025-10-17 23:05 ` Jakub Kicinski [this message]
2025-10-20 14:58 ` [EXTERNAL] " Haiyang Zhang
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=20251017160541.4ce65ede@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=dipayanroy@linux.microsoft.com \
--cc=edumazet@google.com \
--cc=ernis@linux.microsoft.com \
--cc=haiyangz@linux.microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=horms@kernel.org \
--cc=kotaranov@microsoft.com \
--cc=kys@microsoft.com \
--cc=leon@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=mlevitsk@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paulros@microsoft.com \
--cc=shirazsaleem@microsoft.com \
--cc=shradhagupta@linux.microsoft.com \
--cc=ssengar@linux.microsoft.com \
--cc=wei.liu@kernel.org \
--cc=yury.norov@gmail.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.