Linux kernel source tree
Go to file
Carolina Jubran 22239eb258 net/mlx5e: Prevent tunnel reformat when tunnel mode not allowed
When configuring IPsec packet offload in tunnel mode, the driver tries
to create tunnel reformat objects unconditionally. This is incorrect,
because tunnel mode is only permitted under specific encapsulation
settings, and that decision is already made when the flow table is
created.

The offending commit attempted to block this case in the state add
path, but the check there happens too late and does not prevent the
reformat from being configured.

Fix by taking short reservations for both the eswitch mode and the
encap at the start of state setup. This preserves the block ordering
(mode --> encap) used later: the mode is blocked during RX/TX get, and
the encap is blocked during flow-table creation. This lets us fail
early if either reservation cannot be obtained, it means a mode
transition is underway or a conflicting configuration already owns
encap. If both succeed, the flow-table path later takes the ownership
and the reservations are released on exit.

Fixes: 146c196b60 ("net/mlx5e: Create IPsec table with tunnel support only when encap is disabled")
Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1759652999-858513-3-git-send-email-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2025-10-07 12:59:56 +02:00
Documentation Networking changes for 6.18. 2025-10-02 15:17:01 -07:00
LICENSES LICENSES: Replace the obsolete address of the FSF in the GFDL-1.2 2025-07-24 11:15:39 +02:00
arch Networking changes for 6.18. 2025-10-02 15:17:01 -07:00
block for-6.18/block-20250929 2025-10-02 10:16:56 -07:00
certs
crypto bpf-next-6.18 2025-09-30 17:58:11 -07:00
drivers net/mlx5e: Prevent tunnel reformat when tunnel mode not allowed 2025-10-07 12:59:56 +02:00
fs for-6.18/block-20250929 2025-10-02 10:16:56 -07:00
include page_pool: Fix PP_MAGIC_MASK to avoid crashing on some 32-bit arches 2025-10-06 12:14:04 -07:00
init Kbuild updates for 6.18 2025-10-01 20:58:51 -07:00
io_uring Networking changes for 6.18. 2025-10-02 15:17:01 -07:00
ipc namespace-6.18-rc1 2025-09-29 11:20:29 -07:00
kernel Networking changes for 6.18. 2025-10-02 15:17:01 -07:00
lib for-6.18/block-20250929 2025-10-02 10:16:56 -07:00
mm Networking changes for 6.18. 2025-10-02 15:17:01 -07:00
net tcp: take care of zero tp->window_clamp in tcp_set_rcvlowat() 2025-10-06 13:08:48 -07:00
rust Networking changes for 6.18. 2025-10-02 15:17:01 -07:00
samples [GIT PULL for v6.18] media updates 2025-10-02 13:13:26 -07:00
scripts Networking changes for 6.18. 2025-10-02 15:17:01 -07:00
security bitmap-for-6.18 2025-10-02 08:57:03 -07:00
sound sound updates for 6.18-rc1 2025-10-02 11:37:19 -07:00
tools selftests: drv-net: make linters happy with our imports 2025-10-07 12:12:44 +02:00
usr gen_init_cpio: add -a <data_align> as reflink optimization 2025-08-20 16:02:56 -07:00
virt Merge tag 'kvm-x86-no_assignment-6.17' of https://github.com/kvm-x86/linux into HEAD 2025-07-29 08:36:42 -04:00
.clang-format
.clippy.toml
.cocciconfig
.editorconfig
.get_maintainer.ignore MAINTAINERS: remove Alyssa Rosenzweig 2025-09-18 21:17:31 +02:00
.gitattributes
.gitignore .gitignore: ignore compile_commands.json globally 2025-08-12 15:53:55 -07:00
.mailmap Networking changes for 6.18. 2025-10-02 15:17:01 -07:00
.pylintrc
.rustfmt.toml
COPYING
CREDITS MAINTAINERS: Delete inactive maintainers from AF_XDP 2025-09-25 13:18:22 +02:00
Kbuild sched: Make migrate_{en,dis}able() inline 2025-09-25 09:57:16 +02:00
Kconfig
MAINTAINERS Networking changes for 6.18. 2025-10-02 15:17:01 -07:00
Makefile Kbuild updates for 6.18 2025-10-01 20:58:51 -07:00
README

README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the reStructuredText markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.