patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Alexander Kozyrev <akozyrev@nvidia.com>
To: dev@dpdk.org
Cc: rasland@nvidia.com, viacheslavo@nvidia.com, matan@nvidia.com,
	orika@nvidia.com, stable@dpdk.org
Subject: [dpdk-stable] [PATCH v2 6/6] net/mlx5: reject VXLAN ID's modifications
Date: Wed, 24 Mar 2021 15:04:39 +0000	[thread overview]
Message-ID: <20210324150439.9247-7-akozyrev@nvidia.com> (raw)
In-Reply-To: <20210324150439.9247-1-akozyrev@nvidia.com>

Modification of the 802.1Q Tag Identificator, VXLAN Network
Identificator or GENEVE Network Identificator is not supported.
Reject attempt to modify these fields via the MODIFY_FIELD
action and document this mlx5 driver limitation.

Fixes: 641dbe4fb0 ("net/mlx5: support modify field flow action")
Cc: stable@dpdk.org

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
---
 doc/guides/nics/mlx5.rst        |  1 +
 drivers/net/mlx5/mlx5_flow_dv.c | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index a2cfc51b2a..92369fa5ee 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -383,6 +383,7 @@ Limitations
 
   - Supports the 'set' operation only for ``RTE_FLOW_ACTION_TYPE_MODIFY_FIELD`` action.
   - Modification of an arbitrary place in a packet via the special ``RTE_FLOW_FIELD_START`` Field ID is not supported.
+  - Modification of the 802.1Q Tag, VXLAN Network or GENEVE Network ID's is not supported.
   - Encapsulation levels are not supported, can modify outermost header fields only.
   - Offsets must be 32-bits aligned, cannot skip past the boundary of a field.
 
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index ecabf63f53..223a7d0e36 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4650,6 +4650,27 @@ flow_dv_validate_action_modify_field(struct rte_eth_dev *dev,
 				NULL,
 				"modifications of an arbitrary"
 				" place in a packet is not supported");
+	if (action_modify_field->dst.field == RTE_FLOW_FIELD_VLAN_TYPE ||
+	    action_modify_field->src.field == RTE_FLOW_FIELD_VLAN_TYPE)
+		return rte_flow_error_set(error, EINVAL,
+				RTE_FLOW_ERROR_TYPE_ACTION,
+				NULL,
+				"modifications of the 802.1Q Tag"
+				" Identifier is not supported");
+	if (action_modify_field->dst.field == RTE_FLOW_FIELD_VXLAN_VNI ||
+	    action_modify_field->src.field == RTE_FLOW_FIELD_VXLAN_VNI)
+		return rte_flow_error_set(error, EINVAL,
+				RTE_FLOW_ERROR_TYPE_ACTION,
+				NULL,
+				"modifications of the VXLAN Network"
+				" Identifier is not supported");
+	if (action_modify_field->dst.field == RTE_FLOW_FIELD_GENEVE_VNI ||
+	    action_modify_field->src.field == RTE_FLOW_FIELD_GENEVE_VNI)
+		return rte_flow_error_set(error, EINVAL,
+				RTE_FLOW_ERROR_TYPE_ACTION,
+				NULL,
+				"modifications of the GENEVE Network"
+				" Identifier is not supported");
 	if (action_modify_field->dst.field == RTE_FLOW_FIELD_MARK ||
 	    action_modify_field->src.field == RTE_FLOW_FIELD_MARK) {
 		if (config->dv_xmeta_en == MLX5_XMETA_MODE_LEGACY ||
-- 
2.24.1


  parent reply	other threads:[~2021-03-24 15:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210324150439.9247-1-akozyrev@nvidia.com>
2021-03-24 15:04 ` [dpdk-stable] [PATCH v2 1/6] net/mlx5: check for a field size in modify field action Alexander Kozyrev
2021-03-30  7:09   ` Slava Ovsiienko
2021-03-24 15:04 ` [dpdk-stable] [PATCH v2 2/6] net/mlx5: adjust modify field action endianess Alexander Kozyrev
2021-03-30  7:09   ` Slava Ovsiienko
2021-03-24 15:04 ` [dpdk-stable] [PATCH v2 3/6] net/mlx5: check extended metadata for mark modififcation Alexander Kozyrev
2021-03-30  7:09   ` Slava Ovsiienko
2021-03-24 15:04 ` Alexander Kozyrev [this message]
2021-03-30  7:10   ` [dpdk-stable] [PATCH v2 6/6] net/mlx5: reject VXLAN ID's modifications Slava Ovsiienko

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=20210324150439.9247-7-akozyrev@nvidia.com \
    --to=akozyrev@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stable@dpdk.org \
    --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).