Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Mark Bloch <mbloch@nvidia.com>
To: "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: Saeed Mahameed <saeedm@nvidia.com>,
	Tariq Toukan <tariqt@nvidia.com>,
	"Leon Romanovsky" <leon@kernel.org>, <netdev@vger.kernel.org>,
	<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Mark Bloch <mbloch@nvidia.com>
Subject: [PATCH net-next 0/3] net/mlx5: HWS, Improve IP version handling
Date: Tue, 22 Apr 2025 12:25:37 +0300	[thread overview]
Message-ID: <20250422092540.182091-1-mbloch@nvidia.com> (raw)

This small series hardens our checks against a single matcher containing
rules that match on IPv4 and IPv6. This scenario is not supported by
hardware steering and the implementation now signals this instead of
failing silently.

Patches:
* Patch 1 forbids a single definer to match on mixed IP versions for
  source and destination address.
* Patch 2 reproduces a couple of firmware checks: it forbids creating
  a definer that matches on IP address without matching on IP version,
  and also disallows matching on IPv6 addresses and the IPv4 IHL fields
  in the same definer.
* Patch 3 forbids mixing rules that match on IPv4 and IPv6 addresses in
  the same matcher. The underlying definer mechanism does not support
  that.

Thanks,
Mark

Vlad Dogaru (3):
  net/mlx5: HWS, Fix IP version decision
  net/mlx5: HWS, Harden IP version definer checks
  net/mlx5: HWS, Disallow matcher IP version mixing

 .../mellanox/mlx5/core/steering/hws/definer.c |  78 +++++++----
 .../mellanox/mlx5/core/steering/hws/matcher.c |  26 ++++
 .../mellanox/mlx5/core/steering/hws/matcher.h |  12 ++
 .../mellanox/mlx5/core/steering/hws/rule.c    | 122 ++++++++++++++++++
 4 files changed, 216 insertions(+), 22 deletions(-)


base-commit: 07e32237ed9d3f5815fb900dee9458b5f115a678
-- 
2.34.1


             reply	other threads:[~2025-04-22  9:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-22  9:25 Mark Bloch [this message]
2025-04-22  9:25 ` [PATCH net-next 1/3] net/mlx5: HWS, Fix IP version decision Mark Bloch
2025-04-22  9:25 ` [PATCH net-next 2/3] net/mlx5: HWS, Harden IP version definer checks Mark Bloch
2025-04-22  9:25 ` [PATCH net-next 3/3] net/mlx5: HWS, Disallow matcher IP version mixing Mark Bloch
2025-04-24  2:00 ` [PATCH net-next 0/3] net/mlx5: HWS, Improve IP version handling patchwork-bot+netdevbpf

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=20250422092540.182091-1-mbloch@nvidia.com \
    --to=mbloch@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --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