From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mordechay Haimovsky Subject: [PATCH] ethdev: fix flow API item/action name conversion Date: Sun, 7 Oct 2018 15:38:06 +0000 Message-ID: <1538926667-23009-1-git-send-email-motih@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , Mordechay Haimovsky To: Adrien Mazarguil , Shahaf Shuler , "orika@contextream.com" Return-path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70042.outbound.protection.outlook.com [40.107.7.42]) by dpdk.org (Postfix) with ESMTP id 2B6501E20 for ; Sun, 7 Oct 2018 17:38:08 +0200 (CEST) Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch fixes a typecast bug found in rte_flow_conv_name routine used in rte_flow item/action name conversion. Fixes: ae6b2cf49505 ("ethdev: add flow API item/action name conversion") Signed-off-by: Moti Haimovsky --- lib/librte_ethdev/rte_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c index 9c56a97..21a4286 100644 --- a/lib/librte_ethdev/rte_flow.c +++ b/lib/librte_ethdev/rte_flow.c @@ -767,7 +767,7 @@ enum rte_flow_conv_item_spec_type { { rte_flow_desc_action, RTE_DIM(rte_flow_desc_action), }, }; const struct desc_info *const info =3D &info_rep[!!is_action]; - unsigned int type =3D (uintptr_t)src; + unsigned int type =3D *(const unsigned int *)src; =20 if (type >=3D info->num) return rte_flow_error_set --=20 1.8.3.1