summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ionic/ionic_admin.c
diff options
context:
space:
mode:
authorCarolina Jubran <cjubran@nvidia.com>2025-10-05 11:29:58 +0300
committerPaolo Abeni <pabeni@redhat.com>2025-10-07 12:59:56 +0200
commit22239eb258bc1e6ccdb2d3502fce1cc2b2a88386 (patch)
treeda0f0b3fb2f71b8e87a97fa5fbdbe500a9bd4989 /drivers/infiniband/hw/ionic/ionic_admin.c
parent7593439c13933164f701eed9c83d89358f203469 (diff)
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: 146c196b60e4 ("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>
Diffstat (limited to 'drivers/infiniband/hw/ionic/ionic_admin.c')
0 files changed, 0 insertions, 0 deletions