From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mGC06Ca5RDG366vjFdn6jpLe8G0sy6uq3htCDL19tY8=; b=s0bXo1MbRNe4HtjDLngbRorgCv+qmDwcC/aGjzr0zQJs8U8MkBqZucu72VhoqTudAcBgbL8a9AIY8eRCV5tM3lh4g5t9slQWTu9qr36yb+AF++RUOxEnQoU9jOexHYm7n5RdaaHSVCubJVUUTet7orIjw16lTj4k+5wFvTuYmLE= Received: from AM0PR05MB4435.eurprd05.prod.outlook.com (52.134.92.20) by AM0PR05MB4116.eurprd05.prod.outlook.com (52.134.90.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.21; Sun, 7 Oct 2018 16:22:11 +0000 Received: from AM0PR05MB4435.eurprd05.prod.outlook.com ([fe80::2549:a872:4864:b84e]) by AM0PR05MB4435.eurprd05.prod.outlook.com ([fe80::2549:a872:4864:b84e%6]) with mapi id 15.20.1207.024; Sun, 7 Oct 2018 16:22:11 +0000 From: Mordechay Haimovsky To: Adrien Mazarguil , Shahaf Shuler , "orika@contextream.com" CC: "dev@dpdk.org" , Mordechay Haimovsky Thread-Topic: [PATCH v1] ethdev: fix flow API item/action name conversion Thread-Index: AQHUXlnmV6+HyD5Msky/mLgY+cE1BA== 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> In-Reply-To: <1538926667-23009-1-git-send-email-motih@mellanox.com> Accept-Language: he-IL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR03CA0046.eurprd03.prod.outlook.com (2603:10a6:803:50::17) To AM0PR05MB4435.eurprd05.prod.outlook.com (2603:10a6:208:5a::20) authentication-results: spf=none (sender IP is ) smtp.mailfrom=motih@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM0PR05MB4116; 6:669Kn922WmQBhhbnPASJmJdFZ1tsVOdDcX/GcygwiFGbwYDBDkot98gclY2FaPZHDRIVizTjrrHqIdtWTu8ssFxXbXE1290f9/76qmZ9CfBq5Hk7HcpkcSPdq8AAcaGykLkhINGREqWfsgHVYtzoXPILXRixA3epCJpDojL5FjFIp0zht+dhYfhNXDT0KrAUjMxj0dQmpNAcUk/37Fij5K/BFfQGo17ZbZmMbqj5i6dmar1mbP9LX8rcN11+Vhaqd8aiEV361Vjc9V3VTlHKPVoSgC45nE48XhwOiEOkgLRYv32hBenMajtY5wI60X6e7R9qgoQ2XvmXCtA/TUdJHB6XP3OHgU7LJyLCrT7WwwvOZMW2ow59BHv6gf0U7Aej4rEAP1p4kndSatzMy1adjjSHjA5W2vulpp1UgSXPYJny9ZOMT8NimLFwYq9nAdlrzFLGlaEMLe77jDIqMrhtwQ==; 5:AZX8so65inRnvtQRn90MA+wOsmHSCP1Jrcxeth055wjG2ag0XXvQYWcpK+j9fvjPNPN1fnBVimeA+VVb466IbJEa9r7ryNgr2s8MG/AM89O2yqMH+w3RN9e1rU6QwdjuQvylQCzs8d7l/0YItY9bOjc89xz7TIDvV77wBtc2Bn0=; 7:4+8mIs34Kj7RotdR7Pc9tl0zHs2v7X0qq8kDwXMwGawBGIvbyXZBtj+SNPRP24/BO8k/yF2cUeRprLCL3LpSpxglBMTr6+6F5AtTgpjzVFOaPsL50DXC4eT9dm7amjJIvxcGrTPfZT8f2ZUuFatWNnvX7sjKyNJwJS2yJiELdiCd4EXeyyLq86rULQHu5scVVdgnSpLidb+vCIwjYBLJDiJqZ0rrnj4zZCZpWZyKh2kdmW4v3VnqZGJBsjEjKoTH x-ms-office365-filtering-correlation-id: 110ab72a-8e01-4a47-2146-08d62c7108d7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR05MB4116; x-ms-traffictypediagnostic: AM0PR05MB4116: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201708071742011)(7699051); SRVR:AM0PR05MB4116; BCL:0; PCL:0; RULEID:; SRVR:AM0PR05MB4116; x-forefront-prvs: 0818724663 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(346002)(396003)(136003)(376002)(189003)(199004)(25786009)(53936002)(4326008)(71190400001)(6512007)(107886003)(71200400001)(6486002)(14444005)(256004)(97736004)(6436002)(105586002)(5660300001)(106356001)(68736007)(8936002)(2616005)(2900100001)(478600001)(52116002)(476003)(81156014)(7736002)(5250100002)(305945005)(486006)(446003)(81166006)(11346002)(6506007)(386003)(76176011)(86362001)(102836004)(6116002)(8676002)(14454004)(2906002)(99286004)(36756003)(3846002)(66066001)(2501003)(26005)(186003)(110136005)(54906003)(316002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB4116; H:AM0PR05MB4435.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: zFJ/EjqJkJGou+AQMTVYb8zaspH5GRGa4Xo45sFpufVINp2oEXWHHI4saAwc0zMP4SvlBZ41RhHsR4k4s49oXOL02J1lTF/o8NEGDpktdlGgTtX76nT3q7xGnhV+FhRPCyTsF0rmdWAm4aNCx8SDkfB9GxOrj8j7MTaDFRtbmkbVFszjjWfACPptpIItaa+R23XlHLAwbNN58mmQPY3wMF3q/DzsiO4/SNbYDuvp1G1tZr6FAJ27/nEToBWIVDf4bV90+fLXWADeYH4yt5CQMMQ+eQAq5Lx2v5xR80SGN+CqmNby4ywxXudZ1Cyd7SqSg6xFPEE1FJdch1IpB+ftGkfCtBGZG+eXhke+SChTAQ8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 110ab72a-8e01-4a47-2146-08d62c7108d7 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2018 16:22:11.7811 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4116 Subject: [dpdk-dev] [PATCH v1] ethdev: fix flow API item/action name conversion X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2018 16:22:13 -0000 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