Linux RDMA and InfiniBand development
 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 1/7] net/mlx5e: ipsec: Block eswitch mode changes during policy creation
Date: Fri, 18 Sep 2026 18:12:34 +0000	[thread overview]
Message-ID: <20260918181235.1457C1F00899@smtp.kernel.org> (raw)
In-Reply-To: <20260917175433.4090878-2-tariqt@nvidia.com>

> From: Cosmin Ratiu <cratiu@nvidia.com>
> 
> Eswitch mode changes can tear down the IPsec context while policy
> creation is accessing it. The mode-blocking reference acquired when
> creating a flow table comes too late: the table lookup already accesses
> the IPsec context before taking that reference.
> 
> Block mode changes before checking the IPsec context and validating the
> policy. Release the temporary reference after successful setup, when the
> flow table holds its own reference, or after unwinding on failure.
> 
> Unfortunately, simply using mlx5_eswitch_block_mode() for this would
> introduce a regression where:
> 1. An offloaded inbound IPsec policy is added on the uplink.
> 2. A TC flower rule is added on a VF representor.
> 3. Another uplink IPsec policy using the same RX tables is added.
> 
> Before this change, the 3rd rule would reuse an existing RX/TX table
> from 1 and would avoid an mlx5_eswitch_block_mode() check in
> rx_get()/tx_get(). After this change, the temporary mode block added
> would reject the 3rd rule because esw->user_count > 0.
> 
> To avoid that, I was forced to separate the mode blocking from the TC
> check by introducing a check_users argument to
> mlx5_eswitch_block_mode().
> 
> Fixes: a5b8ca9471d3 ("net/mlx5e: Add XFRM policy offload logic")
> Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com>
> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Sashiko has reviewed this patch and found no issues. It looks great!

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


  reply	other threads:[~2026-09-18 18:12 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 17:54 [PATCH net 0/7] net/mlx5e: Fix offload lifetime, cleanup and exclusion bugs Tariq Toukan
2026-09-17 17:54 ` [PATCH net 1/7] net/mlx5e: ipsec: Block eswitch mode changes during policy creation Tariq Toukan
2026-09-18 18:12   ` sashiko-bot [this message]
2026-09-21 18:49   ` netdev-bot+sashiko
2026-09-23  7:27     ` Cosmin Ratiu
2026-09-17 17:54 ` [PATCH net 2/7] net/mlx5e: ipsec: Block eswitch mode changes before accessing priv->ipsec Tariq Toukan
2026-09-18 18:12   ` sashiko-bot
2026-09-21 18:49   ` netdev-bot+sashiko
2026-09-23  7:52     ` Cosmin Ratiu
2026-09-17 17:54 ` [PATCH net 3/7] net/mlx5e: tc: Tie esw & accel blocking refs to the flow's lifetime Tariq Toukan
2026-09-18 18:12   ` sashiko-bot
2026-09-21 18:49   ` netdev-bot+sashiko
2026-09-23  7:59     ` Cosmin Ratiu
2026-09-17 17:54 ` [PATCH net 4/7] net/mlx5e: macsec: Track hardware object ownership for SA teardown Tariq Toukan
2026-09-18 18:12   ` sashiko-bot
2026-09-21 18:49   ` netdev-bot+sashiko
2026-09-23  8:32     ` Cosmin Ratiu
2026-09-17 17:54 ` [PATCH net 5/7] net/mlx5e: macsec: Delete remaining SecYs during cleanup Tariq Toukan
2026-09-18 18:12   ` sashiko-bot
2026-09-21 18:49   ` netdev-bot+sashiko
2026-09-23  8:49     ` Cosmin Ratiu
2026-09-17 17:54 ` [PATCH net 6/7] net/mlx5e: Serialize TC and IPsec offload exclusion counters Tariq Toukan
2026-09-18 18:12   ` sashiko-bot
2026-09-17 17:54 ` [PATCH net 7/7] net/mlx5e: shampo: Do not merge PSP packets Tariq Toukan
2026-09-18 18:12   ` sashiko-bot
2026-09-21 18:49   ` netdev-bot+sashiko
2026-09-23  8:50     ` Cosmin Ratiu
2026-09-22 10:44 ` [PATCH net 0/7] net/mlx5e: Fix offload lifetime, cleanup and exclusion bugs Paolo Abeni
2026-09-23 10:47 ` Cosmin Ratiu

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=20260918181235.1457C1F00899@smtp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox