DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dekel Peled <dekelp@mellanox.com>
To: yskoh@mellanox.com, shahafs@mellanox.com
Cc: dev@dpdk.org, orika@mellanox.com
Subject: [dpdk-dev] [PATCH] net/mlx5: fix MPLS item validation
Date: Mon, 12 Nov 2018 11:20:08 +0200	[thread overview]
Message-ID: <1542014408-12853-1-git-send-email-dekelp@mellanox.com> (raw)

Update the mlx5_flow_validate_item_mpls() function to allow
MPLS over UDP as well as MPLS over IP.

Fixes: 84c406e74524 ("net/mlx5: add flow translate function")
Cc: orika@mellanox.com

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 21d65f4..0db862b 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1626,7 +1626,9 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority,
 	const struct rte_flow_item_mpls *mask = item->mask;
 	int ret;
 
-	if (target_protocol != 0xff && target_protocol != IPPROTO_MPLS)
+	/* MPLS over IP and MPLS over UDP is allowed */
+	if (target_protocol != 0xff && target_protocol != IPPROTO_MPLS &&
+	    target_protocol != IPPROTO_UDP)
 		return rte_flow_error_set(error, EINVAL,
 					  RTE_FLOW_ERROR_TYPE_ITEM, item,
 					  "protocol filtering not compatible"
-- 
1.8.3.1

             reply	other threads:[~2018-11-12  9:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12  9:20 Dekel Peled [this message]
2018-11-12  9:52 ` Ori Kam
2018-11-13  9:51 ` [dpdk-dev] [PATCH v2 0/2] net/mlx5: update MPLS item support Dekel Peled
2018-11-15 15:17   ` [dpdk-dev] [PATCH v3 0/3] " Dekel Peled
2018-11-15 20:44     ` Shahaf Shuler
2018-11-15 15:17   ` [dpdk-dev] [PATCH v3 1/3] net/mlx5: add MPLS to Direct Verbs flow engine Dekel Peled
2018-11-15 15:17   ` [dpdk-dev] [PATCH v3 2/3] net/mlx5: fix MPLS item validation Dekel Peled
2018-11-15 15:17   ` [dpdk-dev] [PATCH v3 3/3] net/mlx5: fix tunnel ptype of MPLS in UDP Dekel Peled
2018-11-13  9:51 ` [dpdk-dev] [PATCH v2 1/2] net/mlx5: add MPLS to Direct Verbs flow engine Dekel Peled
2018-11-13  9:51 ` [dpdk-dev] [PATCH v2 2/2] net/mlx5: fix MPLS item validation Dekel Peled

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=1542014408-12853-1-git-send-email-dekelp@mellanox.com \
    --to=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=orika@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=yskoh@mellanox.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).