[v3,08/11] net/mlx5: support match on IPv6 fragment packets
Checks
Commit Message
This patch adds to MLX5 PMD the support of matching on IPv6
fragmented and non-fragmented packets, using the new field
frag_ext_exist, added to rte_flow following RFC [1].
[1] https://mails.dpdk.org/archives/dev/2020-August/177257.html
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 5 +++++
1 file changed, 5 insertions(+)
Comments
Hi
> -----Original Message-----
> From: Dekel Peled <dekelp@nvidia.com>
> Sent: Monday, October 5, 2020 11:36 AM
> Subject: [PATCH v3 08/11] net/mlx5: support match on IPv6 fragment packets
>
> This patch adds to MLX5 PMD the support of matching on IPv6
> fragmented and non-fragmented packets, using the new field
> frag_ext_exist, added to rte_flow following RFC [1].
>
> [1]
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmails.dp
> dk.org%2Farchives%2Fdev%2F2020-
> August%2F177257.html&data=02%7C01%7Corika%40nvidia.com%7Cbdd7c
> 0dab63e4dee1c5a08d86909f193%7C43083d15727340c1b7db39efd9ccc17a%7C
> 0%7C1%7C637374838713645970&sdata=DqFljgZKStcjqIiwKYh63by%2FmC
> 1t9slR5bobh7jcM70%3D&reserved=0
>
> Signed-off-by: Dekel Peled <dekelp@nvidia.com>
> ---
> drivers/net/mlx5/mlx5_flow_dv.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c
> index 3379caf..4403abc 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -5211,6 +5211,7 @@ struct field_modify_info modify_tcp[] = {
> .proto = 0xff,
> .hop_limits = 0xff,
> },
> + .frag_ext_exist = 1,
> };
> const struct rte_flow_item_ecpri nic_ecpri_mask = {
> .hdr = {
> @@ -6519,6 +6520,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->frag_ext_exist));
> + MLX5_SET(fte_match_set_lyr_2_4, headers_v, frag,
> + !!(ipv6_v->frag_ext_exist & ipv6_m->frag_ext_exist));
> }
>
> /**
> --
> 1.8.3.1
Acked-by: Ori Kam <orika@nvidia.com>
Thanks,
Ori
@@ -5211,6 +5211,7 @@ struct field_modify_info modify_tcp[] = {
.proto = 0xff,
.hop_limits = 0xff,
},
+ .frag_ext_exist = 1,
};
const struct rte_flow_item_ecpri nic_ecpri_mask = {
.hdr = {
@@ -6519,6 +6520,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->frag_ext_exist));
+ MLX5_SET(fte_match_set_lyr_2_4, headers_v, frag,
+ !!(ipv6_v->frag_ext_exist & ipv6_m->frag_ext_exist));
}
/**