DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shiri Kuzin <shirik@mellanox.com>
To: dev@dpdk.org
Cc: matan@mellanox.com, rasland@mellanox.com,
	viacheslavo@mellanox.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/mlx5: fix ipv6 type icmp6 header rewrite actions
Date: Tue, 18 Feb 2020 13:52:54 +0200	[thread overview]
Message-ID: <1582026774-10127-1-git-send-email-shirik@mellanox.com> (raw)

ICMPv6 header contains the checksum field, that includes the IP
addresses from IP header.

The ConnectX-5 hardware does not support ICMPv6 checksum calculation
and in case of IP header modification the checksum will contain
the wrong value.

The patch rejects the header modification actions related to IP
addresses if ICMPv6 protocol is detected in pattern.
This issue was also partly fixed in commit [1] which rejects
flows with the pattern "ipv6 proto is 58".

[1] commit b1632bd0c1e3 ("net/mlx5: fix ICMPv6 header rewrite actions")

Fixes: 4bb14c83df95 ("net/mlx5: support modify header using Direct Verbs")
Cc: stable@dpdk.org

Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index a9bb0b4..e5862bd 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -4621,6 +4621,7 @@ struct field_modify_info modify_tcp[] = {
 							    error);
 			if (ret < 0)
 				return ret;
+			item_ipv6_proto = IPPROTO_ICMPV6;
 			last_item = MLX5_FLOW_LAYER_ICMP6;
 			break;
 		case RTE_FLOW_ITEM_TYPE_TAG:
-- 
1.8.3.1


             reply	other threads:[~2020-02-18 11:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 11:52 Shiri Kuzin [this message]
2020-02-19 11:52 ` 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=1582026774-10127-1-git-send-email-shirik@mellanox.com \
    --to=shirik@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=rasland@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@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).