From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <users-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 1C2D842B71
	for <public@inbox.dpdk.org>; Mon, 22 May 2023 15:35:12 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 88CE940EE7;
	Mon, 22 May 2023 15:35:11 +0200 (CEST)
Received: from outbound03.uzmanposta.com (outbound03.uzmanposta.com
 [77.79.88.60]) by mails.dpdk.org (Postfix) with ESMTP id A6E8B40EE5
 for <users@dpdk.org>; Mon, 22 May 2023 15:35:09 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=b-ulltech.com;
 h=from:subject:message-id:date:to; s=default; bh=jAs0C35IEGTYgN
 2RL24ZQXTxRxvcboqmNQuTEyeod18=; b=o4rLp/uh/grW69ZUT21K7fp459xOBQ
 D6EC2fua7YiKtFH+XQZ4TryG5b8sKQTYn5aqxUk2ZGg2tPVxSTdQjgSLTnKH1IqW
 WVsryJfBsQL8V4Y3Pxnc7F9J58SvbLx3g3q7wLW1yCvAjVixOU8DAmE+NBQGJ/EF
 nM2TaUcEHqVGU=
X-MXLAYER-out-id: eed1761d-50ba-42b9-b68e-6a015cb911ec
Received: from pub01.uzmanposta.com (pub01 [10.60.81.162])
 by outbound03.uzmanposta.com (Postfix) with ESMTP id 4QPz2v2CqCzlY6X
 for <users@dpdk.org>; Mon, 22 May 2023 16:35:01 +0300 (+03)
Date: Mon, 22 May 2023 16:35:01 +0300 (TRT)
From: Aisenur =?utf-8?Q?Yolda=C5=9F?= <aisenur.yoldas@b-ulltech.com>
To: "" <users@dpdk.org>
Message-ID: <1989053041.4731986.1684762501124.JavaMail.zimbra@b-ulltech.com>
Subject: =?utf-8?B?UnRlX2Zsb3cgZnVuY3Rpb24=?=
MIME-Version: 1.0
Content-Type: multipart/alternative; 
 boundary="=_3248b0f6-6c61-4dac-9e81-7f52f3c2a0c9"
X-Originating-IP: [78.164.4.71]
Thread-Index: JYte7V0InBqoX+4HujKoYuFqG8Ehgg==
Thread-Topic: Rte_flow function
X-Original-Sender: aisenur.yoldas@b-ulltech.com
X-BeenThere: users@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK usage discussions <users.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/users>,
 <mailto:users-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/users/>
List-Post: <mailto:users@dpdk.org>
List-Help: <mailto:users-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/users>,
 <mailto:users-request@dpdk.org?subject=subscribe>
Errors-To: users-bounces@dpdk.org

--=_3248b0f6-6c61-4dac-9e81-7f52f3c2a0c9
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi,
I am trying to use the rte_flow_query function to find all the flow rules i=
n a port, but when it comes the action parameter i cannot find the right wa=
y because when I use count action like in the ipsec example
=C2=A0

struct rte_flow_action action;
action.type =3D RTE_FLOW_ACTION_TYPE_COUNT;


rte_errno =3D 0;
ret =3D rte_flow_query(port_id,flow_local,action,&amp;count_query,&amp;erro=
r);
if (ret) {
std::cout&lt;&lt;error.message&lt;&lt;error.type&lt;&lt;std::endl;
printf("Error meaning:%d%d%s\n",ret,rte_errno,rte_strerror(-ret));
}



it gives me=C2=A0 "Error meaning:-22 22 Invalid argument".
And when i try to use my original flow rule
=C2=A0

struct rte_flow_action action[4];

structrte_flow_action_rssrss;
structrte_flow_action_markmark;

staticuint8_thash_key[RSS_HASH_KEY_LENGTH] =3D {
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,
};
rss.key =3D hash_key;
rss.key_len =3D RSS_HASH_KEY_LENGTH;
rss.func =3D RTE_ETH_HASH_FUNCTION_DEFAULT;
=C2=A0
rss.types =3D RTE_ETH_RSS_IP;
rss.queue_num =3D 1;
rss.level =3D 0;

mark.id =3D 0;

action[0].type =3D RTE_FLOW_ACTION_TYPE_MARK;
action[0].conf =3D &amp;mark;
action[1].type =3D RTE_FLOW_ACTION_TYPE_RSS;
action[1].conf =3D &amp;rss;
action[2].type =3D RTE_FLOW_ACTION_TYPE_END;

