From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 554A6A04DB; Thu, 15 Oct 2020 16:08:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 92BDC1D560; Thu, 15 Oct 2020 16:07:00 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 8C6AF1C25E for ; Thu, 15 Oct 2020 16:06:55 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@nvidia.com) with SMTP; 15 Oct 2020 17:06:49 +0300 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.228.134.250]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 09FE6lEY007456; Thu, 15 Oct 2020 17:06:49 +0300 From: Dekel Peled To: matan@nvidia.com, shahafs@nvidia.com, viacheslavo@nvidia.com Cc: dev@dpdk.org Date: Thu, 15 Oct 2020 17:05:55 +0300 Message-Id: <3098502b1635b489078285c118d3807b06a9fc44.1602770369.git.dekelp@nvidia.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 3/5] net/mlx5: support match on IPv6 fragment packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch adds to MLX5 PMD the support of matching on IPv6 fragmented and non-fragmented packets, using the new field has_frag_ext, added to rte_flow following RFC [1]. [1] https://mails.dpdk.org/archives/dev/2020-August/177257.html Signed-off-by: Dekel Peled Acked-by: Ori Kam --- doc/guides/rel_notes/release_20_11.rst | 2 +- drivers/net/mlx5/mlx5_flow_dv.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index 18e2c5e..097117e 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -218,7 +218,7 @@ New Features Updated Mellanox mlx5 driver with new features and improvements, including: - * Added support for matching on fragmented/non-fragmented IPv4 packets. + * Added support for matching on fragmented/non-fragmented IPv4/IPv6 packets. Removed Items ------------- diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index ff97f78..b61a361 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -5417,6 +5417,7 @@ struct field_modify_info modify_tcp[] = { .proto = 0xff, .hop_limits = 0xff, }, + .has_frag_ext = 1, }; const struct rte_flow_item_ecpri nic_ecpri_mask = { .hdr = { @@ -6734,6 +6735,10 @@ struct field_modify_info modify_tcp[] = { ipv6_m->hdr.hop_limits); MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_ttl_hoplimit, ipv6_v->hdr.hop_limits & ipv6_m->hdr.hop_limits); + MLX5_SET(fte_match_set_lyr_2_4, headers_m, frag, + !!(ipv6_m->has_frag_ext)); + MLX5_SET(fte_match_set_lyr_2_4, headers_v, frag, + !!(ipv6_v->has_frag_ext & ipv6_m->has_frag_ext)); } /** -- 1.8.3.1