From: Tariq Toukan <tariqt@nvidia.com>
To: Rishikesh Jethwani <rjethwani@everpuredata.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
"John Fastabend" <john.fastabend@gmail.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
Neal Cardwell <ncardwell@google.com>, <netdev@vger.kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Sabrina Dubroca <sd@queasysnail.net>,
Willem de Bruijn <willemb@google.com>
Cc: Alexander Graf <graf@amazon.com>,
Aviad Yehezkel <aviadye@mellanox.com>,
Bobby Eshleman <bobbyeshleman@meta.com>,
Boris Pismenny <borisp@mellanox.com>,
Boris Pismenny <borisp@nvidia.com>,
Carolina Jubran <cjubran@nvidia.com>,
Costa Shulyupin <costa.shul@redhat.com>,
Dragos Tatulea <dtatulea@nvidia.com>,
Eran Ben Elisha <eranbe@mellanox.com>,
Gal Pressman <gal@nvidia.com>, Ilya Lesokhin <ilyal@mellanox.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Jonathan Corbet <corbet@lwn.net>,
Leon Romanovsky <leon@kernel.org>, <linux-doc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
<linux-rdma@vger.kernel.org>, Mark Bloch <mbloch@nvidia.com>,
Martin Karsten <mkarsten@uwaterloo.ca>,
Randy Dunlap <rdunlap@infradead.org>,
Richard Cochran <richardcochran@gmail.com>,
"Saeed Mahameed" <saeedm@mellanox.com>,
Saeed Mahameed <saeedm@nvidia.com>,
"Shuah Khan" <skhan@linuxfoundation.org>,
Simon Horman <horms@kernel.org>,
"Stanislav Fomichev" <sdf@fomichev.me>,
Stanislav Fomichev <sdf.kernel@gmail.com>,
Stefano Garzarella <sgarzare@redhat.com>,
Tariq Toukan <tariqt@mellanox.com>,
Tariq Toukan <tariqt@nvidia.com>,
Wang Zhan <wang.zhan@smartx.com>, "William Tu" <witu@nvidia.com>
Subject: [RFC net-next 0/7] [Cover Letter] net/mlx5e: kTLS TX fixes for WQEs in flight
Date: Mon, 9 Nov 2026 13:47:27 +0200 [thread overview]
Message-ID: <20261109114734.2087878-1-tariqt@nvidia.com> (raw)
Hi,
This series fixes kTLS TX offload cases where WQEs that a connection
posted are still in flight while its device state is released, changed
from another SQ, or assumed to be in sync. Records then go out wrongly
encrypted, or the TIS and DEK are released while still in use.
kTLS TX WQEs update the TIS crypto and record tracking state of a
connection as they execute, and the device orders WQEs only within an
SQ. The series makes sure that:
- An skb dropped after WQEs were posted for it is held until they
complete, and a connection whose WQEs were lost is resynced fully
(patches 1-2).
- The context params are posted only for an skb that uses them, on the
SQ of the connection's data (patch 3).
- The old and new SQs never execute together across a channels switch
(patch 4).
- The TX queue of an offloaded socket does not change while it has
packets in flight, in the stack and in the mlx5e queue selection
(patches 5-6). An skb that still reaches another SQ meanwhile, e.g.
after tc skbedit queue_mapping, is dropped before anything is posted
(patch 7).
Patches 1-6 are fixes, for net. Patch 7 is for net-next, on top of
them. TLS 1.3 rekey support for device offload builds on this series.
Tested on ConnectX-6 Dx, with a software kTLS receiver that checks
every byte. The commit messages describe the reproduction and the
results of each fix.
Link: https://lore.kernel.org/netdev/20261022181751.1349984-1-rjethwani@purestorage.com/
Regards,
Tariq
Tariq Toukan (7):
net/mlx5e: kTLS, Hold a dropped skb until its posted WQEs complete
net/mlx5e: kTLS, Resync TX fully after its WQEs were lost
net/mlx5e: kTLS, Post TX context params only for skbs that use them
net/mlx5e: Drain old TX SQs before activating new channels
net: tls: keep the TX queue of a device-offloaded socket stable
net/mlx5e: kTLS, Keep the TX queue of an offloaded socket stable
net/mlx5e: kTLS, Keep a TX connection on one SQ at a time
Documentation/admin-guide/sysctl/net.rst | 3 +
.../ethernet/mellanox/mlx5/counters.rst | 7 +
Documentation/networking/tls-offload.rst | 20 +++
.../net/ethernet/mellanox/mlx5/core/en/selq.c | 96 ++++++++--
.../net/ethernet/mellanox/mlx5/core/en/txrx.h | 2 +
.../mellanox/mlx5/core/en_accel/ktls.c | 1 +
.../mellanox/mlx5/core/en_accel/ktls_tx.c | 165 +++++++++++++++---
.../mellanox/mlx5/core/en_accel/ktls_txrx.h | 21 +++
.../net/ethernet/mellanox/mlx5/core/en_main.c | 88 +++++++++-
.../ethernet/mellanox/mlx5/core/en_stats.c | 4 +
.../ethernet/mellanox/mlx5/core/en_stats.h | 2 +
.../net/ethernet/mellanox/mlx5/core/en_tx.c | 98 +++++++++--
include/net/sock.h | 33 +++-
include/net/tls.h | 13 ++
net/core/dev.c | 3 +-
net/core/sock.c | 2 +-
net/ipv4/tcp_output.c | 7 +-
net/tls/tls_device.c | 3 +
18 files changed, 503 insertions(+), 65 deletions(-)
base-commit: fa5196392691051963726787944db872420dfa75
--
2.44.0
next reply other threads:[~2026-11-09 11:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 11:47 Tariq Toukan [this message]
2026-11-09 11:47 ` [RFC net-next 1/7] net/mlx5e: kTLS, Hold a dropped skb until its posted WQEs complete Tariq Toukan
2026-11-09 11:47 ` [RFC net-next 2/7] net/mlx5e: kTLS, Resync TX fully after its WQEs were lost Tariq Toukan
2026-11-09 11:47 ` [RFC net-next 3/7] net/mlx5e: kTLS, Post TX context params only for skbs that use them Tariq Toukan
2026-11-09 11:47 ` [RFC net-next 4/7] net/mlx5e: Drain old TX SQs before activating new channels Tariq Toukan
2026-11-09 11:47 ` [RFC net-next 5/7] net: tls: keep the TX queue of a device-offloaded socket stable Tariq Toukan
2026-11-09 11:47 ` [RFC net-next 6/7] net/mlx5e: kTLS, Keep the TX queue of an offloaded " Tariq Toukan
2026-11-09 11:47 ` [RFC net-next 7/7] net/mlx5e: kTLS, Keep a TX connection on one SQ at a time Tariq Toukan
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=20261109114734.2087878-1-tariqt@nvidia.com \
--to=tariqt@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=aviadye@mellanox.com \
--cc=bobbyeshleman@meta.com \
--cc=borisp@mellanox.com \
--cc=borisp@nvidia.com \
--cc=cjubran@nvidia.com \
--cc=corbet@lwn.net \
--cc=costa.shul@redhat.com \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@kernel.org \
--cc=eranbe@mellanox.com \
--cc=gal@nvidia.com \
--cc=graf@amazon.com \
--cc=horms@kernel.org \
--cc=ilyal@mellanox.com \
--cc=jacob.e.keller@intel.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=leon@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=mkarsten@uwaterloo.ca \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=richardcochran@gmail.com \
--cc=rjethwani@everpuredata.com \
--cc=saeedm@mellanox.com \
--cc=saeedm@nvidia.com \
--cc=sd@queasysnail.net \
--cc=sdf.kernel@gmail.com \
--cc=sdf@fomichev.me \
--cc=sgarzare@redhat.com \
--cc=skhan@linuxfoundation.org \
--cc=tariqt@mellanox.com \
--cc=wang.zhan@smartx.com \
--cc=willemb@google.com \
--cc=witu@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
all inboxes | Powered by JetHome®