DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hamdan Igbaria <hamdani@nvidia.com>
To: <hamdani@nvidia.com>, <viacheslavo@nvidia.com>,
	<thomas@monjalon.net>, <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>
Cc: <dev@dpdk.org>, <orika@nvidia.com>, <valex@nvidia.com>
Subject: [PATCH 4/5] net/mlx5/hws: support IP version matching for non relaxed
Date: Thu, 26 Jan 2023 18:03:08 +0200	[thread overview]
Message-ID: <20230126160309.584967-4-hamdani@nvidia.com> (raw)
In-Reply-To: <20230126160309.584967-1-hamdani@nvidia.com>

Enable matching on IP version explicitly for non relaxed mode.
This will add support for the user cases where he needs to
match on ip version explicitly, for such case to have outer
ipv6 and inner ipv4 packets, etc.

Signed-off-by: Hamdan Igbaria <hamdani@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_definer.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/net/mlx5/hws/mlx5dr_definer.c b/drivers/net/mlx5/hws/mlx5dr_definer.c
index 6b98eb8c96..79f4f2667f 100644
--- a/drivers/net/mlx5/hws/mlx5dr_definer.c
+++ b/drivers/net/mlx5/hws/mlx5dr_definer.c
@@ -539,6 +539,14 @@ mlx5dr_definer_conv_item_ipv4(struct mlx5dr_definer_conv_data *cd,
 		return rte_errno;
 	}
 
+	if (m->version) {
+		fc = &cd->fc[DR_CALC_FNAME(IP_VERSION, inner)];
+		fc->item_idx = item_idx;
+		fc->tag_set = &mlx5dr_definer_ipv4_version_set;
+		fc->tag_mask_set = &mlx5dr_definer_ones_set;
+		DR_CALC_SET(fc, eth_l2, l3_type, inner);
+	}
+
 	if (m->fragment_offset) {
 		fc = &cd->fc[DR_CALC_FNAME(IP_FRAG, inner)];
 		fc->item_idx = item_idx;
@@ -628,6 +636,14 @@ mlx5dr_definer_conv_item_ipv6(struct mlx5dr_definer_conv_data *cd,
 		DR_CALC_SET(fc, eth_l4, ip_fragmented, inner);
 	}
 
+	if (DR_GET(header_ipv6_vtc, &m->hdr.vtc_flow, version)) {
+		fc = &cd->fc[DR_CALC_FNAME(IP_VERSION, inner)];
+		fc->item_idx = item_idx;
+		fc->tag_set = &mlx5dr_definer_ipv6_version_set;
+		fc->tag_mask_set = &mlx5dr_definer_ones_set;
+		DR_CALC_SET(fc, eth_l2, l3_type, inner);
+	}
+
 	if (DR_GET(header_ipv6_vtc, &m->hdr.vtc_flow, tos)) {
 		fc = &cd->fc[DR_CALC_FNAME(IP_TOS, inner)];
 		fc->item_idx = item_idx;
-- 
2.31.1


  parent reply	other threads:[~2023-01-26 16:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26 16:03 [PATCH 1/5] net/mlx5/hws: fix alias_rtc_0 print location in debug dump Hamdan Igbaria
2023-01-26 16:03 ` [PATCH 2/5] net/mlx5/hws: change STC array size to 32K Hamdan Igbaria
2023-01-26 16:03 ` [PATCH 3/5] net/mlx5/hws: support STC info dump Hamdan Igbaria
2023-01-26 16:03 ` Hamdan Igbaria [this message]
2023-01-26 16:03 ` [PATCH 5/5] net/mlx5: support HW steering debug dump Hamdan Igbaria
2023-02-02 16:02 ` [v2 1/5] net/mlx5/hws: fix alias_rtc_0 print location in " Hamdan Igbaria
2023-02-02 16:02   ` [v2 2/5] net/mlx5/hws: change STC array size to 32K Hamdan Igbaria
2023-02-02 16:02   ` [v2 3/5] net/mlx5/hws: support STC info dump Hamdan Igbaria
2023-02-02 16:02   ` [v2 4/5] net/mlx5/hws: support IP version matching for non relaxed Hamdan Igbaria
2023-02-02 16:02   ` [v2 5/5] net/mlx5: support HW steering debug dump Hamdan Igbaria
2023-02-12 11:50   ` [v2 1/5] net/mlx5/hws: fix alias_rtc_0 print location in " Matan Azrad
2023-02-14  8:28   ` Raslan Darawsheh

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=20230126160309.584967-4-hamdani@nvidia.com \
    --to=hamdani@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=valex@nvidia.com \
    --cc=viacheslavo@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).