From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mordechay Haimovsky Subject: [PATCH v1] ethdev: fix flow API item/action name conversion Date: Sun, 7 Oct 2018 16:22:11 +0000 Message-ID: <1538929311-31815-1-git-send-email-motih@mellanox.com> References: <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 EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00078.outbound.protection.outlook.com [40.107.0.78]) by dpdk.org (Postfix) with ESMTP id 5FA4F2C28 for ; Sun, 7 Oct 2018 18:22:13 +0200 (CEST) In-Reply-To: <1538926667-23009-1-git-send-email-motih@mellanox.com> 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: 0c2640cbfa7a ("ethdev: add flow API item/action name conversion") Signed-off-by: Moti Haimovsky --- v1: Fixed wrong hash number in "Fixes" message. ---=20 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