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$(echo .)org \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=decui@microsoft$(echo .)com \
--cc=dipayanroy@linux$(echo .)microsoft.com \
--cc=edumazet@google$(echo .)com \
--cc=ernis@linux$(echo .)microsoft.com \
--cc=haiyangz@linux$(echo .)microsoft.com \
--cc=haiyangz@microsoft$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=kotaranov@microsoft$(echo .)com \
--cc=kys@microsoft$(echo .)com \
--cc=leon@kernel$(echo .)org \
--cc=linux-hyperv@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-rdma@vger$(echo .)kernel.org \
--cc=longli@microsoft$(echo .)com \
--cc=mlevitsk@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=paulros@microsoft$(echo .)com \
--cc=shirazsaleem@microsoft$(echo .)com \
--cc=shradhagupta@linux$(echo .)microsoft.com \
--cc=ssengar@linux$(echo .)microsoft.com \
--cc=wei.liu@kernel$(echo .)org \
--cc=yury.norov@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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