All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tariq Toukan" <tariqt@nvidia.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH net-next V2 2/3] net/mlx5: E-Switch, introduce generic work queue dispatch helper
Date: Fri, 30 Oct 2026 04:53:38 +0000	[thread overview]
Message-ID: <sashiko-outbox-190329@kernel.org> (raw)
In-Reply-To: <20260428051018.219093-3-tariqt@nvidia.com>

> From: Mark Bloch <mbloch@nvidia.com>
> 
> Each E-Switch work item requires the same boilerplate: acquire the
> devlink lock, check whether the work is stale, dispatch to the
> appropriate handler, and release the lock. Factor this out.
> 
> Add a func callback to mlx5_host_work so the generic handler
> esw_wq_handler() can dispatch to the right function without
> duplicating locking logic. Introduce mlx5_esw_add_work() as the
> single enqueue point: it stamps the work item with the current
> generation counter and queues it onto the E-Switch work queue.
> 
> Refactor esw_vfs_changed_event_handler() to match the new contract:
> it no longer receives work_gen or out as parameters. It queries
> mlx5_esw_query_functions() itself and owns the kvfree() of the
> result. The devlink lock is acquired and released by esw_wq_handler()
> before dispatching, so the handler runs with the lock already held.
> 
> Update mlx5_esw_funcs_changed_handler() to use mlx5_esw_add_work().
> 
> Signed-off-by: Mark Bloch <mbloch@nvidia.com>
> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260428051018.219093-1-tariqt@nvidia.com?part=2


  reply	other threads:[~2026-10-30  4:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28  5:10 [PATCH net-next V2 0/3] net/mlx5: Fix E-Switch work queue deadlock with devlink lock Tariq Toukan
2026-04-28  5:10 ` [PATCH net-next V2 1/3] net/mlx5: E-Switch, move work queue generation counter Tariq Toukan
2026-04-28  5:10 ` [PATCH net-next V2 2/3] net/mlx5: E-Switch, introduce generic work queue dispatch helper Tariq Toukan
2026-10-30  4:53   ` sashiko-bot [this message]
2026-04-28  5:10 ` [PATCH net-next V2 3/3] net/mlx5: E-Switch, fix deadlock between devlink lock and esw->wq Tariq Toukan
2026-10-30  4:53   ` sashiko-bot
2026-04-30  1:00 ` [PATCH net-next V2 0/3] net/mlx5: Fix E-Switch work queue deadlock with devlink lock patchwork-bot+netdevbpf

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=sashiko-outbox-190329@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tariqt@nvidia.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.