From: Jacob Keller <jacob.e.keller@intel.com>
To: Tariq Toukan <tariqt@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"Eric Dumazet" <edumazet@google.com>,
Andrew Lunn <andrew+netdev@lunn.ch>
Cc: <netdev@vger.kernel.org>, Saeed Mahameed <saeedm@nvidia.com>,
Gal Pressman <gal@nvidia.com>,
Leon Romanovsky <leonro@nvidia.com>,
Mark Bloch <mbloch@nvidia.com>, Moshe Shemesh <moshe@nvidia.com>
Subject: Re: [PATCH net 7/8] net/mlx5e: Rely on reqid in IPsec tunnel mode
Date: Mon, 13 Jan 2025 11:08:22 -0800 [thread overview]
Message-ID: <729dfd39-cb1f-4067-bf61-a3d1ca0b70e3@intel.com> (raw)
In-Reply-To: <20250113154055.1927008-8-tariqt@nvidia.com>
On 1/13/2025 7:40 AM, Tariq Toukan wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> All packet offloads SAs have reqid in it to make sure they have
> corresponding policy. While it is not strictly needed for transparent
> mode, it is extremely important in tunnel mode. In that mode, policy and
> SAs have different match criteria.
>
> Policy catches the whole subnet addresses, and SA catches the tunnel gateways
> addresses. The source address of such tunnel is not known during egress packet
> traversal in flow steering as it is added only after successful encryption.
>
> As reqid is required for packet offload and it is unique for every SA,
> we can safely rely on it only.
>
> The output below shows the configured egress policy and SA by strongswan:
>
> [leonro@vm ~]$ sudo ip x s
> src 192.169.101.2 dst 192.169.101.1
> proto esp spi 0xc88b7652 reqid 1 mode tunnel
> replay-window 0 flag af-unspec esn
> aead rfc4106(gcm(aes)) 0xe406a01083986e14d116488549094710e9c57bc6 128
> anti-replay esn context:
> seq-hi 0x0, seq 0x0, oseq-hi 0x0, oseq 0x0
> replay_window 1, bitmap-length 1
> 00000000
> crypto offload parameters: dev eth2 dir out mode packet
>
> [leonro@064 ~]$ sudo ip x p
> src 192.170.0.0/16 dst 192.170.0.0/16
> dir out priority 383615 ptype main
> tmpl src 192.169.101.2 dst 192.169.101.1
> proto esp spi 0xc88b7652 reqid 1 mode tunnel
> crypto offload parameters: dev eth2 mode packet
>
> Fixes: b3beba1fb404 ("net/mlx5e: Allow policies with reqid 0, to support IKE policy holes")
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
next prev parent reply other threads:[~2025-01-13 19:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 15:40 [PATCH net 0/8] mlx5 misc fixes 2025-01-13 Tariq Toukan
2025-01-13 15:40 ` [PATCH net 1/8] net/mlx5: Fix RDMA TX steering prio Tariq Toukan
2025-01-13 18:58 ` Jacob Keller
2025-01-13 15:40 ` [PATCH net 2/8] net/mlx5: Fix a lockdep warning as part of the write combining test Tariq Toukan
2025-01-14 16:33 ` Larysa Zaremba
2025-01-13 15:40 ` [PATCH net 3/8] net/mlx5: SF, Fix add port error handling Tariq Toukan
2025-01-13 19:00 ` Jacob Keller
2025-01-13 15:40 ` [PATCH net 4/8] net/mlx5: Clear port select structure when fail to create Tariq Toukan
2025-01-13 19:00 ` Jacob Keller
2025-01-13 15:40 ` [PATCH net 5/8] net/mlx5e: Fix inversion dependency warning while enabling IPsec tunnel Tariq Toukan
2025-01-13 15:40 ` [PATCH net 6/8] net/mlx5e: Properly match IPsec subnet addresses Tariq Toukan
2025-01-13 19:07 ` Jacob Keller
2025-01-13 19:23 ` Leon Romanovsky
2025-01-13 19:48 ` Jacob Keller
2025-01-15 2:37 ` Jakub Kicinski
2025-01-15 8:39 ` Leon Romanovsky
2025-01-13 15:40 ` [PATCH net 7/8] net/mlx5e: Rely on reqid in IPsec tunnel mode Tariq Toukan
2025-01-13 19:08 ` Jacob Keller [this message]
2025-01-13 15:40 ` [PATCH net 8/8] net/mlx5e: Always start IPsec sequence number from 1 Tariq Toukan
2025-01-13 19:08 ` Jacob Keller
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=729dfd39-cb1f-4067-bf61-a3d1ca0b70e3@intel.com \
--to=jacob.e.keller@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=mbloch@nvidia.com \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--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;
as well as URLs for NNTP newsgroup(s).