<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Gulim;
panose-1:2 11 6 0 0 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Malgun Gothic";
panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"Malgun Gothic";}
@font-face
{font-family:Gulim;
panose-1:2 11 6 0 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
text-align:justify;
text-justify:inter-ideograph;
text-autospace:none;
word-break:break-hangul;
font-size:10.0pt;
font-family:"맑은 고딕",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
{mso-style-name:x_msonormal;
margin:0cm;
text-align:justify;
text-justify:inter-ideograph;
text-autospace:none;
word-break:break-hangul;
font-size:10.0pt;
font-family:"맑은 고딕",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=KO link=blue vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Thank you Zhao.</span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I tried it, but now mlx5 driver returned error.</span></p><div><p class=MsoNormal align=left style='text-align:left;background:#232323;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New";color:lightgrey;background:#232323'>mlx5_net: [mlx5dr_action_create_generic]: Cannot create HWS action since HWS is not supported</span><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'><o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN-US>It is what I saw in my original code before trying on testpmd.</span></p><p class=MsoNormal><span lang=EN-US>It seems to be an issue from connectX-6 configuration.</span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Is there anyone ever tried to use asynchronous API with connectX-6?</span></p><p class=MsoNormal><span lang=EN-US>Setting dv_flow_en=2 and dv_esw_en=1 seems not enough.</span></p><p class=MsoNormal><span lang=EN-US>I explored the mlx5 code, and found that rte_flow_configure() queries HCA capability by mlx5dr_cmd_query_caps().</span></p><p class=MsoNormal><span lang=EN-US>In my case, rte_flow_configure() returned error since caps->wqe_based_update is set by 0.</span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Is there anyone know how to set this value to non-zero?</span></p><p class=MsoNormal><span lang=EN-US>I already wrote the same question on nvidia forum.</span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Sincerely,</span></p><p class=MsoNormal><span lang=EN-US>Junghan Yoon</span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal style='border:none;padding:0cm'><b>보낸 사람<span lang=EN-US>: </span></b><span lang=EN-US><a href="mailto:bingz@nvidia.com">Bing Zhao</a><br></span><b>보낸 날짜<span lang=EN-US>: </span></b><span lang=EN-US>2023</span>년<span lang=EN-US> 6</span>월<span lang=EN-US> 9</span>일 금요일 오후<span lang=EN-US> 10:00<br></span><b>받는 사람<span lang=EN-US>: </span></b><span lang=EN-US><a href="mailto:users@dpdk.org">users@dpdk.org</a>; <a href="mailto:cerotyki@gmail.com">cerotyki@gmail.com</a><br></span><b>제목<span lang=EN-US>: </span></b><span lang=EN-US>RE: About rte_flow asynchronous API</span></p></div><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'><o:p> </o:p></span></p><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:ZH-CN'>Hi Junghan,</span><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'><o:p></o:p></span></p><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:ZH-CN'> </span><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'><o:p></o:p></span></p><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:ZH-CN'>In testpmd, you can easily do it by:</span><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'><o:p></o:p></span></p><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:ZH-CN'> </span><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'><o:p></o:p></span></p><p style='margin:0cm'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas'>port stop all</span></p><p style='margin:0cm'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas'># or port stop 0</span></p><p style='margin:0cm'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas'> </span></p><p style='margin:0cm'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas'>flow configure 0 ……</span></p><p style='margin:0cm'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas'># if there are other port(s)</span></p><p style='margin:0cm'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas'># flow configure Y …… </span></p><p style='margin:0cm'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas'> </span></p><p style='margin:0cm'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas'> </span></p><p style='margin:0cm'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas'>port start all</span></p><p style='margin:0cm'><span lang=EN-US style='font-size:10.0pt;font-family:Consolas'># or port start 0</span></p><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:ZH-CN'> </span><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'><o:p></o:p></span></p><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:ZH-CN'>With the source code implementation, you can configure it before starting a device.</span><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'><o:p></o:p></span></p><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:ZH-CN'> </span><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'><o:p></o:p></span></p><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:ZH-CN'>BR. Bing</span><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'><o:p></o:p></span></p><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:ZH-CN'> </span><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'><o:p></o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'> <o:p></o:p></span></p><div id=divRplyFwdMsg><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'> Junghan Yoon <<a href="mailto:cerotyki@gmail.com"><span style='color:#0563C1'>cerotyki@gmail.com</span></a>><br><b>Sent:</b> Friday, June 9, 2023 10:57:13 AM<br><b>To:</b> <a href="mailto:users@dpdk.org"><span style='color:#0563C1'>users@dpdk.org</span></a> <<a href="mailto:users@dpdk.org"><span style='color:#0563C1'>users@dpdk.org</span></a>><br><b>Subject:</b> About rte_flow asynchronous API</span><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'> <o:p></o:p></span></p><div><p class=MsoNormal align=left style='text-align:left;text-autospace:ideograph-numeric ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:12.0pt;font-family:"굴림",sans-serif'> <o:p></o:p></span></p></div></div><div><div><p class=xmsonormal><span lang=EN-US>Hi.</span></p><p class=xmsonormal><span lang=EN-US>I</span>’<span lang=EN-US>m trying to use testpmd to test rte_flow with asynchronous API in DPDK 22.11.</span></p><p class=xmsonormal><span lang=EN-US> </span></p><p class=xmsonormal><span lang=EN-US>I turned on dv_esw_en=1 by echoing switchdev to /sys/class/net/</span>…<span lang=EN-US>., and set dv_flow_en to 2 to use connectX-6 HWS (hardware steering).</span></p><p class=xmsonormal align=left style='text-align:left;background:#232323;text-autospace:ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New";color:lightgrey;background:#232323'>sudo build/app/dpdk-testpmd -a 0000:8a:00.0,dv_flow_en=2 -a 0000:8a:00.1,dv_flow_en=2 -- -i --rxq=1 --txq=1</span></p><p class=xmsonormal><span lang=EN-US> </span></p><p class=xmsonormal><span lang=EN-US>In the prompt, I typed below</span></p><p class=xmsonormal align=left style='text-align:left;background:#232323;text-autospace:ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New";color:lightgrey;background:#232323'>flow configure 0 queues_number 1 queues_size 10 counters_number 0 aging_counters_number 0 meters_number 0 flags 0</span></p><p class=xmsonormal><span lang=EN-US> </span></p><p class=xmsonormal><span lang=EN-US>but it said </span>“<span lang=EN-US>Device with port_id=0 already started.</span>”<span lang=EN-US>.</span></p><p class=xmsonormal><span lang=EN-US> </span></p><p class=xmsonormal><span lang=EN-US>I know rte_flow_configure() call should be in the middle of rte_eth_dev_configure() and rte_eth_dev_start().</span></p><p class=xmsonormal><span lang=EN-US>So, I run testpmd by below to postpone device start,</span></p><p class=xmsonormal align=left style='text-align:left;background:#232323;text-autospace:ideograph-other;word-break:keep-all'><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New";color:lightgrey;background:#232323'>sudo build/app/dpdk-testpmd -a 0000:8a:00.0,dv_flow_en=2 -a 0000:8a:00.1,dv_flow_en=2 -- -i --rxq=1 --txq=1 --disable-device-start</span></p><p class=xmsonormal><span lang=EN-US> </span></p><p class=xmsonormal><span lang=EN-US>However, now not only rte_eth_dev_start() but also rte_eth_dev_configure() does not start, so it said </span>“<span lang=EN-US>Device with port_id=0 is not configured.</span>”<span lang=EN-US>.</span></p><p class=xmsonormal><span lang=EN-US> </span></p><p class=xmsonormal><span lang=EN-US>How can I run rte_flow_configure() between rte_eth_dev_configure() and rte_eth_dev_start() in testpmd?</span></p><p class=xmsonormal><span lang=EN-US>Is there any parameter to postpone only rte_eth_dev_start()?</span></p><p class=xmsonormal><span lang=EN-US> </span></p><p class=xmsonormal><span lang=EN-US>Sincerely,</span></p><p class=xmsonormal><span lang=EN-US>Junghan Yoon.</span></p></div></div></div><p class=xmsonormal><span lang=EN-US> </span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>