* [PATCH] net/mlx5: fix missing next proto in IPv4/6 encap hash calc
@ 2025-09-15 10:40 Maayan Kashani
2025-09-22 8:31 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Maayan Kashani @ 2025-09-15 10:40 UTC (permalink / raw)
To: dev
Cc: mkashani, rasland, stable, Bing Zhao, Dariusz Sosnowski,
Viacheslav Ovsiienko, Ori Kam, Suanming Mou, Matan Azrad
Add missing memcpy for next_protocol field when processing IPv4/6 items
in flow_hw_calc_encap_hash function. This ensures the IPv4/6 header's
proto field is properly copied to the hash calculation data structure.
Fixes: bb328f44afe9 ("net/mlx5: support encapsulation hash calculation")
Cc: stable@dpdk.org
Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 2ca40b41465..ee8f8c35e57 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -15096,6 +15096,8 @@ flow_hw_calc_encap_hash(struct rte_eth_dev *dev,
((const struct rte_flow_item_ipv4 *)(pattern->spec))->hdr.dst_addr;
data.src.ipv4_addr =
((const struct rte_flow_item_ipv4 *)(pattern->spec))->hdr.src_addr;
+ data.next_protocol = ((const struct rte_flow_item_ipv4 *)
+ (pattern->spec))->hdr.next_proto_id;
break;
case RTE_FLOW_ITEM_TYPE_IPV6:
memcpy(data.dst.ipv6_addr,
@@ -15104,6 +15106,8 @@ flow_hw_calc_encap_hash(struct rte_eth_dev *dev,
memcpy(data.src.ipv6_addr,
&((const struct rte_flow_item_ipv6 *)(pattern->spec))->hdr.src_addr,
sizeof(data.src.ipv6_addr));
+ data.next_protocol = ((const struct rte_flow_item_ipv6 *)
+ (pattern->spec))->hdr.proto;
break;
case RTE_FLOW_ITEM_TYPE_UDP:
data.next_protocol = IPPROTO_UDP;
--
2.21.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net/mlx5: fix missing next proto in IPv4/6 encap hash calc
2025-09-15 10:40 [PATCH] net/mlx5: fix missing next proto in IPv4/6 encap hash calc Maayan Kashani
@ 2025-09-22 8:31 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2025-09-22 8:31 UTC (permalink / raw)
To: Maayan Kashani, dev
Cc: stable, Bing Zhao, Dariusz Sosnowski, Viacheslav Ovsiienko,
Ori Kam, Suanming Mou, Matan Azrad
Hi,
On 15/09/2025 1:40 PM, Maayan Kashani wrote:
> Add missing memcpy for next_protocol field when processing IPv4/6 items
> in flow_hw_calc_encap_hash function. This ensures the IPv4/6 header's
> proto field is properly copied to the hash calculation data structure.
>
> Fixes: bb328f44afe9 ("net/mlx5: support encapsulation hash calculation")
> Cc: stable@dpdk.org
>
> Signed-off-by: Maayan Kashani <mkashani@nvidia.com>
> Acked-by: Bing Zhao <bingz@nvidia.com>
> ---
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-22 8:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-15 10:40 [PATCH] net/mlx5: fix missing next proto in IPv4/6 encap hash calc Maayan Kashani
2025-09-22 8:31 ` Raslan Darawsheh
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).