<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<div dir="auto">BTW,</div>
<div dir="auto">In the non working example I see ipv6 / ipv4 / ICMP. Was this your intention or did you mean ipv6 / ICMP?</div>
<div><br>
</div>
<div id="ms-outlook-mobile-signature" dir="auto">
<div>Regards,</div>
<div dir="auto">Asaf Penso</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Asaf Penso <asafp@nvidia.com><br>
<b>Sent:</b> Thursday, March 21, 2024 9:17:04 PM<br>
<b>To:</b> Tao Li <byteocean@hotmail.com>; users@dpdk.org <users@dpdk.org><br>
<b>Subject:</b> Re: Finer matching granularity with async template API</font>
<div> </div>
</div>
<div>
<div dir="auto">Hello Tao,</div>
<div dir="auto"><br>
</div>
<div dir="auto">What is the output / error message you get?</div>
<div dir="auto"><br>
</div>
<div><br>
</div>
<div id="x_ms-outlook-mobile-signature" dir="auto">
<div>Regards,</div>
<div dir="auto">Asaf Penso</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Tao Li <byteocean@hotmail.com><br>
<b>Sent:</b> Thursday, March 21, 2024 5:44:00 PM<br>
<b>To:</b> users@dpdk.org <users@dpdk.org><br>
<b>Subject:</b> Finer matching granularity with async template API</font>
<div> </div>
</div>
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:DengXian}
@font-face
        {font-family:Aptos}
p.x_x_MsoNormal, li.x_x_MsoNormal, div.x_x_MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif}
.x_x_MsoChpDefault
        {font-size:10.0pt}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
-->
</style>
<div lang="en-DE" style="word-wrap:break-word">
<div class="x_x_WordSection1">
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Hi all,</span></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt">I am using async template API to install flow rules to perform actions on packets to achieve IP(v4)inIP(v6) tunnelling. Currently I am facing an issue where I cannot perform incoming traffic
 matching with finer granularity. The test-pmd commands in use are as following:</span></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span></p>
<p class="x_x_MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt"><Not working test-pmd commands></span></b></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">port stop all</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt"> </span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">flow configure 0 queues_number 4 queues_size 64 counters_number 0 aging_counters_number 0 meters_number 0 flags 0   # PF0</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt"> </span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">flow configure 1 queues_number 4 queues_size 64 counters_number 0 aging_counters_number 0 meters_number 0 flags 0</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt"> </span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">flow configure 2 queues_number 4 queues_size 64 counters_number 0 aging_counters_number 0 meters_number 0 flags 0</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt"> </span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">flow configure 3 queues_number 4 queues_size 64 counters_number 0 aging_counters_number 0 meters_number 0 flags 0  # PF1V0</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt"> </span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">port start all</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">set verbose 1</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt"> </span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">flow pattern_template 0 create transfer relaxed no pattern_template_id 10  template represented_port ethdev_port_id is 0 / eth  / ipv6
<b>/ ipv4 / icmp</b>  / end</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt"> </span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">set raw_decap 0 eth  / ipv6 / end_set</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">set raw_encap 0 eth src is 11:22:33:44:55:66 dst is 66:9d:a7:fd:fb:43 type is 0x0800 / end_set</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt"> </span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">flow actions_template 0 create transfer  actions_template_id 10  template raw_decap index 0 / raw_encap index 0 / represented_port / end mask raw_decap index 0 / raw_encap index 0 /  represented_port 
 / end</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt"> </span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">flow template_table 0 create  group 0 priority 0  transfer wire_orig table_id 5 rules_number 8 pattern_template 10 actions_template 10</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt"> </span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">flow queue 0 create 0 template_table 5 pattern_template 0 actions_template 0 postpone no pattern represented_port ethdev_port_id is 0 / eth  / ipv6 
<b>/ ipv4 / icmp</b>  / end actions raw_decap index 0 / raw_encap index 0 /  represented_port ethdev_port_id 3 / end</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt"> </span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">flow push 0 queue 0</span></p>
<p class="x_x_MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt"></Not working test-pmd commands></span></b></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Once I remove matching patterns for the inner packet headers( ipv4 / icmp) as following, I can see the processed packets inside VMs using tcpdump.</span></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span></p>
<p class="x_x_MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt"><Working test-pmd commands></span></b></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">…</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">flow pattern_template 0 create transfer relaxed no pattern_template_id 10  template represented_port ethdev_port_id is 0 / eth  / ipv6 / end</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">…</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">flow queue 0 create 0 template_table 5 pattern_template 0 actions_template 0 postpone no pattern represented_port ethdev_port_id is 0 / eth  / ipv6   / end actions raw_decap index 0 / raw_encap index 0
 /  represented_port ethdev_port_id 3 / end</span></p>
<p class="x_x_MsoNormal"><span style="font-size:10.0pt">…</span></p>
<p class="x_x_MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt"></Working test-pmd commands></span></b></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Similar combination works when using the synchronous rte_flow API. Any comment or suggestion on this issue is much appreciated. Many thanks in advance.</span></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Best regards,</span></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Tao</span></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt"><br>
<br>
</span></p>
<p class="x_x_MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span></p>
</div>
</div>
</div>
</body>
</html>