From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0066.outbound.protection.outlook.com [104.47.41.66]) by dpdk.org (Postfix) with ESMTP id DB66C1B123 for ; Thu, 20 Sep 2018 19:48:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=v4x5qWCh+KlIZvbW+UlpqOv/TrMoww8ZpSqPXtXkI4I=; b=lGtpxDitEXgctB7mezgM3hFWw8OqMqOa2iO46q+wN+4vCzdtEYA59I8jB1JoB1S+gvkggh97EbZs9fQC8aqyHpJ1OjNkd4gCfpD6NWJrzLBIBt1YueAEFlP6SrdZj4VszDpFVLtLotg34Hkc32Y6hYRsgkn/WAwQaEy5DECFyaE= Received: from BY2PR07MB2454.namprd07.prod.outlook.com (10.166.115.22) by BY2PR07MB905.namprd07.prod.outlook.com (10.242.44.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.15; Thu, 20 Sep 2018 17:48:31 +0000 Received: from BY2PR07MB2454.namprd07.prod.outlook.com ([fe80::c4f9:4856:168:b778]) by BY2PR07MB2454.namprd07.prod.outlook.com ([fe80::c4f9:4856:168:b778%4]) with mapi id 15.20.1143.019; Thu, 20 Sep 2018 17:48:30 +0000 From: "Shaikh, Shahed" To: Thomas Monjalon , Ferruh Yigit , Rahul Lakkireddy , Wenzhuo Lu , Qi Zhang , Xiao Wang , Konstantin Ananyev , "Mody, Rasesh" , "Patil, Harish" , Yong Wang CC: "dev@dpdk.org" Thread-Topic: [PATCH] drivers/net: do not redefine bool Thread-Index: AQHUUHfP/4HaN8br6kivj3WLHsazVqT5crcQ Date: Thu, 20 Sep 2018 17:48:30 +0000 Message-ID: References: <20180920001853.23454-1-thomas@monjalon.net> In-Reply-To: <20180920001853.23454-1-thomas@monjalon.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Shahed.Shaikh@cavium.com; x-originating-ip: [114.143.185.87] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BY2PR07MB905; 6:bXTpxWyT8NnExDnJd4Js3++SaPPvhwGCBxZrEdT2G3DdTMmkqeHKGQtr95kxw1OLhZNQ6OXzWqTEPBufshlGvUSWxle60R3NDwedQpcv/3pefHvQhrtNxn0iEqy6qAMJ3SQcQ9lN9ZzSTjLNO9Hxvh4hrGlvhjRq+c/akKD72soHBUAC3z/UFKz/GUMpwPDCSltGaaPySQxvLiBWY9r74HG7BhWhOSkWOpuoUlH12PqBKDBkwgh/QAWL77yScINAaYFYTVej+LFUwZQvpD6lJyYo1TzXQNgrej9TC6Zsarhd3JJi9MxP+fINB7/iD8XyfYJ3jaq80NWyY6EChccsUoaE7kvaVRwGMqu3ecVI96hVFi6wgEA9pSP5KV6Q3141EYtqHtYTqWhmbhKByJsdfne9OwRFxl3H3reqFShlXF3PB/y0MxgXrzSu1HlF7TM8JRwSYylDdYRNlH0zVGZYlw==; 5:ebx1TzCxlrErffNFz3KZiF+xZXvE7nrygtldAWlTNC8NW85S7/bXXjg+Zv6uwsOU0Mg0JZSi+/fbplST7M3CCkw69rXRbQG2GXbMjVb3e4aCP77dgIPJZnFsZwYx0cmU3YjPtLR7tUvoHNNa6iRl+HnT2Td1L9l2bEXNd1hFO58=; 7:xciSwyq0ruu6DUXEeGZycwDj9c9T8N8JLGlffqGBta6/apL7d/qgxYke1XFrk4aw4uLWkWBlFkGQ5oB3uOt8jrtckYDyH17b5L1H46M+30OUpNEegOQVpIP0HxtJSk9qgGIKpuzDvvIsUSgaTr23CJ/e8jrZrvfGTNGEcCOR829lqjjzjNX6VvSchYvY2c3SAP2HVndfHAjI/3ZAS1L58sucHwNSjkl7mDygnJOkt3SVHmAE85R8wRakIvBKwldw x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(366004)(396003)(39860400002)(346002)(376002)(136003)(13464003)(189003)(199004)(4326008)(74316002)(2900100001)(446003)(6506007)(53546011)(305945005)(99286004)(76176011)(106356001)(5660300001)(486006)(8676002)(81156014)(81166006)(7736002)(7696005)(476003)(105586002)(11346002)(55016002)(316002)(6246003)(102836004)(8936002)(110136005)(6436002)(229853002)(2906002)(9686003)(5250100002)(6116002)(26005)(66066001)(72206003)(256004)(14444005)(97736004)(3846002)(14454004)(478600001)(186003)(68736007)(53936002)(71200400001)(25786009)(71190400001)(33656002)(86362001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB905; H:BY2PR07MB2454.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-office365-filtering-correlation-id: 004751c2-b1a9-4764-8d43-08d61f214719 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:BY2PR07MB905; x-ms-traffictypediagnostic: BY2PR07MB905: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699)(61668805478150); 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)(93006095)(93001095)(10201501046)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699051); SRVR:BY2PR07MB905; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB905; x-forefront-prvs: 0801F2E62B received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Ofvlw+7EMp/0GfR07zOD/e9R3Qk6jic3sms8mGaB03/WT/9D1W+yZb4Guo6rug2uEmy5NfusimfEkYeXOebm49u6d0VCnytiEyp1qk/cfoeie2s5/DTYFLCuWBuvG4vaMcf68j+Tgb4kH4dVkSF8pJuJvbHN1s1y0SM+7z+y+0NTeub3y9RcWLKWkocCSLW3oXPAJ7d9pSPDKrflpPD8BxX4zZI+pOQHJlzY/FNShM75jNQXAV1fFv6OZeLKk+oQgoxUkEzEP61OaAHzQvHJwP6NjeMXzpqiiGoQdtHWCFoZ2tFnaJpqc9igLsxG6KmYU9iNVPa9E69LnA3oX/82+d1lp/MXEqFf8SKOvfZV2Dk= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-Network-Message-Id: 004751c2-b1a9-4764-8d43-08d61f214719 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2018 17:48:30.5071 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB905 Subject: Re: [dpdk-dev] [PATCH] drivers/net: do not redefine bool 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: Thu, 20 Sep 2018 17:48:34 -0000 > -----Original Message----- > From: Thomas Monjalon > Sent: Thursday, September 20, 2018 5:49 AM > To: Ferruh Yigit ; Rahul Lakkireddy > ; Wenzhuo Lu ; Qi > Zhang ; Xiao Wang ; > Konstantin Ananyev ; Mody, Rasesh > ; Patil, Harish ; Shaikh= , > Shahed ; Yong Wang > Cc: dev@dpdk.org > Subject: [PATCH] drivers/net: do not redefine bool >=20 > External Email >=20 > When trying to include stdbool.h in DPDK base headers, there are a lot > of conflicts with drivers which redefine bool/true/false > in their compatibility layer. >=20 > It is fixed by including stdbool.h in these drivers. > Some errors with usage of bool type are also fixed in some drivers. >=20 > Note: the driver qede has a surprising mix of bool and int: > (~p_iov->b_pre_fp_hsi & ETH_HSI_VER_MINOR) > where the first variable is boolean and the version is a number. > It is replaced by > !p_iov->b_pre_fp_hsi >=20 > Signed-off-by: Thomas Monjalon > --- > drivers/net/cxgbe/cxgbe_compat.h | 2 +- > drivers/net/e1000/base/e1000_osdep.h | 5 +---- > drivers/net/fm10k/base/fm10k_osdep.h | 8 +------- > drivers/net/fm10k/fm10k_ethdev.c | 4 ++-- > drivers/net/ixgbe/base/ixgbe_osdep.h | 6 +----- > drivers/net/ixgbe/ixgbe_ethdev.c | 16 +++++++++------- > drivers/net/ixgbe/ixgbe_rxtx.c | 2 +- > drivers/net/qede/base/bcm_osal.h | 6 ++---- > drivers/net/qede/base/ecore_vf.c | 3 +-- > drivers/net/qede/qede_ethdev.c | 2 +- > drivers/net/vmxnet3/base/vmxnet3_osdep.h | 3 ++- > 11 files changed, 22 insertions(+), 35 deletions(-) >=20 ... >=20 > /* Delays */ > diff --git a/drivers/net/qede/base/ecore_vf.c > b/drivers/net/qede/base/ecore_vf.c > index d2213f793..f5deb2916 100644 > --- a/drivers/net/qede/base/ecore_vf.c > +++ b/drivers/net/qede/base/ecore_vf.c > @@ -445,8 +445,7 @@ static enum _ecore_status_t ecore_vf_pf_acquire(struc= t > ecore_hwfn *p_hwfn) > } >=20 > /* @DPDK */ > - if ((~p_iov->b_pre_fp_hsi & > - ETH_HSI_VER_MINOR) && > + if (!p_iov->b_pre_fp_hsi && > (resp->pfdev_info.minor_fp_hsi < ETH_HSI_VER_MINOR)) > DP_INFO(p_hwfn, > "PF is using older fastpath HSI;" > diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethde= v.c > index 7bb52b157..53a767b3e 100644 > --- a/drivers/net/qede/qede_ethdev.c > +++ b/drivers/net/qede/qede_ethdev.c > @@ -534,7 +534,7 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev, > bool flg) > params.update_vport_active_tx_flg =3D 1; > params.vport_active_rx_flg =3D flg; > params.vport_active_tx_flg =3D flg; > - if (~qdev->enable_tx_switching & flg) { > + if (!qdev->enable_tx_switching && flg) { > params.update_tx_switching_flg =3D 1; > params.tx_switching_flg =3D !flg; > } For qede changes - Acked-by: Shahed Shaikh