<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hello,</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="color: rgb(0, 0, 0);"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt;">Issue recap from the last mail: Since
</span><span style="font-family: Aptos, sans-serif; font-size: 14.666667px; background-color: rgb(255, 255, 255);">DPDK 24.11.2, installing
<b>synchronous</b> rte flow rules to match IP in IP packets (packets with pattern of eth / ipv6 / ipv4 or eth / ipv4 / ipv4) does not work anymore.</span></div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Recently I took a closer look at this issue and related PR [1], and find that the attached changes can help to enable IPinIP header matching in the
<b>synchronous</b> mode regardless this pattern exists in the outer header or inner header.</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="text-align: left; text-indent: 0px; line-height: 23px; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The reasoning is as follows. <b>Before</b> the change proposed in [1], the condition, `l3_tunnel_detection == l3_tunnel_inner`, adds one extra flag (MLX5_FLOW_LAYER_IPIP or MLX5_FLOW_LAYER_IPV6_ENCAP) to ‘<code>item_flags</code>‘ if this pattern exists as
part of the inner header. The added extra flag later is used by ‘mlx5_flow_validate_item_ipv6’ or ‘mlx5_flow_dv_validate_item_ipv4’ to reject IPinIP encapsulation in another tunnel. To achieve the purpose of explicitly allowing inner IPinIP matching and outer
IPinIP matching as well, the more direct way is simply removing the statement of adding this ’trick’ flag for the inner header case, so that it can pass the validation check. And it also seems more reasonable to set ’tunnel’ to 1 if the l3 inner tunnel is
detected.</div>
<div dir="ltr" style="text-align: left; text-indent: 0px; line-height: 23px; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="text-align: left; text-indent: 0px; line-height: 23px; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
With this change, it is possible to run the following commands without the mentioned error in the previous email:</div>
<div dir="ltr" style="text-align: left; text-indent: 0px; line-height: 23px; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<p dir="ltr" style="text-align: left; text-indent: 0px; line-height: 23px; background-color: rgb(255, 255, 255); margin: 0cm;">
<span style="font-family: Aptos, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">```</span></p>
<p style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0cm;">
<span style="font-family: Aptos, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">sudo ./dpdk-testpmd -a 0000:3b:00.0,class=rxq_cqe_comp_en=0,rx_vec_en=1,representor=pf[0]vf[0-3] -a 0000:3b:00.1,class=rxq_cqe_comp_en=0,rx_vec_en=1 -- -i --rxq=1 --txq=1 --flow-isolate-all</span></p>
<p style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0cm;">
<span style="font-family: Aptos, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"> </span></p>
<p style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0cm;">
<span style="font-family: Aptos, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">flow create 0 ingress pattern eth / ipv6 proto is 0x0004 / end actions queue index 0 / end</span></p>
<p style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0cm;">
<span style="font-family: Aptos, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">or</span></p>
<p style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0cm;">
<span style="font-family: Aptos, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 proto is 0x0004 / end actions queue index 0 / end</span></p>
<p style="text-align: left; text-indent: 0px; background-color: rgb(255, 255, 255); margin: 0cm;">
<span style="font-family: Aptos, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">```</span></p>
<div dir="ltr" style="text-align: left; text-indent: 0px; line-height: 23px; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="text-align: left; text-indent: 0px; line-height: 23px; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I would appreciate more expert feedback on this finding.</div>
<div dir="ltr" style="text-align: left; text-indent: 0px; line-height: 23px; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="text-align: left; text-indent: 0px; line-height: 23px; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks. </div>
<div dir="ltr" style="text-align: left; text-indent: 0px; line-height: 23px; font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr"><span style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">[1]
</span><span style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(70, 120, 134);"><u><a href="https://github.com/DPDK/dpdk-stable/commit/116949c7a7b780f147613068cbbd6257e6053654" target="_blank" data-outlook-id="c9309981-93fa-4b9b-906a-b820894fb1bc" style="color: rgb(70, 120, 134); margin-top: 0px; margin-bottom: 0px;">https://github.com/DPDK/dpdk-stable/commit/116949c7a7b780f147613068cbbd6257e6053654</a></u></span></div>
<div dir="ltr" style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(70, 120, 134);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
<Changes to allow IPinIP matching for both inner and outer cases></div>
<div dir="ltr" style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
index 7b9e501..29c919a 100644</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
--- a/drivers/net/mlx5/mlx5_flow_dv.c</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
+++ b/drivers/net/mlx5/mlx5_flow_dv.c</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
@@ -7930,8 +7930,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
/*</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
* explicitly allow inner IPIP match</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
*/</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
- if (l3_tunnel_detection == l3_tunnel_outer) {</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
- item_flags |= l3_tunnel_flag;</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
+ if (l3_tunnel_detection == l3_tunnel_inner) {</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
tunnel = 1;</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
}</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
ret = mlx5_flow_dv_validate_item_ipv4(dev, items,</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
@@ -7957,8 +7956,7 @@ flow_dv_validate(struct rte_eth_dev *dev, const struct rte_flow_attr *attr,</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
/*</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
* explicitly allow inner IPIP match</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
*/</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
- if (l3_tunnel_detection == l3_tunnel_outer) {</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
- item_flags |= l3_tunnel_flag;</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
+ if (l3_tunnel_detection == l3_tunnel_inner) {</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
tunnel = 1;</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
}</div>
<div style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
ret = mlx5_flow_validate_item_ipv6(dev, items,</div>
<div dir="ltr" style="font-family: Aptos, sans-serif; font-size: 14.666667px; color: rgb(0, 0, 0);">
<span style="background-color: rgb(255, 255, 255);"></Changes to allow IPinIP matching for both inner and outer cases></span></div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color: rgb(255, 255, 255); line-height: 23px;">Best regards,</span><br>
<span style="background-color: rgb(255, 255, 255); line-height: 23px;">Tao Li</span></div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div dir="ltr" style="font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="mail-editor-reference-message-container">
<div dir="ltr" class="ms-outlook-mobile-reference-message skipProofing">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; font-family: Aptos; font-size: 12pt; color: black;">
<b>From: </b>Li, Tao <tao.li06@sap.com><br>
<b>Date: </b>Wednesday, 28. May 2025 at 10:04<br>
<b>To: </b>users <users@dpdk.org><br>
<b>Subject: </b>Failed to install synchronous rte flow rules to match IP in IP packets since DPDK 24.11.2<br>
<br>
</div>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">Hello All,</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">We are running software components that use <b>synchronous</b> rte flow rules to match IP in IP packets. That means, we are matching packets with pattern of eth / ipv6 / ipv4 using rte flow rules. This approach works until DPDK
24.11.2. After investigation, we discover that, this patching commit [1] breaks matching of the above described header pattern, as it seems to only consider IP in IP tunneling coexisting with VXLAN encapsulation. To reproduce the error, the following testpmd
commands can be used.</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">```</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">sudo ./dpdk-testpmd -a 0000:3b:00.0,class=rxq_cqe_comp_en=0,rx_vec_en=1,representor=pf[0]vf[0-3] -a 0000:3b:00.1,class=rxq_cqe_comp_en=0,rx_vec_en=1 -- -i --rxq=1 --txq=1 --flow-isolate-all</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">flow create 0 ingress pattern eth / ipv6 proto is 0x0004 / end actions queue index 0 / end</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">or</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">flow create 0 ingress pattern eth / ipv4 proto is 0x0004 / end actions queue index 0 / end</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">```</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">and the following error will be emitted:</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">```</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">port_flow_complain(): Caught PMD error type 13 (specific pattern item): cause: 0x7ffc9943af78, multiple tunnel not supported: Invalid argument</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">```</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">It would be appreciated to know if it is intended behavior or negative side effect of the mentioned DPDK patch commit. Would it be possible to again support IP in IP encapsulation for the outer headers?</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">[1] </span><span style="font-size: 11pt; color: rgb(70, 120, 134);"><u><a href="https://github.com/DPDK/dpdk-stable/commit/116949c7a7b780f147613068cbbd6257e6053654" target="_blank" data-outlook-id="c9309981-93fa-4b9b-906a-b820894fb1bc" style="color: rgb(70, 120, 134); margin-top: 0px; margin-bottom: 0px;">https://github.com/DPDK/dpdk-stable/commit/116949c7a7b780f147613068cbbd6257e6053654</a></u></span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;"> </span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">Best regards,</span></p>
<p class="MsoNormal" style="margin: 0cm; font-family: Aptos, sans-serif; font-size: 12pt;">
<span style="font-size: 11pt;">Tao Li</span></p>
</div>
</body>
</html>