rte_errno =3D 0;
ret =3D rte_flow_query(port_id,flow_local,action,&amp;count_query,&amp;erro=
r);
if (ret) {
std::cout&lt;&lt;error.message&lt;&lt;error.type&lt;&lt;std::endl;
printf("Error meaning:%d%d%s\n",ret,rte_errno,rte_strerror(-ret));
}
=C2=A0
it gives me "Error meaning:-95 95 Operation not supported".
=C2=A0
What is the correct way to use this function in order to reach all the flow=
s of the port.
=C2=A0
Thanks,
Aisenur Yoldas
=C2=A0
=C2=A0


--=_3248b0f6-6c61-4dac-9e81-7f52f3c2a0c9
Content-Type: multipart/related; 
	boundary="=_feaf825e-99dc-4951-9f87-5c10ccc94014"

--=_feaf825e-99dc-4951-9f87-5c10ccc94014
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><div>Hi,</div>
<div>I am trying to use the rte_flow_query function to find all the flow ru=
les in a port, but when it comes the action parameter i cannot find the rig=
ht way because when I use count action like in the ipsec example</div>
<div>=C2=A0</div>
<div>
<div>struct rte_flow_action action;</div>
<div>action.type =3D RTE_FLOW_ACTION_TYPE_COUNT;</div>
<div>
<div>
<div>rte_errno =3D 0;</div>
<div>ret =3D rte_flow_query(port_id,flow_local,action,&amp;count_query,&amp=
;error);</div>
<div>if (ret) {</div>
<div>std::cout&lt;&lt;error.message&lt;&lt;error.type&lt;&lt;std::endl;</di=
v>
<div>printf("Error meaning:%d%d%s\n",ret,rte_errno,rte_strerror(-ret));</di=
v>
<div>}</div>
</div>
</div>
</div>
<div>it gives me=C2=A0 "Error meaning:-22 22 Invalid argument".</div>
<div>And when i try to use my original flow rule</div>
<div>=C2=A0</div>
<div>
<div>struct rte_flow_action action[4];</div>
<br />
<div>structrte_flow_action_rssrss;</div>
<div>structrte_flow_action_markmark;</div>
<br />
<div>staticuint8_thash_key[RSS_HASH_KEY_LENGTH] =3D {</div>
<div>0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,</div>
<div>0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,</div>
<div>0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,</div>
<div>0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,</div>
<div>0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A, 0x6D, 0x5A,</div>
<div>};</div>
<div>rss.key =3D hash_key;</div>
<div>rss.key_len =3D RSS_HASH_KEY_LENGTH;</div>
<div>rss.func =3D RTE_ETH_HASH_FUNCTION_DEFAULT;</div>
<div>=C2=A0</div>
<div>rss.types =3D RTE_ETH_RSS_IP;</div>
<div>rss.queue_num =3D 1;</div>
<div>rss.level =3D 0;</div>
<br />
<div>mark.id =3D 0;</div>
<br />
<div>action[0].type =3D RTE_FLOW_ACTION_TYPE_MARK;</div>
<div>action[0].conf =3D &amp;mark;</div>
<div>action[1].type =3D RTE_FLOW_ACTION_TYPE_RSS;</div>
<div>action[1].conf =3D &amp;rss;</div>
<div>action[2].type =3D RTE_FLOW_ACTION_TYPE_END;</div>
<div>
<div>rte_errno =3D 0;</div>
<div>ret =3D rte_flow_query(port_id,flow_local,action,&amp;count_query,&amp=
;error);</div>
<div>if (ret) {</div>
<div>std::cout&lt;&lt;error.message&lt;&lt;error.type&lt;&lt;std::endl;</di=
v>
<div>printf("Error meaning:%d%d%s\n",ret,rte_errno,rte_strerror(-ret));</di=
v>
<div>}</div>
<div>=C2=A0</div>
<div>it gives me "Error meaning:-95 95 Operation not supported".</div>
<div>=C2=A0</div>
<div>What is the correct way to use this function in order to reach all the=
 flows of the port.</div>
<div>=C2=A0</div>
<div>Thanks,</div>
<div>Aisenur Yoldas</div>
<div>=C2=A0</div>
<div>=C2=A0</div>
</div>
</div></html>
--=_feaf825e-99dc-4951-9f87-5c10ccc94014--

--=_3248b0f6-6c61-4dac-9e81-7f52f3c2a0c9--